summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/palemoon/app/profile/palemoon.js4
-rw-r--r--application/palemoon/base/content/browser.css8
-rw-r--r--application/palemoon/base/content/browser.js116
-rw-r--r--application/palemoon/base/content/browser.xul1
-rw-r--r--application/palemoon/base/content/newtab/grid.js4
-rw-r--r--application/palemoon/base/content/pageinfo/pageInfo.js2
-rw-r--r--application/palemoon/base/content/sanitizeDialog.js4
-rw-r--r--application/palemoon/base/content/sync/aboutSyncTabs.js2
-rw-r--r--application/palemoon/base/content/sync/addDevice.js6
-rw-r--r--application/palemoon/base/content/sync/genericChange.js4
-rw-r--r--application/palemoon/base/content/sync/setup.js8
-rw-r--r--application/palemoon/base/content/tabbrowser.xml8
-rw-r--r--application/palemoon/components/distribution.js8
-rw-r--r--application/palemoon/components/places/content/bookmarkProperties.js32
-rw-r--r--application/palemoon/components/sessionstore/content/aboutSessionRestore.js6
-rw-r--r--application/palemoon/components/sessionstore/content/content-sessionStore.js2
-rw-r--r--application/palemoon/config/version.txt2
-rw-r--r--application/palemoon/installer/Makefile.in8
-rw-r--r--application/palemoon/installer/package-manifest.in9
-rw-r--r--application/palemoon/installer/windows/moz.build10
-rw-r--r--application/palemoon/modules/Windows8WindowFrameColor.jsm6
-rw-r--r--application/palemoon/themes/linux/browser.css8
-rw-r--r--application/palemoon/themes/linux/jar.mn2
-rw-r--r--application/palemoon/themes/linux/webapps-16.pngbin475 -> 0 bytes
-rw-r--r--application/palemoon/themes/linux/webapps-64.pngbin2942 -> 0 bytes
-rw-r--r--application/palemoon/themes/osx/browser.css20
-rw-r--r--application/palemoon/themes/osx/jar.mn2
-rw-r--r--application/palemoon/themes/osx/webapps-16.pngbin355 -> 0 bytes
-rw-r--r--application/palemoon/themes/osx/webapps-64.pngbin2942 -> 0 bytes
-rw-r--r--application/palemoon/themes/windows/browser.css8
-rw-r--r--application/palemoon/themes/windows/jar.mn2
-rw-r--r--application/palemoon/themes/windows/webapps-16.pngbin355 -> 0 bytes
-rw-r--r--application/palemoon/themes/windows/webapps-64.pngbin2942 -> 0 bytes
-rw-r--r--browser/LICENSE2
-rw-r--r--browser/app/profile/firefox.js9
-rw-r--r--browser/base/content/aboutProviderDirectory.xhtml60
-rw-r--r--browser/base/content/aboutSocialError.xhtml111
-rw-r--r--browser/base/content/browser-context.inc20
-rw-r--r--browser/base/content/browser-doctype.inc2
-rw-r--r--browser/base/content/browser-safebrowsing.js2
-rw-r--r--browser/base/content/browser-sets.inc5
-rw-r--r--browser/base/content/browser-social.js503
-rw-r--r--browser/base/content/browser.css5
-rwxr-xr-xbrowser/base/content/browser.js18
-rw-r--r--browser/base/content/browser.xul26
-rw-r--r--browser/base/content/content.js31
-rwxr-xr-xbrowser/base/content/global-scripts.inc3
-rw-r--r--browser/base/content/nsContextMenu.js47
-rw-r--r--browser/base/content/social-content.js172
-rw-r--r--browser/base/content/tab-content.js2
-rw-r--r--browser/base/content/utilityOverlay.js3
-rw-r--r--browser/base/content/web-panels.xul1
-rw-r--r--browser/base/jar.mn8
-rw-r--r--browser/branding/official/LICENSE16
-rw-r--r--browser/branding/shared/preferences.inc9
-rw-r--r--browser/branding/unofficial/LICENSE9
-rw-r--r--browser/components/about/AboutRedirector.cpp12
-rw-r--r--browser/components/build/nsModule.cpp4
-rw-r--r--browser/components/customizableui/CustomizableWidgets.jsm41
-rw-r--r--browser/components/customizableui/content/panelUI.inc.xul2
-rw-r--r--browser/components/preferences/blocklists.js2
-rw-r--r--browser/components/preferences/in-content/jar.mn2
-rw-r--r--browser/components/preferences/in-content/security.js16
-rw-r--r--browser/components/preferences/in-content/security.xul18
-rwxr-xr-xbrowser/confvars.sh1
-rw-r--r--browser/docs/UITelemetry.rst1
-rw-r--r--browser/installer/package-manifest.in12
-rw-r--r--browser/locales/en-US/chrome/browser/browser.dtd25
-rw-r--r--browser/locales/en-US/chrome/browser/browser.properties23
-rw-r--r--browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties3
-rw-r--r--browser/locales/jar.mn2
-rw-r--r--browser/modules/BrowserUITelemetry.jsm11
-rw-r--r--browser/modules/ReaderParent.jsm116
-rw-r--r--browser/modules/Social.jsm272
-rw-r--r--browser/modules/SocialService.jsm1097
-rw-r--r--browser/modules/moz.build2
-rw-r--r--browser/themes/linux/browser.css50
-rw-r--r--browser/themes/linux/customizableui/panelUI.css8
-rw-r--r--browser/themes/linux/jar.mn4
-rw-r--r--browser/themes/osx/browser.css88
-rw-r--r--browser/themes/osx/jar.mn4
-rw-r--r--browser/themes/shared/aboutProviderDirectory.css30
-rw-r--r--browser/themes/shared/browser.inc2
-rw-r--r--browser/themes/shared/customizableui/panelUI.inc.css4
-rw-r--r--browser/themes/shared/jar.inc.mn4
-rw-r--r--browser/themes/shared/menupanel.inc.css10
-rw-r--r--browser/themes/shared/notification-icons.inc.css22
-rw-r--r--browser/themes/shared/social/gear_clicked.pngbin1262 -> 0 bytes
-rw-r--r--browser/themes/shared/social/gear_default.pngbin1271 -> 0 bytes
-rw-r--r--browser/themes/shared/social/social.inc.css23
-rw-r--r--browser/themes/shared/toolbarbuttons.inc.css8
-rw-r--r--browser/themes/windows/browser.css75
-rw-r--r--browser/themes/windows/customizableui/panelUI.css8
-rw-r--r--browser/themes/windows/jar.mn2
-rw-r--r--build/gyp.mozbuild1
-rw-r--r--build/moz.build5
-rw-r--r--config/config.mk11
-rw-r--r--config/external/nss/crmf/moz.build1
-rw-r--r--devtools/client/responsive.html/browser/tunnel.js4
-rw-r--r--devtools/client/webconsole/console-output.js2
-rw-r--r--devtools/client/webconsole/test/browser_webconsole_block_mixedcontent_securityerrors.js2
-rw-r--r--devtools/client/webconsole/test/browser_webconsole_bug_632817.js4
-rw-r--r--docshell/base/nsDocShell.cpp21
-rw-r--r--docshell/test/navigation/file_bug1379762-1.html32
-rw-r--r--docshell/test/navigation/file_bug1379762-2.html43
-rw-r--r--docshell/test/navigation/mochitest.ini1
-rw-r--r--docshell/test/navigation/test_sessionhistory.html4
-rw-r--r--dom/animation/Animation.cpp6
-rw-r--r--dom/base/nsIDocument.h44
-rw-r--r--dom/base/nsJSEnvironment.cpp109
-rw-r--r--dom/base/test/bug704320.sjs6
-rw-r--r--dom/base/test/referrerHelper.js3
-rw-r--r--dom/canvas/WebGLContext.cpp4
-rw-r--r--dom/fetch/Request.cpp2
-rw-r--r--dom/html/test/test_anchor_ping.html7
-rw-r--r--dom/indexedDB/ActorsParent.cpp12
-rw-r--r--dom/indexedDB/IndexedDatabaseManager.cpp15
-rw-r--r--dom/ipc/ContentChild.cpp82
-rw-r--r--dom/ipc/ContentChild.h15
-rw-r--r--dom/ipc/ContentParent.cpp151
-rw-r--r--dom/ipc/ContentParent.h25
-rw-r--r--dom/ipc/CrashReporterChild.cpp42
-rw-r--r--dom/ipc/CrashReporterChild.h32
-rw-r--r--dom/ipc/CrashReporterParent.cpp63
-rw-r--r--dom/ipc/CrashReporterParent.h70
-rw-r--r--dom/ipc/PContent.ipdl17
-rw-r--r--dom/ipc/PCrashReporter.ipdl31
-rw-r--r--dom/ipc/moz.build8
-rw-r--r--dom/media/android/AndroidMediaPluginHost.cpp4
-rw-r--r--dom/media/gmp/GMPChild.cpp15
-rw-r--r--dom/media/gmp/GMPChild.h3
-rw-r--r--dom/media/gmp/GMPParent.cpp18
-rw-r--r--dom/media/gmp/GMPParent.h3
-rw-r--r--dom/media/gmp/PGMP.ipdl3
-rw-r--r--dom/media/ipc/VideoDecoderChild.cpp1
-rw-r--r--dom/media/ipc/VideoDecoderManagerParent.cpp2
-rw-r--r--dom/media/mediasource/ContainerParser.cpp6
-rw-r--r--dom/media/ogg/OggCodecState.cpp7
-rw-r--r--dom/media/platforms/wmf/DXVA2Manager.cpp9
-rw-r--r--dom/performance/PerformanceResourceTiming.cpp1
-rw-r--r--dom/plugins/ipc/PPluginModule.ipdl15
-rw-r--r--dom/plugins/ipc/PluginModuleChild.cpp68
-rw-r--r--dom/plugins/ipc/PluginModuleChild.h19
-rwxr-xr-xdom/plugins/ipc/PluginModuleParent.cpp198
-rw-r--r--dom/plugins/ipc/PluginModuleParent.h46
-rw-r--r--dom/security/nsContentSecurityManager.cpp9
-rw-r--r--dom/security/nsMixedContentBlocker.cpp191
-rw-r--r--dom/security/nsMixedContentBlocker.h35
-rw-r--r--dom/security/test/csp/test_referrerdirective.html2
-rw-r--r--dom/security/test/hsts/browser.ini19
-rw-r--r--dom/security/test/hsts/browser_hsts-priming_allow_active.js24
-rw-r--r--dom/security/test/hsts/browser_hsts-priming_allow_display.js24
-rw-r--r--dom/security/test/hsts/browser_hsts-priming_block_active.js24
-rw-r--r--dom/security/test/hsts/browser_hsts-priming_block_active_css.js24
-rw-r--r--dom/security/test/hsts/browser_hsts-priming_block_active_with_redir_same.js24
-rw-r--r--dom/security/test/hsts/browser_hsts-priming_block_display.js24
-rw-r--r--dom/security/test/hsts/browser_hsts-priming_cache-timeout.js36
-rw-r--r--dom/security/test/hsts/browser_hsts-priming_hsts_after_mixed.js24
-rw-r--r--dom/security/test/hsts/browser_hsts-priming_no-duplicates.js30
-rw-r--r--dom/security/test/hsts/file_1x1.pngbin17811 -> 0 bytes
-rw-r--r--dom/security/test/hsts/file_priming-top.html84
-rw-r--r--dom/security/test/hsts/file_priming.js4
-rw-r--r--dom/security/test/hsts/file_stylesheet.css0
-rw-r--r--dom/security/test/hsts/file_testserver.sjs66
-rw-r--r--dom/security/test/hsts/head.js308
-rw-r--r--dom/security/test/mixedcontentblocker/test_main.html3
-rw-r--r--dom/security/test/moz.build1
-rw-r--r--dom/tests/mochitest/fetch/test_fetch_cors.js4
-rw-r--r--dom/tests/mochitest/fetch/test_request.js4
-rw-r--r--dom/workers/RuntimeService.cpp13
-rw-r--r--dom/xslt/xslt/txFormatNumberFunctionCall.cpp6
-rw-r--r--extensions/auth/nsAuthSambaNTLM.cpp7
-rw-r--r--gfx/gl/GLContext.cpp4
-rw-r--r--gfx/gl/GLContextProviderEGL.cpp1
-rw-r--r--gfx/gl/GLContextProviderGLX.cpp4
-rw-r--r--gfx/gl/GLContextProviderWGL.cpp5
-rw-r--r--gfx/gl/GLLibraryEGL.cpp4
-rw-r--r--gfx/ipc/GPUChild.cpp7
-rw-r--r--gfx/ipc/GPUChild.h5
-rw-r--r--gfx/ipc/GPUParent.cpp1
-rw-r--r--gfx/ipc/PGPU.ipdl2
-rwxr-xr-xgfx/layers/composite/ContainerLayerComposite.cpp24
-rw-r--r--gfx/layers/d3d11/CompositorD3D11.cpp4
-rw-r--r--gfx/layers/d3d9/CompositorD3D9.cpp5
-rw-r--r--gfx/layers/ipc/CompositorBridgeParent.cpp9
-rw-r--r--gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp3
-rw-r--r--gfx/layers/ipc/ImageBridgeChild.cpp14
-rw-r--r--gfx/layers/opengl/CompositorOGL.cpp5
-rw-r--r--gfx/skia/skia/src/core/SkMath.cpp1
-rw-r--r--gfx/skia/skia/src/core/SkSafeMath.h2
-rw-r--r--gfx/src/gfxCrashReporterUtils.cpp141
-rw-r--r--gfx/src/gfxCrashReporterUtils.h51
-rw-r--r--gfx/src/moz.build2
-rw-r--r--gfx/thebes/ContextStateTracker.cpp12
-rw-r--r--gfx/thebes/DeviceManagerDx.cpp2
-rw-r--r--gfx/thebes/DeviceManagerDx.h2
-rw-r--r--gfx/thebes/gfxPlatform.cpp2
-rwxr-xr-xgfx/thebes/gfxWindowsPlatform.cpp7
-rw-r--r--gfx/thebes/gfxWindowsPlatform.h1
-rw-r--r--image/decoders/nsPNGDecoder.cpp18
-rw-r--r--image/imgLoader.cpp13
-rw-r--r--intl/hyphenation/glue/hnjalloc.h6
-rw-r--r--intl/hyphenation/glue/hnjstdio.cpp51
-rw-r--r--intl/hyphenation/hyphen/hyphen.c22
-rw-r--r--ipc/glue/BackgroundUtils.cpp9
-rw-r--r--ipc/glue/CrashReporterClient.cpp66
-rw-r--r--ipc/glue/CrashReporterClient.h76
-rw-r--r--ipc/glue/CrashReporterHost.cpp25
-rw-r--r--ipc/glue/CrashReporterHost.h43
-rw-r--r--ipc/glue/CrashReporterMetadataShmem.cpp212
-rw-r--r--ipc/glue/CrashReporterMetadataShmem.h44
-rw-r--r--ipc/glue/moz.build6
-rw-r--r--js/ipc/JavaScriptParent.cpp1
-rw-r--r--js/xpconnect/src/XPCJSContext.cpp10
-rw-r--r--layout/base/RestyleTracker.cpp18
-rw-r--r--layout/base/RestyleTracker.h12
-rw-r--r--layout/base/nsDocumentViewer.cpp15
-rw-r--r--layout/base/nsPresContext.cpp13
-rw-r--r--layout/base/nsPresShell.cpp17
-rw-r--r--media/libopus/silk/NLSF_stabilize.c2
-rw-r--r--media/mtransport/third_party/nICEr/nicer.gyp12
-rw-r--r--media/webrtc/signaling/signaling.gyp7
-rw-r--r--media/webrtc/trunk/build/common.gypi2
-rw-r--r--media/webrtc/trunk/webrtc/build/common.gypi7
-rw-r--r--media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi21
-rw-r--r--media/webrtc/trunk/webrtc/system_wrappers/cpu_features_webrtc.gyp2
-rw-r--r--media/webrtc/trunk/webrtc/system_wrappers/system_wrappers.gyp2
-rw-r--r--memory/replace/dmd/DMD.cpp2122
-rw-r--r--memory/replace/dmd/DMD.h310
-rw-r--r--memory/replace/dmd/README2
-rw-r--r--memory/replace/dmd/block_analyzer.py261
-rwxr-xr-xmemory/replace/dmd/dmd.py890
-rw-r--r--memory/replace/dmd/moz.build39
-rw-r--r--memory/replace/dmd/test/SmokeDMD.cpp379
-rw-r--r--memory/replace/dmd/test/basic-scan-32-expected.txt25
-rw-r--r--memory/replace/dmd/test/basic-scan-64-expected.txt25
-rw-r--r--memory/replace/dmd/test/complete-empty-cumulative-expected.txt18
-rw-r--r--memory/replace/dmd/test/complete-empty-dark-matter-expected.txt29
-rw-r--r--memory/replace/dmd/test/complete-empty-live-expected.txt18
-rw-r--r--memory/replace/dmd/test/complete-full1-dark-matter-expected.txt265
-rw-r--r--memory/replace/dmd/test/complete-full1-live-expected.txt127
-rw-r--r--memory/replace/dmd/test/complete-full2-cumulative-expected.txt173
-rw-r--r--memory/replace/dmd/test/complete-full2-dark-matter-expected.txt140
-rw-r--r--memory/replace/dmd/test/complete-partial-live-expected.txt56
-rw-r--r--memory/replace/dmd/test/moz.build26
-rw-r--r--memory/replace/dmd/test/scan-test.py83
-rw-r--r--memory/replace/dmd/test/script-diff-dark-matter-expected.txt127
-rw-r--r--memory/replace/dmd/test/script-diff-dark-matter1.json51
-rw-r--r--memory/replace/dmd/test/script-diff-dark-matter2.json51
-rw-r--r--memory/replace/dmd/test/script-diff-live-expected.txt81
-rw-r--r--memory/replace/dmd/test/script-diff-live1.json51
-rw-r--r--memory/replace/dmd/test/script-diff-live2.json53
-rw-r--r--memory/replace/dmd/test/script-ignore-alloc-fns-expected.txt72
-rw-r--r--memory/replace/dmd/test/script-ignore-alloc-fns.json46
-rw-r--r--memory/replace/dmd/test/script-max-frames-1-expected.txt26
-rw-r--r--memory/replace/dmd/test/script-max-frames-3-expected.txt48
-rw-r--r--memory/replace/dmd/test/script-max-frames-8-expected.txt69
-rw-r--r--memory/replace/dmd/test/script-max-frames.json43
-rw-r--r--memory/replace/dmd/test/script-sort-by-num-blocks-expected.txt46
-rw-r--r--memory/replace/dmd/test/script-sort-by-req-expected.txt46
-rw-r--r--memory/replace/dmd/test/script-sort-by-slop-expected.txt46
-rw-r--r--memory/replace/dmd/test/script-sort-by-usable-expected.txt46
-rw-r--r--memory/replace/dmd/test/script-sort-by.json.gzbin292 -> 0 bytes
-rw-r--r--memory/replace/dmd/test/test_dmd.js226
-rw-r--r--memory/replace/dmd/test/xpcshell.ini35
-rw-r--r--memory/replace/moz.build2
-rw-r--r--mobile/android/app/mobile.js2
-rw-r--r--mobile/android/chrome/content/browser.js8
-rw-r--r--mobile/android/components/MobileComponents.manifest2
-rw-r--r--mobile/android/confvars.sh1
-rw-r--r--mobile/android/installer/package-manifest.in11
-rw-r--r--mobile/android/moz.configure1
-rw-r--r--mobile/android/themes/core/jar.mn4
-rw-r--r--modules/freetype2/CMakeLists.txt397
-rw-r--r--modules/freetype2/ChangeLog2816
-rw-r--r--modules/freetype2/ChangeLog.208
-rw-r--r--modules/freetype2/ChangeLog.2157
-rw-r--r--modules/freetype2/ChangeLog.2220
-rw-r--r--modules/freetype2/ChangeLog.2386
-rw-r--r--modules/freetype2/ChangeLog.2496
-rw-r--r--modules/freetype2/ChangeLog.2524
-rw-r--r--modules/freetype2/ChangeLog.2648
-rw-r--r--modules/freetype2/ChangeLog.272106
-rw-r--r--modules/freetype2/ChangeLog.283136
-rw-r--r--modules/freetype2/Jamfile4
-rw-r--r--modules/freetype2/Jamrules2
-rw-r--r--modules/freetype2/Makefile2
-rw-r--r--modules/freetype2/README18
-rw-r--r--modules/freetype2/README.git2
-rw-r--r--modules/freetype2/README.moz-patches2
-rwxr-xr-xmodules/freetype2/autogen.sh2
-rw-r--r--modules/freetype2/builds/amiga/README2
-rw-r--r--modules/freetype2/builds/amiga/include/config/ftconfig.h2
-rw-r--r--modules/freetype2/builds/amiga/include/config/ftmodule.h2
-rw-r--r--modules/freetype2/builds/amiga/makefile12
-rw-r--r--modules/freetype2/builds/amiga/makefile.os412
-rw-r--r--modules/freetype2/builds/amiga/smakefile10
-rw-r--r--modules/freetype2/builds/amiga/src/base/ftdebug.c2
-rw-r--r--modules/freetype2/builds/amiga/src/base/ftsystem.c2
-rw-r--r--modules/freetype2/builds/ansi/ansi-def.mk2
-rw-r--r--modules/freetype2/builds/ansi/ansi.mk2
-rw-r--r--modules/freetype2/builds/beos/beos-def.mk2
-rw-r--r--modules/freetype2/builds/beos/beos.mk2
-rw-r--r--modules/freetype2/builds/beos/detect.mk2
-rw-r--r--modules/freetype2/builds/cmake/FindHarfBuzz.cmake57
-rw-r--r--modules/freetype2/builds/cmake/iOS.cmake2
-rwxr-xr-xmodules/freetype2/builds/cmake/testbuild.sh2
-rw-r--r--modules/freetype2/builds/compiler/ansi-cc.mk2
-rw-r--r--modules/freetype2/builds/compiler/bcc-dev.mk2
-rw-r--r--modules/freetype2/builds/compiler/bcc.mk2
-rw-r--r--modules/freetype2/builds/compiler/emx.mk2
-rw-r--r--modules/freetype2/builds/compiler/gcc-dev.mk2
-rw-r--r--modules/freetype2/builds/compiler/gcc.mk2
-rw-r--r--modules/freetype2/builds/compiler/intelc.mk2
-rw-r--r--modules/freetype2/builds/compiler/unix-lcc.mk2
-rw-r--r--modules/freetype2/builds/compiler/visualage.mk2
-rw-r--r--modules/freetype2/builds/compiler/visualc.mk2
-rw-r--r--modules/freetype2/builds/compiler/watcom.mk2
-rw-r--r--modules/freetype2/builds/compiler/win-lcc.mk2
-rw-r--r--modules/freetype2/builds/detect.mk66
-rw-r--r--modules/freetype2/builds/dos/detect.mk4
-rw-r--r--modules/freetype2/builds/dos/dos-def.mk2
-rw-r--r--modules/freetype2/builds/dos/dos-emx.mk2
-rw-r--r--modules/freetype2/builds/dos/dos-gcc.mk2
-rw-r--r--modules/freetype2/builds/dos/dos-wat.mk2
-rw-r--r--modules/freetype2/builds/exports.mk2
-rw-r--r--modules/freetype2/builds/freetype.mk28
-rw-r--r--modules/freetype2/builds/link_dos.mk2
-rw-r--r--modules/freetype2/builds/link_std.mk2
-rw-r--r--modules/freetype2/builds/mac/FreeType.m68k_cfm.make.txt3
-rw-r--r--modules/freetype2/builds/mac/FreeType.m68k_far.make.txt3
-rw-r--r--modules/freetype2/builds/mac/FreeType.ppc_carbon.make.txt3
-rw-r--r--modules/freetype2/builds/mac/FreeType.ppc_classic.make.txt3
-rw-r--r--modules/freetype2/builds/mac/ftmac.c6
-rw-r--r--modules/freetype2/builds/modules.mk6
-rw-r--r--modules/freetype2/builds/newline1
-rw-r--r--modules/freetype2/builds/os2/detect.mk4
-rw-r--r--modules/freetype2/builds/os2/os2-def.mk2
-rw-r--r--modules/freetype2/builds/os2/os2-dev.mk2
-rw-r--r--modules/freetype2/builds/os2/os2-gcc.mk2
-rw-r--r--modules/freetype2/builds/symbian/bld.inf12
-rw-r--r--modules/freetype2/builds/symbian/freetype.mmp14
-rw-r--r--modules/freetype2/builds/toplevel.mk5
-rwxr-xr-xmodules/freetype2/builds/unix/config.guess580
-rwxr-xr-xmodules/freetype2/builds/unix/config.sub265
-rwxr-xr-xmodules/freetype2/builds/unix/configure591
-rw-r--r--modules/freetype2/builds/unix/configure.ac105
-rw-r--r--modules/freetype2/builds/unix/configure.raw103
-rw-r--r--modules/freetype2/builds/unix/detect.mk2
-rw-r--r--modules/freetype2/builds/unix/freetype-config.in106
-rw-r--r--modules/freetype2/builds/unix/freetype2.in2
-rw-r--r--modules/freetype2/builds/unix/freetype2.m42
-rw-r--r--modules/freetype2/builds/unix/ft-munmap.m42
-rw-r--r--modules/freetype2/builds/unix/ftconfig.in94
-rw-r--r--modules/freetype2/builds/unix/ftsystem.c2
-rw-r--r--modules/freetype2/builds/unix/install.mk37
-rw-r--r--modules/freetype2/builds/unix/pkg.m42
-rw-r--r--modules/freetype2/builds/unix/unix-cc.in15
-rw-r--r--modules/freetype2/builds/unix/unix-def.in10
-rw-r--r--modules/freetype2/builds/unix/unix-dev.mk2
-rw-r--r--modules/freetype2/builds/unix/unix-lcc.mk2
-rw-r--r--modules/freetype2/builds/unix/unix.mk2
-rw-r--r--modules/freetype2/builds/unix/unixddef.mk2
-rw-r--r--modules/freetype2/builds/vms/ftconfig.h121
-rw-r--r--modules/freetype2/builds/vms/ftsystem.c2
-rw-r--r--modules/freetype2/builds/wince/ftdebug.c4
-rw-r--r--modules/freetype2/builds/wince/vc2005-ce/freetype.vcproj3047
-rw-r--r--modules/freetype2/builds/wince/vc2005-ce/index.html10
-rw-r--r--modules/freetype2/builds/wince/vc2008-ce/freetype.vcproj10065
-rw-r--r--modules/freetype2/builds/wince/vc2008-ce/index.html10
-rw-r--r--modules/freetype2/builds/windows/detect.mk28
-rw-r--r--modules/freetype2/builds/windows/ftdebug.c4
-rw-r--r--modules/freetype2/builds/windows/vc2005/freetype.vcproj453
-rw-r--r--modules/freetype2/builds/windows/vc2005/index.html10
-rw-r--r--modules/freetype2/builds/windows/vc2008/freetype.vcproj1536
-rw-r--r--modules/freetype2/builds/windows/vc2008/index.html10
-rw-r--r--modules/freetype2/builds/windows/vc2010/freetype.sln36
-rw-r--r--modules/freetype2/builds/windows/vc2010/freetype.vcxproj1504
-rw-r--r--modules/freetype2/builds/windows/vc2010/freetype.vcxproj.filters88
-rw-r--r--modules/freetype2/builds/windows/vc2010/index.html42
-rw-r--r--modules/freetype2/builds/windows/visualc/freetype.dsp47
-rw-r--r--modules/freetype2/builds/windows/visualc/freetype.vcproj1536
-rw-r--r--modules/freetype2/builds/windows/visualc/index.html10
-rw-r--r--modules/freetype2/builds/windows/visualce/freetype.dsp47
-rw-r--r--modules/freetype2/builds/windows/visualce/freetype.vcproj10284
-rw-r--r--modules/freetype2/builds/windows/visualce/index.html10
-rw-r--r--modules/freetype2/builds/windows/w32-bcc.mk2
-rw-r--r--modules/freetype2/builds/windows/w32-bccd.mk2
-rw-r--r--modules/freetype2/builds/windows/w32-dev.mk2
-rw-r--r--modules/freetype2/builds/windows/w32-gcc.mk2
-rw-r--r--modules/freetype2/builds/windows/w32-icc.mk2
-rw-r--r--modules/freetype2/builds/windows/w32-intl.mk2
-rw-r--r--modules/freetype2/builds/windows/w32-lcc.mk2
-rw-r--r--modules/freetype2/builds/windows/w32-mingw32.mk2
-rw-r--r--modules/freetype2/builds/windows/w32-vcc.mk2
-rw-r--r--modules/freetype2/builds/windows/w32-wat.mk2
-rw-r--r--modules/freetype2/builds/windows/win32-def.mk2
-rwxr-xr-xmodules/freetype2/configure6
-rw-r--r--modules/freetype2/devel/ft2build.h2
-rw-r--r--modules/freetype2/devel/ftoption.h114
-rw-r--r--modules/freetype2/docs/CHANGES403
-rw-r--r--modules/freetype2/docs/CUSTOMIZE2
-rw-r--r--modules/freetype2/docs/DEBUG4
-rw-r--r--modules/freetype2/docs/FTL.TXT2
-rw-r--r--modules/freetype2/docs/INSTALL8
-rw-r--r--modules/freetype2/docs/INSTALL.ANY4
-rw-r--r--modules/freetype2/docs/INSTALL.CROSS4
-rw-r--r--modules/freetype2/docs/INSTALL.GNU6
-rw-r--r--modules/freetype2/docs/INSTALL.MAC42
-rw-r--r--modules/freetype2/docs/INSTALL.UNIX7
-rw-r--r--modules/freetype2/docs/INSTALL.VMS14
-rw-r--r--modules/freetype2/docs/MAKEPP2
-rw-r--r--modules/freetype2/docs/TODO2
-rw-r--r--modules/freetype2/docs/VERSIONS.TXT8
-rw-r--r--modules/freetype2/docs/formats.txt31
-rw-r--r--modules/freetype2/docs/freetype-config.150
-rw-r--r--modules/freetype2/docs/raster.txt2
-rw-r--r--modules/freetype2/docs/reference/ft2-auto_hinter.html316
-rw-r--r--modules/freetype2/docs/reference/ft2-base_interface.html642
-rw-r--r--modules/freetype2/docs/reference/ft2-basic_types.html12
-rw-r--r--modules/freetype2/docs/reference/ft2-bdf_fonts.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-bitmap_handling.html8
-rw-r--r--modules/freetype2/docs/reference/ft2-bzip2.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-cache_subsystem.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-cff_driver.html125
-rw-r--r--modules/freetype2/docs/reference/ft2-cid_fonts.html8
-rw-r--r--modules/freetype2/docs/reference/ft2-computations.html27
-rw-r--r--modules/freetype2/docs/reference/ft2-error_code_values.html10
-rw-r--r--modules/freetype2/docs/reference/ft2-error_enumerations.html10
-rw-r--r--modules/freetype2/docs/reference/ft2-font_formats.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-gasp_table.html13
-rw-r--r--modules/freetype2/docs/reference/ft2-glyph_management.html13
-rw-r--r--modules/freetype2/docs/reference/ft2-glyph_stroker.html18
-rw-r--r--modules/freetype2/docs/reference/ft2-glyph_variants.html40
-rw-r--r--modules/freetype2/docs/reference/ft2-gx_validation.html8
-rw-r--r--modules/freetype2/docs/reference/ft2-gzip.html9
-rw-r--r--modules/freetype2/docs/reference/ft2-header_file_macros.html151
-rw-r--r--modules/freetype2/docs/reference/ft2-header_inclusion.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-incremental.html24
-rw-r--r--modules/freetype2/docs/reference/ft2-index.html550
-rw-r--r--modules/freetype2/docs/reference/ft2-lcd_filtering.html28
-rw-r--r--modules/freetype2/docs/reference/ft2-list_processing.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-lzw.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-mac_specific.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-module_management.html85
-rw-r--r--modules/freetype2/docs/reference/ft2-multiple_masters.html241
-rw-r--r--modules/freetype2/docs/reference/ft2-ot_validation.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-outline_processing.html36
-rw-r--r--modules/freetype2/docs/reference/ft2-parameter_tags.html232
-rw-r--r--modules/freetype2/docs/reference/ft2-pcf_driver.html111
-rw-r--r--modules/freetype2/docs/reference/ft2-pfr_fonts.html12
-rw-r--r--modules/freetype2/docs/reference/ft2-properties.html704
-rw-r--r--modules/freetype2/docs/reference/ft2-quick_advance.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-raster.html16
-rw-r--r--modules/freetype2/docs/reference/ft2-sfnt_names.html98
-rw-r--r--modules/freetype2/docs/reference/ft2-sizes_management.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-system_interface.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-t1_cid_driver.html114
-rw-r--r--modules/freetype2/docs/reference/ft2-toc.html24
-rw-r--r--modules/freetype2/docs/reference/ft2-truetype_engine.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-truetype_tables.html1129
-rw-r--r--modules/freetype2/docs/reference/ft2-tt_driver.html143
-rw-r--r--modules/freetype2/docs/reference/ft2-type1_tables.html15
-rw-r--r--modules/freetype2/docs/reference/ft2-user_allocation.html6
-rw-r--r--modules/freetype2/docs/reference/ft2-version.html8
-rw-r--r--modules/freetype2/docs/reference/ft2-winfnt_fonts.html8
-rw-r--r--modules/freetype2/docs/release2
-rw-r--r--modules/freetype2/include/freetype/config/ftconfig.h117
-rw-r--r--modules/freetype2/include/freetype/config/ftheader.h139
-rw-r--r--modules/freetype2/include/freetype/config/ftoption.h188
-rw-r--r--modules/freetype2/include/freetype/config/ftstdlib.h2
-rw-r--r--modules/freetype2/include/freetype/freetype.h1166
-rw-r--r--modules/freetype2/include/freetype/ftadvanc.h2
-rw-r--r--modules/freetype2/include/freetype/ftautoh.h511
-rw-r--r--modules/freetype2/include/freetype/ftbbox.h4
-rw-r--r--modules/freetype2/include/freetype/ftbdf.h2
-rw-r--r--modules/freetype2/include/freetype/ftbitmap.h4
-rw-r--r--modules/freetype2/include/freetype/ftbzip2.h2
-rw-r--r--modules/freetype2/include/freetype/ftcache.h17
-rw-r--r--modules/freetype2/include/freetype/ftcffdrv.h275
-rw-r--r--modules/freetype2/include/freetype/ftchapters.h4
-rw-r--r--modules/freetype2/include/freetype/ftcid.h4
-rw-r--r--modules/freetype2/include/freetype/ftdriver.h1225
-rw-r--r--modules/freetype2/include/freetype/fterrdef.h6
-rw-r--r--modules/freetype2/include/freetype/fterrors.h10
-rw-r--r--modules/freetype2/include/freetype/ftfntfmt.h2
-rw-r--r--modules/freetype2/include/freetype/ftgasp.h21
-rw-r--r--modules/freetype2/include/freetype/ftglyph.h17
-rw-r--r--modules/freetype2/include/freetype/ftgxval.h10
-rw-r--r--modules/freetype2/include/freetype/ftgzip.h5
-rw-r--r--modules/freetype2/include/freetype/ftimage.h58
-rw-r--r--modules/freetype2/include/freetype/ftincrem.h15
-rw-r--r--modules/freetype2/include/freetype/ftlcdfil.h43
-rw-r--r--modules/freetype2/include/freetype/ftlist.h2
-rw-r--r--modules/freetype2/include/freetype/ftlzw.h2
-rw-r--r--modules/freetype2/include/freetype/ftmac.h11
-rw-r--r--modules/freetype2/include/freetype/ftmm.h295
-rw-r--r--modules/freetype2/include/freetype/ftmodapi.h66
-rw-r--r--modules/freetype2/include/freetype/ftmoderr.h2
-rw-r--r--modules/freetype2/include/freetype/ftotval.h2
-rw-r--r--modules/freetype2/include/freetype/ftoutln.h14
-rw-r--r--modules/freetype2/include/freetype/ftparams.h205
-rw-r--r--modules/freetype2/include/freetype/ftpfr.h8
-rw-r--r--modules/freetype2/include/freetype/ftrender.h4
-rw-r--r--modules/freetype2/include/freetype/ftsizes.h2
-rw-r--r--modules/freetype2/include/freetype/ftsnames.h145
-rw-r--r--modules/freetype2/include/freetype/ftstroke.h14
-rw-r--r--modules/freetype2/include/freetype/ftsynth.h2
-rw-r--r--modules/freetype2/include/freetype/ftsystem.h2
-rw-r--r--modules/freetype2/include/freetype/fttrigon.h2
-rw-r--r--modules/freetype2/include/freetype/ftttdrv.h329
-rw-r--r--modules/freetype2/include/freetype/fttypes.h4
-rw-r--r--modules/freetype2/include/freetype/ftwinfnt.h4
-rw-r--r--modules/freetype2/include/freetype/internal/autohint.h2
-rw-r--r--modules/freetype2/include/freetype/internal/cffotypes.h108
-rw-r--r--modules/freetype2/include/freetype/internal/cfftypes.h (renamed from modules/freetype2/src/cff/cfftypes.h)16
-rw-r--r--modules/freetype2/include/freetype/internal/ftcalc.h38
-rw-r--r--modules/freetype2/include/freetype/internal/ftdebug.h2
-rw-r--r--modules/freetype2/include/freetype/internal/ftdrv.h (renamed from modules/freetype2/include/freetype/internal/ftdriver.h)12
-rw-r--r--modules/freetype2/include/freetype/internal/ftgloadr.h2
-rw-r--r--modules/freetype2/include/freetype/internal/ftmemory.h4
-rw-r--r--modules/freetype2/include/freetype/internal/ftobjs.h157
-rw-r--r--modules/freetype2/include/freetype/internal/ftpic.h2
-rw-r--r--modules/freetype2/include/freetype/internal/ftpsprop.h48
-rw-r--r--modules/freetype2/include/freetype/internal/ftrfork.h2
-rw-r--r--modules/freetype2/include/freetype/internal/ftserv.h187
-rw-r--r--modules/freetype2/include/freetype/internal/ftstream.h8
-rw-r--r--modules/freetype2/include/freetype/internal/fttrace.h9
-rw-r--r--modules/freetype2/include/freetype/internal/ftvalid.h2
-rw-r--r--modules/freetype2/include/freetype/internal/internal.h8
-rw-r--r--modules/freetype2/include/freetype/internal/psaux.h503
-rw-r--r--modules/freetype2/include/freetype/internal/pshints.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svbdf.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svcfftl.h112
-rw-r--r--modules/freetype2/include/freetype/internal/services/svcid.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svfntfmt.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svgldict.h6
-rw-r--r--modules/freetype2/include/freetype/internal/services/svgxval.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svkern.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svmetric.h10
-rw-r--r--modules/freetype2/include/freetype/internal/services/svmm.h58
-rw-r--r--modules/freetype2/include/freetype/internal/services/svotval.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svpfr.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svpostnm.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svprop.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svpscmap.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svpsinfo.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svsfnt.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svttcmap.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svtteng.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svttglyf.h2
-rw-r--r--modules/freetype2/include/freetype/internal/services/svwinfnt.h2
-rw-r--r--modules/freetype2/include/freetype/internal/sfnt.h42
-rw-r--r--modules/freetype2/include/freetype/internal/t1types.h2
-rw-r--r--modules/freetype2/include/freetype/internal/tttypes.h148
-rw-r--r--modules/freetype2/include/freetype/t1tables.h15
-rw-r--r--modules/freetype2/include/freetype/ttnameid.h627
-rw-r--r--modules/freetype2/include/freetype/tttables.h363
-rw-r--r--modules/freetype2/include/freetype/tttags.h8
-rw-r--r--modules/freetype2/include/freetype/ttunpat.h63
-rw-r--r--modules/freetype2/include/ft2build.h2
-rw-r--r--modules/freetype2/modules.cfg31
-rw-r--r--modules/freetype2/src/Jamfile2
-rw-r--r--modules/freetype2/src/autofit/Jamfile2
-rw-r--r--modules/freetype2/src/autofit/afangles.c2
-rw-r--r--modules/freetype2/src/autofit/afblue.c294
-rw-r--r--modules/freetype2/src/autofit/afblue.cin2
-rw-r--r--modules/freetype2/src/autofit/afblue.dat374
-rw-r--r--modules/freetype2/src/autofit/afblue.h372
-rw-r--r--modules/freetype2/src/autofit/afblue.hin2
-rw-r--r--modules/freetype2/src/autofit/afcjk.c26
-rw-r--r--modules/freetype2/src/autofit/afcjk.h2
-rw-r--r--modules/freetype2/src/autofit/afcover.h2
-rw-r--r--modules/freetype2/src/autofit/afdummy.c2
-rw-r--r--modules/freetype2/src/autofit/afdummy.h2
-rw-r--r--modules/freetype2/src/autofit/aferrors.h2
-rw-r--r--modules/freetype2/src/autofit/afglobal.c5
-rw-r--r--modules/freetype2/src/autofit/afglobal.h2
-rw-r--r--modules/freetype2/src/autofit/afhints.c21
-rw-r--r--modules/freetype2/src/autofit/afhints.h4
-rw-r--r--modules/freetype2/src/autofit/afindic.c4
-rw-r--r--modules/freetype2/src/autofit/afindic.h2
-rw-r--r--modules/freetype2/src/autofit/aflatin.c148
-rw-r--r--modules/freetype2/src/autofit/aflatin.h2
-rw-r--r--modules/freetype2/src/autofit/aflatin2.c34
-rw-r--r--modules/freetype2/src/autofit/aflatin2.h2
-rw-r--r--modules/freetype2/src/autofit/afloader.c125
-rw-r--r--modules/freetype2/src/autofit/afloader.h2
-rw-r--r--modules/freetype2/src/autofit/afmodule.c25
-rw-r--r--modules/freetype2/src/autofit/afmodule.h2
-rw-r--r--modules/freetype2/src/autofit/afpic.c2
-rw-r--r--modules/freetype2/src/autofit/afpic.h4
-rw-r--r--modules/freetype2/src/autofit/afranges.c407
-rw-r--r--modules/freetype2/src/autofit/afranges.h2
-rw-r--r--modules/freetype2/src/autofit/afscript.h169
-rw-r--r--modules/freetype2/src/autofit/afshaper.c34
-rw-r--r--modules/freetype2/src/autofit/afshaper.h2
-rw-r--r--modules/freetype2/src/autofit/afstyles.h186
-rw-r--r--modules/freetype2/src/autofit/aftypes.h9
-rw-r--r--modules/freetype2/src/autofit/afwarp.c3
-rw-r--r--modules/freetype2/src/autofit/afwarp.h2
-rw-r--r--modules/freetype2/src/autofit/afwrtsys.h2
-rw-r--r--modules/freetype2/src/autofit/autofit.c25
-rw-r--r--modules/freetype2/src/autofit/module.mk2
-rw-r--r--modules/freetype2/src/autofit/rules.mk2
-rw-r--r--modules/freetype2/src/base/Jamfile7
-rw-r--r--modules/freetype2/src/base/basepic.c2
-rw-r--r--modules/freetype2/src/base/basepic.h2
-rw-r--r--modules/freetype2/src/base/ftadvanc.c16
-rw-r--r--modules/freetype2/src/base/ftapi.c4
-rw-r--r--modules/freetype2/src/base/ftbase.c12
-rw-r--r--modules/freetype2/src/base/ftbase.h8
-rw-r--r--modules/freetype2/src/base/ftbbox.c2
-rw-r--r--modules/freetype2/src/base/ftbdf.c2
-rw-r--r--modules/freetype2/src/base/ftbitmap.c82
-rw-r--r--modules/freetype2/src/base/ftcalc.c152
-rw-r--r--modules/freetype2/src/base/ftcid.c2
-rw-r--r--modules/freetype2/src/base/ftdbgmem.c10
-rw-r--r--modules/freetype2/src/base/ftdebug.c4
-rw-r--r--modules/freetype2/src/base/ftfntfmt.c2
-rw-r--r--modules/freetype2/src/base/ftfstype.c2
-rw-r--r--modules/freetype2/src/base/ftgasp.c2
-rw-r--r--modules/freetype2/src/base/ftgloadr.c2
-rw-r--r--modules/freetype2/src/base/ftglyph.c18
-rw-r--r--modules/freetype2/src/base/ftgxval.c4
-rw-r--r--modules/freetype2/src/base/ftinit.c37
-rw-r--r--modules/freetype2/src/base/ftlcdfil.c298
-rw-r--r--modules/freetype2/src/base/ftmac.c16
-rw-r--r--modules/freetype2/src/base/ftmm.c199
-rw-r--r--modules/freetype2/src/base/ftobjs.c628
-rw-r--r--modules/freetype2/src/base/ftotval.c2
-rw-r--r--modules/freetype2/src/base/ftoutln.c18
-rw-r--r--modules/freetype2/src/base/ftpatent.c4
-rw-r--r--modules/freetype2/src/base/ftpfr.c2
-rw-r--r--modules/freetype2/src/base/ftpic.c2
-rw-r--r--modules/freetype2/src/base/ftpsprop.c285
-rw-r--r--modules/freetype2/src/base/ftrfork.c14
-rw-r--r--modules/freetype2/src/base/ftsnames.c58
-rw-r--r--modules/freetype2/src/base/ftstream.c2
-rw-r--r--modules/freetype2/src/base/ftstroke.c2
-rw-r--r--modules/freetype2/src/base/ftsynth.c6
-rw-r--r--modules/freetype2/src/base/ftsystem.c2
-rw-r--r--modules/freetype2/src/base/fttrigon.c2
-rw-r--r--modules/freetype2/src/base/fttype1.c2
-rw-r--r--modules/freetype2/src/base/ftutil.c12
-rw-r--r--modules/freetype2/src/base/ftver.rc61
-rw-r--r--modules/freetype2/src/base/ftwinfnt.c2
-rw-r--r--modules/freetype2/src/base/rules.mk5
-rw-r--r--modules/freetype2/src/bdf/Jamfile2
-rw-r--r--modules/freetype2/src/bdf/README2
-rw-r--r--modules/freetype2/src/bdf/bdf.c3
-rw-r--r--modules/freetype2/src/bdf/bdfdrivr.c146
-rw-r--r--modules/freetype2/src/bdf/bdflib.c40
-rw-r--r--modules/freetype2/src/bzip2/Jamfile2
-rw-r--r--modules/freetype2/src/bzip2/ftbzip2.c2
-rw-r--r--modules/freetype2/src/bzip2/rules.mk2
-rw-r--r--modules/freetype2/src/cache/Jamfile2
-rw-r--r--modules/freetype2/src/cache/ftcache.c11
-rw-r--r--modules/freetype2/src/cache/ftcbasic.c40
-rw-r--r--modules/freetype2/src/cache/ftccache.c2
-rw-r--r--modules/freetype2/src/cache/ftccache.h2
-rw-r--r--modules/freetype2/src/cache/ftccback.h2
-rw-r--r--modules/freetype2/src/cache/ftccmap.c2
-rw-r--r--modules/freetype2/src/cache/ftcerror.h2
-rw-r--r--modules/freetype2/src/cache/ftcglyph.c2
-rw-r--r--modules/freetype2/src/cache/ftcglyph.h2
-rw-r--r--modules/freetype2/src/cache/ftcimage.c2
-rw-r--r--modules/freetype2/src/cache/ftcimage.h2
-rw-r--r--modules/freetype2/src/cache/ftcmanag.c2
-rw-r--r--modules/freetype2/src/cache/ftcmanag.h2
-rw-r--r--modules/freetype2/src/cache/ftcmru.c2
-rw-r--r--modules/freetype2/src/cache/ftcmru.h2
-rw-r--r--modules/freetype2/src/cache/ftcsbits.c2
-rw-r--r--modules/freetype2/src/cache/ftcsbits.h2
-rw-r--r--modules/freetype2/src/cache/rules.mk2
-rw-r--r--modules/freetype2/src/cff/Jamfile11
-rw-r--r--modules/freetype2/src/cff/cf2intrp.c1913
-rw-r--r--modules/freetype2/src/cff/cff.c19
-rw-r--r--modules/freetype2/src/cff/cffcmap.c2
-rw-r--r--modules/freetype2/src/cff/cffcmap.h4
-rw-r--r--modules/freetype2/src/cff/cffdrivr.c404
-rw-r--r--modules/freetype2/src/cff/cffdrivr.h2
-rw-r--r--modules/freetype2/src/cff/cfferrs.h2
-rw-r--r--modules/freetype2/src/cff/cffgload.c2605
-rw-r--r--modules/freetype2/src/cff/cffgload.h187
-rw-r--r--modules/freetype2/src/cff/cffload.c206
-rw-r--r--modules/freetype2/src/cff/cffload.h8
-rw-r--r--modules/freetype2/src/cff/cffobjs.c173
-rw-r--r--modules/freetype2/src/cff/cffobjs.h106
-rw-r--r--modules/freetype2/src/cff/cffparse.c99
-rw-r--r--modules/freetype2/src/cff/cffparse.h14
-rw-r--r--modules/freetype2/src/cff/cffpic.c2
-rw-r--r--modules/freetype2/src/cff/cffpic.h36
-rw-r--r--modules/freetype2/src/cff/cfftoken.h2
-rw-r--r--modules/freetype2/src/cff/module.mk2
-rw-r--r--modules/freetype2/src/cff/rules.mk19
-rw-r--r--modules/freetype2/src/cid/Jamfile2
-rw-r--r--modules/freetype2/src/cid/ciderrs.h2
-rw-r--r--modules/freetype2/src/cid/cidgload.c87
-rw-r--r--modules/freetype2/src/cid/cidgload.h2
-rw-r--r--modules/freetype2/src/cid/cidload.c5
-rw-r--r--modules/freetype2/src/cid/cidload.h2
-rw-r--r--modules/freetype2/src/cid/cidobjs.c50
-rw-r--r--modules/freetype2/src/cid/cidobjs.h2
-rw-r--r--modules/freetype2/src/cid/cidparse.c2
-rw-r--r--modules/freetype2/src/cid/cidparse.h2
-rw-r--r--modules/freetype2/src/cid/cidriver.c22
-rw-r--r--modules/freetype2/src/cid/cidriver.h2
-rw-r--r--modules/freetype2/src/cid/cidtoken.h2
-rw-r--r--modules/freetype2/src/cid/module.mk2
-rw-r--r--modules/freetype2/src/cid/rules.mk2
-rw-r--r--modules/freetype2/src/cid/type1cid.c8
-rw-r--r--modules/freetype2/src/gxvalid/Jamfile2
-rw-r--r--modules/freetype2/src/gxvalid/README16
-rw-r--r--modules/freetype2/src/gxvalid/gxvalid.c16
-rw-r--r--modules/freetype2/src/gxvalid/gxvalid.h4
-rw-r--r--modules/freetype2/src/gxvalid/gxvbsln.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvcommn.c4
-rw-r--r--modules/freetype2/src/gxvalid/gxvcommn.h2
-rw-r--r--modules/freetype2/src/gxvalid/gxverror.h2
-rw-r--r--modules/freetype2/src/gxvalid/gxvfeat.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvfeat.h2
-rw-r--r--modules/freetype2/src/gxvalid/gxvfgen.c4
-rw-r--r--modules/freetype2/src/gxvalid/gxvjust.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvkern.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvlcar.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmod.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmod.h2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmort.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmort.h2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmort0.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmort1.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmort2.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmort4.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmort5.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmorx.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmorx.h2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmorx0.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmorx1.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmorx2.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmorx4.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvmorx5.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvopbd.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvprop.c2
-rw-r--r--modules/freetype2/src/gxvalid/gxvtrak.c2
-rw-r--r--modules/freetype2/src/gxvalid/module.mk2
-rw-r--r--modules/freetype2/src/gxvalid/rules.mk2
-rw-r--r--modules/freetype2/src/gzip/Jamfile2
-rw-r--r--modules/freetype2/src/gzip/ftgzip.c2
-rw-r--r--modules/freetype2/src/gzip/rules.mk6
-rw-r--r--modules/freetype2/src/lzw/Jamfile2
-rw-r--r--modules/freetype2/src/lzw/ftlzw.c2
-rw-r--r--modules/freetype2/src/lzw/ftzopen.c2
-rw-r--r--modules/freetype2/src/lzw/ftzopen.h2
-rw-r--r--modules/freetype2/src/lzw/rules.mk2
-rw-r--r--modules/freetype2/src/otvalid/Jamfile2
-rw-r--r--modules/freetype2/src/otvalid/module.mk2
-rw-r--r--modules/freetype2/src/otvalid/otvalid.c5
-rw-r--r--modules/freetype2/src/otvalid/otvalid.h2
-rw-r--r--modules/freetype2/src/otvalid/otvbase.c35
-rw-r--r--modules/freetype2/src/otvalid/otvcommn.c30
-rw-r--r--modules/freetype2/src/otvalid/otvcommn.h54
-rw-r--r--modules/freetype2/src/otvalid/otverror.h2
-rw-r--r--modules/freetype2/src/otvalid/otvgdef.c113
-rw-r--r--modules/freetype2/src/otvalid/otvgpos.c56
-rw-r--r--modules/freetype2/src/otvalid/otvgpos.h2
-rw-r--r--modules/freetype2/src/otvalid/otvgsub.c36
-rw-r--r--modules/freetype2/src/otvalid/otvjstf.c2
-rw-r--r--modules/freetype2/src/otvalid/otvmath.c2
-rw-r--r--modules/freetype2/src/otvalid/otvmod.c2
-rw-r--r--modules/freetype2/src/otvalid/otvmod.h2
-rw-r--r--modules/freetype2/src/otvalid/rules.mk2
-rw-r--r--modules/freetype2/src/pcf/Jamfile2
-rw-r--r--modules/freetype2/src/pcf/README4
-rw-r--r--modules/freetype2/src/pcf/pcf.c8
-rw-r--r--modules/freetype2/src/pcf/pcf.h9
-rw-r--r--modules/freetype2/src/pcf/pcfdrivr.c184
-rw-r--r--modules/freetype2/src/pcf/pcfread.c450
-rw-r--r--modules/freetype2/src/pfr/Jamfile2
-rw-r--r--modules/freetype2/src/pfr/module.mk2
-rw-r--r--modules/freetype2/src/pfr/pfr.c11
-rw-r--r--modules/freetype2/src/pfr/pfrcmap.c2
-rw-r--r--modules/freetype2/src/pfr/pfrcmap.h2
-rw-r--r--modules/freetype2/src/pfr/pfrdrivr.c2
-rw-r--r--modules/freetype2/src/pfr/pfrdrivr.h2
-rw-r--r--modules/freetype2/src/pfr/pfrerror.h2
-rw-r--r--modules/freetype2/src/pfr/pfrgload.c12
-rw-r--r--modules/freetype2/src/pfr/pfrgload.h2
-rw-r--r--modules/freetype2/src/pfr/pfrload.c2
-rw-r--r--modules/freetype2/src/pfr/pfrload.h2
-rw-r--r--modules/freetype2/src/pfr/pfrobjs.c8
-rw-r--r--modules/freetype2/src/pfr/pfrobjs.h2
-rw-r--r--modules/freetype2/src/pfr/pfrsbit.c2
-rw-r--r--modules/freetype2/src/pfr/pfrsbit.h2
-rw-r--r--modules/freetype2/src/pfr/pfrtypes.h2
-rw-r--r--modules/freetype2/src/pfr/rules.mk2
-rw-r--r--modules/freetype2/src/psaux/Jamfile12
-rw-r--r--modules/freetype2/src/psaux/afmparse.c11
-rw-r--r--modules/freetype2/src/psaux/afmparse.h2
-rw-r--r--modules/freetype2/src/psaux/cffdecode.c2370
-rw-r--r--modules/freetype2/src/psaux/cffdecode.h64
-rw-r--r--modules/freetype2/src/psaux/module.mk2
-rw-r--r--modules/freetype2/src/psaux/psarrst.c (renamed from modules/freetype2/src/cff/cf2arrst.c)10
-rw-r--r--modules/freetype2/src/psaux/psarrst.h (renamed from modules/freetype2/src/cff/cf2arrst.h)10
-rw-r--r--modules/freetype2/src/psaux/psaux.c25
-rw-r--r--modules/freetype2/src/psaux/psauxerr.h2
-rw-r--r--modules/freetype2/src/psaux/psauxmod.c56
-rw-r--r--modules/freetype2/src/psaux/psauxmod.h11
-rw-r--r--modules/freetype2/src/psaux/psblues.c (renamed from modules/freetype2/src/cff/cf2blues.c)57
-rw-r--r--modules/freetype2/src/psaux/psblues.h (renamed from modules/freetype2/src/cff/cf2blues.h)12
-rw-r--r--modules/freetype2/src/psaux/psconv.c10
-rw-r--r--modules/freetype2/src/psaux/psconv.h2
-rw-r--r--modules/freetype2/src/psaux/pserror.c (renamed from modules/freetype2/src/cff/cf2error.c)6
-rw-r--r--modules/freetype2/src/psaux/pserror.h (renamed from modules/freetype2/src/cff/cf2error.h)12
-rw-r--r--modules/freetype2/src/psaux/psfixed.h (renamed from modules/freetype2/src/cff/cf2fixed.h)12
-rw-r--r--modules/freetype2/src/psaux/psfont.c (renamed from modules/freetype2/src/cff/cf2font.c)89
-rw-r--r--modules/freetype2/src/psaux/psfont.h (renamed from modules/freetype2/src/cff/cf2font.h)20
-rw-r--r--modules/freetype2/src/psaux/psft.c (renamed from modules/freetype2/src/cff/cf2ft.c)368
-rw-r--r--modules/freetype2/src/psaux/psft.h (renamed from modules/freetype2/src/cff/cf2ft.h)108
-rw-r--r--modules/freetype2/src/psaux/psglue.h (renamed from modules/freetype2/src/cff/cf2glue.h)16
-rw-r--r--modules/freetype2/src/psaux/pshints.c (renamed from modules/freetype2/src/cff/cf2hints.c)333
-rw-r--r--modules/freetype2/src/psaux/pshints.h (renamed from modules/freetype2/src/cff/cf2hints.h)9
-rw-r--r--modules/freetype2/src/psaux/psintrp.c3040
-rw-r--r--modules/freetype2/src/psaux/psintrp.h (renamed from modules/freetype2/src/cff/cf2intrp.h)12
-rw-r--r--modules/freetype2/src/psaux/psobjs.c763
-rw-r--r--modules/freetype2/src/psaux/psobjs.h103
-rw-r--r--modules/freetype2/src/psaux/psread.c (renamed from modules/freetype2/src/cff/cf2read.c)8
-rw-r--r--modules/freetype2/src/psaux/psread.h (renamed from modules/freetype2/src/cff/cf2read.h)8
-rw-r--r--modules/freetype2/src/psaux/psstack.c (renamed from modules/freetype2/src/cff/cf2stack.c)12
-rw-r--r--modules/freetype2/src/psaux/psstack.h (renamed from modules/freetype2/src/cff/cf2stack.h)8
-rw-r--r--modules/freetype2/src/psaux/pstypes.h (renamed from modules/freetype2/src/cff/cf2types.h)8
-rw-r--r--modules/freetype2/src/psaux/rules.mk19
-rw-r--r--modules/freetype2/src/psaux/t1cmap.c2
-rw-r--r--modules/freetype2/src/psaux/t1cmap.h2
-rw-r--r--modules/freetype2/src/psaux/t1decode.c455
-rw-r--r--modules/freetype2/src/psaux/t1decode.h12
-rw-r--r--modules/freetype2/src/pshinter/Jamfile2
-rw-r--r--modules/freetype2/src/pshinter/module.mk2
-rw-r--r--modules/freetype2/src/pshinter/pshalgo.c4
-rw-r--r--modules/freetype2/src/pshinter/pshalgo.h2
-rw-r--r--modules/freetype2/src/pshinter/pshglob.c6
-rw-r--r--modules/freetype2/src/pshinter/pshglob.h2
-rw-r--r--modules/freetype2/src/pshinter/pshinter.c10
-rw-r--r--modules/freetype2/src/pshinter/pshmod.c2
-rw-r--r--modules/freetype2/src/pshinter/pshmod.h2
-rw-r--r--modules/freetype2/src/pshinter/pshnterr.h2
-rw-r--r--modules/freetype2/src/pshinter/pshpic.c2
-rw-r--r--modules/freetype2/src/pshinter/pshpic.h2
-rw-r--r--modules/freetype2/src/pshinter/pshrec.c2
-rw-r--r--modules/freetype2/src/pshinter/pshrec.h2
-rw-r--r--modules/freetype2/src/pshinter/rules.mk2
-rw-r--r--modules/freetype2/src/psnames/Jamfile2
-rw-r--r--modules/freetype2/src/psnames/module.mk2
-rw-r--r--modules/freetype2/src/psnames/psmodule.c16
-rw-r--r--modules/freetype2/src/psnames/psmodule.h2
-rw-r--r--modules/freetype2/src/psnames/psnamerr.h2
-rw-r--r--modules/freetype2/src/psnames/psnames.c6
-rw-r--r--modules/freetype2/src/psnames/pspic.c2
-rw-r--r--modules/freetype2/src/psnames/pspic.h2
-rw-r--r--modules/freetype2/src/psnames/pstables.h40
-rw-r--r--modules/freetype2/src/psnames/rules.mk2
-rw-r--r--modules/freetype2/src/raster/Jamfile2
-rw-r--r--modules/freetype2/src/raster/ftmisc.h2
-rw-r--r--modules/freetype2/src/raster/ftraster.c2
-rw-r--r--modules/freetype2/src/raster/ftraster.h2
-rw-r--r--modules/freetype2/src/raster/ftrend1.c118
-rw-r--r--modules/freetype2/src/raster/ftrend1.h2
-rw-r--r--modules/freetype2/src/raster/module.mk2
-rw-r--r--modules/freetype2/src/raster/raster.c6
-rw-r--r--modules/freetype2/src/raster/rasterrs.h2
-rw-r--r--modules/freetype2/src/raster/rastpic.c2
-rw-r--r--modules/freetype2/src/raster/rastpic.h2
-rw-r--r--modules/freetype2/src/raster/rules.mk2
-rw-r--r--modules/freetype2/src/sfnt/Jamfile2
-rw-r--r--modules/freetype2/src/sfnt/module.mk2
-rw-r--r--modules/freetype2/src/sfnt/pngshim.c91
-rw-r--r--modules/freetype2/src/sfnt/pngshim.h2
-rw-r--r--modules/freetype2/src/sfnt/rules.mk2
-rw-r--r--modules/freetype2/src/sfnt/sfdriver.c867
-rw-r--r--modules/freetype2/src/sfnt/sfdriver.h2
-rw-r--r--modules/freetype2/src/sfnt/sferrors.h2
-rw-r--r--modules/freetype2/src/sfnt/sfnt.c26
-rw-r--r--modules/freetype2/src/sfnt/sfntpic.c2
-rw-r--r--modules/freetype2/src/sfnt/sfntpic.h2
-rw-r--r--modules/freetype2/src/sfnt/sfobjs.c270
-rw-r--r--modules/freetype2/src/sfnt/sfobjs.h2
-rw-r--r--modules/freetype2/src/sfnt/ttbdf.c9
-rw-r--r--modules/freetype2/src/sfnt/ttbdf.h6
-rw-r--r--modules/freetype2/src/sfnt/ttcmap.c159
-rw-r--r--modules/freetype2/src/sfnt/ttcmap.h4
-rw-r--r--modules/freetype2/src/sfnt/ttcmapc.h2
-rw-r--r--modules/freetype2/src/sfnt/ttkern.c17
-rw-r--r--modules/freetype2/src/sfnt/ttkern.h2
-rw-r--r--modules/freetype2/src/sfnt/ttload.c147
-rw-r--r--modules/freetype2/src/sfnt/ttload.h2
-rw-r--r--modules/freetype2/src/sfnt/ttmtx.c10
-rw-r--r--modules/freetype2/src/sfnt/ttmtx.h2
-rw-r--r--modules/freetype2/src/sfnt/ttpost.c24
-rw-r--r--modules/freetype2/src/sfnt/ttpost.h2
-rw-r--r--modules/freetype2/src/sfnt/ttsbit.c45
-rw-r--r--modules/freetype2/src/sfnt/ttsbit.h2
-rw-r--r--modules/freetype2/src/smooth/Jamfile2
-rw-r--r--modules/freetype2/src/smooth/ftgrays.c193
-rw-r--r--modules/freetype2/src/smooth/ftgrays.h2
-rw-r--r--modules/freetype2/src/smooth/ftsmerrs.h2
-rw-r--r--modules/freetype2/src/smooth/ftsmooth.c308
-rw-r--r--modules/freetype2/src/smooth/ftsmooth.h11
-rw-r--r--modules/freetype2/src/smooth/ftspic.c2
-rw-r--r--modules/freetype2/src/smooth/ftspic.h2
-rw-r--r--modules/freetype2/src/smooth/module.mk2
-rw-r--r--modules/freetype2/src/smooth/rules.mk2
-rw-r--r--modules/freetype2/src/smooth/smooth.c6
-rw-r--r--modules/freetype2/src/tools/afblue.pl2
-rw-r--r--modules/freetype2/src/tools/apinames.c19
-rw-r--r--modules/freetype2/src/tools/docmaker/content.py45
-rw-r--r--modules/freetype2/src/tools/docmaker/docbeauty.py18
-rw-r--r--modules/freetype2/src/tools/docmaker/docmaker.py26
-rw-r--r--modules/freetype2/src/tools/docmaker/formatter.py2
-rw-r--r--modules/freetype2/src/tools/docmaker/sources.py14
-rw-r--r--modules/freetype2/src/tools/docmaker/tohtml.py104
-rw-r--r--modules/freetype2/src/tools/docmaker/utils.py2
-rw-r--r--modules/freetype2/src/tools/ftfuzzer/README12
-rw-r--r--modules/freetype2/src/tools/ftfuzzer/ftfuzzer.cc100
-rw-r--r--modules/freetype2/src/tools/ftfuzzer/ftmutator.cc2
-rw-r--r--modules/freetype2/src/tools/ftfuzzer/rasterfuzzer.cc2
-rw-r--r--modules/freetype2/src/tools/ftfuzzer/runinput.cc2
-rw-r--r--modules/freetype2/src/tools/glnames.py34
-rwxr-xr-xmodules/freetype2/src/tools/update-copyright-year2
-rw-r--r--modules/freetype2/src/truetype/Jamfile2
-rw-r--r--modules/freetype2/src/truetype/module.mk2
-rw-r--r--modules/freetype2/src/truetype/rules.mk2
-rw-r--r--modules/freetype2/src/truetype/truetype.c18
-rw-r--r--modules/freetype2/src/truetype/ttdriver.c43
-rw-r--r--modules/freetype2/src/truetype/ttdriver.h2
-rw-r--r--modules/freetype2/src/truetype/tterrors.h2
-rw-r--r--modules/freetype2/src/truetype/ttgload.c404
-rw-r--r--modules/freetype2/src/truetype/ttgload.h2
-rw-r--r--modules/freetype2/src/truetype/ttgxvar.c2276
-rw-r--r--modules/freetype2/src/truetype/ttgxvar.h247
-rw-r--r--modules/freetype2/src/truetype/ttinterp.c573
-rw-r--r--modules/freetype2/src/truetype/ttinterp.h62
-rw-r--r--modules/freetype2/src/truetype/ttobjs.c289
-rw-r--r--modules/freetype2/src/truetype/ttobjs.h8
-rw-r--r--modules/freetype2/src/truetype/ttpic.c2
-rw-r--r--modules/freetype2/src/truetype/ttpic.h2
-rw-r--r--modules/freetype2/src/truetype/ttpload.c10
-rw-r--r--modules/freetype2/src/truetype/ttpload.h2
-rw-r--r--modules/freetype2/src/truetype/ttsubpix.c39
-rw-r--r--modules/freetype2/src/truetype/ttsubpix.h2
-rw-r--r--modules/freetype2/src/type1/Jamfile2
-rw-r--r--modules/freetype2/src/type1/module.mk2
-rw-r--r--modules/freetype2/src/type1/rules.mk2
-rw-r--r--modules/freetype2/src/type1/t1afm.c11
-rw-r--r--modules/freetype2/src/type1/t1afm.h2
-rw-r--r--modules/freetype2/src/type1/t1driver.c21
-rw-r--r--modules/freetype2/src/type1/t1driver.h2
-rw-r--r--modules/freetype2/src/type1/t1errors.h2
-rw-r--r--modules/freetype2/src/type1/t1gload.c118
-rw-r--r--modules/freetype2/src/type1/t1gload.h2
-rw-r--r--modules/freetype2/src/type1/t1load.c117
-rw-r--r--modules/freetype2/src/type1/t1load.h6
-rw-r--r--modules/freetype2/src/type1/t1objs.c61
-rw-r--r--modules/freetype2/src/type1/t1objs.h8
-rw-r--r--modules/freetype2/src/type1/t1parse.c2
-rw-r--r--modules/freetype2/src/type1/t1parse.h2
-rw-r--r--modules/freetype2/src/type1/t1tokens.h2
-rw-r--r--modules/freetype2/src/type1/type1.c15
-rw-r--r--modules/freetype2/src/type42/Jamfile2
-rw-r--r--modules/freetype2/src/type42/module.mk2
-rw-r--r--modules/freetype2/src/type42/rules.mk2
-rw-r--r--modules/freetype2/src/type42/t42drivr.c2
-rw-r--r--modules/freetype2/src/type42/t42drivr.h2
-rw-r--r--modules/freetype2/src/type42/t42error.h2
-rw-r--r--modules/freetype2/src/type42/t42objs.c8
-rw-r--r--modules/freetype2/src/type42/t42objs.h2
-rw-r--r--modules/freetype2/src/type42/t42parse.c2
-rw-r--r--modules/freetype2/src/type42/t42parse.h2
-rw-r--r--modules/freetype2/src/type42/t42types.h2
-rw-r--r--modules/freetype2/src/type42/type42.c8
-rw-r--r--modules/freetype2/src/winfonts/Jamfile2
-rw-r--r--modules/freetype2/src/winfonts/fnterrs.h2
-rw-r--r--modules/freetype2/src/winfonts/module.mk2
-rw-r--r--modules/freetype2/src/winfonts/rules.mk2
-rw-r--r--modules/freetype2/src/winfonts/winfnt.c10
-rw-r--r--modules/freetype2/src/winfonts/winfnt.h2
-rw-r--r--modules/freetype2/vms_make.com20
-rw-r--r--modules/libpref/init/all.js45
-rw-r--r--netwerk/base/LoadInfo.cpp40
-rw-r--r--netwerk/base/LoadInfo.h7
-rw-r--r--netwerk/base/nsILoadGroup.idl6
-rw-r--r--netwerk/base/nsILoadInfo.idl26
-rw-r--r--netwerk/base/nsLoadGroup.cpp14
-rw-r--r--netwerk/base/nsLoadGroup.h2
-rw-r--r--netwerk/base/security-prefs.js11
-rw-r--r--netwerk/ipc/NeckoChannelParams.ipdlh2
-rw-r--r--netwerk/protocol/http/HSTSPrimerListener.cpp273
-rw-r--r--netwerk/protocol/http/HSTSPrimerListener.h108
-rw-r--r--netwerk/protocol/http/HttpChannelChild.cpp16
-rw-r--r--netwerk/protocol/http/HttpChannelParent.cpp10
-rw-r--r--netwerk/protocol/http/HttpChannelParent.h2
-rw-r--r--netwerk/protocol/http/PHttpChannel.ipdl1
-rw-r--r--netwerk/protocol/http/UserAgentOverrides.jsm8
-rw-r--r--netwerk/protocol/http/moz.build2
-rw-r--r--netwerk/protocol/http/nsHttpChannel.cpp189
-rw-r--r--netwerk/protocol/http/nsHttpChannel.h8
-rw-r--r--netwerk/protocol/http/nsHttpHandler.h6
-rw-r--r--netwerk/protocol/http/nsIHstsPrimingCallback.idl50
-rw-r--r--netwerk/protocol/http/nsIHttpProtocolHandler.idl9
-rw-r--r--netwerk/wifi/nsWifiScannerDBus.cpp2
-rw-r--r--old-configure.in43
-rw-r--r--security/manager/ssl/nsISiteSecurityService.idl9
-rw-r--r--security/manager/ssl/nsSiteSecurityService.cpp8
-rw-r--r--storage/TelemetryVFS.cpp12
-rw-r--r--storage/mozStorageService.cpp52
-rw-r--r--testing/mochitest/browser-test.js1
-rw-r--r--testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py38
-rw-r--r--testing/runtimes/mochitest-browser-chrome-e10s.runtimes.json7
-rw-r--r--testing/runtimes/mochitest-browser-chrome.runtimes.json8
-rw-r--r--testing/web-platform/tests/fetch/api/request/request-init-003.sub.html2
-rw-r--r--testing/web-platform/tests/fetch/api/request/request-structure.html2
-rw-r--r--toolkit/components/aboutmemory/content/aboutMemory.js16
-rw-r--r--toolkit/components/blocklist/blocklist.manifest7
-rw-r--r--toolkit/components/blocklist/moz.build (renamed from tools/jprof/stub/moz.build)13
-rw-r--r--toolkit/components/blocklist/nsBlocklistService.js (renamed from toolkit/mozapps/webextensions/nsBlocklistService.js)32
-rw-r--r--toolkit/components/blocklist/nsBlocklistServiceContent.js (renamed from toolkit/mozapps/webextensions/nsBlocklistServiceContent.js)0
-rw-r--r--toolkit/components/build/nsToolkitCompsModule.cpp10
-rw-r--r--toolkit/components/downloads/moz.build8
-rw-r--r--toolkit/components/jsdownloads/src/DownloadIntegration.jsm7
-rw-r--r--toolkit/components/moz.build5
-rw-r--r--toolkit/components/narrate/NarrateControls.jsm135
-rw-r--r--toolkit/components/narrate/Narrator.jsm78
-rw-r--r--toolkit/components/narrate/VoiceSelect.jsm23
-rw-r--r--toolkit/components/printing/content/simplifyMode.css2
-rw-r--r--toolkit/components/reader/AboutReader.jsm409
-rw-r--r--toolkit/components/reader/JSDOMParser.js46
-rw-r--r--toolkit/components/reader/Readability.js853
-rw-r--r--toolkit/components/reader/ReaderMode.jsm312
-rw-r--r--toolkit/components/reader/ReaderWorker.js7
-rw-r--r--toolkit/components/reader/content/aboutReader.html73
-rw-r--r--toolkit/components/reader/content/aboutReader.js2
-rw-r--r--toolkit/components/telemetry/Histograms.json56
-rw-r--r--toolkit/components/telemetry/Telemetry.cpp136
-rw-r--r--toolkit/components/telemetry/Telemetry.h19
-rw-r--r--toolkit/components/telemetry/histogram-whitelists.json10
-rw-r--r--toolkit/content/browser-content.js6
-rw-r--r--toolkit/content/contentAreaUtils.js1
-rw-r--r--toolkit/crashreporter/nsExceptionHandler.cpp35
-rw-r--r--toolkit/library/moz.build5
-rw-r--r--toolkit/locales/en-US/chrome/global/aboutReader.properties16
-rw-r--r--toolkit/locales/en-US/chrome/mozapps/extensions/blocklist.dtd6
-rw-r--r--toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties4
-rw-r--r--toolkit/locales/en-US/chrome/mozapps/webextensions/blocklist.dtd6
-rw-r--r--toolkit/locales/en-US/chrome/mozapps/webextensions/extensions.properties4
-rw-r--r--toolkit/modules/AppConstants.jsm14
-rw-r--r--toolkit/modules/Services.jsm3
-rw-r--r--toolkit/modules/Troubleshoot.jsm1
-rw-r--r--toolkit/moz.configure46
-rw-r--r--toolkit/mozapps/extensions/content/extensions.js8
-rw-r--r--toolkit/mozapps/extensions/content/newaddon.js6
-rw-r--r--toolkit/mozapps/extensions/content/selectAddons.js4
-rw-r--r--toolkit/mozapps/extensions/extensions.manifest4
-rw-r--r--toolkit/mozapps/extensions/internal/Content.js2
-rw-r--r--toolkit/mozapps/extensions/internal/GMPProvider.jsm7
-rw-r--r--toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm (renamed from toolkit/mozapps/webextensions/internal/ProductAddonChecker.jsm)0
-rw-r--r--toolkit/mozapps/extensions/internal/XPIProvider.jsm1
-rw-r--r--toolkit/mozapps/extensions/internal/XPIProviderUtils.js8
-rw-r--r--toolkit/mozapps/extensions/internal/moz.build2
-rw-r--r--toolkit/mozapps/extensions/moz.build1
-rw-r--r--toolkit/mozapps/extensions/nsBlocklistService.js1478
-rw-r--r--toolkit/mozapps/installer/upload-files.mk4
-rw-r--r--toolkit/mozapps/webextensions/amIAddonManager.idl29
-rw-r--r--toolkit/mozapps/webextensions/amIAddonPathService.idl37
-rw-r--r--toolkit/mozapps/webextensions/amIWebInstallListener.idl134
-rw-r--r--toolkit/mozapps/webextensions/amIWebInstaller.idl82
-rw-r--r--toolkit/mozapps/webextensions/content/OpenH264-license.txt59
-rw-r--r--toolkit/mozapps/webextensions/content/about.xul57
-rw-r--r--toolkit/mozapps/webextensions/content/blocklist.css11
-rw-r--r--toolkit/mozapps/webextensions/content/blocklist.xml58
-rw-r--r--toolkit/mozapps/webextensions/content/blocklist.xul46
-rw-r--r--toolkit/mozapps/webextensions/content/eula.xul35
-rw-r--r--toolkit/mozapps/webextensions/content/gmpPrefs.xul8
-rw-r--r--toolkit/mozapps/webextensions/content/list.xul44
-rw-r--r--toolkit/mozapps/webextensions/content/pluginPrefs.xul20
-rw-r--r--toolkit/mozapps/webextensions/content/updateinfo.xsl41
-rw-r--r--toolkit/mozapps/webextensions/content/xpinstallConfirm.css8
-rw-r--r--toolkit/mozapps/webextensions/content/xpinstallConfirm.xul37
-rw-r--r--toolkit/mozapps/webextensions/content/xpinstallItem.xml51
-rw-r--r--toolkit/mozapps/webextensions/extensions.manifest7
-rw-r--r--toolkit/mozapps/webextensions/internal/AddonUpdateChecker.jsm17
-rw-r--r--toolkit/mozapps/webextensions/internal/SpellCheckDictionaryBootstrap.js17
-rw-r--r--toolkit/mozapps/webextensions/internal/moz.build6
-rw-r--r--toolkit/mozapps/webextensions/jar.mn26
-rw-r--r--toolkit/mozapps/webextensions/moz.build10
-rw-r--r--toolkit/themes/linux/global/icons/loading_16.pngbin0 -> 16126 bytes
-rw-r--r--toolkit/themes/linux/global/icons/notloading_16.pngbin0 -> 233 bytes
-rw-r--r--toolkit/themes/linux/global/jar.mn2
-rw-r--r--toolkit/themes/osx/global/icons/loading_16.pngbin0 -> 9025 bytes
-rw-r--r--toolkit/themes/osx/global/icons/notloading_16.pngbin0 -> 686 bytes
-rw-r--r--toolkit/themes/osx/global/jar.mn2
-rw-r--r--toolkit/themes/shared/aboutReader.css626
-rw-r--r--toolkit/themes/shared/aboutReaderContent.css177
-rw-r--r--toolkit/themes/shared/aboutReaderControls.css388
-rw-r--r--toolkit/themes/shared/extensions/alerticon-error.svg6
-rw-r--r--toolkit/themes/shared/extensions/alerticon-info-negative.svg6
-rw-r--r--toolkit/themes/shared/extensions/alerticon-info-positive.svg6
-rw-r--r--toolkit/themes/shared/extensions/alerticon-warning.svg6
-rw-r--r--toolkit/themes/shared/extensions/extensionGeneric.svg12
-rw-r--r--toolkit/themes/shared/extensions/utilities.svg21
-rw-r--r--toolkit/themes/shared/jar.inc.mn5
-rw-r--r--toolkit/themes/shared/narrate.css195
-rw-r--r--toolkit/themes/shared/narrateControls.css185
-rw-r--r--toolkit/themes/shared/non-mac.jar.inc.mn2
-rw-r--r--toolkit/themes/shared/reader/RM-Content-Width-Minus-42x16.svg5
-rw-r--r--toolkit/themes/shared/reader/RM-Content-Width-Plus-44x16.svg5
-rw-r--r--toolkit/themes/shared/reader/RM-Line-Height-Minus-38x14.svg5
-rw-r--r--toolkit/themes/shared/reader/RM-Line-Height-Plus-38x24.svg5
-rw-r--r--toolkit/themes/shared/reader/RM-Type-Controls-Arrow.svg16
-rw-r--r--toolkit/themes/windows/global/icons/loading_16.pngbin0 -> 12351 bytes
-rw-r--r--toolkit/themes/windows/global/icons/notloading_16.pngbin0 -> 294 bytes
-rw-r--r--toolkit/themes/windows/global/jar.mn2
-rw-r--r--toolkit/toolkit.mozbuild4
-rw-r--r--toolkit/xre/nsAppRunner.cpp14
-rw-r--r--toolkit/xre/nsEmbedFunctions.cpp9
-rw-r--r--tools/jprof/README.html330
-rw-r--r--tools/jprof/bfd.cpp231
-rw-r--r--tools/jprof/coff.cpp99
-rw-r--r--tools/jprof/elf.cpp133
-rw-r--r--tools/jprof/intcnt.cpp71
-rw-r--r--tools/jprof/intcnt.h38
-rwxr-xr-xtools/jprof/jprofsig46
-rw-r--r--tools/jprof/leaky.cpp863
-rw-r--r--tools/jprof/leaky.h122
-rw-r--r--tools/jprof/moz.build28
-rwxr-xr-xtools/jprof/split-profile.py143
-rw-r--r--tools/jprof/strset.cpp40
-rw-r--r--tools/jprof/strset.h19
-rw-r--r--tools/jprof/stub/Makefile.in8
-rw-r--r--tools/jprof/stub/config.h18
-rw-r--r--tools/jprof/stub/jprof.h17
-rw-r--r--tools/jprof/stub/libmalloc.cpp790
-rw-r--r--tools/jprof/stub/libmalloc.h45
-rw-r--r--tools/lint/eslint/modules.json1
-rw-r--r--tools/memory-profiler/GCHeapProfilerImpl.cpp168
-rw-r--r--tools/memory-profiler/GCHeapProfilerImpl.h53
-rw-r--r--tools/memory-profiler/MemoryProfiler.cpp324
-rw-r--r--tools/memory-profiler/MemoryProfiler.h159
-rw-r--r--tools/memory-profiler/NativeProfilerImpl.cpp82
-rw-r--r--tools/memory-profiler/NativeProfilerImpl.h43
-rw-r--r--tools/memory-profiler/UncensoredAllocator.cpp121
-rw-r--r--tools/memory-profiler/UncensoredAllocator.h48
-rw-r--r--tools/memory-profiler/moz.build21
-rw-r--r--tools/memory-profiler/nsIMemoryProfiler.idl72
-rw-r--r--tools/memory-profiler/nsMemoryProfilerFactory.cpp32
-rw-r--r--tools/profiler/core/EHABIStackWalk.cpp678
-rw-r--r--tools/profiler/core/EHABIStackWalk.h28
-rw-r--r--tools/profiler/core/GeckoSampler.cpp1306
-rw-r--r--tools/profiler/core/GeckoSampler.h181
-rw-r--r--tools/profiler/core/IntelPowerGadget.cpp310
-rw-r--r--tools/profiler/core/IntelPowerGadget.h150
-rw-r--r--tools/profiler/core/ProfileBuffer.cpp89
-rw-r--r--tools/profiler/core/ProfileBuffer.h61
-rw-r--r--tools/profiler/core/ProfileEntry.cpp881
-rw-r--r--tools/profiler/core/ProfileEntry.h407
-rw-r--r--tools/profiler/core/ProfileJSONWriter.cpp115
-rw-r--r--tools/profiler/core/ProfileJSONWriter.h126
-rw-r--r--tools/profiler/core/ProfilerBacktrace.cpp33
-rw-r--r--tools/profiler/core/ProfilerMarkers.cpp210
-rw-r--r--tools/profiler/core/StackTop.cpp48
-rw-r--r--tools/profiler/core/StackTop.h10
-rw-r--r--tools/profiler/core/SyncProfile.cpp57
-rw-r--r--tools/profiler/core/SyncProfile.h43
-rw-r--r--tools/profiler/core/ThreadInfo.cpp73
-rw-r--r--tools/profiler/core/ThreadInfo.h66
-rw-r--r--tools/profiler/core/ThreadProfile.cpp260
-rw-r--r--tools/profiler/core/ThreadProfile.h107
-rw-r--r--tools/profiler/core/platform-linux.cc715
-rw-r--r--tools/profiler/core/platform-macos.cc469
-rw-r--r--tools/profiler/core/platform-win32.cc431
-rw-r--r--tools/profiler/core/platform.cpp1257
-rw-r--r--tools/profiler/core/platform.h428
-rw-r--r--tools/profiler/core/shared-libraries-linux.cc145
-rw-r--r--tools/profiler/core/shared-libraries-macos.cc132
-rw-r--r--tools/profiler/core/shared-libraries-win32.cc137
-rw-r--r--tools/profiler/gecko/ProfileGatherer.cpp207
-rw-r--r--tools/profiler/gecko/Profiler.jsm16
-rw-r--r--tools/profiler/gecko/ProfilerIOInterposeObserver.cpp30
-rw-r--r--tools/profiler/gecko/ProfilerIOInterposeObserver.h20
-rw-r--r--tools/profiler/gecko/SaveProfileTask.cpp45
-rw-r--r--tools/profiler/gecko/SaveProfileTask.h54
-rw-r--r--tools/profiler/gecko/ThreadResponsiveness.cpp118
-rw-r--r--tools/profiler/gecko/ThreadResponsiveness.h38
-rw-r--r--tools/profiler/gecko/nsIProfileSaveEvent.idl19
-rw-r--r--tools/profiler/gecko/nsIProfiler.idl101
-rw-r--r--tools/profiler/gecko/nsProfiler.cpp308
-rw-r--r--tools/profiler/gecko/nsProfiler.h29
-rw-r--r--tools/profiler/gecko/nsProfilerFactory.cpp31
-rw-r--r--tools/profiler/gecko/nsProfilerStartParams.cpp67
-rw-r--r--tools/profiler/gecko/nsProfilerStartParams.h32
-rw-r--r--tools/profiler/lul/AutoObjectMapper.cpp207
-rw-r--r--tools/profiler/lul/AutoObjectMapper.h115
-rw-r--r--tools/profiler/lul/LulCommon.cpp114
-rw-r--r--tools/profiler/lul/LulDwarf.cpp2180
-rw-r--r--tools/profiler/lul/LulDwarfSummariser.cpp359
-rw-r--r--tools/profiler/lul/LulDwarfSummariser.h65
-rw-r--r--tools/profiler/lul/LulElf.cpp915
-rw-r--r--tools/profiler/lul/LulMain.cpp1963
-rw-r--r--tools/profiler/lul/LulMain.h397
-rw-r--r--tools/profiler/lul/platform-linux-lul.cpp88
-rw-r--r--tools/profiler/lul/platform-linux-lul.h24
-rw-r--r--tools/profiler/moz.build106
-rw-r--r--tools/profiler/public/GeckoProfiler.h8
-rw-r--r--tools/profiler/public/GeckoProfilerFunc.h125
-rw-r--r--tools/profiler/public/GeckoProfilerImpl.h515
-rw-r--r--tools/profiler/public/ProfileGatherer.h42
-rw-r--r--tools/profiler/public/ProfilerBacktrace.h36
-rw-r--r--tools/profiler/public/ProfilerMarkers.h193
-rw-r--r--tools/profiler/public/PseudoStack.h469
-rw-r--r--tools/profiler/public/shared-libraries.h137
-rw-r--r--tools/profiler/tests/gtest/LulTest.cpp51
-rw-r--r--tools/profiler/tests/gtest/LulTestDwarf.cpp2597
-rw-r--r--tools/profiler/tests/gtest/LulTestInfrastructure.cpp491
-rw-r--r--tools/profiler/tests/gtest/LulTestInfrastructure.h666
-rw-r--r--tools/profiler/tests/gtest/ThreadProfileTest.cpp75
-rw-r--r--tools/profiler/tests/gtest/moz.build30
-rw-r--r--widget/VsyncDispatcher.cpp10
-rw-r--r--xpcom/base/nsIMemoryReporter.idl21
-rw-r--r--xpcom/base/nsMemoryInfoDumper.cpp62
-rw-r--r--xpcom/base/nsMemoryInfoDumper.h9
-rw-r--r--xpcom/base/nsMemoryReporterManager.cpp132
-rw-r--r--xpcom/base/nsTraceRefcnt.cpp42
-rw-r--r--xpcom/build/XPCOMInit.cpp14
-rw-r--r--xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp3
-rw-r--r--xpcom/threads/HangMonitor.cpp144
-rw-r--r--xpcom/threads/ThreadStackHelper.cpp466
-rw-r--r--xpcom/threads/ThreadStackHelper.h40
1235 files changed, 38583 insertions, 89513 deletions
diff --git a/application/palemoon/app/profile/palemoon.js b/application/palemoon/app/profile/palemoon.js
index 90b4949b9..000113fe7 100644
--- a/application/palemoon/app/profile/palemoon.js
+++ b/application/palemoon/app/profile/palemoon.js
@@ -433,6 +433,8 @@ pref("browser.tabs.loadDivertedInBackground", false);
pref("browser.tabs.loadBookmarksInBackground", false);
pref("browser.tabs.noWindowActivationOnExternal", false);
pref("browser.tabs.tabClipWidth", 140);
+pref("browser.tabs.tabMinWidth", 100);
+pref("browser.tabs.tabMaxWidth", 250);
pref("browser.tabs.animate", true);
pref("browser.tabs.onTop", true);
#ifdef XP_WIN
@@ -1079,6 +1081,8 @@ pref("security.csp.speccompliant", true);
// Block insecure active content on https pages
pref("security.mixed_content.block_active_content", true);
+// Disable HPKP telemetry
+pref("security.ssl.errorReporting.enabled", false);
// Override the Goanna-default value of false for Firefox.
pref("plain_text.wrap_long_lines", true);
diff --git a/application/palemoon/base/content/browser.css b/application/palemoon/base/content/browser.css
index a2970aefc..76e49436c 100644
--- a/application/palemoon/base/content/browser.css
+++ b/application/palemoon/base/content/browser.css
@@ -43,8 +43,6 @@ tabbrowser {
.tabbrowser-tab:not([pinned]) {
-moz-box-flex: 100;
- max-width: 250px;
- min-width: 100px;
width: 0;
transition: min-width 175ms ease-out,
max-width 200ms ease-out,
@@ -67,6 +65,12 @@ tabbrowser {
display: none;
}
+.tabbrowser-tab[pinned] {
+ -moz-box-flex: 0;
+ min-width: 0 !important;
+ max-width: none !important;
+}
+
.tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] {
position: fixed !important;
display: block; /* position:fixed already does this (bug 579776), but let's be explicit */
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index c1643caa4..4bdac7850 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -420,7 +420,8 @@ var gPopupBlockerObserver = {
if (!this._reportButton && gURLBar)
this._reportButton = document.getElementById("page-report-button");
- if (!gBrowser.selectedBrowser.blockedPopups) {
+ if (!gBrowser.selectedBrowser.blockedPopups ||
+ !gBrowser.selectedBrowser.blockedPopups.length) {
// Hide the icon in the location bar (if the location bar exists)
if (gURLBar)
this._reportButton.hidden = true;
@@ -522,65 +523,66 @@ var gPopupBlockerObserver = {
else
blockedPopupAllowSite.removeAttribute("disabled");
- var foundUsablePopupURI = false;
- var blockedPopups = browser.blockedPopups;
- if (blockedPopups) {
- for (let i = 0; i < blockedPopups.length; i++) {
- let blockedPopup = blockedPopups[i];
-
- // popupWindowURI will be null if the file picker popup is blocked.
- // xxxdz this should make the option say "Show file picker" and do it (Bug 590306)
- if (!blockedPopup.popupWindowURI)
- continue;
- var popupURIspec = blockedPopup.popupWindowURI.spec;
-
- // Sometimes the popup URI that we get back from the blockedPopup
- // isn't useful (for instance, netscape.com's popup URI ends up
- // being "http://www.netscape.com", which isn't really the URI of
- // the popup they're trying to show). This isn't going to be
- // useful to the user, so we won't create a menu item for it.
- if (popupURIspec == "" || popupURIspec == "about:blank" ||
- popupURIspec == uri.spec)
- continue;
-
- // Because of the short-circuit above, we may end up in a situation
- // in which we don't have any usable popup addresses to show in
- // the menu, and therefore we shouldn't show the separator. However,
- // since we got past the short-circuit, we must've found at least
- // one usable popup URI and thus we'll turn on the separator later.
- foundUsablePopupURI = true;
-
- var menuitem = document.createElement("menuitem");
- var label = gNavigatorBundle.getFormattedString("popupShowPopupPrefix",
- [popupURIspec]);
- menuitem.setAttribute("label", label);
- menuitem.setAttribute("popupWindowURI", popupURIspec);
- menuitem.setAttribute("popupWindowFeatures", blockedPopup.popupWindowFeatures);
- menuitem.setAttribute("popupWindowName", blockedPopup.popupWindowName);
- menuitem.setAttribute("oncommand", "gPopupBlockerObserver.showBlockedPopup(event);");
- menuitem.setAttribute("popupReportIndex", i);
- menuitem.popupReportBrowser = browser;
- aEvent.target.appendChild(menuitem);
- }
- }
-
- // Show or hide the separator, depending on whether we added any
- // showable popup addresses to the menu.
- var blockedPopupsSeparator =
- document.getElementById("blockedPopupsSeparator");
- if (foundUsablePopupURI)
- blockedPopupsSeparator.removeAttribute("hidden");
- else
- blockedPopupsSeparator.setAttribute("hidden", true);
-
- var blockedPopupDontShowMessage = document.getElementById("blockedPopupDontShowMessage");
- var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
+ let blockedPopupDontShowMessage = document.getElementById("blockedPopupDontShowMessage");
+ let showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
blockedPopupDontShowMessage.setAttribute("checked", !showMessage);
if (aEvent.target.anchorNode.id == "page-report-button") {
aEvent.target.anchorNode.setAttribute("open", "true");
blockedPopupDontShowMessage.setAttribute("label", gNavigatorBundle.getString("popupWarningDontShowFromLocationbar"));
- } else
+ } else {
blockedPopupDontShowMessage.setAttribute("label", gNavigatorBundle.getString("popupWarningDontShowFromMessage"));
+ }
+
+ let blockedPopupsSeparator =
+ document.getElementById("blockedPopupsSeparator");
+ blockedPopupsSeparator.setAttribute("hidden", true);
+
+ gBrowser.selectedBrowser.retrieveListOfBlockedPopups().then(blockedPopups => {
+ let foundUsablePopupURI = false;
+ if (blockedPopups) {
+ for (let i = 0; i < blockedPopups.length; i++) {
+ let blockedPopup = blockedPopups[i];
+
+ // popupWindowURI will be null if the file picker popup is blocked.
+ // xxxdz this should make the option say "Show file picker" and do it (Bug 590306)
+ if (!blockedPopup.popupWindowURIspec)
+ continue;
+
+ var popupURIspec = blockedPopup.popupWindowURIspec;
+
+ // Sometimes the popup URI that we get back from the blockedPopup
+ // isn't useful (for instance, netscape.com's popup URI ends up
+ // being "http://www.netscape.com", which isn't really the URI of
+ // the popup they're trying to show). This isn't going to be
+ // useful to the user, so we won't create a menu item for it.
+ if (popupURIspec == "" || popupURIspec == "about:blank" ||
+ popupURIspec == "<self>" ||
+ popupURIspec == uri.spec)
+ continue;
+
+ // Because of the short-circuit above, we may end up in a situation
+ // in which we don't have any usable popup addresses to show in
+ // the menu, and therefore we shouldn't show the separator. However,
+ // since we got past the short-circuit, we must've found at least
+ // one usable popup URI and thus we'll turn on the separator later.
+ foundUsablePopupURI = true;
+
+ var menuitem = document.createElement("menuitem");
+ var label = gNavigatorBundle.getFormattedString("popupShowPopupPrefix",
+ [popupURIspec]);
+ menuitem.setAttribute("label", label);
+ menuitem.setAttribute("oncommand", "gPopupBlockerObserver.showBlockedPopup(event);");
+ menuitem.setAttribute("popupReportIndex", i);
+ menuitem.popupReportBrowser = browser;
+ aEvent.target.appendChild(menuitem);
+ }
+ }
+
+ // Show the separator if we added any
+ // showable popup addresses to the menu.
+ if (foundUsablePopupURI)
+ blockedPopupsSeparator.removeAttribute("hidden");
+ }, null);
},
onPopupHiding: function (aEvent) {
@@ -3096,6 +3098,8 @@ const BrowserSearch = {
},
};
+XPCOMUtils.defineConstant(this, "BrowserSearch", BrowserSearch);
+
function FillHistoryMenu(aParent) {
// Lazily add the hover listeners on first showing and never remove them
if (!aParent.hasStatusListener) {
@@ -6768,7 +6772,7 @@ function getTabModalPromptBox(aWindow) {
function getBrowser() gBrowser;
function getNavToolbox() gNavToolbox;
-let gPrivateBrowsingUI = {
+var gPrivateBrowsingUI = {
init: function PBUI_init() {
// Do nothing for normal windows
if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
diff --git a/application/palemoon/base/content/browser.xul b/application/palemoon/base/content/browser.xul
index f9030056e..254e2eee0 100644
--- a/application/palemoon/base/content/browser.xul
+++ b/application/palemoon/base/content/browser.xul
@@ -452,7 +452,6 @@
<image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
- <image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="alert-plugins-notification-icon" class="notification-anchor-icon" role="button"/>
diff --git a/application/palemoon/base/content/newtab/grid.js b/application/palemoon/base/content/newtab/grid.js
index a614d0396..fbeb7bd27 100644
--- a/application/palemoon/base/content/newtab/grid.js
+++ b/application/palemoon/base/content/newtab/grid.js
@@ -115,10 +115,10 @@ var gGrid = {
// (Re-)initialize all cells.
let cellElements = this.node.querySelectorAll(".newtab-cell");
// Tycho: this._cells = [new Cell(this, cell) for (cell of cellElements)];
- this.cells = [];
+ this._cells = [];
for (let cellItem of cellElements) {
- this.cells.push(new Cell(this, cellItem));
+ this._cells.push(new Cell(this, cellItem));
}
},
diff --git a/application/palemoon/base/content/pageinfo/pageInfo.js b/application/palemoon/base/content/pageinfo/pageInfo.js
index 6b02bc370..600174ad9 100644
--- a/application/palemoon/base/content/pageinfo/pageInfo.js
+++ b/application/palemoon/base/content/pageinfo/pageInfo.js
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Cu = Components.utils;
+var Cu = Components.utils;
Cu.import("resource://gre/modules/LoadContextInfo.jsm");
Cu.import("resource://gre/modules/Services.jsm");
diff --git a/application/palemoon/base/content/sanitizeDialog.js b/application/palemoon/base/content/sanitizeDialog.js
index 18df5e4a4..786113288 100644
--- a/application/palemoon/base/content/sanitizeDialog.js
+++ b/application/palemoon/base/content/sanitizeDialog.js
@@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Cc = Components.classes;
-const Ci = Components.interfaces;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
var gSanitizePromptDialog = {
diff --git a/application/palemoon/base/content/sync/aboutSyncTabs.js b/application/palemoon/base/content/sync/aboutSyncTabs.js
index bc624a459..410494b5b 100644
--- a/application/palemoon/base/content/sync/aboutSyncTabs.js
+++ b/application/palemoon/base/content/sync/aboutSyncTabs.js
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Cu = Components.utils;
+var Cu = Components.utils;
Cu.import("resource://services-common/utils.js");
Cu.import("resource://services-sync/main.js");
diff --git a/application/palemoon/base/content/sync/addDevice.js b/application/palemoon/base/content/sync/addDevice.js
index 40862a791..0390d4397 100644
--- a/application/palemoon/base/content/sync/addDevice.js
+++ b/application/palemoon/base/content/sync/addDevice.js
@@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
+var Cu = Components.utils;
Cu.import("resource://services-sync/main.js");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
diff --git a/application/palemoon/base/content/sync/genericChange.js b/application/palemoon/base/content/sync/genericChange.js
index 0c6dc145e..df6639178 100644
--- a/application/palemoon/base/content/sync/genericChange.js
+++ b/application/palemoon/base/content/sync/genericChange.js
@@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Ci = Components.interfaces;
-const Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
Components.utils.import("resource://services-sync/main.js");
Components.utils.import("resource://gre/modules/Services.jsm");
diff --git a/application/palemoon/base/content/sync/setup.js b/application/palemoon/base/content/sync/setup.js
index 99faa038e..e8d67a5f6 100644
--- a/application/palemoon/base/content/sync/setup.js
+++ b/application/palemoon/base/content/sync/setup.js
@@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cr = Components.results;
-const Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
+var Cr = Components.results;
+var Cu = Components.utils;
// page consts
diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml
index 1b8099785..10f109ce8 100644
--- a/application/palemoon/base/content/tabbrowser.xml
+++ b/application/palemoon/base/content/tabbrowser.xml
@@ -1445,6 +1445,9 @@
t.setAttribute("label", aURI);
t.setAttribute("crop", "end");
+ t.style.maxWidth = this.tabContainer.mTabMaxWidth + "px";
+ t.style.minWidth = this.tabContainer.mTabMinWidth + "px";
+ t.width = 0;
t.setAttribute("validate", "never"); //PMed
t.setAttribute("onerror", "this.removeAttribute('image');");
t.className = "tabbrowser-tab";
@@ -3410,6 +3413,8 @@
<implementation implements="nsIDOMEventListener">
<constructor>
<![CDATA[
+ this.mTabMinWidth = Services.prefs.getIntPref("browser.tabs.tabMinWidth");
+ this.mTabMaxWidth = Services.prefs.getIntPref("browser.tabs.tabMaxWidth");
this.mTabClipWidth = Services.prefs.getIntPref("browser.tabs.tabClipWidth");
this.mCloseButtons = Services.prefs.getIntPref("browser.tabs.closeButtons");
this._closeWindowWithLastTab = Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab");
@@ -3417,6 +3422,9 @@
var tab = this.firstChild;
tab.setAttribute("label",
this.tabbrowser.mStringBundle.getString("tabs.emptyTabTitle"));
+ tab.style.minWidth = this.mTabMinWidth + "px";
+ tab.style.maxWidth = this.mTabMaxWidth + "px";
+ tab.width = 0;
tab.setAttribute("crop", "end");
tab.setAttribute("onerror", "this.removeAttribute('image');");
this.adjustTabstrip();
diff --git a/application/palemoon/components/distribution.js b/application/palemoon/components/distribution.js
index b44b5bed3..d3300604e 100644
--- a/application/palemoon/components/distribution.js
+++ b/application/palemoon/components/distribution.js
@@ -4,10 +4,10 @@
this.EXPORTED_SYMBOLS = [ "DistributionCustomizer" ];
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cr = Components.results;
-const Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
+var Cr = Components.results;
+var Cu = Components.utils;
const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC =
"distribution-customization-complete";
diff --git a/application/palemoon/components/places/content/bookmarkProperties.js b/application/palemoon/components/places/content/bookmarkProperties.js
index 22bd51773..685ef57d2 100644
--- a/application/palemoon/components/places/content/bookmarkProperties.js
+++ b/application/palemoon/components/places/content/bookmarkProperties.js
@@ -61,6 +61,8 @@
Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "Task",
+ "resource://gre/modules/Task.jsm");
const BOOKMARK_ITEM = 0;
const BOOKMARK_FOLDER = 1;
@@ -303,7 +305,7 @@ var BookmarkPropertiesPanel = {
* This method should be called by the onload of the Bookmark Properties
* dialog to initialize the state of the panel.
*/
- onDialogLoad: function BPP_onDialogLoad() {
+ onDialogLoad: Task.async(function* BPP_onDialogLoad() {
this._determineItemInfo();
document.title = this._getDialogTitle();
@@ -355,7 +357,7 @@ var BookmarkPropertiesPanel = {
acceptButton.disabled = this._readOnly;
break;
case ACTION_ADD:
- this._fillAddProperties();
+ yield this._fillAddProperties();
// if this is an uri related dialog disable accept button until
// the user fills an uri value.
if (this._itemType == BOOKMARK_ITEM)
@@ -380,7 +382,7 @@ var BookmarkPropertiesPanel = {
.addEventListener("input", this, false);
}
}
- },
+ }),
// nsIDOMEventListener
handleEvent: function BPP_handleEvent(aEvent) {
@@ -428,8 +430,8 @@ var BookmarkPropertiesPanel = {
forceReadOnly: this._readOnly });
},
- _fillAddProperties: function BPP__fillAddProperties() {
- this._createNewItem();
+ _fillAddProperties: Task.async(function* BPP__fillAddProperties() {
+ yield this._createNewItem();
// Edit the new item
gEditItemOverlay.initPanel(this._itemId,
{ hiddenRows: this._hiddenRows });
@@ -439,7 +441,7 @@ var BookmarkPropertiesPanel = {
var locationField = this._element("locationField");
if (locationField.value == "about:blank")
locationField.value = "";
- },
+ }),
// nsISupports
QueryInterface: function BPP_QueryInterface(aIID) {
@@ -637,7 +639,7 @@ var BookmarkPropertiesPanel = {
/**
* Dialog-accept code-path for creating a new item (any type)
*/
- _createNewItem: function BPP__getCreateItemTransaction() {
+ _createNewItem: Task.async(function* BPP__getCreateItemTransaction() {
var [container, index] = this._getInsertionPointDetails();
var txn;
@@ -647,12 +649,22 @@ var BookmarkPropertiesPanel = {
break;
case LIVEMARK_CONTAINER:
txn = this._getCreateNewLivemarkTransaction(container, index);
- break;
+ break;
default: // BOOKMARK_ITEM
txn = this._getCreateNewBookmarkTransaction(container, index);
}
PlacesUtils.transactionManager.doTransaction(txn);
- this._itemId = PlacesUtils.bookmarks.getIdForItemAt(container, index);
- }
+ // This is a temporary hack until we use PlacesTransactions.jsm
+ if (txn._promise) {
+ yield txn._promise;
+ }
+
+ let folderGuid = yield PlacesUtils.promiseItemGuid(container);
+ let bm = yield PlacesUtils.bookmarks.fetch({
+ parentGuid: folderGuid,
+ index: index
+ });
+ this._itemId = yield PlacesUtils.promiseItemId(bm.guid);
+ })
};
diff --git a/application/palemoon/components/sessionstore/content/aboutSessionRestore.js b/application/palemoon/components/sessionstore/content/aboutSessionRestore.js
index cae3bf4de..2459b67f5 100644
--- a/application/palemoon/components/sessionstore/content/aboutSessionRestore.js
+++ b/application/palemoon/components/sessionstore/content/aboutSessionRestore.js
@@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
var gStateObject;
var gTreeData;
diff --git a/application/palemoon/components/sessionstore/content/content-sessionStore.js b/application/palemoon/components/sessionstore/content/content-sessionStore.js
index bdf0fef0c..e3e956ef2 100644
--- a/application/palemoon/components/sessionstore/content/content-sessionStore.js
+++ b/application/palemoon/components/sessionstore/content/content-sessionStore.js
@@ -10,7 +10,7 @@ function debug(msg) {
* Listens for and handles content events that we need for the
* session store service to be notified of state changes in content.
*/
-let EventListener = {
+var EventListener = {
DOM_EVENTS: [
"pageshow", "change", "input"
diff --git a/application/palemoon/config/version.txt b/application/palemoon/config/version.txt
index b117d70fa..da03daefe 100644
--- a/application/palemoon/config/version.txt
+++ b/application/palemoon/config/version.txt
@@ -1 +1 @@
-28.0.0a1 \ No newline at end of file
+28.0.0a2 \ No newline at end of file
diff --git a/application/palemoon/installer/Makefile.in b/application/palemoon/installer/Makefile.in
index 368b16efc..3f009c51c 100644
--- a/application/palemoon/installer/Makefile.in
+++ b/application/palemoon/installer/Makefile.in
@@ -41,12 +41,12 @@ DEFINES += -DMOZ_GTK3=1
endif
endif
-ifdef MOZ_NATIVE_NSPR
-DEFINES += -DMOZ_NATIVE_NSPR=1
+ifdef MOZ_SYSTEM_NSPR
+DEFINES += -DMOZ_SYSTEM_NSPR=1
endif
-ifdef MOZ_NATIVE_NSS
-DEFINES += -DMOZ_NATIVE_NSS=1
+ifdef MOZ_SYSTEM_NSS
+DEFINES += -DMOZ_SYSTEM_NSS=1
endif
ifdef NSS_DISABLE_DBM
diff --git a/application/palemoon/installer/package-manifest.in b/application/palemoon/installer/package-manifest.in
index e6a4d49db..fb5441832 100644
--- a/application/palemoon/installer/package-manifest.in
+++ b/application/palemoon/installer/package-manifest.in
@@ -72,9 +72,6 @@
#ifndef MOZ_STATIC_JS
@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
#endif
-#ifdef MOZ_DMD
-@BINPATH@/@DLL_PREFIX@dmd@DLL_SUFFIX@
-#endif
#ifndef MOZ_SYSTEM_NSPR
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
@@ -172,14 +169,10 @@
#endif
#ifdef NS_PRINTING
#endif
-#ifdef MOZ_ENABLE_PROFILER_SPS
-#endif
#ifdef NECKO_WIFI
#endif
#ifdef MOZ_WEBRTC
#endif
-#ifdef MOZ_ENABLE_PROFILER_SPS
-#endif
#ifdef MOZ_ENABLE_XREMOTE
#endif
#ifdef XP_MACOSX
@@ -206,9 +199,7 @@
@RESPATH@/browser/chrome.manifest
@RESPATH@/browser/chrome/browser@JAREXT@
@RESPATH@/browser/chrome/browser.manifest
-#ifdef XP_WIN
@RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/chrome.manifest
-#endif
@RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
@RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
@RESPATH@/chrome/toolkit@JAREXT@
diff --git a/application/palemoon/installer/windows/moz.build b/application/palemoon/installer/windows/moz.build
index 12e7831ed..394a85ccf 100644
--- a/application/palemoon/installer/windows/moz.build
+++ b/application/palemoon/installer/windows/moz.build
@@ -4,8 +4,12 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
-
DEFINES['MOZ_APP_NAME'] = CONFIG['MOZ_APP_NAME']
-DEFINES['MOZ_APP_DISPLAYNAME'] = CONFIG['MOZ_APP_DISPLAYNAME']
+DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
DEFINES['MOZILLA_VERSION'] = CONFIG['MOZILLA_VERSION']
+
+if CONFIG['MOZ_APP_DISPLAYNAME'] in ('PaleMoon', 'Palemoon'):
+ DEFINES['MOZ_APP_DISPLAYNAME'] = "Pale Moon"
+else:
+ DEFINES['MOZ_APP_DISPLAYNAME'] = CONFIG['MOZ_APP_DISPLAYNAME']
+
diff --git a/application/palemoon/modules/Windows8WindowFrameColor.jsm b/application/palemoon/modules/Windows8WindowFrameColor.jsm
index d424da499..e7a447db2 100644
--- a/application/palemoon/modules/Windows8WindowFrameColor.jsm
+++ b/application/palemoon/modules/Windows8WindowFrameColor.jsm
@@ -11,15 +11,15 @@ Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/WindowsRegistry.jsm");
-const Windows8WindowFrameColor = {
+var Windows8WindowFrameColor = {
_windowFrameColor: null,
get_win8: function() {
if (this._windowFrameColor)
return this._windowFrameColor;
- let HKCU = Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER;
- let dwmKey = "Software\\Microsoft\\Windows\\DWM";
+ const HKCU = Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER;
+ const dwmKey = "Software\\Microsoft\\Windows\\DWM";
// Window frame base color component values when Color Intensity is at 0.
let frameBaseColor = 217;
diff --git a/application/palemoon/themes/linux/browser.css b/application/palemoon/themes/linux/browser.css
index dbdc06235..9a08ea4d8 100644
--- a/application/palemoon/themes/linux/browser.css
+++ b/application/palemoon/themes/linux/browser.css
@@ -1228,10 +1228,6 @@ toolbar[iconsize="small"] #webrtc-status-button {
list-style-image: url(chrome://mozapps/skin/passwordmgr/key-64.png);
}
-.popup-notification-icon[popupid="webapps-install"] {
- list-style-image: url(chrome://browser/skin/webapps-64.png);
-}
-
.popup-notification-icon[popupid="mixed-content-blocked"] {
list-style-image: url(chrome://browser/skin/mixed-content-blocked-64.png);
}
@@ -1305,10 +1301,6 @@ toolbar[iconsize="small"] #webrtc-status-button {
list-style-image: url(chrome://mozapps/skin/passwordmgr/key-16.png);
}
-#webapps-notification-icon {
- list-style-image: url(chrome://browser/skin/webapps-16.png);
-}
-
#plugins-notification-icon {
list-style-image: url(chrome://browser/skin/notification-pluginNormal.png);
}
diff --git a/application/palemoon/themes/linux/jar.mn b/application/palemoon/themes/linux/jar.mn
index 3c2ac406e..570bbb153 100644
--- a/application/palemoon/themes/linux/jar.mn
+++ b/application/palemoon/themes/linux/jar.mn
@@ -136,8 +136,6 @@ browser.jar:
skin/classic/browser/syncQuota.css
skin/classic/browser/syncProgress.css
#endif
- skin/classic/browser/webapps-16.png
- skin/classic/browser/webapps-64.png
skin/classic/browser/notification-pluginNormal.png (../shared/plugins/notification-pluginNormal.png)
skin/classic/browser/notification-pluginAlert.png (../shared/plugins/notification-pluginAlert.png)
skin/classic/browser/notification-pluginBlocked.png (../shared/plugins/notification-pluginBlocked.png)
diff --git a/application/palemoon/themes/linux/webapps-16.png b/application/palemoon/themes/linux/webapps-16.png
deleted file mode 100644
index df3978c4c..000000000
--- a/application/palemoon/themes/linux/webapps-16.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/themes/linux/webapps-64.png b/application/palemoon/themes/linux/webapps-64.png
deleted file mode 100644
index 7c5e48cb8..000000000
--- a/application/palemoon/themes/linux/webapps-64.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/themes/osx/browser.css b/application/palemoon/themes/osx/browser.css
index 6307c5f58..485ed9115 100644
--- a/application/palemoon/themes/osx/browser.css
+++ b/application/palemoon/themes/osx/browser.css
@@ -1459,14 +1459,14 @@ richlistitem[type~="action"][actiontype="switchtab"][selected="true"] > .ac-url-
linear-gradient(-moz-dialog, -moz-dialog);
}
-.tabbrowser-tab:-moz-lwtheme {
- color: inherit;
- /* 0.99 opacity rquired to force an active layer, see bug #1028369 */
- opacity: 0.99;
+.tabbrowser-tab[visuallyselected=true]:not(:-moz-lwtheme) {
+ /* overriding tabbox.css */
+ color: inherit;
}
-.tabbrowser-tab:-moz-lwtheme:not([selected="true"]) {
- opacity: 0.9;
+.tabbrowser-tab[visuallyselected=true] {
+ /* overriding tabbox.css */
+ text-shadow: inherit;
}
/* Remove highlight fuzz on dark themes */
@@ -1913,10 +1913,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
list-style-image: url(chrome://mozapps/skin/passwordmgr/key-64.png);
}
-.popup-notification-icon[popupid="webapps-install"] {
- list-style-image: url(chrome://browser/skin/webapps-64.png);
-}
-
.popup-notification-icon[popupid="mixed-content-blocked"] {
list-style-image: url(chrome://browser/skin/mixed-content-blocked-64.png);
}
@@ -1988,10 +1984,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
list-style-image: url(chrome://mozapps/skin/passwordmgr/key-16.png);
}
-#webapps-notification-icon {
- list-style-image: url(chrome://browser/skin/webapps-16.png);
-}
-
#plugins-notification-icon {
list-style-image: url(chrome://browser/skin/notification-pluginNormal.png);
}
diff --git a/application/palemoon/themes/osx/jar.mn b/application/palemoon/themes/osx/jar.mn
index a085c5f81..28d779985 100644
--- a/application/palemoon/themes/osx/jar.mn
+++ b/application/palemoon/themes/osx/jar.mn
@@ -66,8 +66,6 @@ browser.jar:
skin/classic/browser/urlbar-arrow.png
skin/classic/browser/urlbar-popup-blocked.png
skin/classic/browser/urlbar-history-dropmarker.png
- skin/classic/browser/webapps-16.png
- skin/classic/browser/webapps-64.png
skin/classic/browser/web-notifications-icon.svg
skin/classic/browser/web-notifications-tray.svg
skin/classic/browser/notification-pluginNormal.png (../shared/plugins/notification-pluginNormal.png)
diff --git a/application/palemoon/themes/osx/webapps-16.png b/application/palemoon/themes/osx/webapps-16.png
deleted file mode 100644
index 7112ab4e4..000000000
--- a/application/palemoon/themes/osx/webapps-16.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/themes/osx/webapps-64.png b/application/palemoon/themes/osx/webapps-64.png
deleted file mode 100644
index 7c5e48cb8..000000000
--- a/application/palemoon/themes/osx/webapps-64.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/themes/windows/browser.css b/application/palemoon/themes/windows/browser.css
index b87b50732..db60a6fa7 100644
--- a/application/palemoon/themes/windows/browser.css
+++ b/application/palemoon/themes/windows/browser.css
@@ -2400,10 +2400,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
list-style-image: url(chrome://mozapps/skin/passwordmgr/key-64.png);
}
-.popup-notification-icon[popupid="webapps-install"] {
- list-style-image: url(chrome://browser/skin/webapps-64.png);
-}
-
.popup-notification-icon[popupid="mixed-content-blocked"] {
list-style-image: url(chrome://browser/skin/mixed-content-blocked-64.png);
}
@@ -2475,10 +2471,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
list-style-image: url(chrome://mozapps/skin/passwordmgr/key-16.png);
}
-#webapps-notification-icon {
- list-style-image: url(chrome://browser/skin/webapps-16.png);
-}
-
#plugins-notification-icon {
list-style-image: url(chrome://browser/skin/notification-pluginNormal.png);
}
diff --git a/application/palemoon/themes/windows/jar.mn b/application/palemoon/themes/windows/jar.mn
index 8c0d9a5cc..ce4627e21 100644
--- a/application/palemoon/themes/windows/jar.mn
+++ b/application/palemoon/themes/windows/jar.mn
@@ -68,8 +68,6 @@ browser.jar:
skin/classic/browser/urlbar-arrow.png
skin/classic/browser/urlbar-popup-blocked.png
skin/classic/browser/urlbar-history-dropmarker.png
- skin/classic/browser/webapps-16.png
- skin/classic/browser/webapps-64.png
skin/classic/browser/web-notifications-icon.svg
skin/classic/browser/web-notifications-tray.svg
skin/classic/browser/notification-pluginNormal.png (../shared/plugins/notification-pluginNormal.png)
diff --git a/application/palemoon/themes/windows/webapps-16.png b/application/palemoon/themes/windows/webapps-16.png
deleted file mode 100644
index 7112ab4e4..000000000
--- a/application/palemoon/themes/windows/webapps-16.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/themes/windows/webapps-64.png b/application/palemoon/themes/windows/webapps-64.png
deleted file mode 100644
index 7c5e48cb8..000000000
--- a/application/palemoon/themes/windows/webapps-64.png
+++ /dev/null
Binary files differ
diff --git a/browser/LICENSE b/browser/LICENSE
index f1b2067a7..4f643a5c8 100644
--- a/browser/LICENSE
+++ b/browser/LICENSE
@@ -9,3 +9,5 @@ Basilisk name or logo.
The Serpent logo in branding/unofficial is derived from "Sea Serpent"
by Lorc, licensed under the Creative Commons license CC-BY 3.0
+For individual licensing restrictions on branding, see the LICENSE
+files in the appropriate branding directories.
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index 1182741bd..ab3678095 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -952,8 +952,10 @@ pref("services.sync.prefs.sync.browser.link.open_newwindow", true);
pref("services.sync.prefs.sync.browser.newtabpage.enabled", true);
pref("services.sync.prefs.sync.browser.newtabpage.pinned", true);
pref("services.sync.prefs.sync.browser.offline-apps.notify", true);
+#ifdef MOZ_SAFE_BROWSING
pref("services.sync.prefs.sync.browser.safebrowsing.phishing.enabled", true);
pref("services.sync.prefs.sync.browser.safebrowsing.malware.enabled", true);
+#endif
pref("services.sync.prefs.sync.browser.search.update", true);
pref("services.sync.prefs.sync.browser.sessionstore.restore_on_demand", true);
pref("services.sync.prefs.sync.browser.startup.homepage", true);
@@ -1104,13 +1106,6 @@ pref("pdfjs.previousHandler.alwaysAskBeforeHandling", false);
// (This is intentionally on the high side; see bug 746055.)
pref("image.mem.max_decoded_image_kb", 256000);
-pref("social.sidebar.unload_timeout_ms", 10000);
-
-// Activation from inside of share panel is possible if activationPanelEnabled
-// is true. Pref'd off for release while usage testing is done through beta.
-pref("social.share.activationPanelEnabled", true);
-pref("social.shareDirectory", "https://activations.cdn.mozilla.net/sharePanel.html");
-
// Block insecure active content on https pages
pref("security.mixed_content.block_active_content", true);
diff --git a/browser/base/content/aboutProviderDirectory.xhtml b/browser/base/content/aboutProviderDirectory.xhtml
deleted file mode 100644
index 596ede4b3..000000000
--- a/browser/base/content/aboutProviderDirectory.xhtml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE html [
- <!ENTITY % htmlDTD
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "DTD/xhtml1-strict.dtd">
- %htmlDTD;
- <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
- %brandDTD;
- <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
- %browserDTD;
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>&social.directory.label;</title>
- <link rel="stylesheet" type="text/css" media="all"
- href="chrome://browser/skin/aboutProviderDirectory.css"/>
- </head>
-
- <body>
- <div id="activation-link" hidden="true">
- <div id="message-box">
- <p>&social.directory.text;</p>
- </div>
- <div id="button-box">
- <button onclick="openDirectory()">&social.directory.button;</button>
- </div>
- </div>
- <div id="activation" hidden="true">
- <p>&social.directory.introText;</p>
- <div><iframe id="activation-frame"/></div>
- <p><a class="link" onclick="openDirectory()">&social.directory.viewmore.text;</a></p>
- </div>
- </body>
-
- <script type="text/javascript;version=1.8"><![CDATA[
- const Cu = Components.utils;
-
- Cu.import("resource://gre/modules/Services.jsm");
-
- function openDirectory() {
- let url = Services.prefs.getCharPref("social.directories").split(',')[0];
- window.open(url);
- window.close();
- }
-
- if (Services.prefs.getBoolPref("social.share.activationPanelEnabled")) {
- let url = Services.prefs.getCharPref("social.shareDirectory");
- document.getElementById("activation-frame").setAttribute("src", url);
- document.getElementById("activation").removeAttribute("hidden");
- } else {
- document.getElementById("activation-link").removeAttribute("hidden");
- }
- ]]></script>
-</html>
diff --git a/browser/base/content/aboutSocialError.xhtml b/browser/base/content/aboutSocialError.xhtml
deleted file mode 100644
index 94a4e3dbd..000000000
--- a/browser/base/content/aboutSocialError.xhtml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE html [
- <!ENTITY % htmlDTD
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "DTD/xhtml1-strict.dtd">
- %htmlDTD;
- <!ENTITY % netErrorDTD SYSTEM "chrome://global/locale/netError.dtd">
- %netErrorDTD;
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>&loadError.label;</title>
- <link rel="stylesheet" href="chrome://browser/skin/aboutNetError.css" type="text/css" media="all" />
- <link rel="stylesheet" type="text/css" media="all" href="chrome://browser/skin/aboutSocialError.css"/>
- <link rel="icon" type="image/png" id="favicon" href="chrome://global/skin/icons/warning-16.png"/>
- </head>
-
- <body>
- <div id="errorPageContainer">
-
- <!-- Error Title -->
- <div id="errorTitle">
- <p id="errorShortDescText" >foo</p>
- </div>
-
- <div id="button-box">
- <button id="btnTryAgain" onclick="tryAgainButton()"/>
- </div>
- </div>
- </body>
-
- <script type="text/javascript;version=1.8"><![CDATA[
- const Cu = Components.utils;
-
- Cu.import("resource://gre/modules/Services.jsm");
- Cu.import("resource:///modules/Social.jsm");
-
- let config = {
- tryAgainCallback: reloadProvider
- }
-
- function parseQueryString() {
- let searchParams = new URLSearchParams(document.documentURI.split("?")[1]);
- let mode = searchParams.get("mode");
- config.origin = searchParams.get("origin");
- let encodedURL = searchParams.get("url");
- let url = decodeURIComponent(encodedURL);
- // directory does not have origin set, in that case use the url origin for
- // the error message.
- if (!config.origin) {
- let URI = Services.io.newURI(url, null, null);
- config.origin =
- Services.scriptSecurityManager.createCodebasePrincipal(URI, {}).origin;
- }
-
- switch (mode) {
- case "compactInfo":
- document.getElementById("btnTryAgain").style.display = 'none';
- break;
- case "tryAgainOnly":
- //intentional fall-through
- case "tryAgain":
- config.tryAgainCallback = loadQueryURL;
- config.queryURL = url;
- break;
- default:
- break;
- }
- }
-
- function setUpStrings() {
- let brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
- let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
-
- let productName = brandBundle.GetStringFromName("brandShortName");
- let provider = Social._getProviderFromOrigin(config.origin);
- let providerName = provider ? provider.name : config.origin;
-
- // Sets up the error message
- let msg = browserBundle.formatStringFromName("social.error.message", [productName, providerName], 2);
- document.getElementById("errorShortDescText").textContent = msg;
-
- // Sets up the buttons' labels and accesskeys
- let btnTryAgain = document.getElementById("btnTryAgain");
- btnTryAgain.textContent = browserBundle.GetStringFromName("social.error.tryAgain.label");
- btnTryAgain.accessKey = browserBundle.GetStringFromName("social.error.tryAgain.accesskey");
- }
-
- function tryAgainButton() {
- config.tryAgainCallback();
- }
-
- function loadQueryURL() {
- window.location.href = config.queryURL;
- }
-
- function reloadProvider() {
- let provider = Social._getProviderFromOrigin(config.origin);
- provider.reload();
- }
-
- parseQueryString();
- setUpStrings();
- ]]></script>
-</html>
diff --git a/browser/base/content/browser-context.inc b/browser/base/content/browser-context.inc
index 3061cccdd..9fa90b11c 100644
--- a/browser/base/content/browser-context.inc
+++ b/browser/base/content/browser-context.inc
@@ -85,10 +85,6 @@
label="&bookmarkThisLinkCmd.label;"
accesskey="&bookmarkThisLinkCmd.accesskey;"
oncommand="gContextMenu.bookmarkLink();"/>
- <menuitem id="context-sharelink"
- label="&shareLink.label;"
- accesskey="&shareLink.accesskey;"
- oncommand="gContextMenu.shareLink();"/>
<menuitem id="context-savelink"
label="&saveLinkCmd.label;"
accesskey="&saveLinkCmd.accesskey;"
@@ -212,10 +208,6 @@
label="&saveImageCmd.label;"
accesskey="&saveImageCmd.accesskey;"
oncommand="gContextMenu.saveMedia();"/>
- <menuitem id="context-shareimage"
- label="&shareImage.label;"
- accesskey="&shareImage.accesskey;"
- oncommand="gContextMenu.shareImage();"/>
<menuitem id="context-sendimage"
label="&emailImageCmd.label;"
accesskey="&emailImageCmd.accesskey;"
@@ -237,10 +229,6 @@
label="&saveVideoCmd.label;"
accesskey="&saveVideoCmd.accesskey;"
oncommand="gContextMenu.saveMedia();"/>
- <menuitem id="context-sharevideo"
- label="&shareVideo.label;"
- accesskey="&shareVideo.accesskey;"
- oncommand="gContextMenu.shareVideo();"/>
<menuitem id="context-saveaudio"
label="&saveAudioCmd.label;"
accesskey="&saveAudioCmd.accesskey;"
@@ -271,10 +259,6 @@
accesskey="&hidePluginCmd.accesskey;"
oncommand="gContextMenu.hidePlugin();"/>
<menuseparator id="context-sep-ctp"/>
- <menuitem id="context-sharepage"
- label="&sharePageCmd.label;"
- accesskey="&sharePageCmd.accesskey;"
- oncommand="SocialShare.sharePage();"/>
<menuitem id="context-savepage"
label="&savePageCmd.label;"
accesskey="&savePageCmd.accesskey2;"
@@ -334,10 +318,6 @@
<menupopup id="context-sendlinktodevice-popup"
onpopupshowing="gFxAccounts.populateSendTabToDevicesMenu(event.target, gContextMenu.linkURL, gContextMenu.linkTextStr);"/>
</menu>
- <menuitem id="context-shareselect"
- label="&shareSelect.label;"
- accesskey="&shareSelect.accesskey;"
- oncommand="gContextMenu.shareSelect();"/>
<menuseparator id="frame-sep"/>
<menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;">
<menupopup>
diff --git a/browser/base/content/browser-doctype.inc b/browser/base/content/browser-doctype.inc
index 10015d898..ad08f4b03 100644
--- a/browser/base/content/browser-doctype.inc
+++ b/browser/base/content/browser-doctype.inc
@@ -13,8 +13,10 @@
%customizeToolbarDTD;
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
%placesDTD;
+#ifdef MOZ_SAFE_BROWSING
<!ENTITY % safebrowsingDTD SYSTEM "chrome://browser/locale/safebrowsing/phishing-afterload-warning-message.dtd">
%safebrowsingDTD;
+#endif
<!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
%aboutHomeDTD;
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
diff --git a/browser/base/content/browser-safebrowsing.js b/browser/base/content/browser-safebrowsing.js
index 430d84f13..a66595b2d 100644
--- a/browser/base/content/browser-safebrowsing.js
+++ b/browser/base/content/browser-safebrowsing.js
@@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#ifdef MOZ_SAFE_BROWSING
var gSafeBrowsing = {
setReportPhishingMenu: function() {
@@ -46,3 +47,4 @@ var gSafeBrowsing = {
return SafeBrowsing.getReportURL(name, gBrowser.currentURI);
}
}
+#endif
diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc
index 0c753520f..6ea057d93 100644
--- a/browser/base/content/browser-sets.inc
+++ b/browser/base/content/browser-sets.inc
@@ -105,8 +105,6 @@
oncommand="OpenBrowserWindow({private: true});" reserved="true"/>
<command id="History:UndoCloseTab" oncommand="undoCloseTab();"/>
<command id="History:UndoCloseWindow" oncommand="undoCloseWindow();"/>
- <command id="Social:SharePage" oncommand="SocialShare.sharePage();"/>
- <command id="Social:Addons" oncommand="BrowserOpenAddonsMgr('addons://list/service');"/>
</commandset>
<commandset id="placesCommands">
@@ -117,7 +115,6 @@
</commandset>
<broadcasterset id="mainBroadcasterSet">
- <broadcaster id="Social:PageShareable" disabled="true"/>
<broadcaster id="viewBookmarksSidebar" autoCheck="false" label="&bookmarksButton.label;"
type="checkbox" group="sidebar" sidebarurl="chrome://browser/content/bookmarks/bookmarksPanel.xul"
oncommand="SidebarUI.toggle('viewBookmarksSidebar');"/>
@@ -285,7 +282,7 @@
<key id="key_fullScreen_old" key="&fullScreenCmd.macCommandKey;" command="View:FullScreen" modifiers="accel,shift"/>
<key keycode="VK_F11" command="View:FullScreen"/>
#endif
- <key id="toggleReaderMode" key="&toggleReaderMode.key;" command="View:ReaderView" modifiers="accel,alt" disabled="true"/>
+ <key id="key_toggleReaderMode" key="&toggleReaderMode.key;" command="View:ReaderView" modifiers="accel,alt" disabled="true"/>
<key key="&reloadCmd.commandkey;" command="Browser:Reload" modifiers="accel" id="key_reload"/>
<key key="&reloadCmd.commandkey;" command="Browser:ReloadSkipCache" modifiers="accel,shift"/>
<key id="key_viewSource" key="&pageSourceCmd.commandkey;" command="View:PageSource" modifiers="accel"/>
diff --git a/browser/base/content/browser-social.js b/browser/base/content/browser-social.js
deleted file mode 100644
index b470efd3d..000000000
--- a/browser/base/content/browser-social.js
+++ /dev/null
@@ -1,503 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// the "exported" symbols
-var SocialUI,
- SocialShare,
- SocialActivationListener;
-
-(function() {
-
-XPCOMUtils.defineLazyGetter(this, "OpenGraphBuilder", function() {
- let tmp = {};
- Cu.import("resource:///modules/Social.jsm", tmp);
- return tmp.OpenGraphBuilder;
-});
-
-XPCOMUtils.defineLazyGetter(this, "DynamicResizeWatcher", function() {
- let tmp = {};
- Cu.import("resource:///modules/Social.jsm", tmp);
- return tmp.DynamicResizeWatcher;
-});
-
-SocialUI = {
- _initialized: false,
-
- // Called on delayed startup to initialize the UI
- init: function SocialUI_init() {
- if (this._initialized) {
- return;
- }
- let mm = window.getGroupMessageManager("social");
- mm.loadFrameScript("chrome://browser/content/content.js", true);
- mm.loadFrameScript("chrome://browser/content/social-content.js", true);
-
- Services.obs.addObserver(this, "social:providers-changed", false);
-
- CustomizableUI.addListener(this);
- SocialActivationListener.init();
-
- Social.init().then((update) => {
- if (update)
- this._providersChanged();
- });
-
- this._initialized = true;
- },
-
- // Called on window unload
- uninit: function SocialUI_uninit() {
- if (!this._initialized) {
- return;
- }
- Services.obs.removeObserver(this, "social:providers-changed");
-
- CustomizableUI.removeListener(this);
- SocialActivationListener.uninit();
-
- this._initialized = false;
- },
-
- observe: function SocialUI_observe(subject, topic, data) {
- switch (topic) {
- case "social:providers-changed":
- this._providersChanged();
- break;
- }
- },
-
- _providersChanged: function() {
- SocialShare.populateProviderMenu();
- },
-
- showLearnMore: function() {
- let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "social-api";
- openUILinkIn(url, "tab");
- },
-
- closeSocialPanelForLinkTraversal: function (target, linkNode) {
- // No need to close the panel if this traversal was not retargeted
- if (target == "" || target == "_self")
- return;
-
- // Check to see whether this link traversal was in a social panel
- let win = linkNode.ownerGlobal;
- let container = win.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell)
- .chromeEventHandler;
- let containerParent = container.parentNode;
- if (containerParent.classList.contains("social-panel") &&
- containerParent instanceof Ci.nsIDOMXULPopupElement) {
- // allow the link traversal to finish before closing the panel
- setTimeout(() => {
- containerParent.hidePopup();
- }, 0);
- }
- },
-
- get _chromeless() {
- // Is this a popup window that doesn't want chrome shown?
- let docElem = document.documentElement;
- // extrachrome is not restored during session restore, so we need
- // to check for the toolbar as well.
- let chromeless = docElem.getAttribute("chromehidden").includes("extrachrome") ||
- docElem.getAttribute('chromehidden').includes("toolbar");
- // This property is "fixed" for a window, so avoid doing the check above
- // multiple times...
- delete this._chromeless;
- this._chromeless = chromeless;
- return chromeless;
- },
-
- get enabled() {
- // Returns whether social is enabled *for this window*.
- if (this._chromeless)
- return false;
- return Social.providers.length > 0;
- },
-
- canSharePage: function(aURI) {
- return (aURI && (aURI.schemeIs('http') || aURI.schemeIs('https')));
- },
-
- onCustomizeEnd: function(aWindow) {
- if (aWindow != window)
- return;
- // customization mode gets buttons out of sync with command updating, fix
- // the disabled state
- let canShare = this.canSharePage(gBrowser.currentURI);
- let shareButton = SocialShare.shareButton;
- if (shareButton) {
- if (canShare) {
- shareButton.removeAttribute("disabled")
- } else {
- shareButton.setAttribute("disabled", "true")
- }
- }
- },
-
- // called on tab/urlbar/location changes and after customization. Update
- // anything that is tab specific.
- updateState: function() {
- goSetCommandEnabled("Social:PageShareable", this.canSharePage(gBrowser.currentURI));
- }
-}
-
-// message manager handlers
-SocialActivationListener = {
- init: function() {
- messageManager.addMessageListener("Social:Activation", this);
- },
- uninit: function() {
- messageManager.removeMessageListener("Social:Activation", this);
- },
- receiveMessage: function(aMessage) {
- let data = aMessage.json;
- let browser = aMessage.target;
- data.window = window;
- // if the source if the message is the share panel, we do a one-click
- // installation. The source of activations is controlled by the
- // social.directories preference
- let options;
- if (browser == SocialShare.iframe && Services.prefs.getBoolPref("social.share.activationPanelEnabled")) {
- options = { bypassContentCheck: true, bypassInstallPanel: true };
- }
-
- Social.installProvider(data, function(manifest) {
- Social.activateFromOrigin(manifest.origin, function(provider) {
- if (provider.shareURL) {
- // Ensure that the share button is somewhere usable.
- // SocialShare.shareButton may return null if it is in the menu-panel
- // and has never been visible, so we check the widget directly. If
- // there is no area for the widget we move it into the toolbar.
- let widget = CustomizableUI.getWidget("social-share-button");
- // If the panel is already open, we can be sure that the provider can
- // already be accessed, possibly anchored to another toolbar button.
- // In that case we don't move the widget.
- if (!widget.areaType && SocialShare.panel.state != "open") {
- CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
- // Ensure correct state.
- SocialUI.onCustomizeEnd(window);
- }
-
- // make this new provider the selected provider. If the panel hasn't
- // been opened, we need to make the frame first.
- SocialShare._createFrame();
- SocialShare.iframe.setAttribute('src', 'data:text/plain;charset=utf8,');
- SocialShare.iframe.setAttribute('origin', provider.origin);
- // get the right button selected
- SocialShare.populateProviderMenu();
- if (SocialShare.panel.state == "open") {
- SocialShare.sharePage(provider.origin);
- }
- }
- if (provider.postActivationURL) {
- // if activated from an open share panel, we load the landing page in
- // a background tab
- gBrowser.loadOneTab(provider.postActivationURL, {inBackground: SocialShare.panel.state == "open"});
- }
- });
- }, options);
- }
-}
-
-SocialShare = {
- get _dynamicResizer() {
- delete this._dynamicResizer;
- this._dynamicResizer = new DynamicResizeWatcher();
- return this._dynamicResizer;
- },
-
- // Share panel may be attached to the overflow or menu button depending on
- // customization, we need to manage open state of the anchor.
- get anchor() {
- let widget = CustomizableUI.getWidget("social-share-button");
- return widget.forWindow(window).anchor;
- },
- // Holds the anchor node in use whilst the panel is open, because it may vary.
- _currentAnchor: null,
-
- get panel() {
- return document.getElementById("social-share-panel");
- },
-
- get iframe() {
- // panel.firstChild is our toolbar hbox, panel.lastChild is the iframe
- // container hbox used for an interstitial "loading" graphic
- return this.panel.lastChild.firstChild;
- },
-
- uninit: function () {
- if (this.iframe) {
- let mm = this.messageManager;
- mm.removeMessageListener("PageVisibility:Show", this);
- mm.removeMessageListener("PageVisibility:Hide", this);
- mm.removeMessageListener("Social:DOMWindowClose", this);
- this.iframe.removeEventListener("load", this);
- this.iframe.remove();
- }
- },
-
- _createFrame: function() {
- let panel = this.panel;
- if (this.iframe)
- return;
- this.panel.hidden = false;
- // create and initialize the panel for this window
- let iframe = document.createElement("browser");
- iframe.setAttribute("type", "content");
- iframe.setAttribute("class", "social-share-frame");
- iframe.setAttribute("context", "contentAreaContextMenu");
- iframe.setAttribute("tooltip", "aHTMLTooltip");
- iframe.setAttribute("disableglobalhistory", "true");
- iframe.setAttribute("flex", "1");
- iframe.setAttribute("message", "true");
- iframe.setAttribute("messagemanagergroup", "social");
- panel.lastChild.appendChild(iframe);
- let mm = this.messageManager;
- mm.addMessageListener("PageVisibility:Show", this);
- mm.addMessageListener("PageVisibility:Hide", this);
- mm.sendAsyncMessage("Social:SetErrorURL",
- { template: "about:socialerror?mode=compactInfo&origin=%{origin}&url=%{url}" });
- iframe.addEventListener("load", this, true);
- mm.addMessageListener("Social:DOMWindowClose", this);
-
- this.populateProviderMenu();
- },
-
- get messageManager() {
- // The xbl bindings for the iframe may not exist yet, so we can't
- // access iframe.messageManager directly - but can get at it with this dance.
- return this.iframe.QueryInterface(Components.interfaces.nsIFrameLoaderOwner).frameLoader.messageManager;
- },
-
- receiveMessage: function(aMessage) {
- let iframe = this.iframe;
- switch(aMessage.name) {
- case "PageVisibility:Show":
- SocialShare._dynamicResizer.start(iframe.parentNode, iframe);
- break;
- case "PageVisibility:Hide":
- SocialShare._dynamicResizer.stop();
- break;
- case "Social:DOMWindowClose":
- this.panel.hidePopup();
- break;
- }
- },
-
- handleEvent: function(event) {
- switch (event.type) {
- case "load": {
- this.iframe.parentNode.removeAttribute("loading");
- if (this.currentShare)
- SocialShare.messageManager.sendAsyncMessage("Social:OpenGraphData", this.currentShare);
- }
- }
- },
-
- getSelectedProvider: function() {
- let provider;
- let lastProviderOrigin = this.iframe && this.iframe.getAttribute("origin");
- if (lastProviderOrigin) {
- provider = Social._getProviderFromOrigin(lastProviderOrigin);
- }
- return provider;
- },
-
- createTooltip: function(event) {
- let tt = event.target;
- let provider = Social._getProviderFromOrigin(tt.triggerNode.getAttribute("origin"));
- tt.firstChild.setAttribute("value", provider.name);
- tt.lastChild.setAttribute("value", provider.origin);
- },
-
- populateProviderMenu: function() {
- if (!this.iframe)
- return;
- let providers = Social.providers.filter(p => p.shareURL);
- let hbox = document.getElementById("social-share-provider-buttons");
- // remove everything before the add-share-provider button (which should also
- // be lastChild if any share providers were added)
- let addButton = document.getElementById("add-share-provider");
- while (hbox.lastChild != addButton) {
- hbox.removeChild(hbox.lastChild);
- }
- let selectedProvider = this.getSelectedProvider();
- for (let provider of providers) {
- let button = document.createElement("toolbarbutton");
- button.setAttribute("class", "toolbarbutton-1 share-provider-button");
- button.setAttribute("type", "radio");
- button.setAttribute("group", "share-providers");
- button.setAttribute("image", provider.iconURL);
- button.setAttribute("tooltip", "share-button-tooltip");
- button.setAttribute("origin", provider.origin);
- button.setAttribute("label", provider.name);
- button.setAttribute("oncommand", "SocialShare.sharePage(this.getAttribute('origin'));");
- if (provider == selectedProvider) {
- this.defaultButton = button;
- }
- hbox.appendChild(button);
- }
- if (!this.defaultButton) {
- this.defaultButton = addButton;
- }
- this.defaultButton.setAttribute("checked", "true");
- },
-
- get shareButton() {
- // web-panels (bookmark/sidebar) don't include customizableui, so
- // nsContextMenu fails when accessing shareButton, breaking
- // browser_bug409481.js.
- if (!window.CustomizableUI)
- return null;
- let widget = CustomizableUI.getWidget("social-share-button");
- if (!widget || !widget.areaType)
- return null;
- return widget.forWindow(window).node;
- },
-
- _onclick: function() {
- Services.telemetry.getHistogramById("SOCIAL_PANEL_CLICKS").add(0);
- },
-
- onShowing: function() {
- (this._currentAnchor || this.anchor).setAttribute("open", "true");
- this.iframe.addEventListener("click", this._onclick, true);
- },
-
- onHidden: function() {
- (this._currentAnchor || this.anchor).removeAttribute("open");
- this._currentAnchor = null;
- this.iframe.docShellIsActive = false;
- this.iframe.removeEventListener("click", this._onclick, true);
- this.iframe.setAttribute("src", "data:text/plain;charset=utf8,");
- // make sure that the frame is unloaded after it is hidden
- this.messageManager.sendAsyncMessage("Social:ClearFrame");
- this.currentShare = null;
- // share panel use is over, purge any history
- this.iframe.purgeSessionHistory();
- },
-
- sharePage: function(providerOrigin, graphData, target, anchor) {
- // if providerOrigin is undefined, we use the last-used provider, or the
- // current/default provider. The provider selection in the share panel
- // will call sharePage with an origin for us to switch to.
- this._createFrame();
- let iframe = this.iframe;
-
- // graphData is an optional param that either defines the full set of data
- // to be shared, or partial data about the current page. It is set by a call
- // in mozSocial API, or via nsContentMenu calls. If it is present, it MUST
- // define at least url. If it is undefined, we're sharing the current url in
- // the browser tab.
- let pageData = graphData ? graphData : this.currentShare;
- let sharedURI = pageData ? Services.io.newURI(pageData.url, null, null) :
- gBrowser.currentURI;
- if (!SocialUI.canSharePage(sharedURI))
- return;
-
- let browserMM = gBrowser.selectedBrowser.messageManager;
-
- // the point of this action type is that we can use existing share
- // endpoints (e.g. oexchange) that do not support additional
- // socialapi functionality. One tweak is that we shoot an event
- // containing the open graph data.
- let _dataFn;
- if (!pageData || sharedURI == gBrowser.currentURI) {
- browserMM.addMessageListener("PageMetadata:PageDataResult", _dataFn = (msg) => {
- browserMM.removeMessageListener("PageMetadata:PageDataResult", _dataFn);
- let pageData = msg.json;
- if (graphData) {
- // overwrite data retreived from page with data given to us as a param
- for (let p in graphData) {
- pageData[p] = graphData[p];
- }
- }
- this.sharePage(providerOrigin, pageData, target, anchor);
- });
- browserMM.sendAsyncMessage("PageMetadata:GetPageData", null, { target });
- return;
- }
- // if this is a share of a selected item, get any microformats
- if (!pageData.microformats && target) {
- browserMM.addMessageListener("PageMetadata:MicroformatsResult", _dataFn = (msg) => {
- browserMM.removeMessageListener("PageMetadata:MicroformatsResult", _dataFn);
- pageData.microformats = msg.data;
- this.sharePage(providerOrigin, pageData, target, anchor);
- });
- browserMM.sendAsyncMessage("PageMetadata:GetMicroformats", null, { target });
- return;
- }
- this.currentShare = pageData;
-
- let provider;
- if (providerOrigin)
- provider = Social._getProviderFromOrigin(providerOrigin);
- else
- provider = this.getSelectedProvider();
- if (!provider || !provider.shareURL) {
- this.showDirectory(anchor);
- return;
- }
- // check the menu button
- let hbox = document.getElementById("social-share-provider-buttons");
- let btn = hbox.querySelector("[origin='" + provider.origin + "']");
- if (btn)
- btn.checked = true;
-
- let shareEndpoint = OpenGraphBuilder.generateEndpointURL(provider.shareURL, pageData);
-
- this._dynamicResizer.stop();
- let size = provider.getPageSize("share");
- if (size) {
- // let the css on the share panel define width, but height
- // calculations dont work on all sites, so we allow that to be
- // defined.
- delete size.width;
- }
-
- // if we've already loaded this provider/page share endpoint, we don't want
- // to add another load event listener.
- let endpointMatch = shareEndpoint == iframe.getAttribute("src");
- if (endpointMatch) {
- this._dynamicResizer.start(iframe.parentNode, iframe, size);
- iframe.docShellIsActive = true;
- SocialShare.messageManager.sendAsyncMessage("Social:OpenGraphData", this.currentShare);
- } else {
- iframe.parentNode.setAttribute("loading", "true");
- }
- // if the user switched between share providers we do not want that history
- // available.
- iframe.purgeSessionHistory();
-
- // always ensure that origin belongs to the endpoint
- let uri = Services.io.newURI(shareEndpoint, null, null);
- iframe.setAttribute("origin", provider.origin);
- iframe.setAttribute("src", shareEndpoint);
- this._openPanel(anchor);
- },
-
- showDirectory: function(anchor) {
- this._createFrame();
- let iframe = this.iframe;
- if (iframe.getAttribute("src") == "about:providerdirectory")
- return;
- iframe.removeAttribute("origin");
- iframe.parentNode.setAttribute("loading", "true");
-
- iframe.setAttribute("src", "about:providerdirectory");
- this._openPanel(anchor);
- },
-
- _openPanel: function(anchor) {
- this._currentAnchor = anchor || this.anchor;
- anchor = document.getAnonymousElementByAttribute(this._currentAnchor, "class", "toolbarbutton-icon");
- this.panel.openPopup(anchor, "bottomcenter topright", 0, 0, false, false);
- Services.telemetry.getHistogramById("SOCIAL_TOOLBAR_BUTTONS").add(0);
- }
-};
-
-})();
diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css
index f03f21c3f..ac5bf9e9b 100644
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -933,11 +933,6 @@ html|*#gcli-output-frame,
transition: none;
}
-panelview > .social-panel-frame {
- width: auto;
- height: auto;
-}
-
/* Translation */
notification[value="translation"] {
-moz-binding: url("chrome://browser/content/translation-infobar.xml#translationbar");
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 2380f5d21..4b8ec864b 100755
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -44,7 +44,6 @@ Cu.import("resource://gre/modules/NotificationDB.jsm");
["ShortcutUtils", "resource://gre/modules/ShortcutUtils.jsm"],
["SimpleServiceDiscovery", "resource://gre/modules/SimpleServiceDiscovery.jsm"],
["SitePermissions", "resource:///modules/SitePermissions.jsm"],
- ["Social", "resource:///modules/Social.jsm"],
["TabCrashHandler", "resource:///modules/ContentCrashHandlers.jsm"],
["Task", "resource://gre/modules/Task.jsm"],
["TelemetryStopwatch", "resource://gre/modules/TelemetryStopwatch.jsm"],
@@ -60,8 +59,10 @@ Cu.import("resource://gre/modules/NotificationDB.jsm");
["webrtcUI", "resource:///modules/webrtcUI.jsm", ]
].forEach(([name, resource]) => XPCOMUtils.defineLazyModuleGetter(this, name, resource));
-XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
- "resource://gre/modules/SafeBrowsing.jsm");
+#ifdef MOZ_SAFE_BROWSING
+ XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
+ "resource://gre/modules/SafeBrowsing.jsm");
+#endif
// lazy service getters
[
@@ -1200,8 +1201,10 @@ var gBrowserInit = {
}
}
+#ifdef MOZ_SAFE_BROWSING
// Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008.
setTimeout(function() { SafeBrowsing.init(); }, 2000);
+#endif
Services.obs.addObserver(gIdentityHandler, "perm-changed", false);
Services.obs.addObserver(gSessionHistoryObserver, "browser:purge-session-history", false);
@@ -1401,8 +1404,6 @@ var gBrowserInit = {
// Enable the Restore Last Session command if needed
RestoreLastSessionObserver.init();
- SocialUI.init();
-
// Start monitoring slow add-ons
AddonWatcher.init();
@@ -1533,7 +1534,6 @@ var gBrowserInit = {
gPrefService.removeObserver(ctrlTab.prefName, ctrlTab);
ctrlTab.uninit();
- SocialUI.uninit();
gBrowserThumbnails.uninit();
FullZoom.destroy();
@@ -4293,9 +4293,7 @@ var XULBrowserWindow = {
// Called before links are navigated to to allow us to retarget them if needed.
onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) {
- let target = BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
- SocialUI.closeSocialPanelForLinkTraversal(target, linkNode);
- return target;
+ return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
},
// Check whether this URI should load in the current process
@@ -4476,8 +4474,6 @@ var XULBrowserWindow = {
gIdentityHandler.onLocationChange();
- SocialUI.updateState();
-
UITour.onLocationChange(location);
gTabletModePageCounter.inc();
diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul
index 485471ee3..4f1b48349 100644
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -268,27 +268,6 @@
<box id="UITourHighlight"></box>
</panel>
- <panel id="social-share-panel"
- class="social-panel"
- type="arrow"
- orient="vertical"
- onpopupshowing="SocialShare.onShowing()"
- onpopuphidden="SocialShare.onHidden()"
- hidden="true">
- <hbox class="social-share-toolbar">
- <toolbarbutton id="manage-share-providers" class="share-provider-button"
- tooltiptext="&social.addons.label;"
- oncommand="BrowserOpenAddonsMgr('addons://list/service');
- this.parentNode.parentNode.hidePopup();"/>
- <arrowscrollbox id="social-share-provider-buttons" orient="horizontal" flex="1" pack="end">
- <toolbarbutton id="add-share-provider" class="share-provider-button" type="radio"
- group="share-providers" tooltiptext="&findShareServices.label;"
- oncommand="SocialShare.showDirectory()"/>
- </arrowscrollbox>
- </hbox>
- <hbox id="share-container" flex="1"/>
- </panel>
-
<menupopup id="toolbar-context-menu"
onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));">
<menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
@@ -426,11 +405,6 @@
#endif
</tooltip>
- <tooltip id="share-button-tooltip" onpopupshowing="SocialShare.createTooltip(event);">
- <label class="tooltip-label"/>
- <label class="tooltip-label"/>
- </tooltip>
-
#include popup-notifications.inc
#include ../../components/customizableui/content/panelUI.inc.xul
diff --git a/browser/base/content/content.js b/browser/base/content/content.js
index 496e0d111..5758cb023 100644
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -698,37 +698,6 @@ var PageMetadataMessenger = {
}
PageMetadataMessenger.init();
-addEventListener("ActivateSocialFeature", function (aEvent) {
- let document = content.document;
- let dwu = content.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils);
- if (!dwu.isHandlingUserInput) {
- Cu.reportError("attempt to activate provider without user input from " + document.nodePrincipal.origin);
- return;
- }
-
- let node = aEvent.target;
- let ownerDocument = node.ownerDocument;
- let data = node.getAttribute("data-service");
- if (data) {
- try {
- data = JSON.parse(data);
- } catch (e) {
- Cu.reportError("Social Service manifest parse error: " + e);
- return;
- }
- } else {
- Cu.reportError("Social Service manifest not available");
- return;
- }
-
- sendAsyncMessage("Social:Activation", {
- url: ownerDocument.location.href,
- origin: ownerDocument.nodePrincipal.origin,
- manifest: data
- });
-}, true, true);
-
addMessageListener("ContextMenu:SaveVideoFrameAsImage", (message) => {
let video = message.objects.target;
let canvas = content.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
diff --git a/browser/base/content/global-scripts.inc b/browser/base/content/global-scripts.inc
index dac75878d..eef21e15e 100755
--- a/browser/base/content/global-scripts.inc
+++ b/browser/base/content/global-scripts.inc
@@ -23,9 +23,10 @@
<script type="application/javascript" src="chrome://browser/content/browser-places.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-plugins.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-refreshblocker.js"/>
+#ifdef MOZ_SAFE_BROWSING
<script type="application/javascript" src="chrome://browser/content/browser-safebrowsing.js"/>
+#endif
<script type="application/javascript" src="chrome://browser/content/browser-sidebar.js"/>
-<script type="application/javascript" src="chrome://browser/content/browser-social.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-syncui.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-tabsintitlebar.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-thumbnails.js"/>
diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js
index 955184f64..097caf367 100644
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -174,15 +174,15 @@ nsContextMenu.prototype = {
initNavigationItems: function CM_initNavigationItems() {
var shouldShow = !(this.isContentSelected || this.onLink || this.onImage ||
this.onCanvas || this.onVideo || this.onAudio ||
- this.onTextInput || this.onSocial);
+ this.onTextInput);
this.showItem("context-navigation", shouldShow);
this.showItem("context-sep-navigation", shouldShow);
let stopped = XULBrowserWindow.stopCommand.getAttribute("disabled") == "true";
let stopReloadItem = "";
- if (shouldShow || this.onSocial) {
- stopReloadItem = (stopped || this.onSocial) ? "reload" : "stop";
+ if (shouldShow) {
+ stopReloadItem = (stopped) ? "reload" : "stop";
}
this.showItem("context-reload", stopReloadItem == "reload");
@@ -249,7 +249,7 @@ nsContextMenu.prototype = {
this.onImage || this.onCanvas ||
this.onVideo || this.onAudio ||
this.onLink || this.onTextInput);
- var showInspect = !this.onSocial && gPrefService.getBoolPref("devtools.inspector.enabled");
+ var showInspect = gPrefService.getBoolPref("devtools.inspector.enabled");
this.showItem("context-viewsource", shouldShow);
this.showItem("context-viewinfo", shouldShow);
this.showItem("inspect-separator", showInspect);
@@ -306,12 +306,11 @@ nsContextMenu.prototype = {
let bookmarkPage = document.getElementById("context-bookmarkpage");
this.showItem(bookmarkPage,
!(this.isContentSelected || this.onTextInput || this.onLink ||
- this.onImage || this.onVideo || this.onAudio || this.onSocial ||
- this.onCanvas));
+ this.onImage || this.onVideo || this.onAudio || this.onCanvas));
bookmarkPage.setAttribute("tooltiptext", bookmarkPage.getAttribute("buttontooltiptext"));
- this.showItem("context-bookmarklink", (this.onLink && !this.onMailtoLink &&
- !this.onSocial) || this.onPlainTextLink);
+ this.showItem("context-bookmarklink", (this.onLink && !this.onMailtoLink) ||
+ this.onPlainTextLink);
this.showItem("context-keywordfield",
this.onTextInput && this.onKeywordField);
this.showItem("frame", this.inFrame);
@@ -349,19 +348,6 @@ nsContextMenu.prototype = {
this.onTextInput && !this.onNumeric && top.gBidiUI);
this.showItem("context-bidi-page-direction-toggle",
!this.onTextInput && top.gBidiUI);
-
- // SocialShare
- let shareButton = SocialShare.shareButton;
- let shareEnabled = shareButton && !shareButton.disabled && !this.onSocial;
- let pageShare = shareEnabled && !(this.isContentSelected ||
- this.onTextInput || this.onLink || this.onImage ||
- this.onVideo || this.onAudio || this.onCanvas);
- this.showItem("context-sharepage", pageShare);
- this.showItem("context-shareselect", shareEnabled && this.isContentSelected);
- this.showItem("context-sharelink", shareEnabled && (this.onLink || this.onPlainTextLink) && !this.onMailtoLink);
- this.showItem("context-shareimage", shareEnabled && this.onImage);
- this.showItem("context-sharevideo", shareEnabled && this.onVideo);
- this.setItemAttr("context-sharevideo", "disabled", !this.mediaURL || this.mediaURL.startsWith("blob:"));
},
initSpellingItems: function() {
@@ -681,7 +667,6 @@ nsContextMenu.prototype = {
.getInterface(Ci.nsIDOMWindowUtils)
.outerWindowID;
}
- this.onSocial = !!this.browser.getAttribute("origin");
// Check if we are in a synthetic document (stand alone image, video, etc.).
this.inSyntheticDoc = ownerDoc.mozSyntheticDocument;
@@ -1726,22 +1711,6 @@ nsContextMenu.prototype = {
mm.sendAsyncMessage("ContextMenu:BookmarkFrame", null, { target: this.target });
},
- shareLink: function CM_shareLink() {
- SocialShare.sharePage(null, { url: this.linkURI.spec }, this.target);
- },
-
- shareImage: function CM_shareImage() {
- SocialShare.sharePage(null, { url: this.imageURL, previews: [ this.mediaURL ] }, this.target);
- },
-
- shareVideo: function CM_shareVideo() {
- SocialShare.sharePage(null, { url: this.mediaURL, source: this.mediaURL }, this.target);
- },
-
- shareSelect: function CM_shareSelect() {
- SocialShare.sharePage(null, { url: this.browser.currentURI.spec, text: this.textSelected }, this.target);
- },
-
savePageAs: function CM_savePageAs() {
saveBrowser(this.browser);
},
@@ -1856,7 +1825,7 @@ nsContextMenu.prototype = {
_getTelemetryPageContextInfo: function() {
let rv = [];
for (let k of ["isContentSelected", "onLink", "onImage", "onCanvas", "onVideo", "onAudio",
- "onTextInput", "onSocial"]) {
+ "onTextInput"]) {
if (this[k]) {
rv.push(k.replace(/^(?:is|on)(.)/, (match, firstLetter) => firstLetter.toLowerCase()));
}
diff --git a/browser/base/content/social-content.js b/browser/base/content/social-content.js
deleted file mode 100644
index b5fa6a5c4..000000000
--- a/browser/base/content/social-content.js
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* This content script is intended for use by iframes in the share panel. */
-
-var {interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-// social frames are always treated as app tabs
-docShell.isAppTab = true;
-
-addEventListener("DOMContentLoaded", function(event) {
- if (event.target != content.document)
- return;
- // Some share panels (e.g. twitter and facebook) check content.opener, and if
- // it doesn't exist they act like they are in a browser tab. We want them to
- // act like they are in a dialog (which is the typical case).
- if (content && !content.opener) {
- content.opener = content;
- }
- hookWindowClose();
- disableDialogs();
-});
-
-addMessageListener("Social:OpenGraphData", (message) => {
- let ev = new content.CustomEvent("OpenGraphData", { detail: JSON.stringify(message.data) });
- content.dispatchEvent(ev);
-});
-
-addMessageListener("Social:ClearFrame", () => {
- docShell.createAboutBlankContentViewer(null);
-});
-
-addEventListener("DOMWindowClose", (evt) => {
- // preventDefault stops the default window.close() function being called,
- // which doesn't actually close anything but causes things to get into
- // a bad state (an internal 'closed' flag is set and debug builds start
- // asserting as the window is used.).
- // None of the windows we inject this API into are suitable for this
- // default close behaviour, so even if we took no action above, we avoid
- // the default close from doing anything.
- evt.preventDefault();
-
- // Tells the SocialShare class to close the panel
- sendAsyncMessage("Social:DOMWindowClose");
-});
-
-function hookWindowClose() {
- // Allow scripts to close the "window". Because we are in a panel and not
- // in a full dialog, the DOMWindowClose listener above will only receive the
- // event if we do this.
- let dwu = content.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils);
- dwu.allowScriptsToClose();
-}
-
-function disableDialogs() {
- let windowUtils = content.QueryInterface(Ci.nsIInterfaceRequestor).
- getInterface(Ci.nsIDOMWindowUtils);
- windowUtils.disableDialogs();
-}
-
-// Error handling class used to listen for network errors in the social frames
-// and replace them with a social-specific error page
-const SocialErrorListener = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMEventListener,
- Ci.nsIWebProgressListener,
- Ci.nsISupportsWeakReference,
- Ci.nsISupports]),
-
- defaultTemplate: "about:socialerror?mode=tryAgainOnly&url=%{url}&origin=%{origin}",
- urlTemplate: null,
-
- init() {
- addMessageListener("Social:SetErrorURL", this);
- let webProgress = docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIWebProgress);
- webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_STATE_REQUEST |
- Ci.nsIWebProgress.NOTIFY_LOCATION);
- },
-
- receiveMessage(message) {
- switch (message.name) {
- case "Social:SetErrorURL":
- // Either a url or null to reset to default template.
- this.urlTemplate = message.data.template;
- break;
- }
- },
-
- setErrorPage() {
- // if this is about:providerdirectory, use the directory iframe
- let frame = docShell.chromeEventHandler;
- let origin = frame.getAttribute("origin");
- let src = frame.getAttribute("src");
- if (src == "about:providerdirectory") {
- frame = content.document.getElementById("activation-frame");
- src = frame.getAttribute("src");
- }
-
- let url = this.urlTemplate || this.defaultTemplate;
- url = url.replace("%{url}", encodeURIComponent(src));
- url = url.replace("%{origin}", encodeURIComponent(origin));
- if (frame != docShell.chromeEventHandler) {
- // Unable to access frame.docShell here. This is our own frame and doesn't
- // provide reload, so we'll just set the src.
- frame.setAttribute("src", url);
- } else {
- let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
- webNav.loadURI(url, null, null, null, null);
- }
- sendAsyncMessage("Social:ErrorPageNotify", {
- origin: origin,
- url: src
- });
- },
-
- onStateChange(aWebProgress, aRequest, aState, aStatus) {
- let failure = false;
- if ((aState & Ci.nsIWebProgressListener.STATE_IS_REQUEST))
- return;
- if ((aState & Ci.nsIWebProgressListener.STATE_STOP)) {
- if (aRequest instanceof Ci.nsIHttpChannel) {
- try {
- // Change the frame to an error page on 4xx (client errors)
- // and 5xx (server errors). responseStatus throws if it is not set.
- failure = aRequest.responseStatus >= 400 &&
- aRequest.responseStatus < 600;
- } catch (e) {
- failure = aStatus != Components.results.NS_OK;
- }
- }
- }
-
- // Calling cancel() will raise some OnStateChange notifications by itself,
- // so avoid doing that more than once
- if (failure && aStatus != Components.results.NS_BINDING_ABORTED) {
- // if tp is enabled and we get a failure, ignore failures (ie. STATE_STOP)
- // on child resources since they *may* have been blocked. We don't have an
- // easy way to know if a particular url is blocked by TP, only that
- // something was.
- if (docShell.hasTrackingContentBlocked) {
- let frame = docShell.chromeEventHandler;
- let src = frame.getAttribute("src");
- if (aRequest && aRequest.name != src) {
- Cu.reportError("SocialErrorListener ignoring blocked content error for " + aRequest.name);
- return;
- }
- }
-
- aRequest.cancel(Components.results.NS_BINDING_ABORTED);
- this.setErrorPage();
- }
- },
-
- onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
- if (aRequest && aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) {
- aRequest.cancel(Components.results.NS_BINDING_ABORTED);
- this.setErrorPage();
- }
- },
-
- onProgressChange() {},
- onStatusChange() {},
- onSecurityChange() {},
-};
-
-SocialErrorListener.init();
diff --git a/browser/base/content/tab-content.js b/browser/base/content/tab-content.js
index 7e803796a..a57dc6607 100644
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -307,7 +307,7 @@ var AboutReaderListener = {
if (content.document.body) {
// Update the toolbar icon to show the "reader active" icon.
sendAsyncMessage("Reader:UpdateReaderButton");
- new AboutReader(global, content, this._articlePromise);
+ new AboutReader(content, this._articlePromise);
this._articlePromise = null;
}
break;
diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js
index b041915a7..4ea6d8f90 100644
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -819,9 +819,8 @@ function openTourPage()
function buildHelpMenu()
{
// Enable/disable the "Report Web Forgery" menu item.
- if (typeof gSafeBrowsing != "undefined") {
+ if (typeof gSafeBrowsing != "undefined")
gSafeBrowsing.setReportPhishingMenu();
- }
}
function isElementVisible(aElement)
diff --git a/browser/base/content/web-panels.xul b/browser/base/content/web-panels.xul
index 4693d878b..223b20ed7 100644
--- a/browser/base/content/web-panels.xul
+++ b/browser/base/content/web-panels.xul
@@ -23,7 +23,6 @@
<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
<script type="application/javascript" src="chrome://browser/content/browser.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-places.js"/>
- <script type="application/javascript" src="chrome://browser/content/browser-social.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-fxaccounts.js"/>
<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>
<script type="application/javascript" src="chrome://browser/content/web-panels.js"/>
diff --git a/browser/base/jar.mn b/browser/base/jar.mn
index c58265351..5ec92d79a 100644
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -61,8 +61,6 @@ browser.jar:
content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
- content/browser/aboutSocialError.xhtml (content/aboutSocialError.xhtml)
- content/browser/aboutProviderDirectory.xhtml (content/aboutProviderDirectory.xhtml)
content/browser/aboutTabCrashed.css (content/aboutTabCrashed.css)
content/browser/aboutTabCrashed.js (content/aboutTabCrashed.js)
content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml)
@@ -84,9 +82,10 @@ browser.jar:
content/browser/browser-places.js (content/browser-places.js)
content/browser/browser-plugins.js (content/browser-plugins.js)
content/browser/browser-refreshblocker.js (content/browser-refreshblocker.js)
+#ifdef MOZ_SAFE_BROWSING
content/browser/browser-safebrowsing.js (content/browser-safebrowsing.js)
+#endif
content/browser/browser-sidebar.js (content/browser-sidebar.js)
- content/browser/browser-social.js (content/browser-social.js)
* content/browser/browser-syncui.js (content/browser-syncui.js)
* content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml)
#ifdef CAN_DRAW_IN_TITLEBAR
@@ -98,7 +97,6 @@ browser.jar:
content/browser/browser-trackingprotection.js (content/browser-trackingprotection.js)
* content/browser/tab-content.js (content/tab-content.js)
content/browser/content.js (content/content.js)
- content/browser/social-content.js (content/social-content.js)
content/browser/defaultthemes/1.footer.jpg (content/defaultthemes/1.footer.jpg)
content/browser/defaultthemes/1.header.jpg (content/defaultthemes/1.header.jpg)
content/browser/defaultthemes/1.icon.jpg (content/defaultthemes/1.icon.jpg)
@@ -186,8 +184,10 @@ browser.jar:
# the following files are browser-specific overrides
* content/browser/license.html (/toolkit/content/license.html)
% override chrome://global/content/license.html chrome://browser/content/license.html
+#ifdef MOZ_SAFE_BROWSING
content/browser/report-phishing-overlay.xul (content/report-phishing-overlay.xul)
content/browser/blockedSite.xhtml (content/blockedSite.xhtml)
% overlay chrome://browser/content/browser.xul chrome://browser/content/report-phishing-overlay.xul
+#endif
% override chrome://global/content/netError.xhtml chrome://browser/content/aboutNetError.xhtml
diff --git a/browser/branding/official/LICENSE b/browser/branding/official/LICENSE
index 32d55b9c7..8833fe212 100644
--- a/browser/branding/official/LICENSE
+++ b/browser/branding/official/LICENSE
@@ -1,10 +1,10 @@
-These files are under the MPL 2, as below. However, please note that you
-are not granted any trademark rights or licenses to the trademarks of the
-Mozilla Foundation or any party, including without limitation the
-Firefox name or logo.
+This location contains official branding for the Basilisk browser.
-For more information, see: http://www.mozilla.org/foundation/licensing.html
+Please note that you are not granted any trademark rights or licenses
+to the trademarks of Moonchild Productions or any other party,
+including without limitation the Basilisk name or logo.
-This Source Code Form is subject to the terms of the Mozilla Public
-License, v. 2.0. If a copy of the MPL was not distributed with this
-file, You can obtain one at http://mozilla.org/MPL/2.0/.
+These branding materials are Copyrighted (c) M. Straver. All rights reserved.
+
+Official branding using these files is only allowed by the copyright holder
+or by third parties with express permission from the copyright holder. \ No newline at end of file
diff --git a/browser/branding/shared/preferences.inc b/browser/branding/shared/preferences.inc
index 90fd3da06..e1b8d3be6 100644
--- a/browser/branding/shared/preferences.inc
+++ b/browser/branding/shared/preferences.inc
@@ -22,14 +22,5 @@ pref("app.update.badgeWaitTime", 0);
// If this is less than 5, then pasting code into the web console or scratchpad is disabled
pref("devtools.selfxss.count", 100);
-// Disable Google Safebrowsing by default. Without an API key, this won't work.
-pref("browser.safebrowsing.phishing.enabled", false);
-pref("browser.safebrowsing.malware.enabled", false);
-pref("browser.safebrowsing.downloads.enabled", false);
-pref("browser.safebrowsing.downloads.remote.enabled", false);
-
-// Disable the UI controls for it as well for Basilisk-official.
-pref("browser.safebrowsing.UI.enabled", false);
-
//
pref("general.useragent.appVersionIsBuildID", true);
diff --git a/browser/branding/unofficial/LICENSE b/browser/branding/unofficial/LICENSE
new file mode 100644
index 000000000..35dec1819
--- /dev/null
+++ b/browser/branding/unofficial/LICENSE
@@ -0,0 +1,9 @@
+The Serpent application name and Serpent logo are licensed under a
+Creative Commons Attribution license.
+
+The Serpent logo is derived from "Sea Serpent"
+ by Lorc,
+licensed under the Creative Commons license CC-BY 3.0
+
+Branding files are created by M. Straver and similarly released
+under the Creative Commons license CC-BY 3.0 \ No newline at end of file
diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp
index 717ae9c48..b77949ea7 100644
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -40,6 +40,7 @@ static RedirEntry kRedirMap[] = {
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::HIDE_FROM_ABOUTABOUT
},
+#ifdef MOZ_SAFE_BROWSING
{
"blocked", "chrome://browser/content/blockedSite.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
@@ -47,6 +48,7 @@ static RedirEntry kRedirMap[] = {
nsIAboutModule::ALLOW_SCRIPT |
nsIAboutModule::HIDE_FROM_ABOUTABOUT
},
+#endif
{
"certerror", "chrome://browser/content/aboutNetError.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
@@ -55,16 +57,6 @@ static RedirEntry kRedirMap[] = {
nsIAboutModule::HIDE_FROM_ABOUTABOUT
},
{
- "socialerror", "chrome://browser/content/aboutSocialError.xhtml",
- nsIAboutModule::ALLOW_SCRIPT |
- nsIAboutModule::HIDE_FROM_ABOUTABOUT
- },
- {
- "providerdirectory", "chrome://browser/content/aboutProviderDirectory.xhtml",
- nsIAboutModule::ALLOW_SCRIPT |
- nsIAboutModule::HIDE_FROM_ABOUTABOUT
- },
- {
"tabcrashed", "chrome://browser/content/aboutTabCrashed.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::ALLOW_SCRIPT |
diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp
index 1fad0ce68..1baccd710 100644
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -86,10 +86,10 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
#endif
{ NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "basilisk", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+#ifdef MOZ_SAFE_BROWSING
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "blocked", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+#endif
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "certerror", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
- { NS_ABOUT_MODULE_CONTRACTID_PREFIX "socialerror", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
- { NS_ABOUT_MODULE_CONTRACTID_PREFIX "providerdirectory", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "tabcrashed", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "feeds", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "privatebrowsing", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
diff --git a/browser/components/customizableui/CustomizableWidgets.jsm b/browser/components/customizableui/CustomizableWidgets.jsm
index 3e83b081c..3e00d385f 100644
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -557,47 +557,6 @@ const CustomizableWidgets = [
fillSubviewFromMenuItems([...menu.children], sidebarItems);
}
}, {
- id: "social-share-button",
- // custom build our button so we can attach to the share command
- type: "custom",
- onBuild: function(aDocument) {
- let node = aDocument.createElementNS(kNSXUL, "toolbarbutton");
- node.setAttribute("id", this.id);
- node.classList.add("toolbarbutton-1");
- node.classList.add("chromeclass-toolbar-additional");
- node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label"));
- node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext"));
- node.setAttribute("removable", "true");
- node.setAttribute("observes", "Social:PageShareable");
- node.setAttribute("command", "Social:SharePage");
-
- let listener = {
- onWidgetAdded: (aWidgetId) => {
- if (aWidgetId != this.id)
- return;
-
- Services.obs.notifyObservers(null, "social:" + this.id + "-added", null);
- },
-
- onWidgetRemoved: aWidgetId => {
- if (aWidgetId != this.id)
- return;
-
- Services.obs.notifyObservers(null, "social:" + this.id + "-removed", null);
- },
-
- onWidgetInstanceRemoved: (aWidgetId, aDoc) => {
- if (aWidgetId != this.id || aDoc != aDocument)
- return;
-
- CustomizableUI.removeListener(listener);
- }
- };
- CustomizableUI.addListener(listener);
-
- return node;
- }
- }, {
id: "add-ons-button",
shortcutId: "key_openAddons",
tooltiptext: "add-ons-button.tooltiptext3",
diff --git a/browser/components/customizableui/content/panelUI.inc.xul b/browser/components/customizableui/content/panelUI.inc.xul
index 1b8fc0236..077d9c014 100644
--- a/browser/components/customizableui/content/panelUI.inc.xul
+++ b/browser/components/customizableui/content/panelUI.inc.xul
@@ -240,8 +240,6 @@
onclick="PanelUI.hide();"/>
</panelview>
- <panelview id="PanelUI-socialapi" flex="1"/>
-
<panelview id="PanelUI-feeds" flex="1" oncommand="FeedHandler.subscribeToFeed(null, event);">
<label value="&feedsMenu2.label;" class="panel-subview-header"/>
</panelview>
diff --git a/browser/components/preferences/blocklists.js b/browser/components/preferences/blocklists.js
index bc39eb6bd..c0ce5b656 100644
--- a/browser/components/preferences/blocklists.js
+++ b/browser/components/preferences/blocklists.js
@@ -6,9 +6,11 @@ Components.utils.import("resource://gre/modules/Services.jsm");
const BASE_LIST_ID = "base";
const CONTENT_LIST_ID = "content";
const TRACK_SUFFIX = "-track-digest256";
+#ifdef MOZ_SAFE_BROWSING
const TRACKING_TABLE_PREF = "urlclassifier.trackingTable";
const LISTS_PREF_BRANCH = "browser.safebrowsing.provider.mozilla.lists.";
const UPDATE_TIME_PREF = "browser.safebrowsing.provider.mozilla.nextupdatetime";
+#endif
var gBlocklistManager = {
_type: "",
diff --git a/browser/components/preferences/in-content/jar.mn b/browser/components/preferences/in-content/jar.mn
index 3497ff555..130bf8549 100644
--- a/browser/components/preferences/in-content/jar.mn
+++ b/browser/components/preferences/in-content/jar.mn
@@ -14,5 +14,5 @@ browser.jar:
content/browser/preferences/in-content/applications.js
* content/browser/preferences/in-content/content.js
content/browser/preferences/in-content/sync.js
- content/browser/preferences/in-content/security.js
+* content/browser/preferences/in-content/security.js
content/browser/preferences/in-content/search.js
diff --git a/browser/components/preferences/in-content/security.js b/browser/components/preferences/in-content/security.js
index 0d7af39a3..37a187f9c 100644
--- a/browser/components/preferences/in-content/security.js
+++ b/browser/components/preferences/in-content/security.js
@@ -23,7 +23,9 @@ var gSecurityPane = {
this._pane = document.getElementById("paneSecurity");
this._initMasterPasswordUI();
+#ifdef MOZ_SAFE_BROWSING
this._initSafeBrowsing();
+#endif
setEventListener("addonExceptions", "command",
gSecurityPane.showAddonExceptions);
@@ -160,6 +162,7 @@ var gSecurityPane = {
checkbox.checked = !noMP;
},
+#ifdef MOZ_SAFE_BROWSING
_initSafeBrowsing() {
let enableSafeBrowsing = document.getElementById("enableSafeBrowsing");
let blockDownloads = document.getElementById("blockDownloads");
@@ -168,24 +171,12 @@ var gSecurityPane = {
let safeBrowsingPhishingPref = document.getElementById("browser.safebrowsing.phishing.enabled");
let safeBrowsingMalwarePref = document.getElementById("browser.safebrowsing.malware.enabled");
- let safeBrowsingUIPref = document.getElementById("browser.safebrowsing.UI.enabled");
- let safeBrowsingUISep = document.getElementById("safeBrowsingUISep");
- let safeBrowsingUIGroup = document.getElementById("safeBrowsingUIGroup");
-
let blockDownloadsPref = document.getElementById("browser.safebrowsing.downloads.enabled");
let malwareTable = document.getElementById("urlclassifier.malwareTable");
let blockUnwantedPref = document.getElementById("browser.safebrowsing.downloads.remote.block_potentially_unwanted");
let blockUncommonPref = document.getElementById("browser.safebrowsing.downloads.remote.block_uncommon");
- if (safeBrowsingUIPref.value == false) {
- safeBrowsingUISep.setAttribute("hidden", "true");
- safeBrowsingUIGroup.setAttribute("hidden", "true");
- } else {
- safeBrowsingUISep.removeAttribute("hidden");
- safeBrowsingUIGroup.removeAttribute("hidden");
- }
-
enableSafeBrowsing.addEventListener("command", function() {
safeBrowsingPhishingPref.value = enableSafeBrowsing.checked;
safeBrowsingMalwarePref.value = enableSafeBrowsing.checked;
@@ -244,6 +235,7 @@ var gSecurityPane = {
blockUncommonUnwanted.checked = blockUnwantedPref.value && blockUncommonPref.value;
},
+#endif
/**
* Enables/disables the master password button depending on the state of the
diff --git a/browser/components/preferences/in-content/security.xul b/browser/components/preferences/in-content/security.xul
index 5dc8ad5e9..33e1471bd 100644
--- a/browser/components/preferences/in-content/security.xul
+++ b/browser/components/preferences/in-content/security.xul
@@ -16,11 +16,13 @@
name="pref.privacy.disable_button.view_passwords_exceptions"
type="bool"/>
- <!-- Add-ons, malware, phishing -->
+ <!-- Add-ons -->
<preference id="xpinstall.whitelist.required"
name="xpinstall.whitelist.required"
type="bool"/>
+#ifdef MOZ_SAFE_BROWSING
+ <!-- Malware, phishing -->
<preference id="browser.safebrowsing.malware.enabled"
name="browser.safebrowsing.malware.enabled"
type="bool"/>
@@ -28,10 +30,6 @@
name="browser.safebrowsing.phishing.enabled"
type="bool"/>
- <preference id="browser.safebrowsing.UI.enabled"
- name="browser.safebrowsing.UI.enabled"
- type="bool"/>
-
<preference id="browser.safebrowsing.downloads.enabled"
name="browser.safebrowsing.downloads.enabled"
type="bool"/>
@@ -46,6 +44,7 @@
<preference id="browser.safebrowsing.downloads.remote.block_uncommon"
name="browser.safebrowsing.downloads.remote.block_uncommon"
type="bool"/>
+#endif
<!-- Passwords -->
<preference id="signon.rememberSignons" name="signon.rememberSignons" type="bool"/>
@@ -61,7 +60,7 @@
<html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a>
</hbox>
-<!-- addons, forgery (phishing) UI -->
+<!-- addons -->
<groupbox id="addonsPhishingGroup" data-category="paneSecurity" hidden="true">
<caption><label>&general.label;</label></caption>
@@ -77,8 +76,10 @@
accesskey="&addonExceptions.accesskey;"/>
</hbox>
- <separator id="safeBrowsingUISep" class="thin"/>
- <vbox id="safeBrowsingUIGroup" align="start">
+#ifdef MOZ_SAFE_BROWSING
+<!-- Safebrowsing (phishing) UI -->
+ <separator class="thin"/>
+ <vbox align="start">
<checkbox id="enableSafeBrowsing"
label="&enableSafeBrowsing.label;"
accesskey="&enableSafeBrowsing.accesskey;" />
@@ -91,6 +92,7 @@
accesskey="&blockUncommonUnwanted.accesskey;" />
</vbox>
</vbox>
+#endif
</groupbox>
<!-- Passwords -->
diff --git a/browser/confvars.sh b/browser/confvars.sh
index 41c0be3d7..0343034a4 100755
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -59,6 +59,7 @@ MOZ_DEVTOOLS=1
MOZ_SERVICES_COMMON=1
MOZ_SERVICES_SYNC=1
MOZ_SERVICES_HEALTHREPORT=
+MOZ_SAFE_BROWSING=
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
diff --git a/browser/docs/UITelemetry.rst b/browser/docs/UITelemetry.rst
index 0b3302f8f..1a9213359 100644
--- a/browser/docs/UITelemetry.rst
+++ b/browser/docs/UITelemetry.rst
@@ -128,7 +128,6 @@ divide the following different context menu situations:
- ``canvas`` if the user opened the context menu on a canvas (that isn't a link);
- ``media`` if the user opened the context menu on an HTML video or audio element;
- ``input`` if the user opened the context menu on a text input element;
-- ``social`` if the user opened the context menu inside a social frame;
- ``other`` for all other openings of the content menu;
Each of these objects (if they exist) then gets a "withcustom" and/or a "withoutcustom" property
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
index 4ef8942b5..27dfc4e05 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -69,9 +69,6 @@
#ifndef MOZ_STATIC_JS
@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
#endif
-#ifdef MOZ_DMD
-@BINPATH@/@DLL_PREFIX@dmd@DLL_SUFFIX@
-#endif
#ifndef MOZ_SYSTEM_NSPR
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
@@ -254,9 +251,6 @@
@RESPATH@/components/layout_xul.xpt
@RESPATH@/components/locale.xpt
@RESPATH@/components/lwbrk.xpt
-#ifdef MOZ_ENABLE_PROFILER_SPS
-@RESPATH@/components/memory_profiler.xpt
-#endif
@RESPATH@/browser/components/migration.xpt
@RESPATH@/components/mimetype.xpt
@RESPATH@/components/mozfind.xpt
@@ -288,9 +282,6 @@
@RESPATH@/components/plugin.xpt
@RESPATH@/components/pref.xpt
@RESPATH@/components/prefetch.xpt
-#ifdef MOZ_ENABLE_PROFILER_SPS
-@RESPATH@/components/profiler.xpt
-#endif
@RESPATH@/components/rdf.xpt
@RESPATH@/components/satchel.xpt
@RESPATH@/components/saxparser.xpt
@@ -417,6 +408,7 @@
#endif
@RESPATH@/components/amWebInstallListener.js
@RESPATH@/components/nsBlocklistService.js
+@RESPATH@/components/blocklist.manifest
#ifdef MOZ_WEBEXTENSIONS
@RESPATH@/components/nsBlocklistServiceContent.js
#endif
@@ -578,12 +570,14 @@
@RESPATH@/browser/modules/*
@RESPATH@/modules/*
+#ifdef MOZ_URL_CLASSIFIER
; Safe Browsing
@RESPATH@/components/nsURLClassifier.manifest
@RESPATH@/components/nsUrlClassifierHashCompleter.js
@RESPATH@/components/nsUrlClassifierListManager.js
@RESPATH@/components/nsUrlClassifierLib.js
@RESPATH@/components/url-classifier.xpt
+#endif
; Private Browsing
@RESPATH@/components/privatebrowsing.xpt
diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd
index 6de17b64f..1045977e8 100644
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -163,22 +163,7 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY bookmarkThisPageCmd.label "Bookmark This Page">
<!ENTITY editThisBookmarkCmd.label "Edit This Bookmark">
<!ENTITY bookmarkThisPageCmd.commandkey "d">
-<!-- LOCALIZATION NOTE (findShareServices.label):
- - Use the unicode ellipsis char, \u2026,
- - or use "..." if \u2026 doesn't suit traditions in your locale. -->
-<!ENTITY findShareServices.label "Find more Share services…">
-<!ENTITY sharePageCmd.label "Share This Page">
-<!ENTITY sharePageCmd.commandkey "S">
-<!ENTITY sharePageCmd.accesskey "s">
-<!-- LOCALIZATION NOTE (shareLink.accesskey): must be different than the following share access keys -->
-<!ENTITY shareLink.label "Share This Link">
-<!ENTITY shareLink.accesskey "h">
-<!ENTITY shareImage.label "Share This Image">
-<!ENTITY shareImage.accesskey "r">
-<!ENTITY shareSelect.label "Share Selection">
-<!ENTITY shareSelect.accesskey "r">
-<!ENTITY shareVideo.label "Share This Video">
-<!ENTITY shareVideo.accesskey "r">
+
<!ENTITY feedsMenu2.label "Subscribe to This Page">
<!ENTITY subscribeToPageMenupopup.label "Subscribe to This Page">
<!ENTITY subscribeToPageMenuitem.label "Subscribe to This Page…">
@@ -780,14 +765,6 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY syncReAuthItem.accesskey "R">
<!ENTITY syncToolbarButton.label "Sync">
-<!ENTITY social.addons.label "Manage Services…">
-
-<!ENTITY social.directory.label "Activations Directory">
-<!ENTITY social.directory.text "You can activate Share services from the directory.">
-<!ENTITY social.directory.button "Take me there!">
-<!ENTITY social.directory.introText "Click on a service to add it to &brandShortName;.">
-<!ENTITY social.directory.viewmore.text "View More">
-
<!ENTITY customizeMode.menuAndToolbars.header2 "Additional Tools and Features">
<!ENTITY customizeMode.menuAndToolbars.empty "Want more tools?">
<!ENTITY customizeMode.menuAndToolbars.emptyLink "Choose from thousands of add-ons">
diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties
index f7f3e9339..46b8aabc7 100644
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -453,29 +453,6 @@ processHang.button_debug.accessKey = D
# LOCALIZATION NOTE (fullscreenButton.tooltip): %S is the keyboard shortcut for full screen
fullscreenButton.tooltip=Display the window in full screen (%S)
-service.toolbarbutton.label=Services
-service.toolbarbutton.tooltiptext=Services
-
-# LOCALIZATION NOTE (social.install.description): %1$S is the hostname of the social provider, %2$S is brandShortName (e.g. Firefox)
-service.install.description=Would you like to enable services from %1$S to display in your %2$S toolbar and sidebar?
-service.install.ok.label=Enable Services
-service.install.ok.accesskey=E
-
-# LOCALIZATION NOTE (social.markpageMenu.label): %S is the name of the social provider
-social.markpageMenu.label=Save Page to %S
-# LOCALIZATION NOTE (social.marklinkMenu.label): %S is the name of the social provider
-social.marklinkMenu.label=Save Link to %S
-
-# LOCALIZATION NOTE (social.error.message): %1$S is brandShortName (e.g. Firefox), %2$S is the name of the social provider
-social.error.message=%1$S is unable to connect with %2$S right now.
-social.error.tryAgain.label=Try Again
-social.error.tryAgain.accesskey=T
-social.error.closeSidebar.label=Close This Sidebar
-social.error.closeSidebar.accesskey=C
-
-# LOCALIZATION NOTE: %1$S is the label for the toolbar button, %2$S is the associated badge numbering that the social provider may provide.
-social.aria.toolbarButtonBadgeText=%1$S (%2$S)
-
# LOCALIZATION NOTE (getUserMedia.shareCamera.message, getUserMedia.shareMicrophone.message,
# getUserMedia.shareScreen.message, getUserMedia.shareCameraAndMicrophone.message,
# getUserMedia.shareScreenAndMicrophone.message, getUserMedia.shareCameraAndAudioCapture.message,
diff --git a/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties b/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties
index a68f59fe3..4574c6a81 100644
--- a/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties
+++ b/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties
@@ -95,9 +95,6 @@ quit-button.tooltiptext.linux2 = Quit %1$S (%2$S)
# %2$S is the keyboard shortcut
quit-button.tooltiptext.mac = Quit %1$S (%2$S)
-social-share-button.label = Share This Page
-social-share-button.tooltiptext = Share this page
-
panic-button.label = Forget
panic-button.tooltiptext = Forget about some browsing history
diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
index 6d76d20f0..31cbd9ccf 100644
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -53,8 +53,10 @@
locale/browser/places/bookmarkProperties.properties (%chrome/browser/places/bookmarkProperties.properties)
locale/browser/preferences/selectBookmark.dtd (%chrome/browser/preferences/selectBookmark.dtd)
locale/browser/places/moveBookmarks.dtd (%chrome/browser/places/moveBookmarks.dtd)
+#ifdef MOZ_SAFE_BROWSING
locale/browser/safebrowsing/phishing-afterload-warning-message.dtd (%chrome/browser/safebrowsing/phishing-afterload-warning-message.dtd)
locale/browser/safebrowsing/report-phishing.dtd (%chrome/browser/safebrowsing/report-phishing.dtd)
+#endif
locale/browser/feeds/subscribe.dtd (%chrome/browser/feeds/subscribe.dtd)
locale/browser/feeds/subscribe.properties (%chrome/browser/feeds/subscribe.properties)
locale/browser/migration/migration.dtd (%chrome/browser/migration/migration.dtd)
diff --git a/browser/modules/BrowserUITelemetry.jsm b/browser/modules/BrowserUITelemetry.jsm
index 392462b45..2ad319f1a 100644
--- a/browser/modules/BrowserUITelemetry.jsm
+++ b/browser/modules/BrowserUITelemetry.jsm
@@ -53,7 +53,6 @@ XPCOMUtils.defineLazyGetter(this, "DEFAULT_AREA_PLACEMENTS", function() {
"pocket-button",
"downloads-button",
"home-button",
- "social-share-button",
],
// It's true that toolbar-menubar is not visible
// on OS X, but the XUL node is definitely present
@@ -694,7 +693,7 @@ this.BrowserUITelemetry = {
"spell-undo-add-to-dictionary", "openlinkincurrent", "openlinkintab",
"openlink",
// "openlinkprivate" intentionally omitted for privacy reasons. See bug 1176391.
- "bookmarklink", "sharelink", "savelink",
+ "bookmarklink", "savelink",
"marklinkMenu", "copyemail", "copylink", "media-play", "media-pause",
"media-mute", "media-unmute", "media-playbackrate",
"media-playbackrate-050x", "media-playbackrate-100x",
@@ -702,12 +701,12 @@ this.BrowserUITelemetry = {
"media-showcontrols", "media-hidecontrols",
"video-fullscreen", "leave-dom-fullscreen",
"reloadimage", "viewimage", "viewvideo", "copyimage-contents", "copyimage",
- "copyvideourl", "copyaudiourl", "saveimage", "shareimage", "sendimage",
+ "copyvideourl", "copyaudiourl", "saveimage", "sendimage",
"setDesktopBackground", "viewimageinfo", "viewimagedesc", "savevideo",
- "sharevideo", "saveaudio", "video-saveimage", "sendvideo", "sendaudio",
- "ctp-play", "ctp-hide", "sharepage", "savepage", "pocket", "markpageMenu",
+ "saveaudio", "video-saveimage", "sendvideo", "sendaudio",
+ "ctp-play", "ctp-hide", "savepage", "pocket", "markpageMenu",
"viewbgimage", "undo", "cut", "copy", "paste", "delete", "selectall",
- "keywordfield", "searchselect", "shareselect", "frame", "showonlythisframe",
+ "keywordfield", "searchselect", "frame", "showonlythisframe",
"openframeintab", "openframe", "reloadframe", "bookmarkframe", "saveframe",
"printframe", "viewframesource", "viewframeinfo",
"viewpartialsource-selection", "viewpartialsource-mathml",
diff --git a/browser/modules/ReaderParent.jsm b/browser/modules/ReaderParent.jsm
index 6fcaada42..c81aa9905 100644
--- a/browser/modules/ReaderParent.jsm
+++ b/browser/modules/ReaderParent.jsm
@@ -11,64 +11,26 @@ this.EXPORTED_SYMBOLS = [ "ReaderParent" ];
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode", "resource://gre/modules/ReaderMode.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "UITour", "resource:///modules/UITour.jsm");
const gStringBundle = Services.strings.createBundle("chrome://global/locale/aboutReader.properties");
var ReaderParent = {
- _readerModeInfoPanelOpen: false,
-
MESSAGES: [
- "Reader:ArticleGet",
- "Reader:FaviconRequest",
"Reader:UpdateReaderButton",
],
- init: function() {
+ init() {
let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
for (let msg of this.MESSAGES) {
mm.addMessageListener(msg, this);
}
},
- receiveMessage: function(message) {
+ receiveMessage(message) {
switch (message.name) {
- case "Reader:ArticleGet":
- this._getArticle(message.data.url, message.target).then((article) => {
- // Make sure the target browser is still alive before trying to send data back.
- if (message.target.messageManager) {
- message.target.messageManager.sendAsyncMessage("Reader:ArticleData", { article: article });
- }
- }, e => {
- if (e && e.newURL) {
- // Make sure the target browser is still alive before trying to send data back.
- if (message.target.messageManager) {
- message.target.messageManager.sendAsyncMessage("Reader:ArticleData", { newURL: e.newURL });
- }
- }
- });
- break;
-
- case "Reader:FaviconRequest": {
- if (message.target.messageManager) {
- let faviconUrl = PlacesUtils.promiseFaviconLinkUrl(message.data.url);
- faviconUrl.then(function onResolution(favicon) {
- message.target.messageManager.sendAsyncMessage("Reader:FaviconReturn", {
- url: message.data.url,
- faviconUrl: favicon.path.replace(/^favicon:/, "")
- })
- },
- function onRejection(reason) {
- Cu.reportError("Error requesting favicon URL for about:reader content: " + reason);
- }).catch(Cu.reportError);
- }
- break;
- }
-
case "Reader:UpdateReaderButton": {
let browser = message.target;
if (message.data && message.data.isArticle !== undefined) {
@@ -80,7 +42,7 @@ var ReaderParent = {
}
},
- updateReaderButton: function(browser) {
+ updateReaderButton(browser) {
let win = browser.ownerGlobal;
if (browser != win.gBrowser.selectedBrowser) {
return;
@@ -88,7 +50,11 @@ var ReaderParent = {
let button = win.document.getElementById("reader-mode-button");
let command = win.document.getElementById("View:ReaderView");
- let key = win.document.getElementById("toggleReaderMode");
+ let key = win.document.getElementById("key_toggleReaderMode");
+ // aria-reader is not a real ARIA attribute. However, this will cause
+ // Gecko accessibility to expose the "reader" object attribute. We do this
+ // so that the reader state is easy for accessibility clients to access
+ // programmatically.
if (browser.currentURI.spec.startsWith("about:reader")) {
button.setAttribute("readeractive", true);
button.hidden = false;
@@ -98,6 +64,7 @@ var ReaderParent = {
command.setAttribute("hidden", false);
command.setAttribute("accesskey", gStringBundle.GetStringFromName("readerView.close.accesskey"));
key.setAttribute("disabled", false);
+ browser.setAttribute("aria-reader", "active");
} else {
button.removeAttribute("readeractive");
button.hidden = !browser.isArticle;
@@ -107,24 +74,15 @@ var ReaderParent = {
command.setAttribute("hidden", !browser.isArticle);
command.setAttribute("accesskey", gStringBundle.GetStringFromName("readerView.enter.accesskey"));
key.setAttribute("disabled", !browser.isArticle);
- }
-
- let currentUriHost = browser.currentURI && browser.currentURI.asciiHost;
- if (browser.isArticle &&
- !Services.prefs.getBoolPref("browser.reader.detectedFirstArticle") &&
- currentUriHost && !currentUriHost.endsWith("mozilla.org")) {
- this.showReaderModeInfoPanel(browser);
- Services.prefs.setBoolPref("browser.reader.detectedFirstArticle", true);
- this._readerModeInfoPanelOpen = true;
- } else if (this._readerModeInfoPanelOpen) {
- if (UITour.isInfoOnTarget(win, "readerMode-urlBar")) {
- UITour.hideInfo(win);
+ if (browser.isArticle) {
+ browser.setAttribute("aria-reader", "available");
+ } else {
+ browser.removeAttribute("aria-reader");
}
- this._readerModeInfoPanelOpen = false;
}
},
- forceShowReaderIcon: function(browser) {
+ forceShowReaderIcon(browser) {
browser.isArticle = true;
this.updateReaderButton(browser);
},
@@ -136,51 +94,9 @@ var ReaderParent = {
this.toggleReaderMode(event);
},
- toggleReaderMode: function(event) {
+ toggleReaderMode(event) {
let win = event.target.ownerGlobal;
let browser = win.gBrowser.selectedBrowser;
browser.messageManager.sendAsyncMessage("Reader:ToggleReaderMode");
- },
-
- /**
- * Shows an info panel from the UITour for Reader Mode.
- *
- * @param browser The <browser> that the tour should be started for.
- */
- showReaderModeInfoPanel(browser) {
- let win = browser.ownerGlobal;
- let targetPromise = UITour.getTarget(win, "readerMode-urlBar");
- targetPromise.then(target => {
- let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
- let icon = "chrome://browser/skin/";
- if (win.devicePixelRatio > 1) {
- icon += "reader-tour@2x.png";
- } else {
- icon += "reader-tour.png";
- }
- UITour.showInfo(win, target,
- browserBundle.GetStringFromName("readingList.promo.firstUse.readerView.title"),
- browserBundle.GetStringFromName("readingList.promo.firstUse.readerView.body"),
- icon);
- });
- },
-
- /**
- * Gets an article for a given URL. This method will download and parse a document.
- *
- * @param url The article URL.
- * @param browser The browser where the article is currently loaded.
- * @return {Promise}
- * @resolves JS object representing the article, or null if no article is found.
- */
- _getArticle: Task.async(function* (url, browser) {
- return yield ReaderMode.downloadAndParseDocument(url).catch(e => {
- if (e && e.newURL) {
- // Pass up the error so we can navigate the browser in question to the new URL:
- throw e;
- }
- Cu.reportError("Error downloading and parsing document: " + e);
- return null;
- });
- })
+ }
};
diff --git a/browser/modules/Social.jsm b/browser/modules/Social.jsm
deleted file mode 100644
index 1569e0122..000000000
--- a/browser/modules/Social.jsm
+++ /dev/null
@@ -1,272 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = ["Social", "OpenGraphBuilder",
- "DynamicResizeWatcher", "sizeSocialPanelToContent"];
-
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cu = Components.utils;
-
-// The minimum sizes for the auto-resize panel code, minimum size necessary to
-// properly show the error page in the panel.
-const PANEL_MIN_HEIGHT = 190;
-const PANEL_MIN_WIDTH = 330;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
- "resource:///modules/CustomizableUI.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "SocialService",
- "resource:///modules/SocialService.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PageMetadata",
- "resource://gre/modules/PageMetadata.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
- "resource://gre/modules/PlacesUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-
-
-this.Social = {
- initialized: false,
- lastEventReceived: 0,
- providers: [],
- _disabledForSafeMode: false,
-
- init: function Social_init() {
- this._disabledForSafeMode = Services.appinfo.inSafeMode && this.enabled;
- let deferred = Promise.defer();
-
- if (this.initialized) {
- deferred.resolve(true);
- return deferred.promise;
- }
- this.initialized = true;
- // if SocialService.hasEnabledProviders, retreive the providers so the
- // front-end can generate UI
- if (SocialService.hasEnabledProviders) {
- // Retrieve the current set of providers, and set the current provider.
- SocialService.getOrderedProviderList(function (providers) {
- Social._updateProviderCache(providers);
- Social._updateEnabledState(SocialService.enabled);
- deferred.resolve(false);
- });
- } else {
- deferred.resolve(false);
- }
-
- // Register an observer for changes to the provider list
- SocialService.registerProviderListener(function providerListener(topic, origin, providers) {
- // An engine change caused by adding/removing a provider should notify.
- // any providers we receive are enabled in the AddonsManager
- if (topic == "provider-installed" || topic == "provider-uninstalled") {
- // installed/uninstalled do not send the providers param
- Services.obs.notifyObservers(null, "social:" + topic, origin);
- return;
- }
- if (topic == "provider-enabled") {
- Social._updateProviderCache(providers);
- Social._updateEnabledState(true);
- Services.obs.notifyObservers(null, "social:" + topic, origin);
- return;
- }
- if (topic == "provider-disabled") {
- // a provider was removed from the list of providers, update states
- Social._updateProviderCache(providers);
- Social._updateEnabledState(providers.length > 0);
- Services.obs.notifyObservers(null, "social:" + topic, origin);
- return;
- }
- if (topic == "provider-update") {
- // a provider has self-updated its manifest, we need to update our cache
- // and reload the provider.
- Social._updateProviderCache(providers);
- let provider = Social._getProviderFromOrigin(origin);
- provider.reload();
- }
- });
- return deferred.promise;
- },
-
- _updateEnabledState: function(enable) {
- for (let p of Social.providers) {
- p.enabled = enable;
- }
- },
-
- // Called to update our cache of providers and set the current provider
- _updateProviderCache: function (providers) {
- this.providers = providers;
- Services.obs.notifyObservers(null, "social:providers-changed", null);
- },
-
- get enabled() {
- return !this._disabledForSafeMode && this.providers.length > 0;
- },
-
- _getProviderFromOrigin: function (origin) {
- for (let p of this.providers) {
- if (p.origin == origin) {
- return p;
- }
- }
- return null;
- },
-
- getManifestByOrigin: function(origin) {
- return SocialService.getManifestByOrigin(origin);
- },
-
- installProvider: function(data, installCallback, options={}) {
- SocialService.installProvider(data, installCallback, options);
- },
-
- uninstallProvider: function(origin, aCallback) {
- SocialService.uninstallProvider(origin, aCallback);
- },
-
- // Activation functionality
- activateFromOrigin: function (origin, callback) {
- // It's OK if the provider has already been activated - we still get called
- // back with it.
- SocialService.enableProvider(origin, callback);
- }
-};
-
-function sizeSocialPanelToContent(panel, iframe, requestedSize) {
- let doc = iframe.contentDocument;
- if (!doc || !doc.body) {
- return;
- }
- // We need an element to use for sizing our panel. See if the body defines
- // an id for that element, otherwise use the body itself.
- let body = doc.body;
- let docEl = doc.documentElement;
- let bodyId = body.getAttribute("contentid");
- if (bodyId) {
- body = doc.getElementById(bodyId) || doc.body;
- }
- // offsetHeight/Width don't include margins, so account for that.
- let cs = doc.defaultView.getComputedStyle(body);
- let width = Math.max(PANEL_MIN_WIDTH, docEl.offsetWidth);
- let height = Math.max(PANEL_MIN_HEIGHT, docEl.offsetHeight);
- // if the panel is preloaded prior to being shown, cs will be null. in that
- // case use the minimum size for the panel until it is shown.
- if (cs) {
- let computedHeight = parseInt(cs.marginTop) + body.offsetHeight + parseInt(cs.marginBottom);
- height = Math.max(computedHeight, height);
- let computedWidth = parseInt(cs.marginLeft) + body.offsetWidth + parseInt(cs.marginRight);
- width = Math.max(computedWidth, width);
- }
-
- // if our scrollHeight is still larger than the iframe, the css calculations
- // above did not work for this site, increase the height. This can happen if
- // the site increases its height for additional UI.
- if (docEl.scrollHeight > iframe.boxObject.height)
- height = docEl.scrollHeight;
-
- // if a size was defined in the manifest use it as a minimum
- if (requestedSize) {
- if (requestedSize.height)
- height = Math.max(height, requestedSize.height);
- if (requestedSize.width)
- width = Math.max(width, requestedSize.width);
- }
-
- // add the extra space used by the panel (toolbar, borders, etc) if the iframe
- // has been loaded
- if (iframe.boxObject.width && iframe.boxObject.height) {
- // add extra space the panel needs if any
- width += panel.boxObject.width - iframe.boxObject.width;
- height += panel.boxObject.height - iframe.boxObject.height;
- }
-
- // using panel.sizeTo will ignore css transitions, set size via style
- if (Math.abs(panel.boxObject.width - width) >= 2)
- panel.style.width = width + "px";
- if (Math.abs(panel.boxObject.height - height) >= 2)
- panel.style.height = height + "px";
-}
-
-function DynamicResizeWatcher() {
- this._mutationObserver = null;
-}
-
-DynamicResizeWatcher.prototype = {
- start: function DynamicResizeWatcher_start(panel, iframe, requestedSize) {
- this.stop(); // just in case...
- let doc = iframe.contentDocument;
- this._mutationObserver = new iframe.contentWindow.MutationObserver((mutations) => {
- sizeSocialPanelToContent(panel, iframe, requestedSize);
- });
- // Observe anything that causes the size to change.
- let config = {attributes: true, characterData: true, childList: true, subtree: true};
- this._mutationObserver.observe(doc, config);
- // and since this may be setup after the load event has fired we do an
- // initial resize now.
- sizeSocialPanelToContent(panel, iframe, requestedSize);
- },
- stop: function DynamicResizeWatcher_stop() {
- if (this._mutationObserver) {
- try {
- this._mutationObserver.disconnect();
- } catch (ex) {
- // may get "TypeError: can't access dead object" which seems strange,
- // but doesn't seem to indicate a real problem, so ignore it...
- }
- this._mutationObserver = null;
- }
- }
-}
-
-
-this.OpenGraphBuilder = {
- generateEndpointURL: function(URLTemplate, pageData) {
- // support for existing oexchange style endpoints by supporting their
- // querystring arguments. parse the query string template and do
- // replacements where necessary the query names may be different than ours,
- // so we could see u=%{url} or url=%{url}
- let [endpointURL, queryString] = URLTemplate.split("?");
- let query = {};
- if (queryString) {
- queryString.split('&').forEach(function (val) {
- let [name, value] = val.split('=');
- let p = /%\{(.+)\}/.exec(value);
- if (!p) {
- // preserve non-template query vars
- query[name] = value;
- } else if (pageData[p[1]]) {
- if (p[1] == "previews")
- query[name] = pageData[p[1]][0];
- else
- query[name] = pageData[p[1]];
- } else if (p[1] == "body") {
- // build a body for emailers
- let body = "";
- if (pageData.title)
- body += pageData.title + "\n\n";
- if (pageData.description)
- body += pageData.description + "\n\n";
- if (pageData.text)
- body += pageData.text + "\n\n";
- body += pageData.url;
- query["body"] = body;
- }
- });
- // if the url template doesn't have title and no text was provided, add the title as the text.
- if (!query.text && !query.title && pageData.title) {
- query.text = pageData.title;
- }
- }
- var str = [];
- for (let p in query)
- str.push(p + "=" + encodeURIComponent(query[p]));
- if (str.length)
- endpointURL = endpointURL + "?" + str.join("&");
- return endpointURL;
- },
-};
diff --git a/browser/modules/SocialService.jsm b/browser/modules/SocialService.jsm
deleted file mode 100644
index 95f5e0259..000000000
--- a/browser/modules/SocialService.jsm
+++ /dev/null
@@ -1,1097 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-this.EXPORTED_SYMBOLS = ["SocialService"];
-
-const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/AddonManager.jsm");
-Cu.import("resource://gre/modules/PlacesUtils.jsm");
-
-const URI_EXTENSION_STRINGS = "chrome://mozapps/locale/extensions/extensions.properties";
-const ADDON_TYPE_SERVICE = "service";
-const ID_SUFFIX = "@services.mozilla.org";
-const STRING_TYPE_NAME = "type.%ID%.name";
-
-XPCOMUtils.defineLazyModuleGetter(this, "DeferredTask", "resource://gre/modules/DeferredTask.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(this, "etld",
- "@mozilla.org/network/effective-tld-service;1",
- "nsIEffectiveTLDService");
-
-/**
- * The SocialService is the public API to social providers - it tracks which
- * providers are installed and enabled, and is the entry-point for access to
- * the provider itself.
- */
-
-// Internal helper methods and state
-var SocialServiceInternal = {
- get enabled() {
- return this.providerArray.length > 0;
- },
-
- get providerArray() {
- return Object.keys(this.providers).map(origin => this.providers[origin]);
- },
- *manifestsGenerator() {
- // Retrieve the manifests of installed providers from prefs
- let MANIFEST_PREFS = Services.prefs.getBranch("social.manifest.");
- let prefs = MANIFEST_PREFS.getChildList("", []);
- for (let pref of prefs) {
- // we only consider manifests in user level prefs to be *installed*
- if (!MANIFEST_PREFS.prefHasUserValue(pref))
- continue;
- try {
- var manifest = JSON.parse(MANIFEST_PREFS.getComplexValue(pref, Ci.nsISupportsString).data);
- if (manifest && typeof(manifest) == "object" && manifest.origin)
- yield manifest;
- } catch (err) {
- Cu.reportError("SocialService: failed to load manifest: " + pref +
- ", exception: " + err);
- }
- }
- },
- get manifests() {
- return this.manifestsGenerator();
- },
- getManifestPrefname: function(origin) {
- // Retrieve the prefname for a given origin/manifest.
- // If no existing pref, return a generated prefname.
- let MANIFEST_PREFS = Services.prefs.getBranch("social.manifest.");
- let prefs = MANIFEST_PREFS.getChildList("", []);
- for (let pref of prefs) {
- try {
- var manifest = JSON.parse(MANIFEST_PREFS.getComplexValue(pref, Ci.nsISupportsString).data);
- if (manifest.origin == origin) {
- return pref;
- }
- } catch (err) {
- Cu.reportError("SocialService: failed to load manifest: " + pref +
- ", exception: " + err);
- }
- }
- let originUri = Services.io.newURI(origin, null, null);
- return originUri.hostPort.replace('.', '-');
- },
- orderedProviders: function(aCallback) {
- if (SocialServiceInternal.providerArray.length < 2) {
- schedule(function () {
- aCallback(SocialServiceInternal.providerArray);
- });
- return;
- }
- // query moz_hosts for frecency. since some providers may not have a
- // frecency entry, we need to later sort on our own. We use the providers
- // object below as an easy way to later record the frecency on the provider
- // object from the query results.
- let hosts = [];
- let providers = {};
-
- for (let p of SocialServiceInternal.providerArray) {
- p.frecency = 0;
- providers[p.domain] = p;
- hosts.push(p.domain);
- }
-
- // cannot bind an array to stmt.params so we have to build the string
- let stmt = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
- .DBConnection.createAsyncStatement(
- "SELECT host, frecency FROM moz_hosts WHERE host IN (" +
- hosts.map(host => '"' + host + '"').join(",") + ") "
- );
-
- try {
- stmt.executeAsync({
- handleResult: function(aResultSet) {
- let row;
- while ((row = aResultSet.getNextRow())) {
- let rh = row.getResultByName("host");
- let frecency = row.getResultByName("frecency");
- providers[rh].frecency = parseInt(frecency) || 0;
- }
- },
- handleError: function(aError) {
- Cu.reportError(aError.message + " (Result = " + aError.result + ")");
- },
- handleCompletion: function(aReason) {
- // the query may not have returned all our providers, so we have
- // stamped the frecency on the provider and sort here. This makes sure
- // all enabled providers get sorted even with frecency zero.
- let providerList = SocialServiceInternal.providerArray;
- // reverse sort
- aCallback(providerList.sort((a, b) => b.frecency - a.frecency));
- }
- });
- } finally {
- stmt.finalize();
- }
- }
-};
-
-XPCOMUtils.defineLazyGetter(SocialServiceInternal, "providers", function () {
- initService();
- let providers = {};
- for (let manifest of this.manifests) {
- try {
- if (ActiveProviders.has(manifest.origin)) {
- // enable the api when a provider is enabled
- let provider = new SocialProvider(manifest);
- providers[provider.origin] = provider;
- }
- } catch (err) {
- Cu.reportError("SocialService: failed to load provider: " + manifest.origin +
- ", exception: " + err);
- }
- }
- return providers;
-});
-
-function getOriginActivationType(origin) {
- // if this is an about uri, treat it as a directory
- let URI = Services.io.newURI(origin, null, null);
- let principal = Services.scriptSecurityManager.createCodebasePrincipal(URI, {});
- if (Services.scriptSecurityManager.isSystemPrincipal(principal) || origin == "moz-safe-about:home") {
- return "internal";
- }
-
- let directories = Services.prefs.getCharPref("social.directories").split(',');
- if (directories.indexOf(origin) >= 0)
- return "directory";
-
- return "foreign";
-}
-
-var ActiveProviders = {
- get _providers() {
- delete this._providers;
- this._providers = {};
- try {
- let pref = Services.prefs.getComplexValue("social.activeProviders",
- Ci.nsISupportsString);
- this._providers = JSON.parse(pref);
- } catch (ex) {}
- return this._providers;
- },
-
- has: function (origin) {
- return (origin in this._providers);
- },
-
- add: function (origin) {
- this._providers[origin] = 1;
- this._deferredTask.arm();
- },
-
- delete: function (origin) {
- delete this._providers[origin];
- this._deferredTask.arm();
- },
-
- flush: function () {
- this._deferredTask.disarm();
- this._persist();
- },
-
- get _deferredTask() {
- delete this._deferredTask;
- return this._deferredTask = new DeferredTask(this._persist.bind(this), 0);
- },
-
- _persist: function () {
- let string = Cc["@mozilla.org/supports-string;1"].
- createInstance(Ci.nsISupportsString);
- string.data = JSON.stringify(this._providers);
- Services.prefs.setComplexValue("social.activeProviders",
- Ci.nsISupportsString, string);
- }
-};
-
-function migrateSettings() {
- let activeProviders, enabled;
- try {
- activeProviders = Services.prefs.getCharPref("social.activeProviders");
- } catch (e) {
- // not set, we'll check if we need to migrate older prefs
- }
- if (Services.prefs.prefHasUserValue("social.enabled")) {
- enabled = Services.prefs.getBoolPref("social.enabled");
- }
- if (activeProviders) {
- // migration from fx21 to fx22 or later
- // ensure any *builtin* provider in activeproviders is in user level prefs
- for (let origin in ActiveProviders._providers) {
- let prefname;
- let manifest;
- let defaultManifest;
- try {
- prefname = getPrefnameFromOrigin(origin);
- manifest = JSON.parse(Services.prefs.getComplexValue(prefname, Ci.nsISupportsString).data);
- } catch (e) {
- // Our preference is missing or bad, remove from ActiveProviders and
- // continue. This is primarily an error-case and should only be
- // reached by either messing with preferences or hitting the one or
- // two days of nightly that ran into it, so we'll flush right away.
- ActiveProviders.delete(origin);
- ActiveProviders.flush();
- continue;
- }
- let needsUpdate = !manifest.updateDate;
- // fx23 may have built-ins with shareURL
- try {
- defaultManifest = Services.prefs.getDefaultBranch(null)
- .getComplexValue(prefname, Ci.nsISupportsString).data;
- defaultManifest = JSON.parse(defaultManifest);
- } catch (e) {
- // not a built-in, continue
- }
- if (defaultManifest) {
- if (defaultManifest.shareURL && !manifest.shareURL) {
- manifest.shareURL = defaultManifest.shareURL;
- needsUpdate = true;
- }
- if (defaultManifest.version && (!manifest.version || defaultManifest.version > manifest.version)) {
- manifest = defaultManifest;
- needsUpdate = true;
- }
- }
- if (needsUpdate) {
- // the provider was installed with an older build, so we will update the
- // timestamp and ensure the manifest is in user prefs
- delete manifest.builtin;
- // we're potentially updating for share, so always mark the updateDate
- manifest.updateDate = Date.now();
- if (!manifest.installDate)
- manifest.installDate = 0; // we don't know when it was installed
-
- let string = Cc["@mozilla.org/supports-string;1"].
- createInstance(Ci.nsISupportsString);
- string.data = JSON.stringify(manifest);
- Services.prefs.setComplexValue(prefname, Ci.nsISupportsString, string);
- }
- // as of fx 29, we no longer rely on social.enabled. migration from prior
- // versions should disable all service addons if social.enabled=false
- if (enabled === false) {
- ActiveProviders.delete(origin);
- }
- }
- ActiveProviders.flush();
- Services.prefs.clearUserPref("social.enabled");
- return;
- }
-
- // primary migration from pre-fx21
- let active;
- try {
- active = Services.prefs.getBoolPref("social.active");
- } catch (e) {}
- if (!active)
- return;
-
- // primary difference from SocialServiceInternal.manifests is that we
- // only read the default branch here.
- let manifestPrefs = Services.prefs.getDefaultBranch("social.manifest.");
- let prefs = manifestPrefs.getChildList("", []);
- for (let pref of prefs) {
- try {
- let manifest;
- try {
- manifest = JSON.parse(manifestPrefs.getComplexValue(pref, Ci.nsISupportsString).data);
- } catch (e) {
- // bad or missing preference, we wont update this one.
- continue;
- }
- if (manifest && typeof(manifest) == "object" && manifest.origin) {
- // our default manifests have been updated with the builtin flags as of
- // fx22, delete it so we can set the user-pref
- delete manifest.builtin;
- if (!manifest.updateDate) {
- manifest.updateDate = Date.now();
- manifest.installDate = 0; // we don't know when it was installed
- }
-
- let string = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
- string.data = JSON.stringify(manifest);
- // pref here is just the branch name, set the full pref name
- Services.prefs.setComplexValue("social.manifest." + pref, Ci.nsISupportsString, string);
- ActiveProviders.add(manifest.origin);
- ActiveProviders.flush();
- // social.active was used at a time that there was only one
- // builtin, we'll assume that is still the case
- return;
- }
- } catch (err) {
- Cu.reportError("SocialService: failed to load manifest: " + pref + ", exception: " + err);
- }
- }
-}
-
-function initService() {
- Services.obs.addObserver(function xpcomShutdown() {
- ActiveProviders.flush();
- SocialService._providerListeners = null;
- Services.obs.removeObserver(xpcomShutdown, "xpcom-shutdown");
- }, "xpcom-shutdown", false);
-
- try {
- migrateSettings();
- } catch (e) {
- // no matter what, if migration fails we do not want to render social
- // unusable. Worst case scenario is that, when upgrading Firefox, previously
- // enabled providers are not migrated.
- Cu.reportError("Error migrating social settings: " + e);
- }
-}
-
-function schedule(callback) {
- Services.tm.mainThread.dispatch(callback, Ci.nsIThread.DISPATCH_NORMAL);
-}
-
-// Public API
-this.SocialService = {
- get hasEnabledProviders() {
- // used as an optimization during startup, can be used to check if further
- // initialization should be done (e.g. creating the instances of
- // SocialProvider and turning on UI). ActiveProviders may have changed and
- // not yet flushed so we check the active providers array
- for (let p in ActiveProviders._providers) {
- return true;
- }
- return false;
- },
- get enabled() {
- return SocialServiceInternal.enabled;
- },
- set enabled(val) {
- throw new Error("not allowed to set SocialService.enabled");
- },
-
- // Enables a provider, the manifest must already exist in prefs. The provider
- // may or may not have previously been added. onDone is always called
- // - with null if no such provider exists, or the activated provider on
- // success.
- enableProvider: function enableProvider(origin, onDone) {
- if (SocialServiceInternal.providers[origin]) {
- schedule(function() {
- onDone(SocialServiceInternal.providers[origin]);
- });
- return;
- }
- let manifest = SocialService.getManifestByOrigin(origin);
- if (manifest) {
- let addon = new AddonWrapper(manifest);
- AddonManagerPrivate.callAddonListeners("onEnabling", addon, false);
- addon.pendingOperations |= AddonManager.PENDING_ENABLE;
- this.addProvider(manifest, onDone);
- addon.pendingOperations -= AddonManager.PENDING_ENABLE;
- AddonManagerPrivate.callAddonListeners("onEnabled", addon);
- return;
- }
- schedule(function() {
- onDone(null);
- });
- },
-
- // Adds a provider given a manifest, and returns the added provider.
- addProvider: function addProvider(manifest, onDone) {
- if (SocialServiceInternal.providers[manifest.origin])
- throw new Error("SocialService.addProvider: provider with this origin already exists");
-
- // enable the api when a provider is enabled
- let provider = new SocialProvider(manifest);
- SocialServiceInternal.providers[provider.origin] = provider;
- ActiveProviders.add(provider.origin);
-
- this.getOrderedProviderList(function (providers) {
- this._notifyProviderListeners("provider-enabled", provider.origin, providers);
- if (onDone)
- onDone(provider);
- }.bind(this));
- },
-
- // Removes a provider with the given origin, and notifies when the removal is
- // complete.
- disableProvider: function disableProvider(origin, onDone) {
- if (!(origin in SocialServiceInternal.providers))
- throw new Error("SocialService.disableProvider: no provider with origin " + origin + " exists!");
-
- let provider = SocialServiceInternal.providers[origin];
- let manifest = SocialService.getManifestByOrigin(origin);
- let addon = manifest && new AddonWrapper(manifest);
- if (addon) {
- AddonManagerPrivate.callAddonListeners("onDisabling", addon, false);
- addon.pendingOperations |= AddonManager.PENDING_DISABLE;
- }
- provider.enabled = false;
-
- ActiveProviders.delete(provider.origin);
-
- delete SocialServiceInternal.providers[origin];
-
- if (addon) {
- // we have to do this now so the addon manager ui will update an uninstall
- // correctly.
- addon.pendingOperations -= AddonManager.PENDING_DISABLE;
- AddonManagerPrivate.callAddonListeners("onDisabled", addon);
- }
-
- this.getOrderedProviderList(function (providers) {
- this._notifyProviderListeners("provider-disabled", origin, providers);
- if (onDone)
- onDone();
- }.bind(this));
- },
-
- // Returns a single provider object with the specified origin. The provider
- // must be "installed" (ie, in ActiveProviders)
- getProvider: function getProvider(origin, onDone) {
- schedule((function () {
- onDone(SocialServiceInternal.providers[origin] || null);
- }).bind(this));
- },
-
- // Returns an unordered array of installed providers
- getProviderList: function(onDone) {
- schedule(function () {
- onDone(SocialServiceInternal.providerArray);
- });
- },
-
- getManifestByOrigin: function(origin) {
- for (let manifest of SocialServiceInternal.manifests) {
- if (origin == manifest.origin) {
- return manifest;
- }
- }
- return null;
- },
-
- // Returns an array of installed providers, sorted by frecency
- getOrderedProviderList: function(onDone) {
- SocialServiceInternal.orderedProviders(onDone);
- },
-
- getOriginActivationType: function (origin) {
- return getOriginActivationType(origin);
- },
-
- _providerListeners: new Map(),
- registerProviderListener: function registerProviderListener(listener) {
- this._providerListeners.set(listener, 1);
- },
- unregisterProviderListener: function unregisterProviderListener(listener) {
- this._providerListeners.delete(listener);
- },
-
- _notifyProviderListeners: function (topic, origin, providers) {
- for (let [listener, ] of this._providerListeners) {
- try {
- listener(topic, origin, providers);
- } catch (ex) {
- Components.utils.reportError("SocialService: provider listener threw an exception: " + ex);
- }
- }
- },
-
- _manifestFromData: function(type, data, installOrigin) {
- let featureURLs = ['shareURL'];
- let resolveURLs = featureURLs.concat(['postActivationURL']);
-
- if (type == 'directory' || type == 'internal') {
- // directory provided manifests must have origin in manifest, use that
- if (!data['origin']) {
- Cu.reportError("SocialService.manifestFromData directory service provided manifest without origin.");
- return null;
- }
- installOrigin = data.origin;
- }
- // force/fixup origin
- let URI = Services.io.newURI(installOrigin, null, null);
- let principal = Services.scriptSecurityManager.createCodebasePrincipal(URI, {});
- data.origin = principal.origin;
-
- // iconURL and name are required
- let providerHasFeatures = featureURLs.some(url => data[url]);
- if (!providerHasFeatures) {
- Cu.reportError("SocialService.manifestFromData manifest missing required urls.");
- return null;
- }
- if (!data['name'] || !data['iconURL']) {
- Cu.reportError("SocialService.manifestFromData manifest missing name or iconURL.");
- return null;
- }
- for (let url of resolveURLs) {
- if (data[url]) {
- try {
- let resolved = Services.io.newURI(principal.URI.resolve(data[url]), null, null);
- if (!(resolved.schemeIs("http") || resolved.schemeIs("https"))) {
- Cu.reportError("SocialService.manifestFromData unsupported scheme '" + resolved.scheme + "' for " + principal.origin);
- return null;
- }
- data[url] = resolved.spec;
- } catch (e) {
- Cu.reportError("SocialService.manifestFromData unable to resolve '" + url + "' for " + principal.origin);
- return null;
- }
- }
- }
- return data;
- },
-
- _showInstallNotification: function(data, aAddonInstaller) {
- let brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
- let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
-
- // internal/directory activations need to use the manifest origin, any other
- // use the domain activation is occurring on
- let url = data.url;
- if (data.installType == "internal" || data.installType == "directory") {
- url = data.manifest.origin;
- }
- let requestingURI = Services.io.newURI(url, null, null);
- let productName = brandBundle.GetStringFromName("brandShortName");
-
- let message = browserBundle.formatStringFromName("service.install.description",
- [requestingURI.host, productName], 2);
-
- let action = {
- label: browserBundle.GetStringFromName("service.install.ok.label"),
- accessKey: browserBundle.GetStringFromName("service.install.ok.accesskey"),
- callback: function() {
- aAddonInstaller.install();
- },
- };
-
- let options = {
- learnMoreURL: Services.urlFormatter.formatURLPref("app.support.baseURL") + "social-api",
- };
- let anchor = "servicesInstall-notification-icon";
- let notificationid = "servicesInstall";
- data.window.PopupNotifications.show(data.window.gBrowser.selectedBrowser,
- notificationid, message, anchor,
- action, [], options);
- },
-
- installProvider: function(data, installCallback, options={}) {
- data.installType = getOriginActivationType(data.origin);
- // if we get data, we MUST have a valid manifest generated from the data
- let manifest = this._manifestFromData(data.installType, data.manifest, data.origin);
- if (!manifest)
- throw new Error("SocialService.installProvider: service configuration is invalid from " + data.url);
-
- let addon = new AddonWrapper(manifest);
- if (addon && addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED)
- throw new Error("installProvider: provider with origin [" +
- data.origin + "] is blocklisted");
- // manifestFromData call above will enforce correct origin. To support
- // activation from about: uris, we need to be sure to use the updated
- // origin on the manifest.
- data.manifest = manifest;
- let id = getAddonIDFromOrigin(manifest.origin);
- AddonManager.getAddonByID(id, function(aAddon) {
- if (aAddon && aAddon.userDisabled) {
- aAddon.cancelUninstall();
- aAddon.userDisabled = false;
- }
- schedule(function () {
- try {
- this._installProvider(data, options, aManifest => {
- this._notifyProviderListeners("provider-installed", aManifest.origin);
- installCallback(aManifest);
- });
- } catch (e) {
- Cu.reportError("Activation failed: " + e);
- installCallback(null);
- }
- }.bind(this));
- }.bind(this));
- },
-
- _installProvider: function(data, options, installCallback) {
- if (!data.manifest)
- throw new Error("Cannot install provider without manifest data");
-
- if (data.installType == "foreign" && !Services.prefs.getBoolPref("social.remote-install.enabled"))
- throw new Error("Remote install of services is disabled");
-
- // if installing from any website, the install must happen over https.
- // "internal" are installs from about:home or similar
- if (data.installType != "internal" && !Services.io.newURI(data.origin, null, null).schemeIs("https")) {
- throw new Error("attempt to activate provider over unsecured channel: " + data.origin);
- }
-
- let installer = new AddonInstaller(data.url, data.manifest, installCallback);
- let bypassPanel = options.bypassInstallPanel ||
- (data.installType == "internal" && data.manifest.oneclick);
- if (bypassPanel)
- installer.install();
- else
- this._showInstallNotification(data, installer);
- },
-
- createWrapper: function(manifest) {
- return new AddonWrapper(manifest);
- },
-
- /**
- * updateProvider is used from the worker to self-update. Since we do not
- * have knowledge of the currently selected provider here, we will notify
- * the front end to deal with any reload.
- */
- updateProvider: function(aUpdateOrigin, aManifest) {
- let installType = this.getOriginActivationType(aUpdateOrigin);
- // if we get data, we MUST have a valid manifest generated from the data
- let manifest = this._manifestFromData(installType, aManifest, aUpdateOrigin);
- if (!manifest)
- throw new Error("SocialService.installProvider: service configuration is invalid from " + aUpdateOrigin);
-
- // overwrite the preference
- let string = Cc["@mozilla.org/supports-string;1"].
- createInstance(Ci.nsISupportsString);
- string.data = JSON.stringify(manifest);
- Services.prefs.setComplexValue(getPrefnameFromOrigin(manifest.origin), Ci.nsISupportsString, string);
-
- // overwrite the existing provider then notify the front end so it can
- // handle any reload that might be necessary.
- if (ActiveProviders.has(manifest.origin)) {
- let provider = SocialServiceInternal.providers[manifest.origin];
- provider.enabled = false;
- provider = new SocialProvider(manifest);
- SocialServiceInternal.providers[provider.origin] = provider;
- // update the cache and ui, reload provider if necessary
- this.getOrderedProviderList(providers => {
- this._notifyProviderListeners("provider-update", provider.origin, providers);
- });
- }
-
- },
-
- uninstallProvider: function(origin, aCallback) {
- let manifest = SocialService.getManifestByOrigin(origin);
- let addon = new AddonWrapper(manifest);
- addon.uninstall(aCallback);
- }
-};
-
-/**
- * The SocialProvider object represents a social provider.
- *
- * @constructor
- * @param {jsobj} object representing the manifest file describing this provider
- * @param {bool} boolean indicating whether this provider is "built in"
- */
-function SocialProvider(input) {
- if (!input.name)
- throw new Error("SocialProvider must be passed a name");
- if (!input.origin)
- throw new Error("SocialProvider must be passed an origin");
-
- let addon = new AddonWrapper(input);
- if (addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED)
- throw new Error("SocialProvider: provider with origin [" +
- input.origin + "] is blocklisted");
-
- this.name = input.name;
- this.iconURL = input.iconURL;
- this.icon32URL = input.icon32URL;
- this.icon64URL = input.icon64URL;
- this.shareURL = input.shareURL;
- this.postActivationURL = input.postActivationURL;
- this.origin = input.origin;
- let originUri = Services.io.newURI(input.origin, null, null);
- this.principal = Services.scriptSecurityManager.createCodebasePrincipal(originUri, {});
- this.ambientNotificationIcons = {};
- this.errorState = null;
- this.frecency = 0;
-
- try {
- this.domain = etld.getBaseDomainFromHost(originUri.host);
- } catch (e) {
- this.domain = originUri.host;
- }
-}
-
-SocialProvider.prototype = {
- reload: function() {
- // calling terminate/activate does not set the enabled state whereas setting
- // enabled will call terminate/activate
- this.enabled = false;
- this.enabled = true;
- Services.obs.notifyObservers(null, "social:provider-reload", this.origin);
- },
-
- // Provider enabled/disabled state.
- _enabled: false,
- get enabled() {
- return this._enabled;
- },
- set enabled(val) {
- let enable = !!val;
- if (enable == this._enabled)
- return;
-
- this._enabled = enable;
-
- if (enable) {
- this._activate();
- } else {
- this._terminate();
- }
- },
-
- get manifest() {
- return SocialService.getManifestByOrigin(this.origin);
- },
-
- getPageSize: function(name) {
- let manifest = this.manifest;
- if (manifest && manifest.pageSize)
- return manifest.pageSize[name];
- return undefined;
- },
-
- // Internal helper methods
- _activate: function _activate() {
- },
-
- _terminate: function _terminate() {
- this.errorState = null;
- },
-
- /**
- * Checks if a given URI is of the same origin as the provider.
- *
- * Returns true or false.
- *
- * @param {URI or string} uri
- */
- isSameOrigin: function isSameOrigin(uri, allowIfInheritsPrincipal) {
- if (!uri)
- return false;
- if (typeof uri == "string") {
- try {
- uri = Services.io.newURI(uri, null, null);
- } catch (ex) {
- // an invalid URL can't be loaded!
- return false;
- }
- }
- try {
- this.principal.checkMayLoad(
- uri, // the thing to check.
- false, // reportError - we do our own reporting when necessary.
- allowIfInheritsPrincipal
- );
- return true;
- } catch (ex) {
- return false;
- }
- },
-
- /**
- * Resolve partial URLs for a provider.
- *
- * Returns nsIURI object or null on failure
- *
- * @param {string} url
- */
- resolveUri: function resolveUri(url) {
- try {
- let fullURL = this.principal.URI.resolve(url);
- return Services.io.newURI(fullURL, null, null);
- } catch (ex) {
- Cu.reportError("mozSocial: failed to resolve window URL: " + url + "; " + ex);
- return null;
- }
- }
-};
-
-function getAddonIDFromOrigin(origin) {
- let originUri = Services.io.newURI(origin, null, null);
- return originUri.host + ID_SUFFIX;
-}
-
-function getPrefnameFromOrigin(origin) {
- return "social.manifest." + SocialServiceInternal.getManifestPrefname(origin);
-}
-
-function AddonInstaller(sourceURI, aManifest, installCallback) {
- aManifest.updateDate = Date.now();
- // get the existing manifest for installDate
- let manifest = SocialService.getManifestByOrigin(aManifest.origin);
- let isNewInstall = !manifest;
- if (manifest && manifest.installDate)
- aManifest.installDate = manifest.installDate;
- else
- aManifest.installDate = aManifest.updateDate;
-
- this.sourceURI = sourceURI;
- this.install = function() {
- let addon = this.addon;
- if (isNewInstall) {
- AddonManagerPrivate.callInstallListeners("onExternalInstall", null, addon, null, false);
- AddonManagerPrivate.callAddonListeners("onInstalling", addon, false);
- }
-
- let string = Cc["@mozilla.org/supports-string;1"].
- createInstance(Ci.nsISupportsString);
- string.data = JSON.stringify(aManifest);
- Services.prefs.setComplexValue(getPrefnameFromOrigin(aManifest.origin), Ci.nsISupportsString, string);
-
- if (isNewInstall) {
- AddonManagerPrivate.callAddonListeners("onInstalled", addon);
- }
- installCallback(aManifest);
- };
- this.cancel = function() {
- Services.prefs.clearUserPref(getPrefnameFromOrigin(aManifest.origin));
- };
- this.addon = new AddonWrapper(aManifest);
-}
-
-var SocialAddonProvider = {
- startup: function() {},
-
- shutdown: function() {},
-
- updateAddonAppDisabledStates: function() {
- // we wont bother with "enabling" services that are released from blocklist
- for (let manifest of SocialServiceInternal.manifests) {
- try {
- if (ActiveProviders.has(manifest.origin)) {
- let addon = new AddonWrapper(manifest);
- if (addon.blocklistState != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) {
- SocialService.disableProvider(manifest.origin);
- }
- }
- } catch (e) {
- Cu.reportError(e);
- }
- }
- },
-
- getAddonByID: function(aId, aCallback) {
- for (let manifest of SocialServiceInternal.manifests) {
- if (aId == getAddonIDFromOrigin(manifest.origin)) {
- aCallback(new AddonWrapper(manifest));
- return;
- }
- }
- aCallback(null);
- },
-
- getAddonsByTypes: function(aTypes, aCallback) {
- if (aTypes && aTypes.indexOf(ADDON_TYPE_SERVICE) == -1) {
- aCallback([]);
- return;
- }
- aCallback([...SocialServiceInternal.manifests].map(a => new AddonWrapper(a)));
- },
-
- removeAddon: function(aAddon, aCallback) {
- AddonManagerPrivate.callAddonListeners("onUninstalling", aAddon, false);
- aAddon.pendingOperations |= AddonManager.PENDING_UNINSTALL;
- Services.prefs.clearUserPref(getPrefnameFromOrigin(aAddon.manifest.origin));
- aAddon.pendingOperations -= AddonManager.PENDING_UNINSTALL;
- AddonManagerPrivate.callAddonListeners("onUninstalled", aAddon);
- SocialService._notifyProviderListeners("provider-uninstalled", aAddon.manifest.origin);
- if (aCallback)
- schedule(aCallback);
- }
-};
-
-
-function AddonWrapper(aManifest) {
- this.manifest = aManifest;
- this.id = getAddonIDFromOrigin(this.manifest.origin);
- this._pending = AddonManager.PENDING_NONE;
-}
-AddonWrapper.prototype = {
- get type() {
- return ADDON_TYPE_SERVICE;
- },
-
- get appDisabled() {
- return this.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED;
- },
-
- set softDisabled(val) {
- this.userDisabled = val;
- },
-
- get softDisabled() {
- return this.userDisabled;
- },
-
- get isCompatible() {
- return true;
- },
-
- get isPlatformCompatible() {
- return true;
- },
-
- get scope() {
- return AddonManager.SCOPE_PROFILE;
- },
-
- get foreignInstall() {
- return false;
- },
-
- isCompatibleWith: function(appVersion, platformVersion) {
- return true;
- },
-
- get providesUpdatesSecurely() {
- return true;
- },
-
- get blocklistState() {
- return Services.blocklist.getAddonBlocklistState(this);
- },
-
- get blocklistURL() {
- return Services.blocklist.getAddonBlocklistURL(this);
- },
-
- get screenshots() {
- return [];
- },
-
- get pendingOperations() {
- return this._pending || AddonManager.PENDING_NONE;
- },
- set pendingOperations(val) {
- this._pending = val;
- },
-
- get operationsRequiringRestart() {
- return AddonManager.OP_NEEDS_RESTART_NONE;
- },
-
- get size() {
- return null;
- },
-
- get permissions() {
- let permissions = 0;
- // any "user defined" manifest can be removed
- if (Services.prefs.prefHasUserValue(getPrefnameFromOrigin(this.manifest.origin)))
- permissions = AddonManager.PERM_CAN_UNINSTALL;
- if (!this.appDisabled) {
- if (this.userDisabled) {
- permissions |= AddonManager.PERM_CAN_ENABLE;
- } else {
- permissions |= AddonManager.PERM_CAN_DISABLE;
- }
- }
- return permissions;
- },
-
- findUpdates: function(listener, reason, appVersion, platformVersion) {
- if ("onNoCompatibilityUpdateAvailable" in listener)
- listener.onNoCompatibilityUpdateAvailable(this);
- if ("onNoUpdateAvailable" in listener)
- listener.onNoUpdateAvailable(this);
- if ("onUpdateFinished" in listener)
- listener.onUpdateFinished(this);
- },
-
- get isActive() {
- return ActiveProviders.has(this.manifest.origin);
- },
-
- get name() {
- return this.manifest.name;
- },
- get version() {
- return this.manifest.version ? this.manifest.version.toString() : "";
- },
-
- get iconURL() {
- return this.manifest.icon32URL ? this.manifest.icon32URL : this.manifest.iconURL;
- },
- get icon64URL() {
- return this.manifest.icon64URL;
- },
- get icons() {
- let icons = {
- 16: this.manifest.iconURL
- };
- if (this.manifest.icon32URL)
- icons[32] = this.manifest.icon32URL;
- if (this.manifest.icon64URL)
- icons[64] = this.manifest.icon64URL;
- return icons;
- },
-
- get description() {
- return this.manifest.description;
- },
- get homepageURL() {
- return this.manifest.homepageURL;
- },
- get defaultLocale() {
- return this.manifest.defaultLocale;
- },
- get selectedLocale() {
- return this.manifest.selectedLocale;
- },
-
- get installDate() {
- return this.manifest.installDate ? new Date(this.manifest.installDate) : null;
- },
- get updateDate() {
- return this.manifest.updateDate ? new Date(this.manifest.updateDate) : null;
- },
-
- get creator() {
- return new AddonManagerPrivate.AddonAuthor(this.manifest.author);
- },
-
- get userDisabled() {
- return this.appDisabled || !ActiveProviders.has(this.manifest.origin);
- },
-
- set userDisabled(val) {
- if (val == this.userDisabled)
- return val;
- if (val) {
- SocialService.disableProvider(this.manifest.origin);
- } else if (!this.appDisabled) {
- SocialService.enableProvider(this.manifest.origin);
- }
- return val;
- },
-
- uninstall: function(aCallback) {
- let prefName = getPrefnameFromOrigin(this.manifest.origin);
- if (Services.prefs.prefHasUserValue(prefName)) {
- if (ActiveProviders.has(this.manifest.origin)) {
- SocialService.disableProvider(this.manifest.origin, function() {
- SocialAddonProvider.removeAddon(this, aCallback);
- }.bind(this));
- } else {
- SocialAddonProvider.removeAddon(this, aCallback);
- }
- } else {
- schedule(aCallback);
- }
- },
-
- cancelUninstall: function() {
- this._pending -= AddonManager.PENDING_UNINSTALL;
- AddonManagerPrivate.callAddonListeners("onOperationCancelled", this);
- }
-};
-
-
-AddonManagerPrivate.registerProvider(SocialAddonProvider, [
- new AddonManagerPrivate.AddonType(ADDON_TYPE_SERVICE, URI_EXTENSION_STRINGS,
- STRING_TYPE_NAME,
- AddonManager.VIEW_TYPE_LIST, 10000)
-]);
diff --git a/browser/modules/moz.build b/browser/modules/moz.build
index 852a4c911..a7bbbc258 100644
--- a/browser/modules/moz.build
+++ b/browser/modules/moz.build
@@ -35,8 +35,6 @@ EXTRA_JS_MODULES += [
'Sanitizer.jsm',
'SelfSupportBackend.jsm',
'SitePermissions.jsm',
- 'Social.jsm',
- 'SocialService.jsm',
'TransientPrefs.jsm',
'URLBarZoom.jsm',
'webrtcUI.jsm',
diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css
index 73d3844a2..3e6b81512 100644
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -1172,56 +1172,6 @@ html|span.ac-emphasize-text-url {
-moz-image-region: rect(0, 48px, 16px, 32px);
}
-/* social share panel */
-%include ../shared/social/social.inc.css
-
-.social-share-frame {
- border-top: 1px solid #f8f8f8;
- width: 756px;
- height: 150px;
-}
-
-#share-container {
- min-width: 756px;
- background-color: white;
- background-repeat: no-repeat;
- background-position: center center;
-}
-#share-container[loading] {
- background-image: url(chrome://browser/skin/tabbrowser/pendingpaint.png);
-}
-#share-container > browser {
- transition: opacity 150ms ease-in-out;
- opacity: 1;
-}
-#share-container[loading] > browser {
- opacity: 0;
-}
-
-.social-share-toolbar {
- border-bottom: 1px solid #dedede;
- padding: 2px;
-}
-
-#social-share-provider-buttons {
- padding: 0;
- margin: 0;
-}
-
-.share-provider-button {
- padding: 5px;
- margin: 2px;
-}
-
-.share-provider-button > .toolbarbutton-text {
- display: none;
-}
-.share-provider-button > .toolbarbutton-icon {
- width: 16px;
- min-height: 16px;
- max-height: 16px;
-}
-
/* bookmarks menu-button */
#bookmarks-menu-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker {
diff --git a/browser/themes/linux/customizableui/panelUI.css b/browser/themes/linux/customizableui/panelUI.css
index 289faa085..0037b5634 100644
--- a/browser/themes/linux/customizableui/panelUI.css
+++ b/browser/themes/linux/customizableui/panelUI.css
@@ -49,14 +49,6 @@
padding-inline-start: 0;
}
-/* subviewbutton entries for social sidebars have images that come from external
-/* sources, and are not guaranteed to be the size we want, so force the size on
-/* those icons. */
-toolbarbutton.social-provider-menuitem > .toolbarbutton-icon {
- width: 16px;
- height: 16px;
-}
-
.subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item)[checked="true"] > .toolbarbutton-icon {
visibility: hidden;
}
diff --git a/browser/themes/linux/jar.mn b/browser/themes/linux/jar.mn
index 0bf023f35..189027812 100644
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -81,10 +81,6 @@ browser.jar:
* skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
* skin/classic/browser/preferences/in-content/dialog.css (preferences/in-content/dialog.css)
skin/classic/browser/preferences/applications.css (preferences/applications.css)
- skin/classic/browser/social/services-16.png (social/services-16.png)
- skin/classic/browser/social/services-64.png (social/services-64.png)
- skin/classic/browser/social/share-button.png (social/share-button.png)
- skin/classic/browser/social/share-button-active.png (social/share-button-active.png)
skin/classic/browser/tabbrowser/alltabs.png (tabbrowser/alltabs.png)
skin/classic/browser/tabbrowser/alltabs-inverted.png (tabbrowser/alltabs-inverted.png)
skin/classic/browser/tabbrowser/newtab.svg (tabbrowser/newtab.svg)
diff --git a/browser/themes/osx/browser.css b/browser/themes/osx/browser.css
index e8ac9163e..5a83c74b2 100644
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -808,10 +808,6 @@ toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker > .dropmarker-ic
-moz-image-region: rect(18px, 288px, 36px, 270px);
}
- #social-share-button@toolbarButtonPressed@ {
- -moz-image-region: rect(18px, 306px, 36px, 288px);
- }
-
#characterencoding-button@toolbarButtonPressed@ {
-moz-image-region: rect(18px, 324px, 36px, 306px);
}
@@ -967,10 +963,6 @@ toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker > .dropmarker-ic
-moz-image-region: rect(36px, 576px, 72px, 540px);
}
- #social-share-button@toolbarButtonPressed@ {
- -moz-image-region: rect(36px, 612px, 72px, 576px);
- }
-
#characterencoding-button@toolbarButtonPressed@ {
-moz-image-region: rect(36px, 648px, 72px, 612px);
}
@@ -2029,59 +2021,6 @@ html|span.ac-emphasize-text-url {
-moz-image-region: rect(0, 48px, 16px, 32px);
}
-/* social share panel */
-.social-share-frame {
- border-top: 1px solid #f8f8f8;
- min-width: 756px;
- height: 150px;
- /* we resize our panels dynamically, make it look nice */
-}
-
-#share-container {
- min-width: 756px;
- background-repeat: no-repeat;
- background-position: center center;
-}
-#share-container[loading] {
- background-image: url(chrome://browser/skin/tabbrowser/pendingpaint.png);
-}
-#share-container > browser {
- transition: opacity 150ms ease-in-out;
- opacity: 1;
-}
-#share-container[loading] > browser {
- opacity: 0;
-}
-
-#manage-share-providers {
- -moz-image-region: rect(18px, 468px, 36px, 450px);
-}
-
-.social-share-toolbar {
- border-bottom: 1px solid #dedede;
- padding: 2px;
-}
-
-#social-share-provider-buttons {
- padding: 0;
- margin: 0;
-}
-
-.share-provider-button {
- padding: 5px;
- margin: 2px;
-}
-
-.share-provider-button > .toolbarbutton-text {
- display: none;
-}
-
-.share-provider-button > .toolbarbutton-icon {
- width: 16px;
- min-height: 16px;
- max-height: 16px;
-}
-
/* BOOKMARKING PANEL */
#editBookmarkPanelStarIcon {
list-style-image: url("chrome://browser/skin/places/starred48.png");
@@ -3182,33 +3121,6 @@ menulist.translate-infobar-element > .menulist-dropmarker {
border-radius: 1px;
}
-/* Share */
-%include ../shared/social/social.inc.css
-
-#social-share-panel {
- min-height: 100px;
- min-width: 300px;
- transition: height .3s ease-in-out, width .3s ease-in-out;
-}
-
-#share-container,
-.social-share-frame {
- border-top-left-radius: 0;
- border-bottom-left-radius: inherit;
- border-top-right-radius: 0;
- border-bottom-right-radius: inherit;
-}
-
-#social-share-panel > .social-share-toolbar {
- border-top-left-radius: inherit;
- border-top-right-radius: inherit;
-}
-
-#social-share-provider-buttons {
- border-top-left-radius: inherit;
- border-top-right-radius: inherit;
-}
-
/* Customization mode */
%include ../shared/customizableui/customizeMode.inc.css
diff --git a/browser/themes/osx/jar.mn b/browser/themes/osx/jar.mn
index 98ba4e6ea..27802843d 100644
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -124,10 +124,6 @@ browser.jar:
* skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
* skin/classic/browser/preferences/in-content/dialog.css (preferences/in-content/dialog.css)
skin/classic/browser/preferences/applications.css (preferences/applications.css)
- skin/classic/browser/social/services-16.png (social/services-16.png)
- skin/classic/browser/social/services-16@2x.png (social/services-16@2x.png)
- skin/classic/browser/social/services-64.png (social/services-64.png)
- skin/classic/browser/social/services-64@2x.png (social/services-64@2x.png)
skin/classic/browser/tabbrowser/alltabs-box-bkgnd-icon.png (tabbrowser/alltabs-box-bkgnd-icon.png)
skin/classic/browser/tabbrowser/alltabs-box-bkgnd-icon-inverted.png (tabbrowser/alltabs-box-bkgnd-icon-inverted.png)
skin/classic/browser/tabbrowser/alltabs-box-bkgnd-icon-inverted@2x.png (tabbrowser/alltabs-box-bkgnd-icon-inverted@2x.png)
diff --git a/browser/themes/shared/aboutProviderDirectory.css b/browser/themes/shared/aboutProviderDirectory.css
deleted file mode 100644
index 73e570aad..000000000
--- a/browser/themes/shared/aboutProviderDirectory.css
+++ /dev/null
@@ -1,30 +0,0 @@
-%include aboutSocialError.css
-
-body {
- width: 310px;
- margin: 1em auto;
-}
-
-#message-box {
- margin-top: 2em;
- background: url('chrome://global/skin/icons/information-24.png') no-repeat left 4px;
- padding-inline-start: 30px;
-}
-
-#activation-frame {
- border: none;
- margin: 0;
- width: 310px;
- height: 200px;
-}
-#activation > p {
- width: 100%;
- text-align: center;
- margin: 0;
- line-height: 2em;
-}
-.link {
- text-decoration: none;
- color: -moz-nativehyperlinktext;
- cursor: pointer;
-}
diff --git a/browser/themes/shared/browser.inc b/browser/themes/shared/browser.inc
index c57b59237..81caf94d6 100644
--- a/browser/themes/shared/browser.inc
+++ b/browser/themes/shared/browser.inc
@@ -2,7 +2,7 @@
% Note that zoom-reset-button is a bit different since it doesn't use an image and thus has the image with display: none.
%define nestedButtons #zoom-out-button, #zoom-reset-button, #zoom-in-button, #cut-button, #copy-button, #paste-button
-%define primaryToolbarButtons #back-button, #forward-button, #home-button, #print-button, #downloads-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #fullscreen-button, #sync-button, #feed-button, #social-share-button, #open-file-button, #find-button, #developer-button, #preferences-button, #privatebrowsing-button, #save-page-button, #add-ons-button, #history-panelmenu, #nav-bar-overflow-button, #PanelUI-menu-button, #characterencoding-button, #email-link-button, #sidebar-button, @nestedButtons@, #e10s-button, #panic-button, #webide-button, #containers-panelmenu
+%define primaryToolbarButtons #back-button, #forward-button, #home-button, #print-button, #downloads-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #fullscreen-button, #sync-button, #feed-button, #open-file-button, #find-button, #developer-button, #preferences-button, #privatebrowsing-button, #save-page-button, #add-ons-button, #history-panelmenu, #nav-bar-overflow-button, #PanelUI-menu-button, #characterencoding-button, #email-link-button, #sidebar-button, @nestedButtons@, #e10s-button, #panic-button, #webide-button, #containers-panelmenu
%ifdef XP_MACOSX
% Prior to 10.7 there wasn't a native fullscreen button so we use #restore-button to exit fullscreen
diff --git a/browser/themes/shared/customizableui/panelUI.inc.css b/browser/themes/shared/customizableui/panelUI.inc.css
index b0bb05415..ba36da995 100644
--- a/browser/themes/shared/customizableui/panelUI.inc.css
+++ b/browser/themes/shared/customizableui/panelUI.inc.css
@@ -951,7 +951,6 @@ panelview .toolbarbutton-1,
.subviewbutton,
.widget-overflow-list .toolbarbutton-1,
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-button,
-.share-provider-button,
.toolbaritem-combined-buttons@inAnyPanel@ > toolbarbutton {
-moz-appearance: none;
padding: 0 6px;
@@ -964,7 +963,6 @@ panelview .toolbarbutton-1,
panelview .toolbarbutton-1,
.subviewbutton,
.widget-overflow-list .toolbarbutton-1,
-.share-provider-button,
.toolbaritem-combined-buttons@inAnyPanel@ > toolbarbutton {
border-width: 1px;
}
@@ -1038,7 +1036,6 @@ panelview .toolbarbutton-1@buttonStateHover@,
toolbarbutton.subviewbutton@buttonStateHover@,
menu.subviewbutton@menuStateHover@,
menuitem.subviewbutton@menuStateHover@,
-.share-provider-button@buttonStateHover@:not([checked="true"]),
.widget-overflow-list .toolbarbutton-1@buttonStateHover@,
.toolbaritem-combined-buttons@inAnyPanel@ > toolbarbutton@buttonStateHover@ {
background-color: var(--arrowpanel-dimmed);
@@ -1053,7 +1050,6 @@ panelview .toolbarbutton-1:-moz-any(@buttonStateActive@,[checked=true]),
toolbarbutton.subviewbutton@buttonStateActive@,
menu.subviewbutton@menuStateActive@,
menuitem.subviewbutton@menuStateActive@,
-.share-provider-button:-moz-any(@buttonStateActive@,[checked=true]),
.widget-overflow-list .toolbarbutton-1@buttonStateActive@,
.toolbaritem-combined-buttons@inAnyPanel@ > toolbarbutton@buttonStateActive@ {
background-color: var(--arrowpanel-dimmed-further);
diff --git a/browser/themes/shared/jar.inc.mn b/browser/themes/shared/jar.inc.mn
index dcc1e9dd9..588cf5364 100644
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -10,9 +10,7 @@
skin/classic/browser/aboutNetError.css (../shared/aboutNetError.css)
skin/classic/browser/blockedSite.css (../shared/blockedSite.css)
skin/classic/browser/error-pages.css (../shared/error-pages.css)
-* skin/classic/browser/aboutProviderDirectory.css (../shared/aboutProviderDirectory.css)
* skin/classic/browser/aboutSessionRestore.css (../shared/aboutSessionRestore.css)
- skin/classic/browser/aboutSocialError.css (../shared/aboutSocialError.css)
skin/classic/browser/aboutTabCrashed.css (../shared/aboutTabCrashed.css)
skin/classic/browser/aboutWelcomeBack.css (../shared/aboutWelcomeBack.css)
skin/classic/browser/content-contextmenu.svg (../shared/content-contextmenu.svg)
@@ -100,8 +98,6 @@
skin/classic/browser/search-indicator-magnifying-glass.svg (../shared/search/search-indicator-magnifying-glass.svg)
skin/classic/browser/search-arrow-go.svg (../shared/search/search-arrow-go.svg)
skin/classic/browser/gear.svg (../shared/search/gear.svg)
- skin/classic/browser/social/gear_default.png (../shared/social/gear_default.png)
- skin/classic/browser/social/gear_clicked.png (../shared/social/gear_clicked.png)
skin/classic/browser/tabbrowser/connecting.png (../shared/tabbrowser/connecting.png)
skin/classic/browser/tabbrowser/connecting@2x.png (../shared/tabbrowser/connecting@2x.png)
skin/classic/browser/tabbrowser/crashed.svg (../shared/tabbrowser/crashed.svg)
diff --git a/browser/themes/shared/menupanel.inc.css b/browser/themes/shared/menupanel.inc.css
index 7517e4df0..266e1c83e 100644
--- a/browser/themes/shared/menupanel.inc.css
+++ b/browser/themes/shared/menupanel.inc.css
@@ -63,11 +63,6 @@ toolbarpaletteitem[place="palette"] > #feed-button {
-moz-image-region: rect(0px, 416px, 32px, 384px);
}
-#social-share-button[cui-areatype="menu-panel"],
-toolbarpaletteitem[place="palette"] > #social-share-button {
- -moz-image-region: rect(0px, 448px, 32px, 416px);
-}
-
#characterencoding-button[cui-areatype="menu-panel"],
toolbarpaletteitem[place="palette"] > #characterencoding-button {
-moz-image-region: rect(0px, 480px, 32px, 448px);
@@ -176,8 +171,3 @@ toolbarpaletteitem[place="palette"] > #zoom-controls > #zoom-in-button {
-moz-image-region: rect(0px, 96px, 16px, 80px);
}
-#add-share-provider {
- list-style-image: url(chrome://browser/skin/menuPanel-small.svg);
- -moz-image-region: rect(0px, 96px, 16px, 80px);
-}
-
diff --git a/browser/themes/shared/notification-icons.inc.css b/browser/themes/shared/notification-icons.inc.css
index 595e911b6..86dce73a1 100644
--- a/browser/themes/shared/notification-icons.inc.css
+++ b/browser/themes/shared/notification-icons.inc.css
@@ -271,28 +271,6 @@ html|*#webRTC-previewVideo {
}
}
-/* SOCIAL API */
-
-.popup-notification-icon[popupid="servicesInstall"] {
- list-style-image: url(chrome://browser/skin/social/services-64.png);
-}
-
-.service-icon {
- list-style-image: url(chrome://browser/skin/social/services-16.png);
-}
-
-%ifdef XP_MACOSX
-@media (min-resolution: 1.1dppx) {
- .popup-notification-icon[popupid="servicesInstall"] {
- list-style-image: url(chrome://browser/skin/social/services-64@2x.png);
- }
-
- .service-icon {
- list-style-image: url(chrome://browser/skin/social/services-16@2x.png);
- }
-}
-%endif
-
/* TRANSLATION */
.translation-icon {
diff --git a/browser/themes/shared/social/gear_clicked.png b/browser/themes/shared/social/gear_clicked.png
deleted file mode 100644
index 7c93aa767..000000000
--- a/browser/themes/shared/social/gear_clicked.png
+++ /dev/null
Binary files differ
diff --git a/browser/themes/shared/social/gear_default.png b/browser/themes/shared/social/gear_default.png
deleted file mode 100644
index 2a9c8e198..000000000
--- a/browser/themes/shared/social/gear_default.png
+++ /dev/null
Binary files differ
diff --git a/browser/themes/shared/social/social.inc.css b/browser/themes/shared/social/social.inc.css
deleted file mode 100644
index 31389b215..000000000
--- a/browser/themes/shared/social/social.inc.css
+++ /dev/null
@@ -1,23 +0,0 @@
-%if 0
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-%endif
-
-#manage-share-providers {
- list-style-image: url("chrome://browser/skin/Toolbar.png");
- -moz-image-region: rect(0, 468px, 18px, 450px);
-}
-
-#manage-share-providers > .toolbarbutton-icon {
- min-height: 18px;
- min-width: 18px;
-}
-
-.social-panel > .panel-arrowcontainer > .panel-arrowcontent {
- padding: 0;
-}
-/* fixup corners for share panel */
-.social-panel > .social-panel-frame {
- border-radius: inherit;
-}
diff --git a/browser/themes/shared/toolbarbuttons.inc.css b/browser/themes/shared/toolbarbuttons.inc.css
index b3b3ffcf8..c043b8192 100644
--- a/browser/themes/shared/toolbarbuttons.inc.css
+++ b/browser/themes/shared/toolbarbuttons.inc.css
@@ -64,10 +64,6 @@ toolbar[brighttext] #bookmarks-menu-button > .toolbarbutton-menubutton-dropmarke
-moz-image-region: rect(0, 288px, 18px, 270px);
}
-#social-share-button[cui-areatype="toolbar"] {
- -moz-image-region: rect(0px, 306px, 18px, 288px);
-}
-
#characterencoding-button[cui-areatype="toolbar"]{
-moz-image-region: rect(0, 324px, 18px, 306px);
}
@@ -242,10 +238,6 @@ toolbar[brighttext] #bookmarks-menu-button > .toolbarbutton-menubutton-dropmarke
-moz-image-region: rect(0, 576px, 36px, 540px);
}
- #social-share-button[cui-areatype="toolbar"] {
- -moz-image-region: rect(0, 612px, 36px, 576px);
- }
-
#characterencoding-button[cui-areatype="toolbar"] {
-moz-image-region: rect(0, 648px, 36px, 612px);
}
diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css
index a0cdabfb2..b364dbc36 100644
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -1784,81 +1784,6 @@ html|span.ac-emphasize-text-url {
-moz-image-region: rect(0, 48px, 16px, 32px);
}
-/* social share panel */
-%include ../shared/social/social.inc.css
-
-.social-panel-frame {
- border-radius: inherit;
-}
-
-.social-share-frame {
- min-width: 756px;
- height: 150px;
-}
-#share-container {
- min-width: 756px;
- background-color: white;
- background-repeat: no-repeat;
- background-position: center center;
-}
-#share-container[loading] {
- background-image: url(chrome://browser/skin/tabbrowser/pendingpaint.png);
-}
-#share-container > browser {
- transition: opacity 150ms ease-in-out;
- opacity: 1;
-}
-#share-container[loading] > browser {
- opacity: 0;
-}
-
-.social-share-toolbar {
- border-bottom: 1px solid #e2e5e8;
- padding: 2px;
-}
-
-#social-share-provider-buttons {
- padding: 0;
- margin: 0;
-}
-
-.share-provider-button {
- padding: 5px;
- margin: 2px;
-}
-
-.share-provider-button > .toolbarbutton-text {
- display: none;
-}
-.share-provider-button > .toolbarbutton-icon {
- width: 16px;
- min-height: 16px;
- max-height: 16px;
-}
-
-#social-share-panel {
- min-height: 100px;
- min-width: 766px;
-}
-
-#share-container,
-.social-share-frame {
- border-top-left-radius: 0;
- border-bottom-left-radius: inherit;
- border-top-right-radius: 0;
- border-bottom-right-radius: inherit;
-}
-
-#social-share-panel > .social-share-toolbar {
- border-top-left-radius: inherit;
- border-top-right-radius: inherit;
-}
-
-#social-share-provider-buttons {
- border-top-left-radius: inherit;
- border-top-right-radius: inherit;
-}
-
/* bookmarks menu-button */
#nav-bar #bookmarks-menu-button[cui-areatype="toolbar"]:not([overflowedItem=true]) > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
diff --git a/browser/themes/windows/customizableui/panelUI.css b/browser/themes/windows/customizableui/panelUI.css
index 189a163f3..a01a2f3e3 100644
--- a/browser/themes/windows/customizableui/panelUI.css
+++ b/browser/themes/windows/customizableui/panelUI.css
@@ -97,14 +97,6 @@ menuitem[type="checkbox"].subviewbutton {
padding-inline-start: 0;
}
-/* subviewbutton entries for social sidebars have images that come from external
-/* sources, and are not guaranteed to be the size we want, so force the size on
-/* those icons. */
-toolbarbutton.social-provider-menuitem > .toolbarbutton-icon {
- width: 16px;
- height: 16px;
-}
-
.subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item)[checked="true"] > .toolbarbutton-icon {
visibility: hidden;
}
diff --git a/browser/themes/windows/jar.mn b/browser/themes/windows/jar.mn
index 410148645..e8db7eed2 100644
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -109,8 +109,6 @@ browser.jar:
* skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
* skin/classic/browser/preferences/in-content/dialog.css (preferences/in-content/dialog.css)
skin/classic/browser/preferences/applications.css (preferences/applications.css)
- skin/classic/browser/social/services-16.png (social/services-16.png)
- skin/classic/browser/social/services-64.png (social/services-64.png)
skin/classic/browser/tabbrowser/newtab.svg (tabbrowser/newtab.svg)
skin/classic/browser/tabbrowser/newtab-win7.svg (tabbrowser/newtab-win7.svg)
skin/classic/browser/tabbrowser/newtab-inverted.svg (tabbrowser/newtab-inverted.svg)
diff --git a/build/gyp.mozbuild b/build/gyp.mozbuild
index 10c3af95d..fd8714ecf 100644
--- a/build/gyp.mozbuild
+++ b/build/gyp.mozbuild
@@ -44,7 +44,6 @@ gyp_vars = {
'arm_neon': 0,
'arm_neon_optional': 1,
- 'moz_widget_toolkit_gonk': 0,
'moz_webrtc_omx': 0,
'moz_webrtc_mediacodec': 0,
diff --git a/build/moz.build b/build/moz.build
index 616a64c3f..4ac1f2290 100644
--- a/build/moz.build
+++ b/build/moz.build
@@ -52,16 +52,13 @@ if CONFIG['MOZ_PHOENIX']:
'compare-mozconfig/compare-mozconfigs-wrapper.py',
]
-if CONFIG['ENABLE_TESTS'] or CONFIG['MOZ_DMD']:
+if CONFIG['ENABLE_TESTS']:
FINAL_TARGET_FILES += ['/tools/rb/fix_stack_using_bpsyms.py']
if CONFIG['OS_ARCH'] == 'Darwin':
FINAL_TARGET_FILES += ['/tools/rb/fix_macosx_stack.py']
if CONFIG['OS_ARCH'] == 'Linux':
FINAL_TARGET_FILES += ['/tools/rb/fix_linux_stack.py']
-if CONFIG['MOZ_DMD']:
- FINAL_TARGET_FILES += ['/memory/replace/dmd/dmd.py']
-
# Put a useful .gdbinit in the bin directory, to be picked up automatically
# by GDB when we debug executables there.
FINAL_TARGET_FILES += ['/.gdbinit']
diff --git a/config/config.mk b/config/config.mk
index 4e3fd1a6c..24442bfe9 100644
--- a/config/config.mk
+++ b/config/config.mk
@@ -173,17 +173,6 @@ OS_LDFLAGS += -DEBUG -OPT:REF
endif
endif
-#
-# Handle DMD in optimized builds.
-#
-ifdef MOZ_DMD
-ifdef HAVE_64BIT_BUILD
-OS_LDFLAGS = -DEBUG -OPT:REF,ICF
-else
-OS_LDFLAGS = -DEBUG -OPT:REF
-endif
-endif # MOZ_DMD
-
endif # MOZ_DEBUG
endif # WINNT && !GNU_CC
diff --git a/config/external/nss/crmf/moz.build b/config/external/nss/crmf/moz.build
index d2004a509..04d985d74 100644
--- a/config/external/nss/crmf/moz.build
+++ b/config/external/nss/crmf/moz.build
@@ -8,7 +8,6 @@ Library('crmf')
if CONFIG['MOZ_SYSTEM_NSS']:
OS_LIBS += [l for l in CONFIG['NSS_LIBS'] if l.startswith('-L')]
- OS_LIBS += ['-lcrmf']
else:
USE_LIBS += [
# The dependency on nss is not real, but is required to force the
diff --git a/devtools/client/responsive.html/browser/tunnel.js b/devtools/client/responsive.html/browser/tunnel.js
index fdbfe8918..42eb010e7 100644
--- a/devtools/client/responsive.html/browser/tunnel.js
+++ b/devtools/client/responsive.html/browser/tunnel.js
@@ -407,8 +407,6 @@ MessageManagerTunnel.prototype = {
"PageInfo:",
// Messages sent from printUtils.js
"Printing:",
- // Messages sent from browser-social.js
- "Social:",
"PageMetadata:",
// Messages sent from viewSourceUtils.js
"ViewSource:",
@@ -427,8 +425,6 @@ MessageManagerTunnel.prototype = {
"PageInfo:",
// Messages sent to printUtils.js
"Printing:",
- // Messages sent to browser-social.js
- "Social:",
"PageMetadata:",
// Messages sent to viewSourceUtils.js
"ViewSource:",
diff --git a/devtools/client/webconsole/console-output.js b/devtools/client/webconsole/console-output.js
index 52d848494..bd290dcc6 100644
--- a/devtools/client/webconsole/console-output.js
+++ b/devtools/client/webconsole/console-output.js
@@ -31,7 +31,7 @@ const {PluralForm} = require("devtools/shared/plural-form");
const MAX_STRING_GRIP_LENGTH = 36;
const {ELLIPSIS} = require("devtools/shared/l10n");
-const validProtocols = /^(http|https|ftp|data|javascript|resource|chrome):/i;
+const validProtocols = /^(http|https|ftp|resource|chrome):/i;
// Constants for compatibility with the Web Console output implementation before
// bug 778766.
diff --git a/devtools/client/webconsole/test/browser_webconsole_block_mixedcontent_securityerrors.js b/devtools/client/webconsole/test/browser_webconsole_block_mixedcontent_securityerrors.js
index ff4157a3b..eb77bc158 100644
--- a/devtools/client/webconsole/test/browser_webconsole_block_mixedcontent_securityerrors.js
+++ b/devtools/client/webconsole/test/browser_webconsole_block_mixedcontent_securityerrors.js
@@ -61,8 +61,6 @@ function pushPrefEnv() {
"set": [
["security.mixed_content.block_active_content", true],
["security.mixed_content.block_display_content", true],
- ["security.mixed_content.use_hsts", false],
- ["security.mixed_content.send_hsts_priming", false],
]
};
SpecialPowers.pushPrefEnv(options, deferred.resolve);
diff --git a/devtools/client/webconsole/test/browser_webconsole_bug_632817.js b/devtools/client/webconsole/test/browser_webconsole_bug_632817.js
index 561e3b112..dc976411f 100644
--- a/devtools/client/webconsole/test/browser_webconsole_bug_632817.js
+++ b/devtools/client/webconsole/test/browser_webconsole_bug_632817.js
@@ -95,10 +95,6 @@ function testXhrWarn() {
let lastRequest = yield waitForFinishedRequest(XHR_WARN_REQUEST_PREDICATE);
if (lastRequest.request.method == "HEAD") {
- // in non-e10s, we get the HEAD request that priming sends, so make sure
- // a priming request should be sent, and then get the actual request
- is(Services.prefs.getBoolPref("security.mixed_content.send_hsts_priming"),
- true, "Found HSTS Priming Request");
lastRequest = yield waitForFinishedRequest(XHR_WARN_REQUEST_PREDICATE);
}
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index b3e26da33..8eca47495 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9961,27 +9961,6 @@ nsDocShell::InternalLoad(nsIURI* aURI,
return NS_ERROR_CONTENT_BLOCKED;
}
-
- // If HSTS priming was set by nsMixedContentBlocker::ShouldLoad, and we
- // would block due to mixed content, go ahead and block here. If we try to
- // proceed with priming, we will error out later on.
- nsCOMPtr<nsIDocShell> docShell = NS_CP_GetDocShellFromContext(requestingContext);
- // When loading toplevel windows, requestingContext can be null. We don't
- // really care about HSTS in that situation, though; loads in toplevel
- // windows should all be browser UI.
- if (docShell) {
- nsIDocument* document = docShell->GetDocument();
- NS_ENSURE_TRUE(document, NS_OK);
-
- HSTSPrimingState state = document->GetHSTSPrimingStateForLocation(aURI);
- if (state == HSTSPrimingState::eHSTS_PRIMING_BLOCK) {
- // HSTS Priming currently disabled for InternalLoad, so we need to clear
- // the location that was added by nsMixedContentBlocker::ShouldLoad
- // Bug 1269815 will address images loaded via InternalLoad
- document->ClearHSTSPrimingLocation(aURI);
- return NS_ERROR_CONTENT_BLOCKED;
- }
- }
}
nsCOMPtr<nsIPrincipal> principalToInherit = aPrincipalToInherit;
diff --git a/docshell/test/navigation/file_bug1379762-1.html b/docshell/test/navigation/file_bug1379762-1.html
new file mode 100644
index 000000000..e8cd8b30b
--- /dev/null
+++ b/docshell/test/navigation/file_bug1379762-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Bug 1379762</title>
+ </head>
+ <img srcset> <!-- This tries to add load blockers during bfcache restoration -->
+ <script>
+ onunload = null; // enable bfcache
+ opener.is(opener.testCount, 0,
+ "We should only run once; otherwise the loadCount variable makes no sense");
+ var loadCount = 0;
+ onpageshow = function() {
+ ++opener.testCount;
+ if (opener.testCount == 1) {
+ // Navigate forward and then back.
+ setTimeout(function() { location = "goback.html"; }, 0);
+ } else if (opener.testCount == 2) {
+ // Do this async so our load event gets a chance to fire if it plans to
+ // do it.
+ setTimeout(function() {
+ opener.nextTest();
+ window.close();
+ });
+ }
+ };
+ onload = function() {
+ ++loadCount;
+ opener.is(loadCount, 1, "Should only get one onload");
+ }
+ </script>
+</html>
diff --git a/docshell/test/navigation/file_bug1379762-2.html b/docshell/test/navigation/file_bug1379762-2.html
new file mode 100644
index 000000000..86033cb2e
--- /dev/null
+++ b/docshell/test/navigation/file_bug1379762-2.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Bug 1379762</title>
+ </head>
+ <script type="text/just-data">
+ onunload = null; // enable bfcache
+ ++opener.testCount;
+ onpageshow = function(e) {
+ opener.ok(!e.persisted, "Pageshow should not be coming from bfcache " + opener.testCount);
+ }
+ if (opener.testCount == 1) {
+ onload = function () {
+ setTimeout(function() {
+ document.write(testScript);
+ }, 0);
+ }
+ } else if (opener.testCount == 2) {
+ // Do this async, just in case.
+ setTimeout(function() {
+ history.back();
+ }, 0);
+ } else if (opener.testCount == 3) {
+ // Do this async, just in case.
+ setTimeout(function() {
+ history.forward();
+ }, 0);
+ } else if (opener.testCount == 4) {
+ onload = function() {
+ opener.nextTest();
+ window.close();
+ }
+ }
+ </script>
+ <script>
+ var data = document.querySelector("script[type='text/just-data']").textContent;
+ // Store the string that does all out work in a global variable, so we can
+ // get at it later.
+ var testScript = "<script>" + data + "</" + "script>";
+ document.write(testScript);
+ </script>
+</html>
diff --git a/docshell/test/navigation/mochitest.ini b/docshell/test/navigation/mochitest.ini
index 1b5f33c7f..8cff81ad1 100644
--- a/docshell/test/navigation/mochitest.ini
+++ b/docshell/test/navigation/mochitest.ini
@@ -59,6 +59,7 @@ skip-if = (toolkit == 'android') || (!debug && (os == 'mac' || os == 'win')) # B
skip-if = (toolkit == 'android') || (debug && e10s) #too slow on Android 4.3 aws only; bug 1030403; bug 1263213 for debug e10s
[test_sessionhistory.html]
skip-if = toolkit == 'android' #RANDOM
+support-files = file_bug1379762-1.html file_bug1379762-2.html
[test_sibling-matching-parent.html]
[test_sibling-off-domain.html]
[test_triggeringprincipal_frame_nav.html]
diff --git a/docshell/test/navigation/test_sessionhistory.html b/docshell/test/navigation/test_sessionhistory.html
index 452271a41..10b0cbcaf 100644
--- a/docshell/test/navigation/test_sessionhistory.html
+++ b/docshell/test/navigation/test_sessionhistory.html
@@ -31,7 +31,9 @@ var testFiles =
"file_nested_frames.html",
"file_shiftReload_and_pushState.html",
"file_scrollRestoration.html",
- "file_bug1300461.html"
+ "file_bug1300461.html",
+ "file_bug1379762-1.html",
+ "file_bug1379762-2.html",
];
var testCount = 0; // Used by the test files.
diff --git a/dom/animation/Animation.cpp b/dom/animation/Animation.cpp
index bd318f79e..f4d29376c 100644
--- a/dom/animation/Animation.cpp
+++ b/dom/animation/Animation.cpp
@@ -589,8 +589,10 @@ Animation::Tick()
// during the *previous* tick of the refresh driver, it can still be
// ahead of the *current* timeline time when we are using the
// vsync timer so we need to clamp it to the timeline time.
- mPendingReadyTime.SetValue(std::min(mTimeline->GetCurrentTime().Value(),
- mPendingReadyTime.Value()));
+ TimeDuration currentTime = mTimeline->GetCurrentTime().Value();
+ if (currentTime < mPendingReadyTime.Value()) {
+ mPendingReadyTime.SetValue(currentTime);
+ }
FinishPendingAt(mPendingReadyTime.Value());
mPendingReadyTime.SetNull();
}
diff --git a/dom/base/nsIDocument.h b/dom/base/nsIDocument.h
index 1e0c9562e..7a73fae71 100644
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -18,11 +18,11 @@
#include "nsINode.h" // for base class
#include "nsIScriptGlobalObject.h" // for member (in nsCOMPtr)
#include "nsIServiceManager.h"
+#include "nsIURI.h" // for use in inline functions
#include "nsIUUIDGenerator.h"
#include "nsPIDOMWindow.h" // for use in inline functions
#include "nsPropertyTable.h" // for member
-#include "nsDataHashtable.h" // for member
-#include "nsURIHashKey.h" // for member
+#include "nsTHashtable.h" // for member
#include "mozilla/net/ReferrerPolicy.h" // for member
#include "nsWeakReference.h"
#include "mozilla/UseCounter.h"
@@ -182,13 +182,6 @@ enum DocumentFlavor {
DocumentFlavorPlain, // Just a Document
};
-// Enum for HSTS priming states
-enum class HSTSPrimingState {
- eNO_HSTS_PRIMING = 0, // don't do HSTS Priming
- eHSTS_PRIMING_ALLOW = 1, // if HSTS priming fails, allow the load to proceed
- eHSTS_PRIMING_BLOCK = 2 // if HSTS priming fails, block the load
-};
-
// Document states
// RTL locale: specific to the XUL localedir attribute
@@ -406,34 +399,6 @@ public:
}
/**
- * Check to see if a subresource we want to load requires HSTS priming
- * to be done.
- */
- HSTSPrimingState GetHSTSPrimingStateForLocation(nsIURI* aContentLocation) const
- {
- HSTSPrimingState state;
- if (mHSTSPrimingURIList.Get(aContentLocation, &state)) {
- return state;
- }
- return HSTSPrimingState::eNO_HSTS_PRIMING;
- }
-
- /**
- * Add a subresource to the HSTS priming list. If this URI is
- * not in the HSTS cache, it will trigger an HSTS priming request
- * when we try to load it.
- */
- void AddHSTSPrimingLocation(nsIURI* aContentLocation, HSTSPrimingState aState)
- {
- mHSTSPrimingURIList.Put(aContentLocation, aState);
- }
-
- void ClearHSTSPrimingLocation(nsIURI* aContentLocation)
- {
- mHSTSPrimingURIList.Remove(aContentLocation);
- }
-
- /**
* Set the principal responsible for this document.
*/
virtual void SetPrincipal(nsIPrincipal *aPrincipal) = 0;
@@ -2987,11 +2952,6 @@ protected:
bool mUpgradeInsecureRequests;
bool mUpgradeInsecurePreloads;
- // if nsMixedContentBlocker requires sending an HSTS priming request,
- // temporarily store that in the document so that it can be propogated to the
- // LoadInfo and eventually the HTTP Channel
- nsDataHashtable<nsURIHashKey, HSTSPrimingState> mHSTSPrimingURIList;
-
mozilla::WeakPtr<nsDocShell> mDocumentContainer;
nsCString mCharacterSet;
diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp
index 576f3052a..3be1a6d2f 100644
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -1006,110 +1006,6 @@ nsJSContext::AddSupportsPrimitiveTojsvals(nsISupports *aArg, JS::Value *aArgv)
return NS_OK;
}
-#ifdef MOZ_JPROF
-
-#include <signal.h>
-
-inline bool
-IsJProfAction(struct sigaction *action)
-{
- return (action->sa_sigaction &&
- (action->sa_flags & (SA_RESTART | SA_SIGINFO)) == (SA_RESTART | SA_SIGINFO));
-}
-
-void NS_JProfStartProfiling();
-void NS_JProfStopProfiling();
-void NS_JProfClearCircular();
-
-static bool
-JProfStartProfilingJS(JSContext *cx, unsigned argc, JS::Value *vp)
-{
- NS_JProfStartProfiling();
- return true;
-}
-
-void NS_JProfStartProfiling()
-{
- // Figure out whether we're dealing with SIGPROF, SIGALRM, or
- // SIGPOLL profiling (SIGALRM for JP_REALTIME, SIGPOLL for
- // JP_RTC_HZ)
- struct sigaction action;
-
- // Must check ALRM before PROF since both are enabled for real-time
- sigaction(SIGALRM, nullptr, &action);
- //printf("SIGALRM: %p, flags = %x\n",action.sa_sigaction,action.sa_flags);
- if (IsJProfAction(&action)) {
- //printf("Beginning real-time jprof profiling.\n");
- raise(SIGALRM);
- return;
- }
-
- sigaction(SIGPROF, nullptr, &action);
- //printf("SIGPROF: %p, flags = %x\n",action.sa_sigaction,action.sa_flags);
- if (IsJProfAction(&action)) {
- //printf("Beginning process-time jprof profiling.\n");
- raise(SIGPROF);
- return;
- }
-
- sigaction(SIGPOLL, nullptr, &action);
- //printf("SIGPOLL: %p, flags = %x\n",action.sa_sigaction,action.sa_flags);
- if (IsJProfAction(&action)) {
- //printf("Beginning rtc-based jprof profiling.\n");
- raise(SIGPOLL);
- return;
- }
-
- printf("Could not start jprof-profiling since JPROF_FLAGS was not set.\n");
-}
-
-static bool
-JProfStopProfilingJS(JSContext *cx, unsigned argc, JS::Value *vp)
-{
- NS_JProfStopProfiling();
- return true;
-}
-
-void
-NS_JProfStopProfiling()
-{
- raise(SIGUSR1);
- //printf("Stopped jprof profiling.\n");
-}
-
-static bool
-JProfClearCircularJS(JSContext *cx, unsigned argc, JS::Value *vp)
-{
- NS_JProfClearCircular();
- return true;
-}
-
-void
-NS_JProfClearCircular()
-{
- raise(SIGUSR2);
- //printf("cleared jprof buffer\n");
-}
-
-static bool
-JProfSaveCircularJS(JSContext *cx, unsigned argc, JS::Value *vp)
-{
- // Not ideal...
- NS_JProfStopProfiling();
- NS_JProfStartProfiling();
- return true;
-}
-
-static const JSFunctionSpec JProfFunctions[] = {
- JS_FS("JProfStartProfiling", JProfStartProfilingJS, 0, 0),
- JS_FS("JProfStopProfiling", JProfStopProfilingJS, 0, 0),
- JS_FS("JProfClearCircular", JProfClearCircularJS, 0, 0),
- JS_FS("JProfSaveCircular", JProfSaveCircularJS, 0, 0),
- JS_FS_END
-};
-
-#endif /* defined(MOZ_JPROF) */
-
nsresult
nsJSContext::InitClasses(JS::Handle<JSObject*> aGlobalObj)
{
@@ -1121,11 +1017,6 @@ nsJSContext::InitClasses(JS::Handle<JSObject*> aGlobalObj)
// Attempt to initialize profiling functions
::JS_DefineProfilingFunctions(cx, aGlobalObj);
-#ifdef MOZ_JPROF
- // Attempt to initialize JProf functions
- ::JS_DefineFunctions(cx, aGlobalObj, JProfFunctions);
-#endif
-
return NS_OK;
}
diff --git a/dom/base/test/bug704320.sjs b/dom/base/test/bug704320.sjs
index dff77f4b3..e0f549533 100644
--- a/dom/base/test/bug704320.sjs
+++ b/dom/base/test/bug704320.sjs
@@ -194,12 +194,6 @@ function createPolicyTest(policy, optionalEarlierPolicy) {
}
function handleRequest(request, response) {
- if (request.method == 'HEAD') {
- // respond to a HEAD request with a 418 so that we can easily distinguish
- // HSTS priming responses and ignore them
- response.setStatusLine('1.1', 418, "I'm a teapot");
- return;
- }
var sharedKey = 'bug704320.sjs';
var params = request.queryString.split('&');
var action = params[0].split('=')[1];
diff --git a/dom/base/test/referrerHelper.js b/dom/base/test/referrerHelper.js
index 207bf5f15..01a22829c 100644
--- a/dom/base/test/referrerHelper.js
+++ b/dom/base/test/referrerHelper.js
@@ -25,9 +25,6 @@ function doXHR(url, onSuccess, onFail) {
xhr.onload = function () {
if (xhr.status == 200) {
onSuccess(xhr);
- } else if (xhr.status == 418) {
- // Ignore HSTS priming responses
- return;
} else {
onFail(xhr);
}
diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp
index 2a92084b4..32eed6354 100644
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -9,7 +9,6 @@
#include "AccessCheck.h"
#include "gfxContext.h"
-#include "gfxCrashReporterUtils.h"
#include "gfxPattern.h"
#include "gfxPrefs.h"
#include "gfxUtils.h"
@@ -956,7 +955,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
// Alright, now let's start trying.
bool forceEnabled = gfxPrefs::WebGLForceEnabled();
- ScopedGfxFeatureReporter reporter("WebGL", forceEnabled);
MOZ_ASSERT(!gl);
std::vector<FailureReason> failReasons;
@@ -1087,8 +1085,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
//////
- reporter.SetSuccessful();
-
failureId = NS_LITERAL_CSTRING("SUCCESS");
return NS_OK;
}
diff --git a/dom/fetch/Request.cpp b/dom/fetch/Request.cpp
index bc17afae3..c119a503e 100644
--- a/dom/fetch/Request.cpp
+++ b/dom/fetch/Request.cpp
@@ -327,7 +327,7 @@ Request::Constructor(const GlobalObject& aGlobal,
RequestCache fallbackCache = RequestCache::EndGuard_;
if (aInput.IsUSVString()) {
fallbackMode = RequestMode::Cors;
- fallbackCredentials = RequestCredentials::Omit;
+ fallbackCredentials = RequestCredentials::Same_origin;
fallbackCache = RequestCache::Default;
}
diff --git a/dom/html/test/test_anchor_ping.html b/dom/html/test/test_anchor_ping.html
index 4a39bcefe..6a1832ad1 100644
--- a/dom/html/test/test_anchor_ping.html
+++ b/dom/html/test/test_anchor_ping.html
@@ -40,15 +40,10 @@ let tests = [
function* setup() {
Services.prefs.setBoolPref("browser.send_pings", true);
Services.prefs.setIntPref("browser.send_pings.max_per_link", -1);
- Services.prefs.setBoolPref("security.mixed_content.block_active_content", false);
- // The server we create can't handle the priming HEAD requests
- Services.prefs.setBoolPref("security.mixed_content.send_hsts_priming", false);
SimpleTest.registerCleanupFunction(() => {
Services.prefs.clearUserPref("browser.send_pings");
Services.prefs.clearUserPref("browser.send_pings.max_per_link");
- Services.prefs.clearUserPref("security.mixed_content.block_active_content");
- Services.prefs.clearUserPref("security.mixed_content.send_hsts_priming");
});
},
@@ -151,7 +146,7 @@ let tests = [
// The referrer will be loaded using a secure channel.
navigate("https://example.com/chrome/dom/html/test/" +
- "file_anchor_ping.html?" + "http://localhost:" +
+ "file_anchor_ping.html?" + "http://127.0.0.1:" +
server.identity.primaryPort + ping);
// Wait until the ping has been sent.
diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp
index 9678fb49f..4e1b9f7af 100644
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -13470,10 +13470,6 @@ nsresult
ConnectionPool::
ThreadRunnable::Run()
{
-#ifdef MOZ_ENABLE_PROFILER_SPS
- char stackTopGuess;
-#endif // MOZ_ENABLE_PROFILER_SPS
-
MOZ_ASSERT(!IsOnBackgroundThread());
MOZ_ASSERT(mContinueRunning);
@@ -13490,10 +13486,6 @@ ThreadRunnable::Run()
const nsPrintfCString threadName("IndexedDB #%lu", mSerialNumber);
PR_SetCurrentThreadName(threadName.get());
-
-#ifdef MOZ_ENABLE_PROFILER_SPS
- profiler_register_thread(threadName.get(), &stackTopGuess);
-#endif // MOZ_ENABLE_PROFILER_SPS
}
{
@@ -13537,10 +13529,6 @@ ThreadRunnable::Run()
}
}
-#ifdef MOZ_ENABLE_PROFILER_SPS
- profiler_unregister_thread();
-#endif // MOZ_ENABLE_PROFILER_SPS
-
return NS_OK;
}
diff --git a/dom/indexedDB/IndexedDatabaseManager.cpp b/dom/indexedDB/IndexedDatabaseManager.cpp
index f65381fe8..62ba51c08 100644
--- a/dom/indexedDB/IndexedDatabaseManager.cpp
+++ b/dom/indexedDB/IndexedDatabaseManager.cpp
@@ -153,7 +153,7 @@ const char kPrefMaxSerilizedMsgSize[] = IDB_PREF_BRANCH_ROOT "maxSerializedMsgSi
const char kPrefLoggingEnabled[] = IDB_PREF_LOGGING_BRANCH_ROOT "enabled";
const char kPrefLoggingDetails[] = IDB_PREF_LOGGING_BRANCH_ROOT "details";
-#if defined(DEBUG) || defined(MOZ_ENABLE_PROFILER_SPS)
+#if defined(DEBUG)
const char kPrefLoggingProfiler[] =
IDB_PREF_LOGGING_BRANCH_ROOT "profiler-marks";
#endif
@@ -415,10 +415,7 @@ IndexedDatabaseManager::Init()
Preferences::RegisterCallback(LoggingModePrefChangedCallback,
kPrefLoggingDetails);
-#ifdef MOZ_ENABLE_PROFILER_SPS
- Preferences::RegisterCallback(LoggingModePrefChangedCallback,
- kPrefLoggingProfiler);
-#endif
+
Preferences::RegisterCallbackAndCall(LoggingModePrefChangedCallback,
kPrefLoggingEnabled);
@@ -479,10 +476,6 @@ IndexedDatabaseManager::Destroy()
Preferences::UnregisterCallback(LoggingModePrefChangedCallback,
kPrefLoggingDetails);
-#ifdef MOZ_ENABLE_PROFILER_SPS
- Preferences::UnregisterCallback(LoggingModePrefChangedCallback,
- kPrefLoggingProfiler);
-#endif
Preferences::UnregisterCallback(LoggingModePrefChangedCallback,
kPrefLoggingEnabled);
@@ -1060,15 +1053,13 @@ IndexedDatabaseManager::LoggingModePrefChangedCallback(
}
bool useProfiler =
-#if defined(DEBUG) || defined(MOZ_ENABLE_PROFILER_SPS)
+#if defined(DEBUG)
Preferences::GetBool(kPrefLoggingProfiler);
-#if !defined(MOZ_ENABLE_PROFILER_SPS)
if (useProfiler) {
NS_WARNING("IndexedDB cannot create profiler marks because this build does "
"not have profiler extensions enabled!");
useProfiler = false;
}
-#endif
#else
false;
#endif
diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
index 9e1c7e8cb..fc288e2c5 100644
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -11,7 +11,6 @@
#include "ContentChild.h"
#include "BlobChild.h"
-#include "CrashReporterChild.h"
#include "GeckoProfiler.h"
#include "TabChild.h"
#include "HandlerServiceChild.h"
@@ -32,7 +31,6 @@
#include "mozilla/dom/ExternalHelperAppChild.h"
#include "mozilla/dom/FlyWebPublishedServerIPC.h"
#include "mozilla/dom/GetFilesHelper.h"
-#include "mozilla/dom/PCrashReporterChild.h"
#include "mozilla/dom/ProcessGlobal.h"
#include "mozilla/dom/PushNotifier.h"
#include "mozilla/dom/workers/ServiceWorkerManager.h"
@@ -535,8 +533,7 @@ ContentChild::Init(MessageLoop* aIOLoop,
NS_ASSERTION(!sSingleton, "only one ContentChild per child");
// Once we start sending IPC messages, we need the thread manager to be
- // initialized so we can deal with the responses. Do that here before we
- // try to construct the crash reporter.
+ // initialized so we can deal with the responses. Do that here.
nsresult rv = nsThreadManager::get().Init();
if (NS_WARN_IF(NS_FAILED(rv))) {
return false;
@@ -1497,19 +1494,6 @@ ContentChild::RecvNotifyEmptyHTTPCache()
return true;
}
-PCrashReporterChild*
-ContentChild::AllocPCrashReporterChild(const mozilla::dom::NativeThreadId& id,
- const uint32_t& processType)
-{
- return nullptr;
-}
-
-bool
-ContentChild::DeallocPCrashReporterChild(PCrashReporterChild* crashreporter)
-{
- delete crashreporter;
- return true;
-}
PHalChild*
ContentChild::AllocPHalChild()
@@ -2420,61 +2404,6 @@ ContentChild::DeallocPOfflineCacheUpdateChild(POfflineCacheUpdateChild* actor)
}
bool
-ContentChild::RecvStartProfiler(const ProfilerInitParams& params)
-{
- nsTArray<const char*> featureArray;
- for (size_t i = 0; i < params.features().Length(); ++i) {
- featureArray.AppendElement(params.features()[i].get());
- }
-
- nsTArray<const char*> threadNameFilterArray;
- for (size_t i = 0; i < params.threadFilters().Length(); ++i) {
- threadNameFilterArray.AppendElement(params.threadFilters()[i].get());
- }
-
- profiler_start(params.entries(), params.interval(),
- featureArray.Elements(), featureArray.Length(),
- threadNameFilterArray.Elements(),
- threadNameFilterArray.Length());
-
- return true;
-}
-
-bool
-ContentChild::RecvStopProfiler()
-{
- profiler_stop();
- return true;
-}
-
-bool
-ContentChild::RecvPauseProfiler(const bool& aPause)
-{
- if (aPause) {
- profiler_pause();
- } else {
- profiler_resume();
- }
-
- return true;
-}
-
-bool
-ContentChild::RecvGatherProfile()
-{
- nsCString profileCString;
- UniquePtr<char[]> profile = profiler_get_profile();
- if (profile) {
- profileCString = nsCString(profile.get(), strlen(profile.get()));
- } else {
- profileCString = EmptyCString();
- }
-
- Unused << SendProfile(profileCString);
- return true;
-}
-
-bool
ContentChild::RecvLoadPluginResult(const uint32_t& aPluginId,
const bool& aResult)
{
@@ -2628,15 +2557,6 @@ ContentChild::RecvShutdown()
GetIPCChannel()->SetAbortOnError(false);
-#ifdef MOZ_ENABLE_PROFILER_SPS
- if (profiler_is_active()) {
- // We're shutting down while we were profiling. Send the
- // profile up to the parent so that we don't lose this
- // information.
- Unused << RecvGatherProfile();
- }
-#endif
-
// Start a timer that will insure we quickly exit after a reasonable
// period of time. Prevents shutdown hangs after our connection to the
// parent closes.
diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h
index c78f951f0..ba590b58e 100644
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -186,13 +186,6 @@ public:
virtual bool DeallocPBlobChild(PBlobChild* aActor) override;
- virtual PCrashReporterChild*
- AllocPCrashReporterChild(const mozilla::dom::NativeThreadId& id,
- const uint32_t& processType) override;
-
- virtual bool
- DeallocPCrashReporterChild(PCrashReporterChild*) override;
-
virtual PHalChild* AllocPHalChild() override;
virtual bool DeallocPHalChild(PHalChild*) override;
@@ -461,14 +454,6 @@ public:
virtual bool RecvUpdateWindow(const uintptr_t& aChildId) override;
- virtual bool RecvStartProfiler(const ProfilerInitParams& params) override;
-
- virtual bool RecvPauseProfiler(const bool& aPause) override;
-
- virtual bool RecvStopProfiler() override;
-
- virtual bool RecvGatherProfile() override;
-
virtual bool RecvDomainSetChanged(const uint32_t& aSetType,
const uint32_t& aChangeType,
const OptionalURIParams& aDomain) override;
diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp
index 8b9ab4442..3488e26bd 100644
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -22,7 +22,6 @@
#include "AppProcessChecker.h"
#include "AudioChannelService.h"
#include "BlobParent.h"
-#include "CrashReporterParent.h"
#include "GMPServiceParent.h"
#include "HandlerServiceParent.h"
#include "IHistory.h"
@@ -82,9 +81,6 @@
#include "mozilla/Preferences.h"
#include "mozilla/ProcessHangMonitor.h"
#include "mozilla/ProcessHangMonitorIPC.h"
-#ifdef MOZ_ENABLE_PROFILER_SPS
-#include "mozilla/ProfileGatherer.h"
-#endif
#include "mozilla/ScopeExit.h"
#include "mozilla/Services.h"
#include "mozilla/StaticPtr.h"
@@ -221,11 +217,6 @@
#include "nsIBrowserSearchService.h"
#endif
-#ifdef MOZ_ENABLE_PROFILER_SPS
-#include "nsIProfiler.h"
-#include "nsIProfileSaveEvent.h"
-#endif
-
#ifdef XP_WIN
#include "mozilla/widget/AudioSession.h"
#endif
@@ -246,9 +237,6 @@ extern const char* kForceEnableE10sPref;
using base::ChildPrivileges;
using base::KillProcess;
-#ifdef MOZ_ENABLE_PROFILER_SPS
-using mozilla::ProfileGatherer;
-#endif
using namespace mozilla::dom::power;
using namespace mozilla::media;
@@ -516,14 +504,6 @@ static const char* sObserverTopics[] = {
#ifdef ACCESSIBILITY
"a11y-init-or-shutdown",
#endif
-#ifdef MOZ_ENABLE_PROFILER_SPS
- "profiler-started",
- "profiler-stopped",
- "profiler-paused",
- "profiler-resumed",
- "profiler-subprocess-gather",
- "profiler-subprocess",
-#endif
"cacheservice:empty-cache",
};
@@ -1306,26 +1286,6 @@ ContentParent::Init()
}
#endif
-#ifdef MOZ_ENABLE_PROFILER_SPS
- nsCOMPtr<nsIProfiler> profiler(do_GetService("@mozilla.org/tools/profiler;1"));
- bool profilerActive = false;
- DebugOnly<nsresult> rv = profiler->IsActive(&profilerActive);
- MOZ_ASSERT(NS_SUCCEEDED(rv));
-
- if (profilerActive) {
- nsCOMPtr<nsIProfilerStartParams> currentProfilerParams;
- rv = profiler->GetStartParams(getter_AddRefs(currentProfilerParams));
- MOZ_ASSERT(NS_SUCCEEDED(rv));
-
- nsCOMPtr<nsISupports> gatherer;
- rv = profiler->GetProfileGatherer(getter_AddRefs(gatherer));
- MOZ_ASSERT(NS_SUCCEEDED(rv));
- mGatherer = static_cast<ProfileGatherer*>(gatherer.get());
-
- StartProfiler(currentProfilerParams);
- }
-#endif
-
RefPtr<GeckoMediaPluginServiceParent> gmps(GeckoMediaPluginServiceParent::GetSingleton());
gmps->UpdateContentProcessGMPCapabilities();
}
@@ -1752,12 +1712,6 @@ ContentParent::ActorDestroy(ActorDestroyReason why)
mConsoleService = nullptr;
-#ifdef MOZ_ENABLE_PROFILER_SPS
- if (mGatherer && !mProfile.IsEmpty()) {
- mGatherer->OOPExitProfile(mProfile);
- }
-#endif
-
if (obs) {
RefPtr<nsHashPropertyBag> props = new nsHashPropertyBag();
@@ -2557,27 +2511,6 @@ ContentParent::Observe(nsISupports* aSubject,
NS_ASSERTION(!mSubprocess, "Close should have nulled mSubprocess");
}
-#ifdef MOZ_ENABLE_PROFILER_SPS
- // Need to do this before the mIsAlive check to avoid missing profiles.
- if (!strcmp(aTopic, "profiler-subprocess-gather")) {
- if (mGatherer) {
- mGatherer->WillGatherOOPProfile();
- if (mIsAlive && mSubprocess) {
- Unused << SendGatherProfile();
- }
- }
- }
- else if (!strcmp(aTopic, "profiler-subprocess")) {
- nsCOMPtr<nsIProfileSaveEvent> pse = do_QueryInterface(aSubject);
- if (pse) {
- if (!mProfile.IsEmpty()) {
- pse->AddSubProfile(mProfile.get());
- mProfile.Truncate();
- }
- }
- }
-#endif
-
if (!mIsAlive || !mSubprocess)
return NS_OK;
@@ -2664,22 +2597,6 @@ ContentParent::Observe(nsISupports* aSubject,
}
}
#endif
-#ifdef MOZ_ENABLE_PROFILER_SPS
- else if (!strcmp(aTopic, "profiler-started")) {
- nsCOMPtr<nsIProfilerStartParams> params(do_QueryInterface(aSubject));
- StartProfiler(params);
- }
- else if (!strcmp(aTopic, "profiler-stopped")) {
- mGatherer = nullptr;
- Unused << SendStopProfiler();
- }
- else if (!strcmp(aTopic, "profiler-paused")) {
- Unused << SendPauseProfiler(true);
- }
- else if (!strcmp(aTopic, "profiler-resumed")) {
- Unused << SendPauseProfiler(false);
- }
-#endif
else if (!strcmp(aTopic, "cacheservice:empty-cache")) {
Unused << SendNotifyEmptyHTTPCache();
}
@@ -2953,29 +2870,6 @@ ContentParent::FriendlyName(nsAString& aName, bool aAnonymize)
}
}
-PCrashReporterParent*
-ContentParent::AllocPCrashReporterParent(const NativeThreadId& tid,
- const uint32_t& processType)
-{
- return nullptr;
-}
-
-bool
-ContentParent::RecvPCrashReporterConstructor(PCrashReporterParent* actor,
- const NativeThreadId& tid,
- const uint32_t& processType)
-{
- static_cast<CrashReporterParent*>(actor)->SetChildData(tid, processType);
- return true;
-}
-
-bool
-ContentParent::DeallocPCrashReporterParent(PCrashReporterParent* crashreporter)
-{
- delete crashreporter;
- return true;
-}
-
hal_sandbox::PHalParent*
ContentParent::AllocPHalParent()
{
@@ -3479,13 +3373,13 @@ ContentParent::RecvIsSecureURI(const uint32_t& type,
}
bool
-ContentParent::RecvAccumulateMixedContentHSTS(const URIParams& aURI, const bool& aActive, const bool& aHSTSPriming)
+ContentParent::RecvAccumulateMixedContentHSTS(const URIParams& aURI, const bool& aActive)
{
nsCOMPtr<nsIURI> ourURI = DeserializeURI(aURI);
if (!ourURI) {
return false;
}
- nsMixedContentBlocker::AccumulateMixedContentHSTS(ourURI, aActive, aHSTSPriming);
+ nsMixedContentBlocker::AccumulateMixedContentHSTS(ourURI, aActive);
return true;
}
@@ -4581,19 +4475,6 @@ ContentParent::RecvCreateWindow(PBrowserParent* aThisTab,
}
bool
-ContentParent::RecvProfile(const nsCString& aProfile)
-{
-#ifdef MOZ_ENABLE_PROFILER_SPS
- if (NS_WARN_IF(!mGatherer)) {
- return true;
- }
- mProfile = aProfile;
- mGatherer->GatheredOOPProfile();
-#endif
- return true;
-}
-
-bool
ContentParent::RecvGetGraphicsDeviceInitData(ContentDeviceData* aOut)
{
gfxPlatform::GetPlatform()->BuildContentDeviceData(aOut);
@@ -4679,34 +4560,6 @@ ContentParent::RecvNotifyBenchmarkResult(const nsString& aCodecName,
return true;
}
-void
-ContentParent::StartProfiler(nsIProfilerStartParams* aParams)
-{
-#ifdef MOZ_ENABLE_PROFILER_SPS
- if (NS_WARN_IF(!aParams)) {
- return;
- }
-
- ProfilerInitParams ipcParams;
-
- ipcParams.enabled() = true;
- aParams->GetEntries(&ipcParams.entries());
- aParams->GetInterval(&ipcParams.interval());
- ipcParams.features() = aParams->GetFeatures();
- ipcParams.threadFilters() = aParams->GetThreadFilterNames();
-
- Unused << SendStartProfiler(ipcParams);
-
- nsCOMPtr<nsIProfiler> profiler(do_GetService("@mozilla.org/tools/profiler;1"));
- if (NS_WARN_IF(!profiler)) {
- return;
- }
- nsCOMPtr<nsISupports> gatherer;
- profiler->GetProfileGatherer(getter_AddRefs(gatherer));
- mGatherer = static_cast<ProfileGatherer*>(gatherer.get());
-#endif
-}
-
bool
ContentParent::RecvNotifyPushObservers(const nsCString& aScope,
const IPC::Principal& aPrincipal,
diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h
index 3f74b10e1..abcea0b65 100644
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -42,9 +42,6 @@ class nsIWidget;
namespace mozilla {
class PRemoteSpellcheckEngineParent;
-#ifdef MOZ_ENABLE_PROFILER_SPS
-class ProfileGatherer;
-#endif
namespace embedding {
class PrintingParent;
@@ -372,15 +369,6 @@ public:
virtual void OnChannelError() override;
- virtual PCrashReporterParent*
- AllocPCrashReporterParent(const NativeThreadId& tid,
- const uint32_t& processType) override;
-
- virtual bool
- RecvPCrashReporterConstructor(PCrashReporterParent* actor,
- const NativeThreadId& tid,
- const uint32_t& processType) override;
-
virtual PNeckoParent* AllocPNeckoParent() override;
virtual bool RecvPNeckoConstructor(PNeckoParent* aActor) override
@@ -735,9 +723,6 @@ private:
RecvPBlobConstructor(PBlobParent* aActor,
const BlobConstructorParams& params) override;
- virtual bool
- DeallocPCrashReporterParent(PCrashReporterParent* crashreporter) override;
-
virtual bool RecvNSSU2FTokenIsCompatibleVersion(const nsString& aVersion,
bool* aIsCompatible) override;
@@ -757,8 +742,7 @@ private:
const uint32_t& aFlags, bool* aIsSecureURI) override;
virtual bool RecvAccumulateMixedContentHSTS(const URIParams& aURI,
- const bool& aActive,
- const bool& aHSTSPriming) override;
+ const bool& aActive) override;
virtual bool DeallocPHalParent(PHalParent*) override;
@@ -1030,12 +1014,8 @@ private:
virtual bool RecvUpdateDropEffect(const uint32_t& aDragAction,
const uint32_t& aDropEffect) override;
- virtual bool RecvProfile(const nsCString& aProfile) override;
-
virtual bool RecvGetGraphicsDeviceInitData(ContentDeviceData* aOut) override;
- void StartProfiler(nsIProfilerStartParams* aParams);
-
virtual bool RecvGetAndroidSystemInfo(AndroidSystemInfo* aInfo) override;
virtual bool RecvNotifyBenchmarkResult(const nsString& aCodecName,
@@ -1140,9 +1120,6 @@ private:
PProcessHangMonitorParent* mHangMonitorActor;
-#ifdef MOZ_ENABLE_PROFILER_SPS
- RefPtr<mozilla::ProfileGatherer> mGatherer;
-#endif
nsCString mProfile;
UniquePtr<gfx::DriverCrashGuard> mDriverCrashGuard;
diff --git a/dom/ipc/CrashReporterChild.cpp b/dom/ipc/CrashReporterChild.cpp
deleted file mode 100644
index 8174452e7..000000000
--- a/dom/ipc/CrashReporterChild.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#include "mozilla/plugins/PluginModuleChild.h"
-#include "ContentChild.h"
-#include "CrashReporterChild.h"
-#include "nsXULAppAPI.h"
-
-using mozilla::plugins::PluginModuleChild;
-
-namespace mozilla {
-namespace dom {
-
-/*static*/
-PCrashReporterChild*
-CrashReporterChild::GetCrashReporter()
-{
- const ManagedContainer<PCrashReporterChild>* reporters = nullptr;
- switch (XRE_GetProcessType()) {
- case GeckoProcessType_Content: {
- ContentChild* child = ContentChild::GetSingleton();
- reporters = &child->ManagedPCrashReporterChild();
- break;
- }
- case GeckoProcessType_Plugin: {
- PluginModuleChild* child = PluginModuleChild::GetChrome();
- reporters = &child->ManagedPCrashReporterChild();
- break;
- }
- default:
- break;
- }
- if (!reporters) {
- return nullptr;
- }
- return LoneManagedOrNullAsserts(*reporters);
-}
-
-} // namespace dom
-} // namespace mozilla
diff --git a/dom/ipc/CrashReporterChild.h b/dom/ipc/CrashReporterChild.h
deleted file mode 100644
index 96355ca11..000000000
--- a/dom/ipc/CrashReporterChild.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_CrashReporterChild_h
-#define mozilla_dom_CrashReporterChild_h
-
-#include "mozilla/dom/PCrashReporterChild.h"
-
-namespace mozilla {
-namespace dom {
-
-class CrashReporterChild :
- public PCrashReporterChild
-{
-public:
- CrashReporterChild() {
- MOZ_COUNT_CTOR(CrashReporterChild);
- }
- ~CrashReporterChild() {
- MOZ_COUNT_DTOR(CrashReporterChild);
- }
-
- static PCrashReporterChild* GetCrashReporter();
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // mozilla_dom_CrashReporterChild_h
diff --git a/dom/ipc/CrashReporterParent.cpp b/dom/ipc/CrashReporterParent.cpp
deleted file mode 100644
index 677b29670..000000000
--- a/dom/ipc/CrashReporterParent.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#include "CrashReporterParent.h"
-#include "mozilla/Sprintf.h"
-#include "mozilla/dom/ContentParent.h"
-#include "mozilla/ipc/CrashReporterHost.h"
-#include "nsAutoPtr.h"
-#include "nsXULAppAPI.h"
-#include <time.h>
-
-#include "mozilla/Telemetry.h"
-
-namespace mozilla {
-namespace dom {
-
-using namespace mozilla::ipc;
-
-void
-CrashReporterParent::AnnotateCrashReport(const nsCString& key,
- const nsCString& data)
-{
-}
-
-void
-CrashReporterParent::ActorDestroy(ActorDestroyReason aWhy)
-{
- // Implement me! Bug 1005155
-}
-
-bool
-CrashReporterParent::RecvAppendAppNotes(const nsCString& data)
-{
- mAppNotes.Append(data);
- return true;
-}
-
-CrashReporterParent::CrashReporterParent()
- :
- mStartTime(::time(nullptr))
- , mInitialized(false)
-{
- MOZ_COUNT_CTOR(CrashReporterParent);
-}
-
-CrashReporterParent::~CrashReporterParent()
-{
- MOZ_COUNT_DTOR(CrashReporterParent);
-}
-
-void
-CrashReporterParent::SetChildData(const NativeThreadId& tid,
- const uint32_t& processType)
-{
- mInitialized = true;
- mMainThread = tid;
- mProcessType = GeckoProcessType(processType);
-}
-
-} // namespace dom
-} // namespace mozilla
diff --git a/dom/ipc/CrashReporterParent.h b/dom/ipc/CrashReporterParent.h
deleted file mode 100644
index 71896c5c1..000000000
--- a/dom/ipc/CrashReporterParent.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_CrashReporterParent_h
-#define mozilla_dom_CrashReporterParent_h
-
-#include "mozilla/dom/PCrashReporterParent.h"
-#include "mozilla/dom/TabMessageUtils.h"
-#include "nsIFile.h"
-
-namespace mozilla {
-namespace dom {
-
-class CrashReporterParent : public PCrashReporterParent
-{
-public:
- CrashReporterParent();
- virtual ~CrashReporterParent();
-
- /*
- * Initialize this reporter with data from the child process.
- */
- void
- SetChildData(const NativeThreadId& id, const uint32_t& processType);
-
- /*
- * Returns the ID of the child minidump.
- * GeneratePairedMinidump or GenerateCrashReport must be called first.
- */
- const nsString& ChildDumpID() const {
- return mChildDumpID;
- }
-
- /*
- * Add an annotation to our internally tracked list of annotations.
- * Callers must apply these notes using GenerateChildData otherwise
- * the notes will get dropped.
- */
- void
- AnnotateCrashReport(const nsCString& aKey, const nsCString& aData);
-
- protected:
- virtual void ActorDestroy(ActorDestroyReason aWhy) override;
-
- virtual bool RecvAnnotateCrashReport(const nsCString& aKey,
- const nsCString& aData) override
- {
- AnnotateCrashReport(aKey, aData);
- return true;
- }
-
- virtual bool RecvAppendAppNotes(const nsCString& aData) override;
-
- nsCString mAppNotes;
- nsString mChildDumpID;
- // stores the child main thread id
- NativeThreadId mMainThread;
- time_t mStartTime;
- // stores the child process type
- GeckoProcessType mProcessType;
- bool mInitialized;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // mozilla_dom_CrashReporterParent_h
diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl
index d436c19fe..c01ad59c1 100644
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -11,7 +11,6 @@ include protocol PCompositorBridge;
include protocol PContentBridge;
include protocol PContentPermissionRequest;
include protocol PCycleCollectWithLogs;
-include protocol PCrashReporter;
include protocol PPSMContentDownloader;
include protocol PExternalHelperApp;
include protocol PHandlerService;
@@ -243,7 +242,6 @@ nested(upto inside_cpow) sync protocol PContent
manages PBlob;
manages PBrowser;
manages PContentPermissionRequest;
- manages PCrashReporter;
manages PCycleCollectWithLogs;
manages PPSMContentDownloader;
manages PExternalHelperApp;
@@ -466,15 +464,6 @@ child:
*/
async LoadPluginResult(uint32_t aPluginId, bool aResult);
- /**
- * Control the Gecko Profiler in the child process.
- */
- async StartProfiler(ProfilerInitParams params);
- async StopProfiler();
- async PauseProfiler(bool aPause);
-
- async GatherProfile();
-
async InvokeDragSession(IPCDataTransfer[] transfers, uint32_t action);
async EndDragSession(bool aDoneDrag, bool aUserCancelled,
@@ -625,8 +614,6 @@ parent:
async PRemoteSpellcheckEngine();
- sync PCrashReporter(NativeThreadId tid, uint32_t processType);
-
/**
* Is this token compatible with the provided version?
*
@@ -674,7 +661,7 @@ parent:
sync IsSecureURI(uint32_t type, URIParams uri, uint32_t flags)
returns (bool isSecureURI);
- async AccumulateMixedContentHSTS(URIParams uri, bool active, bool hasHSTSPriming);
+ async AccumulateMixedContentHSTS(URIParams uri, bool active);
sync GetLookAndFeelCache()
returns (LookAndFeelInt[] lookAndFeelIntCache);
@@ -962,8 +949,6 @@ parent:
async PContentPermissionRequest(PermissionRequest[] aRequests, Principal aPrincipal,
TabId tabId);
- async Profile(nsCString aProfile);
-
/**
* Request graphics initialization information from the parent.
*/
diff --git a/dom/ipc/PCrashReporter.ipdl b/dom/ipc/PCrashReporter.ipdl
deleted file mode 100644
index 8f965f2ee..000000000
--- a/dom/ipc/PCrashReporter.ipdl
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set sw=4 ts=8 et tw=80 :
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-include protocol PContent;
-include protocol PPluginModule;
-include protocol PGMP;
-
-namespace mozilla {
-namespace dom {
-
-struct Mapping {
- nsCString library_name;
- nsCString file_id;
- uintptr_t start_address;
- size_t mapping_length;
- size_t file_offset;
-};
-
-async protocol PCrashReporter {
- manager PContent or PPluginModule or PGMP;
-parent:
- async AnnotateCrashReport(nsCString key, nsCString data);
- async AppendAppNotes(nsCString data);
- async __delete__();
-};
-
-}
-}
diff --git a/dom/ipc/moz.build b/dom/ipc/moz.build
index c34ac5d48..5629ab2c6 100644
--- a/dom/ipc/moz.build
+++ b/dom/ipc/moz.build
@@ -26,8 +26,6 @@ EXPORTS.mozilla.dom += [
'ContentProcess.h',
'ContentProcessManager.h',
'CPOWManagerGetter.h',
- 'CrashReporterChild.h',
- 'CrashReporterParent.h',
'FilePickerParent.h',
'nsIContentChild.h',
'nsIContentParent.h',
@@ -54,7 +52,6 @@ UNIFIED_SOURCES += [
'ContentParent.cpp',
'ContentProcess.cpp',
'ContentProcessManager.cpp',
- 'CrashReporterParent.cpp',
'FilePickerParent.cpp',
'nsIContentChild.cpp',
'nsIContentParent.cpp',
@@ -70,13 +67,10 @@ UNIFIED_SOURCES += [
]
# Blob.cpp cannot be compiled in unified mode because it triggers a fatal gcc warning.
-# CrashReporterChild.cpp cannot be compiled in unified mode because of name clashes
-# in OS X headers.
# ContentChild.cpp cannot be compiled in unified mode on linux due to Time conflict
SOURCES += [
'Blob.cpp',
'ContentChild.cpp',
- 'CrashReporterChild.cpp',
'ProcessHangMonitor.cpp',
]
@@ -92,7 +86,6 @@ IPDL_SOURCES += [
'PContentBridge.ipdl',
'PContentPermission.ipdlh',
'PContentPermissionRequest.ipdl',
- 'PCrashReporter.ipdl',
'PCycleCollectWithLogs.ipdl',
'PFilePicker.ipdl',
'PMemoryReportRequest.ipdl',
@@ -132,7 +125,6 @@ LOCAL_INCLUDES += [
'/layout/base',
'/media/webrtc',
'/netwerk/base',
- '/toolkit/crashreporter',
'/toolkit/xre',
'/uriloader/exthandler',
'/widget',
diff --git a/dom/media/android/AndroidMediaPluginHost.cpp b/dom/media/android/AndroidMediaPluginHost.cpp
index cc3adbbd3..d4c4fc59e 100644
--- a/dom/media/android/AndroidMediaPluginHost.cpp
+++ b/dom/media/android/AndroidMediaPluginHost.cpp
@@ -12,7 +12,6 @@
#include "nsXPCOMStrings.h"
#include "nsISeekableStream.h"
#include "nsIGfxInfo.h"
-#include "gfxCrashReporterUtils.h"
#include "prmem.h"
#include "prlink.h"
#include "AndroidMediaResourceServer.h"
@@ -109,8 +108,6 @@ static bool IsOmxSupported()
return false;
}
- ScopedGfxFeatureReporter reporter("Stagefright", forceEnabled);
-
if (!forceEnabled) {
nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
if (gfxInfo) {
@@ -125,7 +122,6 @@ static bool IsOmxSupported()
}
}
- reporter.SetSuccessful();
return true;
}
diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp
index f83a927ca..14b06cc72 100644
--- a/dom/media/gmp/GMPChild.cpp
+++ b/dom/media/gmp/GMPChild.cpp
@@ -18,7 +18,6 @@
#include "gmp-video-decode.h"
#include "gmp-video-encode.h"
#include "GMPPlatform.h"
-#include "mozilla/dom/CrashReporterChild.h"
#include "mozilla/ipc/ProcessChild.h"
#include "GMPUtils.h"
#include "prio.h"
@@ -26,7 +25,6 @@
#include "widevine-adapter/WidevineAdapter.h"
using namespace mozilla::ipc;
-using mozilla::dom::CrashReporterChild;
static const int MAX_VOUCHER_LENGTH = 500000;
@@ -331,19 +329,6 @@ GMPChild::ProcessingError(Result aCode, const char* aReason)
}
}
-mozilla::dom::PCrashReporterChild*
-GMPChild::AllocPCrashReporterChild(const NativeThreadId& aThread)
-{
- return new CrashReporterChild();
-}
-
-bool
-GMPChild::DeallocPCrashReporterChild(PCrashReporterChild* aCrashReporter)
-{
- delete aCrashReporter;
- return true;
-}
-
PGMPTimerChild*
GMPChild::AllocPGMPTimerChild()
{
diff --git a/dom/media/gmp/GMPChild.h b/dom/media/gmp/GMPChild.h
index a4f688901..722e4c7a9 100644
--- a/dom/media/gmp/GMPChild.h
+++ b/dom/media/gmp/GMPChild.h
@@ -52,9 +52,6 @@ private:
bool AnswerStartPlugin(const nsString& aAdapter) override;
bool RecvPreloadLibs(const nsCString& aLibs) override;
- PCrashReporterChild* AllocPCrashReporterChild(const NativeThreadId& aThread) override;
- bool DeallocPCrashReporterChild(PCrashReporterChild*) override;
-
PGMPTimerChild* AllocPGMPTimerChild() override;
bool DeallocPGMPTimerChild(PGMPTimerChild* aActor) override;
diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp
index 851634ce7..40c3e5141 100644
--- a/dom/media/gmp/GMPParent.cpp
+++ b/dom/media/gmp/GMPParent.cpp
@@ -22,8 +22,6 @@
#include "MediaPrefs.h"
#include "VideoUtils.h"
-#include "mozilla/dom/CrashReporterParent.h"
-using mozilla::dom::CrashReporterParent;
using mozilla::ipc::GeckoChildProcessHost;
#include "mozilla/Telemetry.h"
@@ -580,22 +578,6 @@ GMPParent::ActorDestroy(ActorDestroyReason aWhy)
}
}
-mozilla::dom::PCrashReporterParent*
-GMPParent::AllocPCrashReporterParent(const NativeThreadId& aThread)
-{
- MOZ_ASSERT(false, "Should only be sent if crash reporting is enabled.");
- CrashReporterParent* cr = new CrashReporterParent();
- cr->SetChildData(aThread, GeckoProcessType_GMPlugin);
- return cr;
-}
-
-bool
-GMPParent::DeallocPCrashReporterParent(PCrashReporterParent* aCrashReporter)
-{
- delete aCrashReporter;
- return true;
-}
-
PGMPStorageParent*
GMPParent::AllocPGMPStorageParent()
{
diff --git a/dom/media/gmp/GMPParent.h b/dom/media/gmp/GMPParent.h
index 4f91ec5ba..dacd6feeb 100644
--- a/dom/media/gmp/GMPParent.h
+++ b/dom/media/gmp/GMPParent.h
@@ -168,9 +168,6 @@ private:
RefPtr<GenericPromise> ReadChromiumManifestFile(nsIFile* aFile); // GMP thread.
void ActorDestroy(ActorDestroyReason aWhy) override;
- PCrashReporterParent* AllocPCrashReporterParent(const NativeThreadId& aThread) override;
- bool DeallocPCrashReporterParent(PCrashReporterParent* aCrashReporter) override;
-
bool RecvPGMPStorageConstructor(PGMPStorageParent* actor) override;
PGMPStorageParent* AllocPGMPStorageParent() override;
bool DeallocPGMPStorageParent(PGMPStorageParent* aActor) override;
diff --git a/dom/media/gmp/PGMP.ipdl b/dom/media/gmp/PGMP.ipdl
index b421f0280..e1738d010 100644
--- a/dom/media/gmp/PGMP.ipdl
+++ b/dom/media/gmp/PGMP.ipdl
@@ -3,7 +3,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-include protocol PCrashReporter;
include protocol PGMPContent;
include protocol PGMPTimer;
include protocol PGMPStorage;
@@ -17,12 +16,10 @@ intr protocol PGMP
{
parent opens PGMPContent;
- manages PCrashReporter;
manages PGMPTimer;
manages PGMPStorage;
parent:
- async PCrashReporter(NativeThreadId tid);
async PGMPTimer();
async PGMPStorage();
diff --git a/dom/media/ipc/VideoDecoderChild.cpp b/dom/media/ipc/VideoDecoderChild.cpp
index d1b1d23fc..f01d3c659 100644
--- a/dom/media/ipc/VideoDecoderChild.cpp
+++ b/dom/media/ipc/VideoDecoderChild.cpp
@@ -238,6 +238,7 @@ VideoDecoderChild::Shutdown()
SendShutdown();
}
mInitialized = false;
+ mCallback = nullptr;
}
bool
diff --git a/dom/media/ipc/VideoDecoderManagerParent.cpp b/dom/media/ipc/VideoDecoderManagerParent.cpp
index a111b5e53..4ff9acf19 100644
--- a/dom/media/ipc/VideoDecoderManagerParent.cpp
+++ b/dom/media/ipc/VideoDecoderManagerParent.cpp
@@ -194,7 +194,7 @@ VideoDecoderManagerParent::RecvReadback(const SurfaceDescriptorGPUVideo& aSD, Su
}
RefPtr<SourceSurface> source = image->GetAsSourceSurface();
- if (!image) {
+ if (!source) {
*aResult = null_t();
return true;
}
diff --git a/dom/media/mediasource/ContainerParser.cpp b/dom/media/mediasource/ContainerParser.cpp
index 5267e9315..4ae37d7e9 100644
--- a/dom/media/mediasource/ContainerParser.cpp
+++ b/dom/media/mediasource/ContainerParser.cpp
@@ -390,7 +390,7 @@ private:
"ftyp", "moov", // init segment
"pdin", "free", "sidx", // optional prior moov box
"styp", "moof", "mdat", // media segment
- "mfra", "skip", "meta", "meco", "ssix", "prft" // others.
+ "mfra", "skip", "meta", "meco", "ssix", "prft", // others.
"pssh", // optional with encrypted EME, though ignored.
"emsg", // ISO23009-1:2014 Section 5.10.3.3
"bloc", "uuid" // boxes accepted by chrome.
@@ -588,8 +588,8 @@ public:
return false;
}
size_t header_length = have_crc ? 9 : 7;
- size_t data_length = (((*aData)[3] & 0x03) << 11) ||
- (((*aData)[4] & 0xff) << 3) ||
+ size_t data_length = (((*aData)[3] & 0x03) << 11) |
+ (((*aData)[4] & 0xff) << 3) |
(((*aData)[5] & 0xe0) >> 5);
uint8_t frames = ((*aData)[6] & 0x03) + 1;
MOZ_ASSERT(frames > 0);
diff --git a/dom/media/ogg/OggCodecState.cpp b/dom/media/ogg/OggCodecState.cpp
index e7e1ca4a3..d03508411 100644
--- a/dom/media/ogg/OggCodecState.cpp
+++ b/dom/media/ogg/OggCodecState.cpp
@@ -1229,12 +1229,13 @@ already_AddRefed<MediaRawData>
OpusState::PacketOutAsMediaRawData()
{
ogg_packet* packet = PacketPeek();
- uint32_t frames = 0;
- const int64_t endFrame = packet->granulepos;
-
if (!packet) {
return nullptr;
}
+
+ uint32_t frames = 0;
+ const int64_t endFrame = packet->granulepos;
+
if (packet->e_o_s) {
frames = GetOpusDeltaGP(packet);
}
diff --git a/dom/media/platforms/wmf/DXVA2Manager.cpp b/dom/media/platforms/wmf/DXVA2Manager.cpp
index 9fdb0fa20..0c1734c54 100644
--- a/dom/media/platforms/wmf/DXVA2Manager.cpp
+++ b/dom/media/platforms/wmf/DXVA2Manager.cpp
@@ -21,7 +21,6 @@
#include "MFTDecoder.h"
#include "DriverCrashGuard.h"
#include "nsPrintfCString.h"
-#include "gfxCrashReporterUtils.h"
#include "VideoUtils.h"
const CLSID CLSID_VideoProcessorMFT =
@@ -271,8 +270,6 @@ D3D9DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor,
{
MOZ_ASSERT(NS_IsMainThread());
- ScopedGfxFeatureReporter reporter("DXVA2D3D9");
-
gfx::D3D9VideoCrashGuard crashGuard;
if (crashGuard.Crashed()) {
NS_WARNING("DXVA2D3D9 crash detected");
@@ -448,8 +445,6 @@ D3D9DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor,
Telemetry::Accumulate(Telemetry::MEDIA_DECODER_BACKEND_USED,
uint32_t(media::MediaDecoderBackend::WMFDXVA2D3D9));
- reporter.SetSuccessful();
-
return S_OK;
}
@@ -645,8 +640,6 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor,
{
HRESULT hr;
- ScopedGfxFeatureReporter reporter("DXVA2D3D11");
-
gfx::D3D11VideoCrashGuard crashGuard;
if (crashGuard.Crashed()) {
NS_WARNING("DXVA2D3D11 crash detected");
@@ -785,8 +778,6 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor,
Telemetry::Accumulate(Telemetry::MEDIA_DECODER_BACKEND_USED,
uint32_t(media::MediaDecoderBackend::WMFDXVA2D3D11));
- reporter.SetSuccessful();
-
return S_OK;
}
diff --git a/dom/performance/PerformanceResourceTiming.cpp b/dom/performance/PerformanceResourceTiming.cpp
index 2eaa4eb9a..9c5475041 100644
--- a/dom/performance/PerformanceResourceTiming.cpp
+++ b/dom/performance/PerformanceResourceTiming.cpp
@@ -6,6 +6,7 @@
#include "PerformanceResourceTiming.h"
#include "mozilla/dom/PerformanceResourceTimingBinding.h"
+#include "mozilla/Unused.h"
using namespace mozilla::dom;
diff --git a/dom/plugins/ipc/PPluginModule.ipdl b/dom/plugins/ipc/PPluginModule.ipdl
index ecde41b63..6797b49a7 100644
--- a/dom/plugins/ipc/PPluginModule.ipdl
+++ b/dom/plugins/ipc/PPluginModule.ipdl
@@ -5,7 +5,6 @@
include protocol PPluginInstance;
include protocol PPluginScriptableObject;
-include protocol PCrashReporter;
include protocol PContent;
include ProfilerTypes;
@@ -39,7 +38,6 @@ intr protocol PPluginModule
bridges PContent, PPluginModule;
manages PPluginInstance;
- manages PCrashReporter;
both:
// Window-specific message which instructs the interrupt mechanism to enter
@@ -94,17 +92,6 @@ child:
async SetParentHangTimeout(uint32_t seconds);
- intr PCrashReporter()
- returns (NativeThreadId tid, uint32_t processType);
-
- /**
- * Control the Gecko Profiler in the plugin process.
- */
- async StartProfiler(ProfilerInitParams params);
- async StopProfiler();
-
- async GatherProfile();
-
async SettingChanged(PluginSettings settings);
async NPP_SetValue_NPNVaudioDeviceChangeDetails(NPAudioDeviceChangeDetailsIPC changeDetails);
@@ -153,8 +140,6 @@ parent:
// down the plugin process in response.
async NotifyContentModuleDestroyed();
- async Profile(nsCString aProfile);
-
// Answers to request about site data
async ReturnClearSiteData(NPError aRv, uint64_t aCallbackId);
diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp
index 7350a7fa7..cbf6e509f 100644
--- a/dom/plugins/ipc/PluginModuleChild.cpp
+++ b/dom/plugins/ipc/PluginModuleChild.cpp
@@ -32,7 +32,6 @@
#include "mozilla/plugins/StreamNotifyChild.h"
#include "mozilla/plugins/BrowserStreamChild.h"
#include "mozilla/plugins/PluginStreamChild.h"
-#include "mozilla/dom/CrashReporterChild.h"
#include "mozilla/Sprintf.h"
#include "mozilla/Unused.h"
@@ -56,8 +55,6 @@ using namespace mozilla;
using namespace mozilla::ipc;
using namespace mozilla::plugins;
using namespace mozilla::widget;
-using mozilla::dom::CrashReporterChild;
-using mozilla::dom::PCrashReporterChild;
#if defined(XP_WIN)
const wchar_t * kFlashFullscreenClass = L"ShockwaveFlashFullScreen";
@@ -733,29 +730,6 @@ PluginModuleChild::AllocPPluginModuleChild(mozilla::ipc::Transport* aTransport,
return PluginModuleChild::CreateForContentProcess(aTransport, aOtherPid);
}
-PCrashReporterChild*
-PluginModuleChild::AllocPCrashReporterChild(mozilla::dom::NativeThreadId* id,
- uint32_t* processType)
-{
- return new CrashReporterChild();
-}
-
-bool
-PluginModuleChild::DeallocPCrashReporterChild(PCrashReporterChild* actor)
-{
- delete actor;
- return true;
-}
-
-bool
-PluginModuleChild::AnswerPCrashReporterConstructor(
- PCrashReporterChild* actor,
- mozilla::dom::NativeThreadId* id,
- uint32_t* processType)
-{
- return true;
-}
-
void
PluginModuleChild::ActorDestroy(ActorDestroyReason why)
{
@@ -2575,48 +2549,6 @@ PluginModuleChild::ProcessNativeEvents() {
}
#endif
-bool
-PluginModuleChild::RecvStartProfiler(const ProfilerInitParams& params)
-{
- nsTArray<const char*> featureArray;
- for (size_t i = 0; i < params.features().Length(); ++i) {
- featureArray.AppendElement(params.features()[i].get());
- }
-
- nsTArray<const char*> threadNameFilterArray;
- for (size_t i = 0; i < params.threadFilters().Length(); ++i) {
- threadNameFilterArray.AppendElement(params.threadFilters()[i].get());
- }
-
- profiler_start(params.entries(), params.interval(),
- featureArray.Elements(), featureArray.Length(),
- threadNameFilterArray.Elements(), threadNameFilterArray.Length());
-
- return true;
-}
-
-bool
-PluginModuleChild::RecvStopProfiler()
-{
- profiler_stop();
- return true;
-}
-
-bool
-PluginModuleChild::RecvGatherProfile()
-{
- nsCString profileCString;
- UniquePtr<char[]> profile = profiler_get_profile();
- if (profile != nullptr) {
- profileCString = nsCString(profile.get(), strlen(profile.get()));
- } else {
- profileCString = nsCString("", 0);
- }
-
- Unused << SendProfile(profileCString);
- return true;
-}
-
NPError
PluginModuleChild::PluginRequiresAudioDeviceChanges(
PluginInstanceChild* aInstance,
diff --git a/dom/plugins/ipc/PluginModuleChild.h b/dom/plugins/ipc/PluginModuleChild.h
index 233a95369..681743582 100644
--- a/dom/plugins/ipc/PluginModuleChild.h
+++ b/dom/plugins/ipc/PluginModuleChild.h
@@ -46,17 +46,12 @@ typedef NS_NPAPIPLUGIN_CALLBACK(NPError, NP_PLUGINUNIXINIT) (const NPNetscapeFun
typedef NS_NPAPIPLUGIN_CALLBACK(NPError, NP_PLUGINSHUTDOWN) (void);
namespace mozilla {
-namespace dom {
-class PCrashReporterChild;
-} // namespace dom
-
namespace plugins {
class PluginInstanceChild;
class PluginModuleChild : public PPluginModuleChild
{
- typedef mozilla::dom::PCrashReporterChild PCrashReporterChild;
protected:
virtual mozilla::ipc::RacyInterruptPolicy
MediateInterruptRace(const MessageInfo& parent,
@@ -124,26 +119,12 @@ protected:
virtual bool
RecvSetParentHangTimeout(const uint32_t& aSeconds) override;
- virtual PCrashReporterChild*
- AllocPCrashReporterChild(mozilla::dom::NativeThreadId* id,
- uint32_t* processType) override;
- virtual bool
- DeallocPCrashReporterChild(PCrashReporterChild* actor) override;
- virtual bool
- AnswerPCrashReporterConstructor(PCrashReporterChild* actor,
- mozilla::dom::NativeThreadId* id,
- uint32_t* processType) override;
-
virtual void
ActorDestroy(ActorDestroyReason why) override;
virtual bool
RecvProcessNativeEventsInInterruptCall() override;
- virtual bool RecvStartProfiler(const ProfilerInitParams& params) override;
- virtual bool RecvStopProfiler() override;
- virtual bool RecvGatherProfile() override;
-
virtual bool
AnswerModuleSupportsAsyncRender(bool* aResult) override;
public:
diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp
index ae6da8787..2489baf16 100755
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -10,7 +10,6 @@
#include "mozilla/Attributes.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/ContentChild.h"
-#include "mozilla/dom/PCrashReporterParent.h"
#include "mozilla/ipc/GeckoChildProcessHost.h"
#include "mozilla/ipc/MessageChannel.h"
#include "mozilla/ipc/ProtocolUtils.h"
@@ -19,9 +18,6 @@
#include "mozilla/plugins/PluginBridge.h"
#include "mozilla/plugins/PluginInstanceParent.h"
#include "mozilla/Preferences.h"
-#ifdef MOZ_ENABLE_PROFILER_SPS
-#include "mozilla/ProfileGatherer.h"
-#endif
#include "mozilla/ProcessHangMonitor.h"
#include "mozilla/Services.h"
#include "mozilla/Telemetry.h"
@@ -47,11 +43,6 @@
#include "PluginUtilsWin.h"
#endif
-#ifdef MOZ_ENABLE_PROFILER_SPS
-#include "nsIProfiler.h"
-#include "nsIProfileSaveEvent.h"
-#endif
-
#ifdef MOZ_WIDGET_GTK
#include <glib.h>
#elif XP_MACOSX
@@ -62,13 +53,8 @@
using base::KillProcess;
using mozilla::PluginLibrary;
-#ifdef MOZ_ENABLE_PROFILER_SPS
-using mozilla::ProfileGatherer;
-#endif
using mozilla::ipc::MessageChannel;
using mozilla::ipc::GeckoChildProcessHost;
-using mozilla::dom::PCrashReporterParent;
-using mozilla::dom::CrashReporterParent;
using namespace mozilla;
using namespace mozilla::plugins;
@@ -546,25 +532,6 @@ PluginModuleChromeParent::OnProcessLaunched(const bool aSucceeded)
}
#endif
}
-
-#ifdef MOZ_ENABLE_PROFILER_SPS
- nsCOMPtr<nsIProfiler> profiler(do_GetService("@mozilla.org/tools/profiler;1"));
- bool profilerActive = false;
- DebugOnly<nsresult> rv = profiler->IsActive(&profilerActive);
- MOZ_ASSERT(NS_SUCCEEDED(rv));
- if (profilerActive) {
- nsCOMPtr<nsIProfilerStartParams> currentProfilerParams;
- rv = profiler->GetStartParams(getter_AddRefs(currentProfilerParams));
- MOZ_ASSERT(NS_SUCCEEDED(rv));
-
- nsCOMPtr<nsISupports> gatherer;
- rv = profiler->GetProfileGatherer(getter_AddRefs(gatherer));
- MOZ_ASSERT(NS_SUCCEEDED(rv));
- mGatherer = static_cast<ProfileGatherer*>(gatherer.get());
-
- StartProfiler(currentProfilerParams);
- }
-#endif
}
bool
@@ -650,10 +617,6 @@ PluginModuleChromeParent::PluginModuleChromeParent(const char* aFilePath,
mSandboxLevel = aSandboxLevel;
mRunID = GeckoChildProcessHost::GetUniqueID();
-#ifdef MOZ_ENABLE_PROFILER_SPS
- InitPluginProfiling();
-#endif
-
mozilla::HangMonitor::RegisterAnnotator(*this);
}
@@ -663,10 +626,6 @@ PluginModuleChromeParent::~PluginModuleChromeParent()
NS_RUNTIMEABORT("unsafe destruction");
}
-#ifdef MOZ_ENABLE_PROFILER_SPS
- ShutdownPluginProfiling();
-#endif
-
#ifdef XP_WIN
// If we registered for audio notifications, stop.
mozilla::plugins::PluginUtilsWin::RegisterForAudioDeviceChanges(this,
@@ -2525,33 +2484,6 @@ PluginModuleParent::RecvPluginHideWindow(const uint32_t& aWindowId)
#endif
}
-PCrashReporterParent*
-PluginModuleParent::AllocPCrashReporterParent(mozilla::dom::NativeThreadId* id,
- uint32_t* processType)
-{
- MOZ_CRASH("unreachable");
-}
-
-bool
-PluginModuleParent::DeallocPCrashReporterParent(PCrashReporterParent* actor)
-{
- MOZ_CRASH("unreachable");
-}
-
-PCrashReporterParent*
-PluginModuleChromeParent::AllocPCrashReporterParent(mozilla::dom::NativeThreadId* id,
- uint32_t* processType)
-{
- return nullptr;
-}
-
-bool
-PluginModuleChromeParent::DeallocPCrashReporterParent(PCrashReporterParent* actor)
-{
- delete actor;
- return true;
-}
-
bool
PluginModuleParent::RecvSetCursor(const NSCursorInfo& aCursorInfo)
{
@@ -2709,136 +2641,6 @@ PluginModuleParent::AnswerNPN_SetValue_NPPVpluginRequiresAudioDeviceChanges(
return true;
}
-#ifdef MOZ_ENABLE_PROFILER_SPS
-class PluginProfilerObserver final : public nsIObserver,
- public nsSupportsWeakReference
-{
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIOBSERVER
-
- explicit PluginProfilerObserver(PluginModuleChromeParent* pmp)
- : mPmp(pmp)
- {}
-
-private:
- ~PluginProfilerObserver() {}
- PluginModuleChromeParent* mPmp;
-};
-
-NS_IMPL_ISUPPORTS(PluginProfilerObserver, nsIObserver, nsISupportsWeakReference)
-
-NS_IMETHODIMP
-PluginProfilerObserver::Observe(nsISupports *aSubject,
- const char *aTopic,
- const char16_t *aData)
-{
- if (!strcmp(aTopic, "profiler-started")) {
- nsCOMPtr<nsIProfilerStartParams> params(do_QueryInterface(aSubject));
- mPmp->StartProfiler(params);
- } else if (!strcmp(aTopic, "profiler-stopped")) {
- mPmp->StopProfiler();
- } else if (!strcmp(aTopic, "profiler-subprocess-gather")) {
- mPmp->GatherAsyncProfile();
- } else if (!strcmp(aTopic, "profiler-subprocess")) {
- nsCOMPtr<nsIProfileSaveEvent> pse = do_QueryInterface(aSubject);
- mPmp->GatheredAsyncProfile(pse);
- }
- return NS_OK;
-}
-
-void
-PluginModuleChromeParent::InitPluginProfiling()
-{
- nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
- if (observerService) {
- mProfilerObserver = new PluginProfilerObserver(this);
- observerService->AddObserver(mProfilerObserver, "profiler-started", false);
- observerService->AddObserver(mProfilerObserver, "profiler-stopped", false);
- observerService->AddObserver(mProfilerObserver, "profiler-subprocess-gather", false);
- observerService->AddObserver(mProfilerObserver, "profiler-subprocess", false);
- }
-}
-
-void
-PluginModuleChromeParent::ShutdownPluginProfiling()
-{
- nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
- if (observerService) {
- observerService->RemoveObserver(mProfilerObserver, "profiler-started");
- observerService->RemoveObserver(mProfilerObserver, "profiler-stopped");
- observerService->RemoveObserver(mProfilerObserver, "profiler-subprocess-gather");
- observerService->RemoveObserver(mProfilerObserver, "profiler-subprocess");
- }
-}
-
-void
-PluginModuleChromeParent::StartProfiler(nsIProfilerStartParams* aParams)
-{
- if (NS_WARN_IF(!aParams)) {
- return;
- }
-
- ProfilerInitParams ipcParams;
-
- ipcParams.enabled() = true;
- aParams->GetEntries(&ipcParams.entries());
- aParams->GetInterval(&ipcParams.interval());
- ipcParams.features() = aParams->GetFeatures();
- ipcParams.threadFilters() = aParams->GetThreadFilterNames();
-
- Unused << SendStartProfiler(ipcParams);
-
- nsCOMPtr<nsIProfiler> profiler(do_GetService("@mozilla.org/tools/profiler;1"));
- if (NS_WARN_IF(!profiler)) {
- return;
- }
- nsCOMPtr<nsISupports> gatherer;
- profiler->GetProfileGatherer(getter_AddRefs(gatherer));
- mGatherer = static_cast<ProfileGatherer*>(gatherer.get());
-}
-
-void
-PluginModuleChromeParent::StopProfiler()
-{
- mGatherer = nullptr;
- Unused << SendStopProfiler();
-}
-
-void
-PluginModuleChromeParent::GatherAsyncProfile()
-{
- if (NS_WARN_IF(!mGatherer)) {
- return;
- }
- mGatherer->WillGatherOOPProfile();
- Unused << SendGatherProfile();
-}
-
-void
-PluginModuleChromeParent::GatheredAsyncProfile(nsIProfileSaveEvent* aSaveEvent)
-{
- if (aSaveEvent && !mProfile.IsEmpty()) {
- aSaveEvent->AddSubProfile(mProfile.get());
- mProfile.Truncate();
- }
-}
-#endif // MOZ_ENABLE_PROFILER_SPS
-
-bool
-PluginModuleChromeParent::RecvProfile(const nsCString& aProfile)
-{
-#ifdef MOZ_ENABLE_PROFILER_SPS
- if (NS_WARN_IF(!mGatherer)) {
- return true;
- }
-
- mProfile = aProfile;
- mGatherer->GatheredOOPProfile();
-#endif
- return true;
-}
-
bool
PluginModuleParent::AnswerGetKeyState(const int32_t& aVirtKey, int16_t* aRet)
{
diff --git a/dom/plugins/ipc/PluginModuleParent.h b/dom/plugins/ipc/PluginModuleParent.h
index d00a01401..0ceed6efd 100644
--- a/dom/plugins/ipc/PluginModuleParent.h
+++ b/dom/plugins/ipc/PluginModuleParent.h
@@ -30,14 +30,6 @@ class nsIProfileSaveEvent;
class nsPluginTag;
namespace mozilla {
-#ifdef MOZ_ENABLE_PROFILER_SPS
-class ProfileGatherer;
-#endif
-namespace dom {
-class PCrashReporterParent;
-class CrashReporterParent;
-} // namespace dom
-
namespace layers {
class TextureClientRecycleAllocator;
} // namespace layers
@@ -76,8 +68,6 @@ class PluginModuleParent
{
protected:
typedef mozilla::PluginLibrary PluginLibrary;
- typedef mozilla::dom::PCrashReporterParent PCrashReporterParent;
- typedef mozilla::dom::CrashReporterParent CrashReporterParent;
PPluginInstanceParent*
AllocPPluginInstanceParent(const nsCString& aMimeType,
@@ -158,12 +148,6 @@ protected:
virtual bool
RecvPluginHideWindow(const uint32_t& aWindowId) override;
- virtual PCrashReporterParent*
- AllocPCrashReporterParent(mozilla::dom::NativeThreadId* id,
- uint32_t* processType) override;
- virtual bool
- DeallocPCrashReporterParent(PCrashReporterParent* actor) override;
-
virtual bool
RecvSetCursor(const NSCursorInfo& aCursorInfo) override;
@@ -201,8 +185,6 @@ protected:
virtual bool RecvNotifyContentModuleDestroyed() override { return true; }
- virtual bool RecvProfile(const nsCString& aProfile) override { return true; }
-
virtual bool AnswerGetKeyState(const int32_t& aVirtKey, int16_t* aRet) override;
virtual bool RecvReturnClearSiteData(const NPError& aRv,
@@ -348,7 +330,6 @@ protected:
bool
GetPluginDetails();
- friend class mozilla::dom::CrashReporterParent;
friend class mozilla::plugins::PluginAsyncSurrogate;
bool mIsStartingAsync;
@@ -480,16 +461,6 @@ class PluginModuleChromeParent
void CachedSettingChanged();
-#ifdef MOZ_ENABLE_PROFILER_SPS
- void GatherAsyncProfile();
- void GatheredAsyncProfile(nsIProfileSaveEvent* aSaveEvent);
- void StartProfiler(nsIProfilerStartParams* aParams);
- void StopProfiler();
-#endif
-
- virtual bool
- RecvProfile(const nsCString& aProfile) override;
-
virtual bool
AnswerGetKeyState(const int32_t& aVirtKey, int16_t* aRet) override;
@@ -508,12 +479,6 @@ private:
virtual bool ShouldContinueFromReplyTimeout() override;
- virtual PCrashReporterParent*
- AllocPCrashReporterParent(mozilla::dom::NativeThreadId* id,
- uint32_t* processType) override;
- virtual bool
- DeallocPCrashReporterParent(PCrashReporterParent* actor) override;
-
PluginProcessParent* Process() const { return mSubprocess; }
base::ProcessHandle ChildProcessHandle() { return mSubprocess->GetChildProcessHandle(); }
@@ -534,17 +499,10 @@ private:
int32_t aSandboxLevel,
bool aAllowAsyncInit);
- CrashReporterParent* CrashReporter();
-
void CleanupFromTimeout(const bool aByHangUI);
virtual void UpdatePluginTimeout() override;
-#ifdef MOZ_ENABLE_PROFILER_SPS
- void InitPluginProfiling();
- void ShutdownPluginProfiling();
-#endif
-
void RegisterSettingsCallbacks();
void UnregisterSettingsCallbacks();
@@ -593,7 +551,6 @@ private:
FinishHangUI();
#endif
- friend class mozilla::dom::CrashReporterParent;
friend class mozilla::plugins::PluginAsyncSurrogate;
void OnProcessLaunched(const bool aSucceeded);
@@ -628,9 +585,6 @@ private:
// processes in existence!
dom::ContentParent* mContentParent;
nsCOMPtr<nsIObserver> mPluginOfflineObserver;
-#ifdef MOZ_ENABLE_PROFILER_SPS
- RefPtr<mozilla::ProfileGatherer> mGatherer;
-#endif
nsCString mProfile;
bool mIsBlocklisted;
static bool sInstantiated;
diff --git a/dom/security/nsContentSecurityManager.cpp b/dom/security/nsContentSecurityManager.cpp
index c6558fc93..f329aa723 100644
--- a/dom/security/nsContentSecurityManager.cpp
+++ b/dom/security/nsContentSecurityManager.cpp
@@ -8,8 +8,6 @@
#include "nsContentUtils.h"
#include "nsCORSListenerProxy.h"
#include "nsIStreamListener.h"
-#include "nsIDocument.h"
-#include "nsMixedContentBlocker.h"
#include "nsCDefaultURIFixup.h"
#include "nsIURIFixup.h"
@@ -507,13 +505,6 @@ DoContentSecurityChecks(nsIChannel* aChannel, nsILoadInfo* aLoadInfo)
return NS_ERROR_CONTENT_BLOCKED;
}
- if (nsMixedContentBlocker::sSendHSTSPriming) {
- rv = nsMixedContentBlocker::MarkLoadInfoForPriming(uri,
- requestingContext,
- aLoadInfo);
- return rv;
- }
-
return NS_OK;
}
diff --git a/dom/security/nsMixedContentBlocker.cpp b/dom/security/nsMixedContentBlocker.cpp
index 4e80dce3f..7d50a43a3 100644
--- a/dom/security/nsMixedContentBlocker.cpp
+++ b/dom/security/nsMixedContentBlocker.cpp
@@ -54,13 +54,6 @@ bool nsMixedContentBlocker::sBlockMixedScript = false;
// Is mixed display content blocking (images, audio, video, <a ping>) enabled?
bool nsMixedContentBlocker::sBlockMixedDisplay = false;
-// Do we move HSTS before mixed-content
-bool nsMixedContentBlocker::sUseHSTS = false;
-// Do we send an HSTS priming request
-bool nsMixedContentBlocker::sSendHSTSPriming = false;
-// Default HSTS Priming failure timeout to 7 days, in seconds
-uint32_t nsMixedContentBlocker::sHSTSPrimingCacheTimeout = (60 * 24 * 7);
-
// Fired at the document that attempted to load mixed content. The UI could
// handle this event, for example, by displaying an info bar that offers the
// choice to reload the page with mixed content permitted.
@@ -202,18 +195,6 @@ nsMixedContentBlocker::nsMixedContentBlocker()
// Cache the pref for mixed display blocking
Preferences::AddBoolVarCache(&sBlockMixedDisplay,
"security.mixed_content.block_display_content");
-
- // Cache the pref for HSTS
- Preferences::AddBoolVarCache(&sUseHSTS,
- "security.mixed_content.use_hsts");
-
- // Cache the pref for sending HSTS priming
- Preferences::AddBoolVarCache(&sSendHSTSPriming,
- "security.mixed_content.send_hsts_priming");
-
- // Cache the pref for HSTS priming failure cache time
- Preferences::AddUintVarCache(&sHSTSPrimingCacheTimeout,
- "security.mixed_content.hsts_priming_cache_timeout");
}
nsMixedContentBlocker::~nsMixedContentBlocker()
@@ -343,22 +324,6 @@ nsMixedContentBlocker::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
return NS_BINDING_FAILED;
}
- if (nsMixedContentBlocker::sSendHSTSPriming) {
- // The LoadInfo passed in is for the original channel, HSTS priming needs to
- // be set on the new channel, if required. If the redirect changes
- // http->https, or vice-versa, the need for priming may change.
- nsCOMPtr<nsILoadInfo> newLoadInfo;
- rv = aNewChannel->GetLoadInfo(getter_AddRefs(newLoadInfo));
- NS_ENSURE_SUCCESS(rv, rv);
- rv = nsMixedContentBlocker::MarkLoadInfoForPriming(newUri,
- requestingContext,
- newLoadInfo);
- if (NS_FAILED(rv)) {
- decision = REJECT_REQUEST;
- newLoadInfo->ClearHSTSPriming();
- }
- }
-
// If the channel is about to load mixed content, abort the channel
if (!NS_CP_ACCEPTED(decision)) {
autoCallback.DontCallback();
@@ -691,12 +656,6 @@ nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect,
// the parent is https, and the protocol associated with innerContentLocation
// doesn't map to the secure URI flags checked above. Assert this for
// sanity's sake
-#ifdef DEBUG
- bool isHttpsScheme = false;
- rv = innerContentLocation->SchemeIs("https", &isHttpsScheme);
- NS_ENSURE_SUCCESS(rv, rv);
- MOZ_ASSERT(!isHttpsScheme);
-#endif
*aDecision = REJECT_REQUEST;
return NS_OK;
}
@@ -836,34 +795,6 @@ nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect,
}
nsresult stateRV = securityUI->GetState(&state);
- bool doHSTSPriming = false;
- if (isHttpScheme) {
- bool hsts = false;
- bool cached = false;
- nsCOMPtr<nsISiteSecurityService> sss =
- do_GetService(NS_SSSERVICE_CONTRACTID, &rv);
- NS_ENSURE_SUCCESS(rv, rv);
- rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, aContentLocation,
- 0, &cached, &hsts);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (hsts && sUseHSTS) {
- // assume we will be upgraded later
- *aDecision = ACCEPT;
- return NS_OK;
- }
-
- // Send a priming request if the result is not already cached and priming
- // requests are allowed
- if (!cached && sSendHSTSPriming) {
- // add this URI as a priming location
- doHSTSPriming = true;
- document->AddHSTSPrimingLocation(innerContentLocation,
- HSTSPrimingState::eHSTS_PRIMING_ALLOW);
- *aDecision = ACCEPT;
- }
- }
-
// At this point we know that the request is mixed content, and the only
// question is whether we block it. Record telemetry at this point as to
// whether HSTS would have fixed things by making the content location
@@ -879,14 +810,14 @@ nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect,
bool active = (classification == eMixedScript);
if (!aHadInsecureImageRedirect) {
if (XRE_IsParentProcess()) {
- AccumulateMixedContentHSTS(innerContentLocation, active, doHSTSPriming);
+ AccumulateMixedContentHSTS(innerContentLocation, active);
} else {
// Ask the parent process to do the same call
mozilla::dom::ContentChild* cc = mozilla::dom::ContentChild::GetSingleton();
if (cc) {
mozilla::ipc::URIParams uri;
SerializeURI(innerContentLocation, uri);
- cc->SendAccumulateMixedContentHSTS(uri, active, doHSTSPriming);
+ cc->SendAccumulateMixedContentHSTS(uri, active);
}
}
}
@@ -929,13 +860,7 @@ nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect,
}
}
} else {
- if (doHSTSPriming) {
- document->AddHSTSPrimingLocation(innerContentLocation,
- HSTSPrimingState::eHSTS_PRIMING_BLOCK);
- *aDecision = nsIContentPolicy::ACCEPT;
- } else {
- *aDecision = nsIContentPolicy::REJECT_REQUEST;
- }
+ *aDecision = nsIContentPolicy::REJECT_REQUEST;
LogMixedContentMessage(classification, aContentLocation, rootDoc, eBlocked);
if (!rootDoc->GetHasMixedDisplayContentBlocked() && NS_SUCCEEDED(stateRV)) {
rootDoc->SetHasMixedDisplayContentBlocked(true);
@@ -981,13 +906,7 @@ nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect,
}
} else {
//User has not overriden the pref by Disabling protection. Reject the request and update the security state.
- if (doHSTSPriming) {
- document->AddHSTSPrimingLocation(innerContentLocation,
- HSTSPrimingState::eHSTS_PRIMING_BLOCK);
- *aDecision = nsIContentPolicy::ACCEPT;
- } else {
- *aDecision = nsIContentPolicy::REJECT_REQUEST;
- }
+ *aDecision = nsIContentPolicy::REJECT_REQUEST;
LogMixedContentMessage(classification, aContentLocation, rootDoc, eBlocked);
// See if the pref will change here. If it will, only then do we need to call OnSecurityChange() to update the UI.
if (rootDoc->GetHasMixedActiveContentBlocked()) {
@@ -1052,24 +971,10 @@ enum MixedContentHSTSState {
MCB_HSTS_ACTIVE_WITH_HSTS = 3
};
-// Similar to the existing mixed-content HSTS, except MCB_HSTS_*_NO_HSTS is
-// broken into two distinct states, indicating whether we plan to send a priming
-// request or not. If we decided not go send a priming request, it could be
-// because it is a type we do not support, or because we cached a previous
-// negative response.
-enum MixedContentHSTSPrimingState {
- eMCB_HSTS_PASSIVE_WITH_HSTS = 0,
- eMCB_HSTS_ACTIVE_WITH_HSTS = 1,
- eMCB_HSTS_PASSIVE_NO_PRIMING = 2,
- eMCB_HSTS_PASSIVE_DO_PRIMING = 3,
- eMCB_HSTS_ACTIVE_NO_PRIMING = 4,
- eMCB_HSTS_ACTIVE_DO_PRIMING = 5
-};
-
// Record information on when HSTS would have made mixed content not mixed
// content (regardless of whether it was actually blocked)
void
-nsMixedContentBlocker::AccumulateMixedContentHSTS(nsIURI* aURI, bool aActive, bool aHasHSTSPriming)
+nsMixedContentBlocker::AccumulateMixedContentHSTS(nsIURI* aURI, bool aActive)
{
// This method must only be called in the parent, because
// nsSiteSecurityService is only available in the parent
@@ -1089,108 +994,26 @@ nsMixedContentBlocker::AccumulateMixedContentHSTS(nsIURI* aURI, bool aActive, bo
return;
}
- // states: would upgrade, would prime, hsts info cached
+ // states: would upgrade, hsts info cached
// active, passive
//
if (!aActive) {
if (!hsts) {
Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS,
MCB_HSTS_PASSIVE_NO_HSTS);
- if (aHasHSTSPriming) {
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING,
- eMCB_HSTS_PASSIVE_DO_PRIMING);
- } else {
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING,
- eMCB_HSTS_PASSIVE_NO_PRIMING);
- }
}
else {
Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS,
MCB_HSTS_PASSIVE_WITH_HSTS);
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING,
- eMCB_HSTS_PASSIVE_WITH_HSTS);
}
} else {
if (!hsts) {
Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS,
MCB_HSTS_ACTIVE_NO_HSTS);
- if (aHasHSTSPriming) {
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING,
- eMCB_HSTS_ACTIVE_DO_PRIMING);
- } else {
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING,
- eMCB_HSTS_ACTIVE_NO_PRIMING);
- }
}
else {
Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS,
MCB_HSTS_ACTIVE_WITH_HSTS);
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING,
- eMCB_HSTS_ACTIVE_WITH_HSTS);
}
}
-}
-
-//static
-nsresult
-nsMixedContentBlocker::MarkLoadInfoForPriming(nsIURI* aURI,
- nsISupports* aRequestingContext,
- nsILoadInfo* aLoadInfo)
-{
- nsresult rv;
- bool sendPriming = false;
- bool mixedContentWouldBlock = false;
- rv = GetHSTSPrimingFromRequestingContext(aURI,
- aRequestingContext,
- &sendPriming,
- &mixedContentWouldBlock);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (sendPriming) {
- aLoadInfo->SetHSTSPriming(mixedContentWouldBlock);
- }
-
- return NS_OK;
-}
-
-//static
-nsresult
-nsMixedContentBlocker::GetHSTSPrimingFromRequestingContext(nsIURI* aURI,
- nsISupports* aRequestingContext,
- bool* aSendPrimingRequest,
- bool* aMixedContentWouldBlock)
-{
- *aSendPrimingRequest = false;
- *aMixedContentWouldBlock = false;
- // If we marked for priming, we used the innermost URI, so get that
- nsCOMPtr<nsIURI> innerURI = NS_GetInnermostURI(aURI);
- if (!innerURI) {
- NS_ERROR("Can't get innerURI from aContentLocation");
- return NS_ERROR_CONTENT_BLOCKED;
- }
-
- bool isHttp = false;
- innerURI->SchemeIs("http", &isHttp);
- if (!isHttp) {
- // there is nothign to do
- return NS_OK;
- }
-
- // If the DocShell was marked for HSTS priming, propagate that to the LoadInfo
- nsCOMPtr<nsIDocShell> docShell = NS_CP_GetDocShellFromContext(aRequestingContext);
- if (!docShell) {
- return NS_OK;
- }
- nsCOMPtr<nsIDocument> document = docShell->GetDocument();
- if (!document) {
- return NS_OK;
- }
-
- HSTSPrimingState status = document->GetHSTSPrimingStateForLocation(innerURI);
- if (status != HSTSPrimingState::eNO_HSTS_PRIMING) {
- *aSendPrimingRequest = (status != HSTSPrimingState::eNO_HSTS_PRIMING);
- *aMixedContentWouldBlock = (status == HSTSPrimingState::eHSTS_PRIMING_BLOCK);
- }
-
- return NS_OK;
-}
+} \ No newline at end of file
diff --git a/dom/security/nsMixedContentBlocker.h b/dom/security/nsMixedContentBlocker.h
index 539c3ebbb..56ab9621f 100644
--- a/dom/security/nsMixedContentBlocker.h
+++ b/dom/security/nsMixedContentBlocker.h
@@ -62,44 +62,11 @@ public:
nsIPrincipal* aRequestPrincipal,
int16_t* aDecision);
static void AccumulateMixedContentHSTS(nsIURI* aURI,
- bool aActive,
- bool aHasHSTSPriming);
- /* If the document associated with aRequestingContext requires priming for
- * aURI, propagate that to the LoadInfo so the HttpChannel will find out about
- * it.
- *
- * @param aURI The URI associated with the load
- * @param aRequestingContext the requesting context passed to ShouldLoad
- * @param aLoadInfo the LoadInfo for the load
- */
- static nsresult MarkLoadInfoForPriming(nsIURI* aURI,
- nsISupports* aRequestingContext,
- nsILoadInfo* aLoadInfo);
-
- /* Given a context, return whether HSTS was marked on the document associated
- * with the load for the given URI. This is used by MarkLoadInfoForPriming and
- * directly by the image loader to determine whether to allow a load to occur
- * from the cache.
- *
- * @param aURI The URI associated with the load
- * @param aRequestingContext the requesting context passed to ShouldLoad
- * @param aSendPrimingRequest out true if priming is required on the channel
- * @param aMixedContentWouldBlock out true if mixed content would block
- */
- static nsresult GetHSTSPrimingFromRequestingContext(nsIURI* aURI,
- nsISupports* aRequestingContext,
- bool* aSendPrimingRequest,
- bool* aMixedContentWouldBlock);
+ bool aActive);
static bool sBlockMixedScript;
static bool sBlockMixedDisplay;
- // Do we move HSTS before mixed-content
- static bool sUseHSTS;
- // Do we send an HSTS priming request
- static bool sSendHSTSPriming;
- // Default HSTS Priming failure timeout in seconds
- static uint32_t sHSTSPrimingCacheTimeout;
};
#endif /* nsMixedContentBlocker_h___ */
diff --git a/dom/security/test/csp/test_referrerdirective.html b/dom/security/test/csp/test_referrerdirective.html
index 770fcc40b..f590460a0 100644
--- a/dom/security/test/csp/test_referrerdirective.html
+++ b/dom/security/test/csp/test_referrerdirective.html
@@ -116,8 +116,6 @@ SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({
'set': [['security.mixed_content.block_active_content', false],
['security.mixed_content.block_display_content', false],
- ['security.mixed_content.send_hsts_priming', false],
- ['security.mixed_content.use_hsts', false],
]
},
function() {
diff --git a/dom/security/test/hsts/browser.ini b/dom/security/test/hsts/browser.ini
deleted file mode 100644
index ae75031df..000000000
--- a/dom/security/test/hsts/browser.ini
+++ /dev/null
@@ -1,19 +0,0 @@
-[DEFAULT]
-skip-if = debug # bug 1311599, bug 1311239, etc
-support-files =
- head.js
- file_priming-top.html
- file_testserver.sjs
- file_1x1.png
- file_priming.js
- file_stylesheet.css
-
-[browser_hsts-priming_allow_active.js]
-[browser_hsts-priming_block_active.js]
-[browser_hsts-priming_hsts_after_mixed.js]
-[browser_hsts-priming_allow_display.js]
-[browser_hsts-priming_block_display.js]
-[browser_hsts-priming_block_active_css.js]
-[browser_hsts-priming_block_active_with_redir_same.js]
-[browser_hsts-priming_no-duplicates.js]
-[browser_hsts-priming_cache-timeout.js]
diff --git a/dom/security/test/hsts/browser_hsts-priming_allow_active.js b/dom/security/test/hsts/browser_hsts-priming_allow_active.js
deleted file mode 100644
index a932b31b3..000000000
--- a/dom/security/test/hsts/browser_hsts-priming_allow_active.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Description of the test:
- * Check that HSTS priming occurs correctly with mixed content when active
- * content is allowed.
- */
-'use strict';
-
-//jscs:disable
-add_task(function*() {
- //jscs:enable
- Services.obs.addObserver(Observer, "console-api-log-event", false);
- Services.obs.addObserver(Observer, "http-on-examine-response", false);
- registerCleanupFunction(do_cleanup);
-
- let which = "allow_active";
-
- SetupPrefTestEnvironment(which);
-
- for (let server of Object.keys(test_servers)) {
- yield execute_test(server, test_settings[which].mimetype);
- }
-
- SpecialPowers.popPrefEnv();
-});
diff --git a/dom/security/test/hsts/browser_hsts-priming_allow_display.js b/dom/security/test/hsts/browser_hsts-priming_allow_display.js
deleted file mode 100644
index 06546ca65..000000000
--- a/dom/security/test/hsts/browser_hsts-priming_allow_display.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Description of the test:
- * Check that HSTS priming occurs correctly with mixed content when display
- * content is allowed.
- */
-'use strict';
-
-//jscs:disable
-add_task(function*() {
- //jscs:enable
- Services.obs.addObserver(Observer, "console-api-log-event", false);
- Services.obs.addObserver(Observer, "http-on-examine-response", false);
- registerCleanupFunction(do_cleanup);
-
- let which = "allow_display";
-
- SetupPrefTestEnvironment(which);
-
- for (let server of Object.keys(test_servers)) {
- yield execute_test(server, test_settings[which].mimetype);
- }
-
- SpecialPowers.popPrefEnv();
-});
diff --git a/dom/security/test/hsts/browser_hsts-priming_block_active.js b/dom/security/test/hsts/browser_hsts-priming_block_active.js
deleted file mode 100644
index a5478b185..000000000
--- a/dom/security/test/hsts/browser_hsts-priming_block_active.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Description of the test:
- * Check that HSTS priming occurs correctly with mixed content when active
- * content is blocked.
- */
-'use strict';
-
-//jscs:disable
-add_task(function*() {
- //jscs:enable
- Services.obs.addObserver(Observer, "console-api-log-event", false);
- Services.obs.addObserver(Observer, "http-on-examine-response", false);
- registerCleanupFunction(do_cleanup);
-
- let which = "block_active";
-
- SetupPrefTestEnvironment(which);
-
- for (let server of Object.keys(test_servers)) {
- yield execute_test(server, test_settings[which].mimetype);
- }
-
- SpecialPowers.popPrefEnv();
-});
diff --git a/dom/security/test/hsts/browser_hsts-priming_block_active_css.js b/dom/security/test/hsts/browser_hsts-priming_block_active_css.js
deleted file mode 100644
index 340d11483..000000000
--- a/dom/security/test/hsts/browser_hsts-priming_block_active_css.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Description of the test:
- * Check that HSTS priming occurs correctly with mixed content when active
- * content is blocked for css.
- */
-'use strict';
-
-//jscs:disable
-add_task(function*() {
- //jscs:enable
- Services.obs.addObserver(Observer, "console-api-log-event", false);
- Services.obs.addObserver(Observer, "http-on-examine-response", false);
- registerCleanupFunction(do_cleanup);
-
- let which = "block_active_css";
-
- SetupPrefTestEnvironment(which);
-
- for (let server of Object.keys(test_servers)) {
- yield execute_test(server, test_settings[which].mimetype);
- }
-
- SpecialPowers.popPrefEnv();
-});
diff --git a/dom/security/test/hsts/browser_hsts-priming_block_active_with_redir_same.js b/dom/security/test/hsts/browser_hsts-priming_block_active_with_redir_same.js
deleted file mode 100644
index 130a3d5ec..000000000
--- a/dom/security/test/hsts/browser_hsts-priming_block_active_with_redir_same.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Description of the test:
- * Check that HSTS priming occurs correctly with mixed content when active
- * content is blocked and redirect to the same host should still upgrade.
- */
-'use strict';
-
-//jscs:disable
-add_task(function*() {
- //jscs:enable
- Services.obs.addObserver(Observer, "console-api-log-event", false);
- Services.obs.addObserver(Observer, "http-on-examine-response", false);
- registerCleanupFunction(do_cleanup);
-
- let which = "block_active_with_redir_same";
-
- SetupPrefTestEnvironment(which);
-
- for (let server of Object.keys(test_servers)) {
- yield execute_test(server, test_settings[which].mimetype);
- }
-
- SpecialPowers.popPrefEnv();
-});
diff --git a/dom/security/test/hsts/browser_hsts-priming_block_display.js b/dom/security/test/hsts/browser_hsts-priming_block_display.js
deleted file mode 100644
index 4eca62718..000000000
--- a/dom/security/test/hsts/browser_hsts-priming_block_display.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Description of the test:
- * Check that HSTS priming occurs correctly with mixed content when display
- * content is blocked.
- */
-'use strict';
-
-//jscs:disable
-add_task(function*() {
- //jscs:enable
- Services.obs.addObserver(Observer, "console-api-log-event", false);
- Services.obs.addObserver(Observer, "http-on-examine-response", false);
- registerCleanupFunction(do_cleanup);
-
- let which = "block_display";
-
- SetupPrefTestEnvironment(which);
-
- for (let server of Object.keys(test_servers)) {
- yield execute_test(server, test_settings[which].mimetype);
- }
-
- SpecialPowers.popPrefEnv();
-});
diff --git a/dom/security/test/hsts/browser_hsts-priming_cache-timeout.js b/dom/security/test/hsts/browser_hsts-priming_cache-timeout.js
deleted file mode 100644
index 5416a71d2..000000000
--- a/dom/security/test/hsts/browser_hsts-priming_cache-timeout.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Description of the test:
- * Test that the network.hsts_priming.cache_timeout preferene causes the cache
- * to timeout
- */
-'use strict';
-
-//jscs:disable
-add_task(function*() {
- //jscs:enable
- Observer.add_observers(Services);
- registerCleanupFunction(do_cleanup);
-
- let which = "block_display";
-
- SetupPrefTestEnvironment(which, [["security.mixed_content.hsts_priming_cache_timeout", 1]]);
-
- yield execute_test("no-ssl", test_settings[which].mimetype);
-
- let pre_promise = performance.now();
-
- while ((performance.now() - pre_promise) < 2000) {
- yield new Promise(function (resolve) {
- setTimeout(resolve, 2000);
- });
- }
-
- // clear the fact that we saw a priming request
- test_settings[which].priming = {};
-
- yield execute_test("no-ssl", test_settings[which].mimetype);
- is(test_settings[which].priming["no-ssl"], true,
- "Correctly send a priming request after expiration.");
-
- SpecialPowers.popPrefEnv();
-});
diff --git a/dom/security/test/hsts/browser_hsts-priming_hsts_after_mixed.js b/dom/security/test/hsts/browser_hsts-priming_hsts_after_mixed.js
deleted file mode 100644
index 89ea6fbeb..000000000
--- a/dom/security/test/hsts/browser_hsts-priming_hsts_after_mixed.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Description of the test:
- * Check that HSTS priming occurs correctly with mixed content when the
- * mixed-content blocks before HSTS.
- */
-'use strict';
-
-//jscs:disable
-add_task(function*() {
- //jscs:enable
- Services.obs.addObserver(Observer, "console-api-log-event", false);
- Services.obs.addObserver(Observer, "http-on-examine-response", false);
- registerCleanupFunction(do_cleanup);
-
- let which = "hsts_after_mixed";
-
- SetupPrefTestEnvironment(which);
-
- for (let server of Object.keys(test_servers)) {
- yield execute_test(server, test_settings[which].mimetype);
- }
-
- SpecialPowers.popPrefEnv();
-});
diff --git a/dom/security/test/hsts/browser_hsts-priming_no-duplicates.js b/dom/security/test/hsts/browser_hsts-priming_no-duplicates.js
deleted file mode 100644
index 3846fe4f0..000000000
--- a/dom/security/test/hsts/browser_hsts-priming_no-duplicates.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Description of the test:
- * Only one request should be sent per host, even if we run the test more
- * than once.
- */
-'use strict';
-
-//jscs:disable
-add_task(function*() {
- //jscs:enable
- Observer.add_observers(Services);
- registerCleanupFunction(do_cleanup);
-
- let which = "block_display";
-
- SetupPrefTestEnvironment(which);
-
- for (let server of Object.keys(test_servers)) {
- yield execute_test(server, test_settings[which].mimetype);
- }
-
- test_settings[which].priming = {};
-
- // run the tests twice to validate the cache is being used
- for (let server of Object.keys(test_servers)) {
- yield execute_test(server, test_settings[which].mimetype);
- }
-
- SpecialPowers.popPrefEnv();
-});
diff --git a/dom/security/test/hsts/file_1x1.png b/dom/security/test/hsts/file_1x1.png
deleted file mode 100644
index 1ba31ba1a..000000000
--- a/dom/security/test/hsts/file_1x1.png
+++ /dev/null
Binary files differ
diff --git a/dom/security/test/hsts/file_priming-top.html b/dom/security/test/hsts/file_priming-top.html
deleted file mode 100644
index b1d1bfa40..000000000
--- a/dom/security/test/hsts/file_priming-top.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Bug 1246540</title>
- <meta http-equiv='content-type' content="text/html;charset=utf-8" />
-</head>
-<body>
- <p id="display"></p>
- <div id="content" style="visibility: hidden">
- </div>
-
-<script type="text/javascript">
-/*
- * Description of the test:
- * Attempt to load an insecure resource. If the resource responds to HSTS
- * priming with an STS header, the load should continue securely.
- * If it does not, the load should continue be blocked or continue insecurely.
- */
-
-function parse_query_string() {
- var q = {};
- document.location.search.substr(1).
- split('&').forEach(function (item, idx, ar) {
- let [k, v] = item.split('=');
- q[k] = unescape(v);
- });
- return q;
-}
-
-var args = parse_query_string();
-
-var subresources = {
- css: { mimetype: 'text/css', file: 'file_stylesheet.css' },
- img: { mimetype: 'image/png', file: 'file_1x1.png' },
- script: { mimetype: 'text/javascript', file: 'file_priming.js' },
-};
-
-function handler(ev) {
- console.log("HSTS_PRIMING: Blocked "+args.id);
-}
-
-function loadCss(src) {
- let head = document.getElementsByTagName("head")[0];
- let link = document.createElement("link");
- link.setAttribute("rel", "stylesheet");
- link.setAttribute("type", subresources[args.type].mimetype);
- link.setAttribute("href", src);
- head.appendChild(link);
-}
-
-function loadResource(src) {
- let content = document.getElementById("content");
- let testElem = document.createElement(args.type);
- testElem.setAttribute("id", args.id);
- testElem.setAttribute("charset", "UTF-8");
- testElem.onerror = handler;
- content.appendChild(testElem);
- testElem.src = src;
-}
-
-function loadTest() {
- let subresource = subresources[args.type];
-
- let src = "http://"
- + args.host
- + "/browser/dom/security/test/hsts/file_testserver.sjs"
- + "?file=" +escape("browser/dom/security/test/hsts/" + subresource.file)
- + "&primer=" + escape(args.id)
- + "&mimetype=" + escape(subresource.mimetype)
- ;
- if (args.type == 'css') {
- loadCss(src);
- return;
- }
-
- loadResource(src);
-}
-
-// start running the tests
-loadTest();
-
-</script>
-</body>
-</html>
diff --git a/dom/security/test/hsts/file_priming.js b/dom/security/test/hsts/file_priming.js
deleted file mode 100644
index 023022da6..000000000
--- a/dom/security/test/hsts/file_priming.js
+++ /dev/null
@@ -1,4 +0,0 @@
-function completed() {
- return;
-}
-completed();
diff --git a/dom/security/test/hsts/file_stylesheet.css b/dom/security/test/hsts/file_stylesheet.css
deleted file mode 100644
index e69de29bb..000000000
--- a/dom/security/test/hsts/file_stylesheet.css
+++ /dev/null
diff --git a/dom/security/test/hsts/file_testserver.sjs b/dom/security/test/hsts/file_testserver.sjs
deleted file mode 100644
index d5cd6b17a..000000000
--- a/dom/security/test/hsts/file_testserver.sjs
+++ /dev/null
@@ -1,66 +0,0 @@
-// SJS file for HSTS mochitests
-
-Components.utils.import("resource://gre/modules/NetUtil.jsm");
-Components.utils.importGlobalProperties(["URLSearchParams"]);
-
-function loadFromFile(path) {
- // Load the HTML to return in the response from file.
- // Since it's relative to the cwd of the test runner, we start there and
- // append to get to the actual path of the file.
- var testFile =
- Components.classes["@mozilla.org/file/directory_service;1"].
- getService(Components.interfaces.nsIProperties).
- get("CurWorkD", Components.interfaces.nsILocalFile);
- var dirs = path.split("/");
- for (var i = 0; i < dirs.length; i++) {
- testFile.append(dirs[i]);
- }
- var testFileStream =
- Components.classes["@mozilla.org/network/file-input-stream;1"].
- createInstance(Components.interfaces.nsIFileInputStream);
- testFileStream.init(testFile, -1, 0, 0);
- var test = NetUtil.readInputStreamToString(testFileStream, testFileStream.available());
- return test;
-}
-
-function handleRequest(request, response)
-{
- const query = new URLSearchParams(request.queryString);
-
- redir = query.get('redir');
- if (redir == 'same') {
- query.delete("redir");
- response.setStatus(302);
- let newURI = request.uri;
- newURI.queryString = query.serialize();
- response.setHeader("Location", newURI.spec)
- }
-
- // avoid confusing cache behaviors
- response.setHeader("Cache-Control", "no-cache", false);
-
- // if we have a priming header, check for required behavior
- // and set header appropriately
- if (request.hasHeader('Upgrade-Insecure-Requests')) {
- var expected = query.get('primer');
- if (expected == 'prime-hsts') {
- // set it for 5 minutes
- response.setHeader("Strict-Transport-Security", "max-age="+(60*5), false);
- } else if (expected == 'reject-upgrade') {
- response.setHeader("Strict-Transport-Security", "max-age=0", false);
- }
- response.write('');
- return;
- }
-
- var file = query.get('file');
- if (file) {
- var mimetype = unescape(query.get('mimetype'));
- response.setHeader("Content-Type", mimetype, false);
- response.write(loadFromFile(unescape(file)));
- return;
- }
-
- response.setHeader("Content-Type", "application/json", false);
- response.write('{}');
-}
diff --git a/dom/security/test/hsts/head.js b/dom/security/test/hsts/head.js
deleted file mode 100644
index 362b36444..000000000
--- a/dom/security/test/hsts/head.js
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Description of the tests:
- * Check that HSTS priming occurs correctly with mixed content
- *
- * This test uses three hostnames, each of which treats an HSTS priming
- * request differently.
- * * no-ssl never returns an ssl response
- * * reject-upgrade returns an ssl response, but with no STS header
- * * prime-hsts returns an ssl response with the appropriate STS header
- *
- * For each server, test that it response appropriately when the we allow
- * or block active or display content, as well as when we send an hsts priming
- * request, but do not change the order of mixed-content and HSTS.
- *
- * Test use http-on-examine-response, so must be run in browser context.
- */
-'use strict';
-
-var TOP_URI = "https://example.com/browser/dom/security/test/hsts/file_priming-top.html";
-
-var test_servers = {
- // a test server that does not support TLS
- 'no-ssl': {
- host: 'example.co.jp',
- response: false,
- id: 'no-ssl',
- },
- // a test server which does not support STS upgrade
- 'reject-upgrade': {
- host: 'example.org',
- response: true,
- id: 'reject-upgrade',
- },
- // a test server when sends an STS header when priming
- 'prime-hsts': {
- host: 'test1.example.com',
- response: true,
- id: 'prime-hsts'
- },
-};
-
-var test_settings = {
- // mixed active content is allowed, priming will upgrade
- allow_active: {
- block_active: false,
- block_display: false,
- use_hsts: true,
- send_hsts_priming: true,
- type: 'script',
- result: {
- 'no-ssl': 'insecure',
- 'reject-upgrade': 'insecure',
- 'prime-hsts': 'secure',
- },
- },
- // mixed active content is blocked, priming will upgrade
- block_active: {
- block_active: true,
- block_display: false,
- use_hsts: true,
- send_hsts_priming: true,
- type: 'script',
- result: {
- 'no-ssl': 'blocked',
- 'reject-upgrade': 'blocked',
- 'prime-hsts': 'secure',
- },
- },
- // keep the original order of mixed-content and HSTS, but send
- // priming requests
- hsts_after_mixed: {
- block_active: true,
- block_display: false,
- use_hsts: false,
- send_hsts_priming: true,
- type: 'script',
- result: {
- 'no-ssl': 'blocked',
- 'reject-upgrade': 'blocked',
- 'prime-hsts': 'blocked',
- },
- },
- // mixed display content is allowed, priming will upgrade
- allow_display: {
- block_active: true,
- block_display: false,
- use_hsts: true,
- send_hsts_priming: true,
- type: 'img',
- result: {
- 'no-ssl': 'insecure',
- 'reject-upgrade': 'insecure',
- 'prime-hsts': 'secure',
- },
- },
- // mixed display content is blocked, priming will upgrade
- block_display: {
- block_active: true,
- block_display: true,
- use_hsts: true,
- send_hsts_priming: true,
- type: 'img',
- result: {
- 'no-ssl': 'blocked',
- 'reject-upgrade': 'blocked',
- 'prime-hsts': 'secure',
- },
- },
- // mixed active content is blocked, priming will upgrade (css)
- block_active_css: {
- block_active: true,
- block_display: false,
- use_hsts: true,
- send_hsts_priming: true,
- type: 'css',
- result: {
- 'no-ssl': 'blocked',
- 'reject-upgrade': 'blocked',
- 'prime-hsts': 'secure',
- },
- },
- // mixed active content is blocked, priming will upgrade
- // redirect to the same host
- block_active_with_redir_same: {
- block_active: true,
- block_display: false,
- use_hsts: true,
- send_hsts_priming: true,
- type: 'script',
- redir: 'same',
- result: {
- 'no-ssl': 'blocked',
- 'reject-upgrade': 'blocked',
- 'prime-hsts': 'secure',
- },
- },
-}
-// track which test we are on
-var which_test = "";
-
-const Observer = {
- observe: function (subject, topic, data) {
- switch (topic) {
- case 'console-api-log-event':
- return Observer.console_api_log_event(subject, topic, data);
- case 'http-on-examine-response':
- return Observer.http_on_examine_response(subject, topic, data);
- case 'http-on-modify-request':
- return Observer.http_on_modify_request(subject, topic, data);
- }
- throw "Can't handle topic "+topic;
- },
- add_observers: function (services) {
- services.obs.addObserver(Observer, "console-api-log-event", false);
- services.obs.addObserver(Observer, "http-on-examine-response", false);
- services.obs.addObserver(Observer, "http-on-modify-request", false);
- },
- // When a load is blocked which results in an error event within a page, the
- // test logs to the console.
- console_api_log_event: function (subject, topic, data) {
- var message = subject.wrappedJSObject.arguments[0];
- // when we are blocked, this will match the message we sent to the console,
- // ignore everything else.
- var re = RegExp(/^HSTS_PRIMING: Blocked ([-\w]+).*$/);
- if (!re.test(message)) {
- return;
- }
-
- let id = message.replace(re, '$1');
- let curTest =test_servers[id];
-
- if (!curTest) {
- ok(false, "HSTS priming got a console message blocked, "+
- "but doesn't match expectations "+id+" (msg="+message);
- return;
- }
-
- is("blocked", test_settings[which_test].result[curTest.id], "HSTS priming "+
- which_test+":"+curTest.id+" expected "+
- test_settings[which_test].result[curTest.id]+", got blocked");
- test_settings[which_test].finished[curTest.id] = "blocked";
- },
- get_current_test: function(uri) {
- for (let item in test_servers) {
- let re = RegExp('https?://'+test_servers[item].host);
- if (re.test(uri)) {
- return test_servers[item];
- }
- }
- return null;
- },
- http_on_modify_request: function (subject, topic, data) {
- let channel = subject.QueryInterface(Ci.nsIHttpChannel);
- if (channel.requestMethod != 'HEAD') {
- return;
- }
-
- let curTest = this.get_current_test(channel.URI.asciiSpec);
-
- if (!curTest) {
- return;
- }
-
- ok(!(curTest.id in test_settings[which_test].priming), "Already saw a priming request for " + curTest.id);
- test_settings[which_test].priming[curTest.id] = true;
- },
- // When we see a response come back, peek at the response and test it is secure
- // or insecure as needed. Addtionally, watch the response for priming requests.
- http_on_examine_response: function (subject, topic, data) {
- let channel = subject.QueryInterface(Ci.nsIHttpChannel);
- let curTest = this.get_current_test(channel.URI.asciiSpec);
-
- if (!curTest) {
- return;
- }
-
- let result = (channel.URI.asciiSpec.startsWith('https:')) ? "secure" : "insecure";
-
- // This is a priming request, go ahead and validate we were supposed to see
- // a response from the server
- if (channel.requestMethod == 'HEAD') {
- is(true, curTest.response, "HSTS priming response found " + curTest.id);
- return;
- }
-
- // This is the response to our query, make sure it matches
- is(result, test_settings[which_test].result[curTest.id],
- "HSTS priming result " + which_test + ":" + curTest.id);
- test_settings[which_test].finished[curTest.id] = result;
- },
-};
-
-// opens `uri' in a new tab and focuses it.
-// returns the newly opened tab
-function openTab(uri) {
- let tab = gBrowser.addTab(uri);
-
- // select tab and make sure its browser is focused
- gBrowser.selectedTab = tab;
- tab.ownerDocument.defaultView.focus();
-
- return tab;
-}
-
-function clear_sts_data() {
- for (let test in test_servers) {
- SpecialPowers.cleanUpSTSData('http://'+test_servers[test].host);
- }
-}
-
-function do_cleanup() {
- clear_sts_data();
-
- Services.obs.removeObserver(Observer, "console-api-log-event");
- Services.obs.removeObserver(Observer, "http-on-examine-response");
-}
-
-function SetupPrefTestEnvironment(which, additional_prefs) {
- which_test = which;
- clear_sts_data();
-
- var settings = test_settings[which];
- // priming counts how many priming requests we saw
- settings.priming = {};
- // priming counts how many tests were finished
- settings.finished= {};
-
- var prefs = [["security.mixed_content.block_active_content",
- settings.block_active],
- ["security.mixed_content.block_display_content",
- settings.block_display],
- ["security.mixed_content.use_hsts",
- settings.use_hsts],
- ["security.mixed_content.send_hsts_priming",
- settings.send_hsts_priming]];
-
- if (additional_prefs) {
- for (let idx in additional_prefs) {
- prefs.push(additional_prefs[idx]);
- }
- }
-
- console.log("prefs=%s", prefs);
-
- SpecialPowers.pushPrefEnv({'set': prefs});
-}
-
-// make the top-level test uri
-function build_test_uri(base_uri, host, test_id, type) {
- return base_uri +
- "?host=" + escape(host) +
- "&id=" + escape(test_id) +
- "&type=" + escape(type);
-}
-
-// open a new tab, load the test, and wait for it to finish
-function execute_test(test, mimetype) {
- var src = build_test_uri(TOP_URI, test_servers[test].host,
- test, test_settings[which_test].type);
-
- let tab = openTab(src);
- test_servers[test]['tab'] = tab;
-
- let browser = gBrowser.getBrowserForTab(tab);
- yield BrowserTestUtils.browserLoaded(browser);
-
- yield BrowserTestUtils.removeTab(tab);
-}
diff --git a/dom/security/test/mixedcontentblocker/test_main.html b/dom/security/test/mixedcontentblocker/test_main.html
index d2bc9dc7e..bb9536939 100644
--- a/dom/security/test/mixedcontentblocker/test_main.html
+++ b/dom/security/test/mixedcontentblocker/test_main.html
@@ -162,9 +162,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=62178
}
function startTest() {
- // Set prefs to use mixed-content before HSTS
- SpecialPowers.pushPrefEnv({'set': [["security.mixed_content.use_hsts", false],
- ["security.mixed_content.send_hsts_priming", false]]});
//Set the first set of mixed content settings and increment the counter.
changePrefs([], function() {
//listen for a messages from the mixed content test harness
diff --git a/dom/security/test/moz.build b/dom/security/test/moz.build
index 946959dee..759e76c73 100644
--- a/dom/security/test/moz.build
+++ b/dom/security/test/moz.build
@@ -28,5 +28,4 @@ BROWSER_CHROME_MANIFESTS += [
'contentverifier/browser.ini',
'csp/browser.ini',
'general/browser.ini',
- 'hsts/browser.ini',
]
diff --git a/dom/tests/mochitest/fetch/test_fetch_cors.js b/dom/tests/mochitest/fetch/test_fetch_cors.js
index ac83d050d..f375ce73f 100644
--- a/dom/tests/mochitest/fetch/test_fetch_cors.js
+++ b/dom/tests/mochitest/fetch/test_fetch_cors.js
@@ -64,9 +64,9 @@ function testSameOriginCredentials() {
withCred: "same-origin",
},
{
- // Default mode is "omit".
+ // Default mode is "same-origin".
pass: 1,
- noCookie: 1,
+ cookie: cookieStr,
},
{
pass: 1,
diff --git a/dom/tests/mochitest/fetch/test_request.js b/dom/tests/mochitest/fetch/test_request.js
index badad61b9..5be361a46 100644
--- a/dom/tests/mochitest/fetch/test_request.js
+++ b/dom/tests/mochitest/fetch/test_request.js
@@ -6,7 +6,7 @@ function testDefaultCtor() {
is(req.context, "fetch", "Default context is fetch.");
is(req.referrer, "about:client", "Default referrer is `client` which serializes to about:client.");
is(req.mode, "cors", "Request mode for string input is cors");
- is(req.credentials, "omit", "Default Request credentials is omit");
+ is(req.credentials, "same-origin", "Default Request credentials is same-origin");
is(req.cache, "default", "Default Request cache is default");
var req = new Request(req);
@@ -16,7 +16,7 @@ function testDefaultCtor() {
is(req.context, "fetch", "Default context is fetch.");
is(req.referrer, "about:client", "Default referrer is `client` which serializes to about:client.");
is(req.mode, "cors", "Request mode string input is cors");
- is(req.credentials, "omit", "Default Request credentials is omit");
+ is(req.credentials, "same-origin", "Default Request credentials is same-origin");
is(req.cache, "default", "Default Request cache is default");
}
diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp
index 1739f3d31..ad95d4896 100644
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -2811,13 +2811,6 @@ WorkerThreadPrimaryRunnable::Run()
}
{
-#ifdef MOZ_ENABLE_PROFILER_SPS
- PseudoStack* stack = mozilla_get_pseudo_stack();
- if (stack) {
- stack->sampleContext(cx);
- }
-#endif
-
{
JSAutoRequest ar(cx);
@@ -2829,12 +2822,6 @@ WorkerThreadPrimaryRunnable::Run()
}
BackgroundChild::CloseForCurrentThread();
-
-#ifdef MOZ_ENABLE_PROFILER_SPS
- if (stack) {
- stack->sampleContext(nullptr);
- }
-#endif
}
// There may still be runnables on the debugger event queue that hold a
diff --git a/dom/xslt/xslt/txFormatNumberFunctionCall.cpp b/dom/xslt/xslt/txFormatNumberFunctionCall.cpp
index a4d4b8fb0..674fb553c 100644
--- a/dom/xslt/xslt/txFormatNumberFunctionCall.cpp
+++ b/dom/xslt/xslt/txFormatNumberFunctionCall.cpp
@@ -265,6 +265,12 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext,
value = fabs(value) * multiplier;
+ // Make sure the multiplier didn't push value to infinity.
+ if (value == mozilla::PositiveInfinity<double>()) {
+ return aContext->recycler()->getStringResult(format->mInfinity,
+ aResult);
+ }
+
// Prefix
nsAutoString res(prefix);
diff --git a/extensions/auth/nsAuthSambaNTLM.cpp b/extensions/auth/nsAuthSambaNTLM.cpp
index 1406c15e0..69777dcca 100644
--- a/extensions/auth/nsAuthSambaNTLM.cpp
+++ b/extensions/auth/nsAuthSambaNTLM.cpp
@@ -5,6 +5,7 @@
#include "nsAuth.h"
#include "nsAuthSambaNTLM.h"
+#include "nspr.h"
#include "prenv.h"
#include "plbase64.h"
#include "prerror.h"
@@ -23,7 +24,7 @@ nsAuthSambaNTLM::~nsAuthSambaNTLM()
// ntlm_auth reads from stdin regularly so closing our file handles
// should cause it to exit.
Shutdown();
- free(mInitialMessage);
+ PR_Free(mInitialMessage);
}
void
@@ -248,7 +249,7 @@ nsAuthSambaNTLM::GetNextToken(const void *inToken,
nsCString request;
request.AssignLiteral("TT ");
request.Append(encoded);
- free(encoded);
+ PR_Free(encoded);
request.Append('\n');
if (!WriteString(mToChildFD, request))
@@ -265,7 +266,7 @@ nsAuthSambaNTLM::GetNextToken(const void *inToken,
if (!buf)
return NS_ERROR_FAILURE;
*outToken = nsMemory::Clone(buf, *outTokenLen);
- free(buf);
+ PR_Free(buf);
if (!*outToken) {
return NS_ERROR_OUT_OF_MEMORY;
}
diff --git a/gfx/gl/GLContext.cpp b/gfx/gl/GLContext.cpp
index 23090ef98..33315413f 100644
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -19,7 +19,6 @@
#include "GLReadTexImageHelper.h"
#include "GLScreenBuffer.h"
-#include "gfxCrashReporterUtils.h"
#include "gfxEnv.h"
#include "gfxUtils.h"
#include "GLContextProvider.h"
@@ -523,8 +522,6 @@ GLContext::InitWithPrefix(const char* prefix, bool trygl)
MOZ_RELEASE_ASSERT(!mSymbols.fBindFramebuffer,
"GFX: InitWithPrefix should only be called once.");
- ScopedGfxFeatureReporter reporter("GL Context");
-
if (!InitWithPrefixImpl(prefix, trygl)) {
// If initialization fails, zero the symbols to avoid hard-to-understand bugs.
mSymbols.Zero();
@@ -532,7 +529,6 @@ GLContext::InitWithPrefix(const char* prefix, bool trygl)
return false;
}
- reporter.SetSuccessful();
return true;
}
diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp
index 086f35ad7..098662200 100644
--- a/gfx/gl/GLContextProviderEGL.cpp
+++ b/gfx/gl/GLContextProviderEGL.cpp
@@ -79,7 +79,6 @@
#endif
#include "gfxASurface.h"
-#include "gfxCrashReporterUtils.h"
#include "gfxFailure.h"
#include "gfxPlatform.h"
#include "gfxUtils.h"
diff --git a/gfx/gl/GLContextProviderGLX.cpp b/gfx/gl/GLContextProviderGLX.cpp
index 9a1157f33..d804f95af 100644
--- a/gfx/gl/GLContextProviderGLX.cpp
+++ b/gfx/gl/GLContextProviderGLX.cpp
@@ -35,8 +35,6 @@
#include "GLScreenBuffer.h"
#include "gfxPrefs.h"
-#include "gfxCrashReporterUtils.h"
-
#ifdef MOZ_WIDGET_GTK
#include "gfxPlatformGtk.h"
#endif
@@ -93,13 +91,11 @@ GLXLibrary::EnsureInitialized()
libGLfilename = "libGL.so.1";
#endif
- ScopedGfxFeatureReporter reporter(libGLfilename, forceFeatureReport);
mOGLLibrary = PR_LoadLibrary(libGLfilename);
if (!mOGLLibrary) {
NS_WARNING("Couldn't load OpenGL shared library.");
return false;
}
- reporter.SetSuccessful();
}
if (gfxEnv::GlxDebug()) {
diff --git a/gfx/gl/GLContextProviderWGL.cpp b/gfx/gl/GLContextProviderWGL.cpp
index a1373f78f..c9c3f0a54 100644
--- a/gfx/gl/GLContextProviderWGL.cpp
+++ b/gfx/gl/GLContextProviderWGL.cpp
@@ -11,8 +11,6 @@
#include "gfxPlatform.h"
#include "gfxWindowsSurface.h"
-#include "gfxCrashReporterUtils.h"
-
#include "prenv.h"
#include "mozilla/Preferences.h"
@@ -99,8 +97,6 @@ WGLLibrary::EnsureInitialized()
if (mInitialized)
return true;
- mozilla::ScopedGfxFeatureReporter reporter("WGL");
-
std::string libGLFilename = "Opengl32.dll";
// SU_SPIES_DIRECTORY is for AMD CodeXL/gDEBugger
if (PR_GetEnv("SU_SPIES_DIRECTORY")) {
@@ -268,7 +264,6 @@ WGLLibrary::EnsureInitialized()
mInitialized = true;
- reporter.SetSuccessful();
return true;
}
diff --git a/gfx/gl/GLLibraryEGL.cpp b/gfx/gl/GLLibraryEGL.cpp
index 22be44ed6..3d8da3085 100644
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -6,7 +6,6 @@
#include "angle/Platform.h"
#include "gfxConfig.h"
-#include "gfxCrashReporterUtils.h"
#include "gfxUtils.h"
#include "mozilla/Preferences.h"
#include "mozilla/Assertions.h"
@@ -300,8 +299,6 @@ GLLibraryEGL::EnsureInitialized(bool forceAccel, nsACString* const out_failureId
return true;
}
- mozilla::ScopedGfxFeatureReporter reporter("EGL");
-
#ifdef XP_WIN
if (!mEGLLibrary) {
// On Windows, the GLESv2, EGL and DXSDK libraries are shipped with libxul and
@@ -624,7 +621,6 @@ GLLibraryEGL::EnsureInitialized(bool forceAccel, nsACString* const out_failureId
}
mInitialized = true;
- reporter.SetSuccessful();
return true;
}
diff --git a/gfx/ipc/GPUChild.cpp b/gfx/ipc/GPUChild.cpp
index 3c2797683..a075716e3 100644
--- a/gfx/ipc/GPUChild.cpp
+++ b/gfx/ipc/GPUChild.cpp
@@ -14,7 +14,6 @@
#if defined(XP_WIN)
# include "mozilla/gfx/DeviceManagerDx.h"
#endif
-#include "mozilla/ipc/CrashReporterHost.h"
namespace mozilla {
namespace gfx {
@@ -119,12 +118,6 @@ GPUChild::RecvGraphicsError(const nsCString& aError)
}
bool
-GPUChild::RecvInitCrashReporter(Shmem&& aShmem)
-{
- return true;
-}
-
-bool
GPUChild::RecvNotifyUiObservers(const nsCString& aTopic)
{
nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService();
diff --git a/gfx/ipc/GPUChild.h b/gfx/ipc/GPUChild.h
index c0f7d076f..888884ddf 100644
--- a/gfx/ipc/GPUChild.h
+++ b/gfx/ipc/GPUChild.h
@@ -12,9 +12,6 @@
#include "mozilla/gfx/gfxVarReceiver.h"
namespace mozilla {
-namespace ipc {
-class CrashReporterHost;
-} // namespace
namespace gfx {
class GPUProcessHost;
@@ -37,7 +34,6 @@ public:
// PGPUChild overrides.
bool RecvInitComplete(const GPUDeviceData& aData) override;
bool RecvReportCheckerboard(const uint32_t& aSeverity, const nsCString& aLog) override;
- bool RecvInitCrashReporter(Shmem&& shmem) override;
bool RecvAccumulateChildHistogram(InfallibleTArray<Accumulation>&& aAccumulations) override;
bool RecvAccumulateChildKeyedHistogram(InfallibleTArray<KeyedAccumulation>&& aAccumulations) override;
void ActorDestroy(ActorDestroyReason aWhy) override;
@@ -49,7 +45,6 @@ public:
private:
GPUProcessHost* mHost;
- UniquePtr<ipc::CrashReporterHost> mCrashReporter;
bool mGPUReady;
};
diff --git a/gfx/ipc/GPUParent.cpp b/gfx/ipc/GPUParent.cpp
index 896c7b36b..b693f4728 100644
--- a/gfx/ipc/GPUParent.cpp
+++ b/gfx/ipc/GPUParent.cpp
@@ -14,7 +14,6 @@
#include "mozilla/Assertions.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/gfxVars.h"
-#include "mozilla/ipc/CrashReporterClient.h"
#include "mozilla/ipc/ProcessChild.h"
#include "mozilla/layers/APZThreadUtils.h"
#include "mozilla/layers/APZCTreeManager.h"
diff --git a/gfx/ipc/PGPU.ipdl b/gfx/ipc/PGPU.ipdl
index c442335c9..d36c51394 100644
--- a/gfx/ipc/PGPU.ipdl
+++ b/gfx/ipc/PGPU.ipdl
@@ -89,8 +89,6 @@ child:
// Graphics errors, analogous to PContent::GraphicsError
async GraphicsError(nsCString aError);
- async InitCrashReporter(Shmem shmem);
-
// Have a message be broadcasted to the UI process by the UI process
// observer service.
async NotifyUiObservers(nsCString aTopic);
diff --git a/gfx/layers/composite/ContainerLayerComposite.cpp b/gfx/layers/composite/ContainerLayerComposite.cpp
index 35070cad6..f25503532 100755
--- a/gfx/layers/composite/ContainerLayerComposite.cpp
+++ b/gfx/layers/composite/ContainerLayerComposite.cpp
@@ -35,9 +35,6 @@
#include "TextRenderer.h" // for TextRenderer
#include <vector>
#include "GeckoProfiler.h" // for GeckoProfiler
-#ifdef MOZ_ENABLE_PROFILER_SPS
-#include "ProfilerMarkers.h" // for ProfilerMarkers
-#endif
#define CULLING_LOG(...)
// #define CULLING_LOG(...) printf_stderr("CULLING: " __VA_ARGS__)
@@ -86,26 +83,7 @@ static gfx::IntRect ContainerVisibleRect(ContainerT* aContainer)
static void PrintUniformityInfo(Layer* aLayer)
{
-#ifdef MOZ_ENABLE_PROFILER_SPS
- if (!profiler_is_active()) {
- return;
- }
-
- // Don't want to print a log for smaller layers
- if (aLayer->GetLocalVisibleRegion().GetBounds().width < 300 ||
- aLayer->GetLocalVisibleRegion().GetBounds().height < 300) {
- return;
- }
-
- Matrix4x4 transform = aLayer->AsLayerComposite()->GetShadowBaseTransform();
- if (!transform.Is2D()) {
- return;
- }
-
- Point translation = transform.As2D().GetTranslation();
- LayerTranslationPayload* payload = new LayerTranslationPayload(aLayer, translation);
- PROFILER_MARKER_PAYLOAD("LayerTranslation", payload);
-#endif
+ /*** STUB ***/
}
/* all of the per-layer prepared data we need to maintain */
diff --git a/gfx/layers/d3d11/CompositorD3D11.cpp b/gfx/layers/d3d11/CompositorD3D11.cpp
index 540d39b33..2197f5444 100644
--- a/gfx/layers/d3d11/CompositorD3D11.cpp
+++ b/gfx/layers/d3d11/CompositorD3D11.cpp
@@ -19,7 +19,6 @@
#include "nsWindowsHelpers.h"
#include "gfxPrefs.h"
#include "gfxConfig.h"
-#include "gfxCrashReporterUtils.h"
#include "gfxUtils.h"
#include "mozilla/gfx/StackArray.h"
#include "mozilla/Services.h"
@@ -181,8 +180,6 @@ CompositorD3D11::~CompositorD3D11()
bool
CompositorD3D11::Initialize(nsCString* const out_failureReason)
{
- ScopedGfxFeatureReporter reporter("D3D11 Layers");
-
MOZ_ASSERT(gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING));
HRESULT hr;
@@ -415,7 +412,6 @@ CompositorD3D11::Initialize(nsCString* const out_failureReason)
mAllowPartialPresents = CanUsePartialPresents(mDevice);
- reporter.SetSuccessful();
return true;
}
diff --git a/gfx/layers/d3d9/CompositorD3D9.cpp b/gfx/layers/d3d9/CompositorD3D9.cpp
index 0f7e942c1..85c19139f 100644
--- a/gfx/layers/d3d9/CompositorD3D9.cpp
+++ b/gfx/layers/d3d9/CompositorD3D9.cpp
@@ -15,7 +15,6 @@
#include "gfxFailure.h"
#include "mozilla/layers/LayerManagerComposite.h"
#include "gfxPrefs.h"
-#include "gfxCrashReporterUtils.h"
#include "gfxUtils.h"
#include "mozilla/gfx/DeviceManagerDx.h"
#include "mozilla/layers/CompositorBridgeParent.h"
@@ -43,8 +42,6 @@ CompositorD3D9::~CompositorD3D9()
bool
CompositorD3D9::Initialize(nsCString* const out_failureReason)
{
- ScopedGfxFeatureReporter reporter("D3D9 Layers");
-
mDeviceManager = DeviceManagerD3D9::Get();
if (!mDeviceManager) {
*out_failureReason = "FEATURE_FAILURE_D3D9_DEVICE_MANAGER";
@@ -62,8 +59,6 @@ CompositorD3D9::Initialize(nsCString* const out_failureReason)
return false;
}
- reporter.SetSuccessful();
-
return true;
}
diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp
index 6728e8841..bf510cd46 100644
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -74,9 +74,6 @@
#include "mozilla/HalTypes.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/Telemetry.h"
-#ifdef MOZ_ENABLE_PROFILER_SPS
-#include "ProfilerMarkers.h"
-#endif
#include "mozilla/VsyncDispatcher.h"
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
#include "VsyncSource.h"
@@ -1923,11 +1920,7 @@ CompositorBridgeParent::GetAPZCTreeManager(uint64_t aLayersId)
static void
InsertVsyncProfilerMarker(TimeStamp aVsyncTimestamp)
{
-#ifdef MOZ_ENABLE_PROFILER_SPS
- MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
- VsyncPayload* payload = new VsyncPayload(aVsyncTimestamp);
- PROFILER_MARKER_PAYLOAD("VsyncTimestamp", payload);
-#endif
+ /*** STUB ***/
}
/*static */ void
diff --git a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp
index 1bb6d046b..c3ea33149 100644
--- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp
@@ -73,9 +73,6 @@
#include "mozilla/HalTypes.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/Telemetry.h"
-#ifdef MOZ_ENABLE_PROFILER_SPS
-#include "ProfilerMarkers.h"
-#endif
#include "mozilla/VsyncDispatcher.h"
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
#include "VsyncSource.h"
diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChild.cpp
index 0466a1031..efd7a0162 100644
--- a/gfx/layers/ipc/ImageBridgeChild.cpp
+++ b/gfx/layers/ipc/ImageBridgeChild.cpp
@@ -73,24 +73,10 @@ protected:
MOZ_IS_CLASS_INIT
void Init() {
-#ifdef MOZ_ENABLE_PROFILER_SPS
- mPseudoStackHack = mozilla_get_pseudo_stack();
-#endif
}
void CleanUp() {
-#ifdef MOZ_ENABLE_PROFILER_SPS
- mPseudoStackHack = nullptr;
-#endif
}
-
-private:
-
-#ifdef MOZ_ENABLE_PROFILER_SPS
- // This is needed to avoid a spurious leak report. There's no other
- // use for it. See bug 1239504 and bug 1215265.
- MOZ_INIT_OUTSIDE_CTOR PseudoStack* mPseudoStackHack;
-#endif
};
}
diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp
index bbe1b4657..93656d72a 100644
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -12,7 +12,6 @@
#include "GLUploadHelpers.h"
#include "Layers.h" // for WriteSnapshotToDumpFile
#include "LayerScope.h" // for LayerScope
-#include "gfxCrashReporterUtils.h" // for ScopedGfxFeatureReporter
#include "gfxEnv.h" // for gfxEnv
#include "gfxPlatform.h" // for gfxPlatform
#include "gfxPrefs.h" // for gfxPrefs
@@ -225,8 +224,6 @@ CompositorOGL::CleanupResources()
bool
CompositorOGL::Initialize(nsCString* const out_failureReason)
{
- ScopedGfxFeatureReporter reporter("GL Layers");
-
// Do not allow double initialization
MOZ_ASSERT(mGLContext == nullptr, "Don't reinitialize CompositorOGL");
@@ -424,8 +421,6 @@ CompositorOGL::Initialize(nsCString* const out_failureReason)
console->LogStringMessage(msg.get());
}
- reporter.SetSuccessful();
-
return true;
}
diff --git a/gfx/skia/skia/src/core/SkMath.cpp b/gfx/skia/skia/src/core/SkMath.cpp
index 84796c522..bf9a73da8 100644
--- a/gfx/skia/skia/src/core/SkMath.cpp
+++ b/gfx/skia/skia/src/core/SkMath.cpp
@@ -6,6 +6,7 @@
*/
#include "SkMathPriv.h"
+#include "SkSafeMath.h"
#include "SkFixed.h"
#include "SkFloatBits.h"
#include "SkFloatingPoint.h"
diff --git a/gfx/skia/skia/src/core/SkSafeMath.h b/gfx/skia/skia/src/core/SkSafeMath.h
index 0bc0fbfac..9948fd722 100644
--- a/gfx/skia/skia/src/core/SkSafeMath.h
+++ b/gfx/skia/skia/src/core/SkSafeMath.h
@@ -9,6 +9,8 @@
#define SkSafeMath_DEFINED
#include "SkTypes.h"
+#include "SkTFitsIn.h"
+#include <limits>
// SkSafeMath always check that a series of operations do not overflow.
// This must be correct for all platforms, because this is a check for safety at runtime.
diff --git a/gfx/src/gfxCrashReporterUtils.cpp b/gfx/src/gfxCrashReporterUtils.cpp
deleted file mode 100644
index 757c15527..000000000
--- a/gfx/src/gfxCrashReporterUtils.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "gfxCrashReporterUtils.h"
-
-#ifdef MOZ_GFXFEATUREREPORTER
-#include "gfxCrashReporterUtils.h"
-#include <string.h> // for strcmp
-#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2
-#include "mozilla/Services.h" // for GetObserverService
-#include "mozilla/StaticMutex.h"
-#include "mozilla/mozalloc.h" // for operator new, etc
-#include "mozilla/RefPtr.h" // for RefPtr
-#include "nsCOMPtr.h" // for nsCOMPtr
-#include "nsError.h" // for NS_OK, NS_FAILED, nsresult
-#include "nsExceptionHandler.h" // for AppendAppNotesToCrashReport
-#include "nsID.h"
-#include "nsIEventTarget.h" // for NS_DISPATCH_NORMAL
-#include "nsIObserver.h" // for nsIObserver, etc
-#include "nsIObserverService.h" // for nsIObserverService
-#include "nsIRunnable.h" // for nsIRunnable
-#include "nsISupports.h"
-#include "nsTArray.h" // for nsTArray
-#include "nsThreadUtils.h" // for NS_DispatchToMainThread, etc
-#include "nscore.h" // for NS_IMETHOD, NS_IMETHODIMP, etc
-
-namespace mozilla {
-
-static nsTArray<nsCString> *gFeaturesAlreadyReported = nullptr;
-static StaticMutex gFeaturesAlreadyReportedMutex;
-
-class ObserverToDestroyFeaturesAlreadyReported final : public nsIObserver
-{
-
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIOBSERVER
-
- ObserverToDestroyFeaturesAlreadyReported() {}
-private:
- virtual ~ObserverToDestroyFeaturesAlreadyReported() {}
-};
-
-NS_IMPL_ISUPPORTS(ObserverToDestroyFeaturesAlreadyReported,
- nsIObserver)
-
-NS_IMETHODIMP
-ObserverToDestroyFeaturesAlreadyReported::Observe(nsISupports* aSubject,
- const char* aTopic,
- const char16_t* aData)
-{
- if (!strcmp(aTopic, "xpcom-shutdown")) {
- StaticMutexAutoLock al(gFeaturesAlreadyReportedMutex);
- if (gFeaturesAlreadyReported) {
- delete gFeaturesAlreadyReported;
- gFeaturesAlreadyReported = nullptr;
- }
- }
- return NS_OK;
-}
-
-class RegisterObserverRunnable : public Runnable {
-public:
- NS_IMETHOD Run() override {
- // LeakLog made me do this. Basically, I just wanted gFeaturesAlreadyReported to be a static nsTArray<nsCString>,
- // and LeakLog was complaining about leaks like this:
- // leaked 1 instance of nsTArray_base with size 8 bytes
- // leaked 7 instances of nsStringBuffer with size 8 bytes each (56 bytes total)
- // So this is a work-around using a pointer, and using a nsIObserver to deallocate on xpcom shutdown.
- // Yay for fighting bloat.
- nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
- if (!observerService)
- return NS_OK;
- RefPtr<ObserverToDestroyFeaturesAlreadyReported> observer = new ObserverToDestroyFeaturesAlreadyReported;
- observerService->AddObserver(observer, "xpcom-shutdown", false);
- return NS_OK;
- }
-};
-
-class AppendAppNotesRunnable : public CancelableRunnable {
-public:
- explicit AppendAppNotesRunnable(const nsACString& aFeatureStr)
- : mFeatureString(aFeatureStr)
- {
- }
-
- NS_IMETHOD Run() override {
- CrashReporter::AppendAppNotesToCrashReport(mFeatureString);
- return NS_OK;
- }
-
-private:
- nsAutoCString mFeatureString;
-};
-
-void
-ScopedGfxFeatureReporter::WriteAppNote(char statusChar)
-{
- StaticMutexAutoLock al(gFeaturesAlreadyReportedMutex);
-
- if (!gFeaturesAlreadyReported) {
- gFeaturesAlreadyReported = new nsTArray<nsCString>;
- nsCOMPtr<nsIRunnable> r = new RegisterObserverRunnable();
- NS_DispatchToMainThread(r);
- }
-
- nsAutoCString featureString;
- featureString.AppendPrintf("%s%c ",
- mFeature,
- statusChar);
-
- if (!gFeaturesAlreadyReported->Contains(featureString)) {
- gFeaturesAlreadyReported->AppendElement(featureString);
- AppNote(featureString);
- }
-}
-
-void
-ScopedGfxFeatureReporter::AppNote(const nsACString& aMessage)
-{
- if (NS_IsMainThread()) {
- CrashReporter::AppendAppNotesToCrashReport(aMessage);
- } else {
- nsCOMPtr<nsIRunnable> r = new AppendAppNotesRunnable(aMessage);
- NS_DispatchToMainThread(r);
- }
-}
-
-} // end namespace mozilla
-
-#else
-
-namespace mozilla {
-void ScopedGfxFeatureReporter::WriteAppNote(char) {}
-void ScopedGfxFeatureReporter::AppNote(const nsACString&) {}
-
-} // namespace mozilla
-
-#endif
diff --git a/gfx/src/gfxCrashReporterUtils.h b/gfx/src/gfxCrashReporterUtils.h
deleted file mode 100644
index efc5ab1ab..000000000
--- a/gfx/src/gfxCrashReporterUtils.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef gfxCrashReporterUtils_h__
-#define gfxCrashReporterUtils_h__
-
-#include "nsString.h"
-
-namespace mozilla {
-
-/** \class ScopedGfxFeatureReporter
- *
- * On creation, adds "FeatureName?" to AppNotes
- * On destruction, adds "FeatureName-", or "FeatureName+" if you called SetSuccessful().
- *
- * Any such string is added at most once to AppNotes, and is subsequently skipped.
- *
- * This ScopedGfxFeatureReporter class is designed to be fool-proof to use in functions that
- * have many exit points. We don't want to encourage having function with many exit points.
- * It just happens that our graphics features initialization functions are like that.
- */
-class ScopedGfxFeatureReporter
-{
-public:
- explicit ScopedGfxFeatureReporter(const char *aFeature, bool aForce = false)
- : mFeature(aFeature), mStatusChar('-')
- {
- WriteAppNote(aForce ? '!' : '?');
- }
- ~ScopedGfxFeatureReporter() {
- WriteAppNote(mStatusChar);
- }
- void SetSuccessful() { mStatusChar = '+'; }
-
- static void AppNote(const nsACString& aMessage);
-
- class AppNoteWritingRunnable;
-
-protected:
- const char *mFeature;
- char mStatusChar;
-
-private:
- void WriteAppNote(char statusChar);
-};
-
-} // end namespace mozilla
-
-#endif // gfxCrashReporterUtils_h__
diff --git a/gfx/src/moz.build b/gfx/src/moz.build
index 3678eee7a..ea707a340 100644
--- a/gfx/src/moz.build
+++ b/gfx/src/moz.build
@@ -16,7 +16,6 @@ DEFINES['MOZ_APP_VERSION'] = '"%s"' % CONFIG['MOZ_APP_VERSION']
EXPORTS += [
'DriverCrashGuard.h',
'FilterSupport.h',
- 'gfxCrashReporterUtils.h',
'gfxTelemetry.h',
'nsBoundingMetrics.h',
'nsColor.h',
@@ -60,7 +59,6 @@ if CONFIG['MOZ_X11']:
UNIFIED_SOURCES += [
'DriverCrashGuard.cpp',
'FilterSupport.cpp',
- 'gfxCrashReporterUtils.cpp',
'gfxTelemetry.cpp',
'nsColor.cpp',
'nsFont.cpp',
diff --git a/gfx/thebes/ContextStateTracker.cpp b/gfx/thebes/ContextStateTracker.cpp
index e3659e5fc..a179abad9 100644
--- a/gfx/thebes/ContextStateTracker.cpp
+++ b/gfx/thebes/ContextStateTracker.cpp
@@ -5,9 +5,6 @@
#include "ContextStateTracker.h"
#include "GLContext.h"
-#ifdef MOZ_ENABLE_PROFILER_SPS
-#include "ProfilerMarkers.h"
-#endif
namespace mozilla {
@@ -110,15 +107,6 @@ ContextStateTrackerOGL::Flush(GLContext* aGL)
aGL->fDeleteQueries(1, &handle);
-#ifdef MOZ_ENABLE_PROFILER_SPS
- PROFILER_MARKER_PAYLOAD("gpu_timer_query", new GPUMarkerPayload(
- mCompletedSections[0].mCpuTimeStart,
- mCompletedSections[0].mCpuTimeEnd,
- 0,
- gpuTime
- ));
-#endif
-
mCompletedSections.RemoveElementAt(0);
}
}
diff --git a/gfx/thebes/DeviceManagerDx.cpp b/gfx/thebes/DeviceManagerDx.cpp
index c194f40f2..2f2693c76 100644
--- a/gfx/thebes/DeviceManagerDx.cpp
+++ b/gfx/thebes/DeviceManagerDx.cpp
@@ -389,7 +389,6 @@ DeviceManagerDx::CreateDevice(IDXGIAdapter* aAdapter,
void
DeviceManagerDx::CreateWARPCompositorDevice()
{
- ScopedGfxFeatureReporter reporterWARP("D3D11-WARP", gfxPrefs::LayersD3D11ForceWARP());
FeatureState& d3d11 = gfxConfig::GetFeature(Feature::D3D11_COMPOSITING);
HRESULT hr;
@@ -434,7 +433,6 @@ DeviceManagerDx::CreateWARPCompositorDevice()
}
mCompositorDevice->SetExceptionMode(0);
- reporterWARP.SetSuccessful();
}
FeatureStatus
diff --git a/gfx/thebes/DeviceManagerDx.h b/gfx/thebes/DeviceManagerDx.h
index ea6dd4846..e29ab0731 100644
--- a/gfx/thebes/DeviceManagerDx.h
+++ b/gfx/thebes/DeviceManagerDx.h
@@ -34,8 +34,6 @@ struct ID3D11Device;
struct IDirectDraw7;
namespace mozilla {
-class ScopedGfxFeatureReporter;
-
namespace gfx {
class FeatureState;
diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp
index 4db7bc29f..684117788 100644
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -18,7 +18,6 @@
#include "mozilla/Logging.h"
#include "mozilla/Services.h"
-#include "gfxCrashReporterUtils.h"
#include "gfxPlatform.h"
#include "gfxPrefs.h"
#include "gfxEnv.h"
@@ -650,7 +649,6 @@ gfxPlatform::Init()
gfxPrefs::CanvasAzureAccelerated(),
gfxPrefs::DisableGralloc(),
gfxPrefs::ForceShmemTiles());
- ScopedGfxFeatureReporter::AppNote(forcedPrefs);
}
InitMoz2DLogging();
diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp
index c68f622c6..a988859eb 100755
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -33,8 +33,6 @@
#include "nsIGfxInfo.h"
-#include "gfxCrashReporterUtils.h"
-
#include "gfxGDIFontList.h"
#include "gfxGDIFont.h"
@@ -400,7 +398,6 @@ gfxWindowsPlatform::InitDWriteSupport()
return false;
}
- mozilla::ScopedGfxFeatureReporter reporter("DWrite");
decltype(DWriteCreateFactory)* createDWriteFactory = (decltype(DWriteCreateFactory)*)
GetProcAddress(LoadLibraryW(L"dwrite.dll"), "DWriteCreateFactory");
if (!createDWriteFactory) {
@@ -422,7 +419,6 @@ gfxWindowsPlatform::InitDWriteSupport()
Factory::SetDWriteFactory(mDWriteFactory);
SetupClearTypeParams();
- reporter.SetSuccessful();
return true;
}
@@ -1569,8 +1565,6 @@ gfxWindowsPlatform::InitializeD2DConfig()
void
gfxWindowsPlatform::InitializeD2D()
{
- ScopedGfxFeatureReporter d2d1_1("D2D1.1");
-
FeatureState& d2d1 = gfxConfig::GetFeature(Feature::DIRECT2D);
DeviceManagerDx* dm = DeviceManagerDx::Get();
@@ -1621,7 +1615,6 @@ gfxWindowsPlatform::InitializeD2D()
}
MOZ_ASSERT(d2d1.IsEnabled());
- d2d1_1.SetSuccessful();
}
bool
diff --git a/gfx/thebes/gfxWindowsPlatform.h b/gfx/thebes/gfxWindowsPlatform.h
index f77d9a87a..f401038fc 100644
--- a/gfx/thebes/gfxWindowsPlatform.h
+++ b/gfx/thebes/gfxWindowsPlatform.h
@@ -13,7 +13,6 @@
*/
#include "cairo-win32.h"
-#include "gfxCrashReporterUtils.h"
#include "gfxFontUtils.h"
#include "gfxWindowsSurface.h"
#include "gfxFont.h"
diff --git a/image/decoders/nsPNGDecoder.cpp b/image/decoders/nsPNGDecoder.cpp
index 0f385b339..9596ae7d6 100644
--- a/image/decoders/nsPNGDecoder.cpp
+++ b/image/decoders/nsPNGDecoder.cpp
@@ -34,13 +34,18 @@ namespace image {
static LazyLogModule sPNGLog("PNGDecoder");
static LazyLogModule sPNGDecoderAccountingLog("PNGDecoderAccounting");
-// limit image dimensions (bug #251381, #591822, #967656, and #1283961)
+// Limit image dimensions.
#ifndef MOZ_PNG_MAX_WIDTH
-# define MOZ_PNG_MAX_WIDTH 0x7fffffff // Unlimited
+# define MOZ_PNG_MAX_WIDTH 65535
#endif
#ifndef MOZ_PNG_MAX_HEIGHT
-# define MOZ_PNG_MAX_HEIGHT 0x7fffffff // Unlimited
+# define MOZ_PNG_MAX_HEIGHT 65535
#endif
+// Maximum area supported in pixels (W*H)
+#ifndef MOZ_PNG_MAX_PIX
+# define MOZ_PNG_MAX_PIX 268435456 // 256 Mpix = 16Ki x 16Ki
+#endif
+
nsPNGDecoder::AnimFrameInfo::AnimFrameInfo()
: mDispose(DisposalMethod::KEEP)
@@ -568,6 +573,13 @@ nsPNGDecoder::info_callback(png_structp png_ptr, png_infop info_ptr)
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
&interlace_type, &compression_type, &filter_type);
+ // Check sizes against cap limits and W*H
+ if ((width > MOZ_PNG_MAX_WIDTH) ||
+ (height > MOZ_PNG_MAX_HEIGHT) ||
+ (width * height > MOZ_PNG_MAX_PIX)) {
+ png_error(decoder->mPNG, "Image too large");
+ }
+
const IntRect frameRect(0, 0, width, height);
// Post our size to the superclass
diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp
index 5e5ee7829..f7fb657bd 100644
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -607,19 +607,6 @@ ShouldLoadCachedImage(imgRequest* aImgRequest,
}
}
- bool sendPriming = false;
- bool mixedContentWouldBlock = false;
- rv = nsMixedContentBlocker::GetHSTSPrimingFromRequestingContext(contentLocation,
- aLoadingContext, &sendPriming, &mixedContentWouldBlock);
- if (NS_FAILED(rv)) {
- return false;
- }
- if (sendPriming && mixedContentWouldBlock) {
- // if either of the securty checks above would cause a priming request, we
- // can't load this image from the cache, so go ahead and return false here
- return false;
- }
-
return true;
}
diff --git a/intl/hyphenation/glue/hnjalloc.h b/intl/hyphenation/glue/hnjalloc.h
index fec3a4bc9..5cee1be1b 100644
--- a/intl/hyphenation/glue/hnjalloc.h
+++ b/intl/hyphenation/glue/hnjalloc.h
@@ -31,6 +31,8 @@
#define fopen(path,mode) hnjFopen(path,mode)
#define fclose(file) hnjFclose(file)
#define fgets(buf,count,file) hnjFgets(buf,count,file)
+#define feof(file) hnjFeof(file)
+#define fgetc(file) hnjFgetc(file)
typedef struct hnjFile_ hnjFile;
@@ -44,6 +46,10 @@ int hnjFclose(hnjFile* f);
char* hnjFgets(char* s, int n, hnjFile* f);
+int hnjFeof(hnjFile* f);
+
+int hnjFgetc(hnjFile* f);
+
#ifdef __cplusplus
}
#endif
diff --git a/intl/hyphenation/glue/hnjstdio.cpp b/intl/hyphenation/glue/hnjstdio.cpp
index 660ebaf13..5be8b7c1d 100644
--- a/intl/hyphenation/glue/hnjstdio.cpp
+++ b/intl/hyphenation/glue/hnjstdio.cpp
@@ -22,6 +22,7 @@ struct hnjFile_ {
char mBuffer[BUFSIZE];
uint32_t mCurPos;
uint32_t mLimit;
+ bool mEOF;
};
// replacement for fopen()
@@ -58,6 +59,7 @@ hnjFopen(const char* aURISpec, const char* aMode)
f->mStream = instream;
f->mCurPos = 0;
f->mLimit = 0;
+ f->mEOF = false;
return f;
}
@@ -79,6 +81,27 @@ hnjFclose(hnjFile* f)
return result;
}
+// replacement for fgetc()
+int
+hnjFgetc(hnjFile* f)
+{
+ if (f->mCurPos >= f->mLimit) {
+ f->mCurPos = 0;
+
+ nsresult rv = f->mStream->Read(f->mBuffer, BUFSIZE, &f->mLimit);
+ if (NS_FAILED(rv)) {
+ f->mLimit = 0;
+ }
+
+ if (f->mLimit == 0) {
+ f->mEOF = true;
+ return EOF;
+ }
+ }
+
+ return f->mBuffer[f->mCurPos++];
+}
+
// replacement for fgets()
// (not a full reimplementation, but sufficient for libhyphen's needs)
char*
@@ -88,24 +111,15 @@ hnjFgets(char* s, int n, hnjFile* f)
int i = 0;
while (i < n - 1) {
- if (f->mCurPos < f->mLimit) {
- char c = f->mBuffer[f->mCurPos++];
- s[i++] = c;
- if (c == '\n' || c == '\r') {
- break;
- }
- continue;
- }
-
- f->mCurPos = 0;
+ int c = hnjFgetc(f);
- nsresult rv = f->mStream->Read(f->mBuffer, BUFSIZE, &f->mLimit);
- if (NS_FAILED(rv)) {
- f->mLimit = 0;
- return nullptr;
+ if (c == EOF) {
+ break;
}
- if (f->mLimit == 0) {
+ s[i++] = c;
+
+ if (c == '\n' || c == '\r') {
break;
}
}
@@ -117,3 +131,10 @@ hnjFgets(char* s, int n, hnjFile* f)
s[i] = '\0'; // null-terminate the returned string
return s;
}
+
+
+int
+hnjFeof(hnjFile* f)
+{
+ return f->mEOF ? EOF : 0;
+} \ No newline at end of file
diff --git a/intl/hyphenation/hyphen/hyphen.c b/intl/hyphenation/hyphen/hyphen.c
index 9a132d026..9f2b7112c 100644
--- a/intl/hyphenation/hyphen/hyphen.c
+++ b/intl/hyphenation/hyphen/hyphen.c
@@ -438,11 +438,25 @@ for (k = 0; k < 2; k++) {
}
if (k == 0 || nextlevel) {
- while (fgets (buf, sizeof(buf), f) != NULL) {
+ while (fgets(buf, sizeof(buf), f) != NULL) {
+
+ /* discard lines that don't fit in buffer */
+ if (!feof(f) && strchr(buf, '\n') == NULL) {
+ int c;
+ while ((c = fgetc(f)) != '\n' && c != EOF);
+ /* issue warning if not a comment */
+ if (buf[0] != '%') {
+ fprintf(stderr, "Warning: skipping too long pattern (more than %lu chars)\n", sizeof(buf));
+ }
+ continue;
+ }
+
if (strncmp(buf, "NEXTLEVEL", 9) == 0) {
- nextlevel = 1;
- break;
- } else if (buf[0] != '%') hnj_hyphen_load_line(buf, dict[k], hashtab);
+ nextlevel = 1;
+ break;
+ } else if (buf[0] != '%') {
+ hnj_hyphen_load_line(buf, dict[k], hashtab);
+ }
}
} else if (k == 1) {
/* default first level: hyphen and ASCII apostrophe */
diff --git a/ipc/glue/BackgroundUtils.cpp b/ipc/glue/BackgroundUtils.cpp
index e115fa74c..44f988efd 100644
--- a/ipc/glue/BackgroundUtils.cpp
+++ b/ipc/glue/BackgroundUtils.cpp
@@ -295,9 +295,8 @@ LoadInfoToLoadInfoArgs(nsILoadInfo *aLoadInfo,
aLoadInfo->CorsUnsafeHeaders(),
aLoadInfo->GetForcePreflight(),
aLoadInfo->GetIsPreflight(),
- aLoadInfo->GetLoadTriggeredFromExternal(),
- aLoadInfo->GetForceHSTSPriming(),
- aLoadInfo->GetMixedContentWouldBlock());
+ aLoadInfo->GetLoadTriggeredFromExternal()
+ );
return NS_OK;
}
@@ -373,9 +372,7 @@ LoadInfoArgsToLoadInfo(const OptionalLoadInfoArgs& aOptionalLoadInfoArgs,
loadInfoArgs.corsUnsafeHeaders(),
loadInfoArgs.forcePreflight(),
loadInfoArgs.isPreflight(),
- loadInfoArgs.loadTriggeredFromExternal(),
- loadInfoArgs.forceHSTSPriming(),
- loadInfoArgs.mixedContentWouldBlock()
+ loadInfoArgs.loadTriggeredFromExternal()
);
loadInfo.forget(outLoadInfo);
diff --git a/ipc/glue/CrashReporterClient.cpp b/ipc/glue/CrashReporterClient.cpp
deleted file mode 100644
index 004ca3b57..000000000
--- a/ipc/glue/CrashReporterClient.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "CrashReporterClient.h"
-#include "CrashReporterMetadataShmem.h"
-#include "nsISupportsImpl.h"
-
-namespace mozilla {
-namespace ipc {
-
-StaticMutex CrashReporterClient::sLock;
-StaticRefPtr<CrashReporterClient> CrashReporterClient::sClientSingleton;
-
-CrashReporterClient::CrashReporterClient(const Shmem& aShmem)
- : mMetadata(new CrashReporterMetadataShmem(aShmem))
-{
- MOZ_COUNT_CTOR(CrashReporterClient);
-}
-
-CrashReporterClient::~CrashReporterClient()
-{
- MOZ_COUNT_DTOR(CrashReporterClient);
-}
-
-void
-CrashReporterClient::AnnotateCrashReport(const nsCString& aKey, const nsCString& aData)
-{
- StaticMutexAutoLock lock(sLock);
- mMetadata->AnnotateCrashReport(aKey, aData);
-}
-
-void
-CrashReporterClient::AppendAppNotes(const nsCString& aData)
-{
- StaticMutexAutoLock lock(sLock);
- mMetadata->AppendAppNotes(aData);
-}
-
-/* static */ void
-CrashReporterClient::InitSingletonWithShmem(const Shmem& aShmem)
-{
- StaticMutexAutoLock lock(sLock);
-
- MOZ_ASSERT(!sClientSingleton);
- sClientSingleton = new CrashReporterClient(aShmem);
-}
-
-/* static */ void
-CrashReporterClient::DestroySingleton()
-{
- StaticMutexAutoLock lock(sLock);
- sClientSingleton = nullptr;
-}
-
-/* static */ RefPtr<CrashReporterClient>
-CrashReporterClient::GetSingleton()
-{
- StaticMutexAutoLock lock(sLock);
- return sClientSingleton;
-}
-
-} // namespace ipc
-} // namespace mozilla
diff --git a/ipc/glue/CrashReporterClient.h b/ipc/glue/CrashReporterClient.h
deleted file mode 100644
index 512533da8..000000000
--- a/ipc/glue/CrashReporterClient.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_ipc_CrashReporterClient_h
-#define mozilla_ipc_CrashReporterClient_h
-
-#include "mozilla/StaticMutex.h"
-#include "mozilla/StaticPtr.h"
-#include "mozilla/Unused.h"
-#include "mozilla/ipc/Shmem.h"
-
-namespace mozilla {
-namespace ipc {
-
-class CrashReporterMetadataShmem;
-
-class CrashReporterClient
-{
-public:
- NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CrashReporterClient);
-
- // |aTopLevelProtocol| must be a top-level protocol instance, as sub-actors
- // do not have AllocUnsafeShmem. It must also have a child-to-parent message:
- //
- // async SetCrashReporterClient(Shmem shmem);
- //
- // The parent-side receive function of this message should save the shmem
- // somewhere, and when the top-level actor's ActorDestroy runs (or when the
- // crash reporter needs metadata), the shmem should be parsed.
- template <typename T>
- static bool InitSingleton(T* aToplevelProtocol) {
- // 16KB should be enough for most metadata - see bug 1278717 comment #11.
- static const size_t kShmemSize = 16 * 1024;
-
- Shmem shmem;
- bool rv = aToplevelProtocol->AllocUnsafeShmem(
- kShmemSize,
- SharedMemory::TYPE_BASIC,
- &shmem);
- if (!rv) {
- return false;
- }
-
- InitSingletonWithShmem(shmem);
- Unused << aToplevelProtocol->SendInitCrashReporter(shmem);
- return true;
- }
-
- static void DestroySingleton();
- static RefPtr<CrashReporterClient> GetSingleton();
-
- void AnnotateCrashReport(const nsCString& aKey, const nsCString& aData);
- void AppendAppNotes(const nsCString& aData);
-
-private:
- explicit CrashReporterClient(const Shmem& aShmem);
- ~CrashReporterClient();
-
- static void InitSingletonWithShmem(const Shmem& aShmem);
-
-private:
- static StaticMutex sLock;
- static StaticRefPtr<CrashReporterClient> sClientSingleton;
-
-private:
- UniquePtr<CrashReporterMetadataShmem> mMetadata;
-};
-
-} // namespace ipc
-} // namespace mozilla
-
-#endif // mozilla_ipc_CrashReporterClient_h
-
diff --git a/ipc/glue/CrashReporterHost.cpp b/ipc/glue/CrashReporterHost.cpp
deleted file mode 100644
index 85552cba5..000000000
--- a/ipc/glue/CrashReporterHost.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "CrashReporterHost.h"
-#include "CrashReporterMetadataShmem.h"
-#include "mozilla/Sprintf.h"
-#include "mozilla/SyncRunnable.h"
-#include "mozilla/Telemetry.h"
-
-namespace mozilla {
-namespace ipc {
-
-CrashReporterHost::CrashReporterHost(GeckoProcessType aProcessType,
- const Shmem& aShmem)
- : mProcessType(aProcessType),
- mShmem(aShmem),
- mStartTime(::time(nullptr))
-{
-}
-
-} // namespace ipc
-} // namespace mozilla
diff --git a/ipc/glue/CrashReporterHost.h b/ipc/glue/CrashReporterHost.h
deleted file mode 100644
index 1089781c5..000000000
--- a/ipc/glue/CrashReporterHost.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_ipc_CrashReporterHost_h
-#define mozilla_ipc_CrashReporterHost_h
-
-#include "mozilla/UniquePtr.h"
-#include "mozilla/ipc/Shmem.h"
-#include "base/process.h"
-#include "nsExceptionHandler.h"
-
-namespace mozilla {
-namespace ipc {
-
-// This is the newer replacement for CrashReporterParent. It is created in
-// response to a InitCrashReporter message on a top-level actor, and simply
-// holds the metadata shmem alive until the process ends. When the process
-// terminates abnormally, the top-level should call GenerateCrashReport to
-// automatically integrate metadata.
-class CrashReporterHost
-{
- typedef mozilla::ipc::Shmem Shmem;
- typedef CrashReporter::AnnotationTable AnnotationTable;
-
-public:
- CrashReporterHost(GeckoProcessType aProcessType, const Shmem& aShmem);
-
-private:
- void GenerateCrashReport(RefPtr<nsIFile> aCrashDump);
-
-private:
- GeckoProcessType mProcessType;
- Shmem mShmem;
- time_t mStartTime;
-};
-
-} // namespace ipc
-} // namespace mozilla
-
-#endif // mozilla_ipc_CrashReporterHost_h
diff --git a/ipc/glue/CrashReporterMetadataShmem.cpp b/ipc/glue/CrashReporterMetadataShmem.cpp
deleted file mode 100644
index 5b889948b..000000000
--- a/ipc/glue/CrashReporterMetadataShmem.cpp
+++ /dev/null
@@ -1,212 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "CrashReporterMetadataShmem.h"
-#include "mozilla/Attributes.h"
-#include "nsISupportsImpl.h"
-
-namespace mozilla {
-namespace ipc {
-
-enum class EntryType : uint8_t {
- None,
- Annotation,
-};
-
-CrashReporterMetadataShmem::CrashReporterMetadataShmem(const Shmem& aShmem)
- : mShmem(aShmem)
-{
- MOZ_COUNT_CTOR(CrashReporterMetadataShmem);
-}
-
-CrashReporterMetadataShmem::~CrashReporterMetadataShmem()
-{
- MOZ_COUNT_DTOR(CrashReporterMetadataShmem);
-}
-
-void
-CrashReporterMetadataShmem::AnnotateCrashReport(const nsCString& aKey, const nsCString& aData)
-{
- mNotes.Put(aKey, aData);
- SyncNotesToShmem();
-}
-
-void
-CrashReporterMetadataShmem::AppendAppNotes(const nsCString& aData)
-{
- mAppNotes.Append(aData);
- mNotes.Put(NS_LITERAL_CSTRING("Notes"), mAppNotes);
- SyncNotesToShmem();
-}
-
-class MOZ_STACK_CLASS MetadataShmemWriter
-{
-public:
- explicit MetadataShmemWriter(const Shmem& aShmem)
- : mCursor(aShmem.get<uint8_t>()),
- mEnd(mCursor + aShmem.Size<uint8_t>())
- {
- *mCursor = uint8_t(EntryType::None);
- }
-
- MOZ_MUST_USE bool WriteAnnotation(const nsCString& aKey, const nsCString& aValue) {
- // This shouldn't happen because Commit() guarantees mCursor < mEnd. But
- // we might as well be safe.
- if (mCursor >= mEnd) {
- return false;
- }
-
- // Save the current position so we can write the entry type if the entire
- // entry fits.
- uint8_t* start = mCursor++;
- if (!Write(aKey) || !Write(aValue)) {
- return false;
- }
- return Commit(start, EntryType::Annotation);
- }
-
-private:
- // On success, append a new terminal byte. On failure, rollback the cursor.
- MOZ_MUST_USE bool Commit(uint8_t* aStart, EntryType aType) {
- MOZ_ASSERT(aStart < mEnd);
- MOZ_ASSERT(EntryType(*aStart) == EntryType::None);
-
- if (mCursor >= mEnd) {
- // No room for a terminating byte - rollback.
- mCursor = aStart;
- return false;
- }
-
- // Commit the entry and write a new terminal byte.
- *aStart = uint8_t(aType);
- *mCursor = uint8_t(EntryType::None);
- return true;
- }
-
- MOZ_MUST_USE bool Write(const nsCString& aString) {
- // 32-bit length is okay since our shmems are very small (16K),
- // a huge write would fail anyway.
- return Write(static_cast<uint32_t>(aString.Length())) &&
- Write(aString.get(), aString.Length());
- }
-
- template <typename T>
- MOZ_MUST_USE bool Write(const T& aT) {
- return Write(&aT, sizeof(T));
- }
-
- MOZ_MUST_USE bool Write(const void* aData, size_t aLength) {
- if (size_t(mEnd - mCursor) < aLength) {
- return false;
- }
- memcpy(mCursor, aData, aLength);
- mCursor += aLength;
- return true;
- }
-
- private:
- // The cursor (beginning at start) always points to a single byte
- // representing the next EntryType. An EntryType is either None,
- // indicating there are no more entries, or Annotation, meaning
- // two strings follow.
- //
- // Strings are written as a 32-bit length and byte sequence. After each new
- // entry, a None entry is always appended, and a subsequent entry will
- // overwrite this byte.
- uint8_t* mCursor;
- uint8_t* mEnd;
-};
-
-void
-CrashReporterMetadataShmem::SyncNotesToShmem()
-{
- MetadataShmemWriter writer(mShmem);
-
- for (auto it = mNotes.Iter(); !it.Done(); it.Next()) {
- nsCString key = nsCString(it.Key());
- nsCString value = nsCString(it.Data());
- if (!writer.WriteAnnotation(key, value)) {
- return;
- }
- }
-}
-
-// Helper class to iterate over metadata entries encoded in shmem.
-class MOZ_STACK_CLASS MetadataShmemReader
-{
-public:
- explicit MetadataShmemReader(const Shmem& aShmem)
- : mEntryType(EntryType::None)
- {
- mCursor = aShmem.get<uint8_t>();
- mEnd = mCursor + aShmem.Size<uint8_t>();
-
- // Advance to the first item, if any.
- Next();
- }
-
- bool Done() const {
- return mCursor >= mEnd || Type() == EntryType::None;
- }
- EntryType Type() const {
- return mEntryType;
- }
- void Next() {
- if (mCursor < mEnd) {
- mEntryType = EntryType(*mCursor++);
- } else {
- mEntryType = EntryType::None;
- }
- }
-
- bool Read(nsCString& aOut) {
- uint32_t length = 0;
- if (!Read(&length)) {
- return false;
- }
-
- const uint8_t* src = Read(length);
- if (!src) {
- return false;
- }
-
- aOut.Assign((const char *)src, length);
- return true;
- }
-
-private:
- template <typename T>
- bool Read(T* aOut) {
- return Read(aOut, sizeof(T));
- }
- bool Read(void* aOut, size_t aLength) {
- const uint8_t* src = Read(aLength);
- if (!src) {
- return false;
- }
- memcpy(aOut, src, aLength);
- return true;
- }
-
- // If buffer has |aLength| bytes, return cursor and then advance it.
- // Otherwise, return null.
- const uint8_t* Read(size_t aLength) {
- if (size_t(mEnd - mCursor) < aLength) {
- return nullptr;
- }
- const uint8_t* result = mCursor;
- mCursor += aLength;
- return result;
- }
-
-private:
- const uint8_t* mCursor;
- const uint8_t* mEnd;
- EntryType mEntryType;
-};
-
-} // namespace ipc
-} // namespace mozilla
diff --git a/ipc/glue/CrashReporterMetadataShmem.h b/ipc/glue/CrashReporterMetadataShmem.h
deleted file mode 100644
index ad67c6d75..000000000
--- a/ipc/glue/CrashReporterMetadataShmem.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_ipc_CrashReporterMetadataShmem_h
-#define mozilla_ipc_CrashReporterMetadataShmem_h
-
-#include <stdint.h>
-#include "mozilla/ipc/Shmem.h"
-#include "nsExceptionHandler.h"
-#include "nsString.h"
-
-namespace mozilla {
-namespace ipc {
-
-class CrashReporterMetadataShmem
-{
- typedef mozilla::ipc::Shmem Shmem;
- typedef CrashReporter::AnnotationTable AnnotationTable;
-
-public:
- explicit CrashReporterMetadataShmem(const Shmem& aShmem);
- ~CrashReporterMetadataShmem();
-
- // Metadata writers. These must only be called in child processes.
- void AnnotateCrashReport(const nsCString& aKey, const nsCString& aData);
- void AppendAppNotes(const nsCString& aData);
-
-private:
- void SyncNotesToShmem();
-
-private:
- Shmem mShmem;
-
- AnnotationTable mNotes;
- nsCString mAppNotes;
-};
-
-} // namespace ipc
-} // namespace mozilla
-
-#endif // mozilla_ipc_CrashReporterMetadataShmem_h
diff --git a/ipc/glue/moz.build b/ipc/glue/moz.build
index 8caee1ffe..d0d9f9937 100644
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -15,9 +15,6 @@ EXPORTS.mozilla.ipc += [
'BackgroundParent.h',
'BackgroundUtils.h',
'BrowserProcessSubThread.h',
- 'CrashReporterClient.h',
- 'CrashReporterHost.h',
- 'CrashReporterMetadataShmem.h',
'CrossProcessMutex.h',
'FileDescriptor.h',
'FileDescriptorSetChild.h',
@@ -122,9 +119,6 @@ UNIFIED_SOURCES += [
'BackgroundImpl.cpp',
'BackgroundUtils.cpp',
'BrowserProcessSubThread.cpp',
- 'CrashReporterClient.cpp',
- 'CrashReporterHost.cpp',
- 'CrashReporterMetadataShmem.cpp',
'FileDescriptor.cpp',
'FileDescriptorUtils.cpp',
'InputStreamUtils.cpp',
diff --git a/js/ipc/JavaScriptParent.cpp b/js/ipc/JavaScriptParent.cpp
index 7fe92d662..ca0a0bd21 100644
--- a/js/ipc/JavaScriptParent.cpp
+++ b/js/ipc/JavaScriptParent.cpp
@@ -16,6 +16,7 @@
#include "xpcprivate.h"
#include "mozilla/Casting.h"
#include "mozilla/Telemetry.h"
+#include "mozilla/Unused.h"
#include "nsAutoPtr.h"
using namespace js;
diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp
index 8862bca32..f352607d4 100644
--- a/js/xpconnect/src/XPCJSContext.cpp
+++ b/js/xpconnect/src/XPCJSContext.cpp
@@ -1528,12 +1528,6 @@ XPCJSContext::~XPCJSContext()
delete mDyingWrappedNativeProtoMap;
mDyingWrappedNativeProtoMap = nullptr;
-#ifdef MOZ_ENABLE_PROFILER_SPS
- // Tell the profiler that the context is gone
- if (PseudoStack* stack = mozilla_get_pseudo_stack())
- stack->sampleContext(nullptr);
-#endif
-
Preferences::UnregisterCallback(ReloadPrefsCallback, JS_OPTIONS_DOT_STR, this);
}
@@ -3382,10 +3376,6 @@ XPCJSContext::Initialize()
JS_AddWeakPointerCompartmentCallback(cx, WeakPointerCompartmentCallback, this);
JS_SetWrapObjectCallbacks(cx, &WrapObjectCallbacks);
js::SetPreserveWrapperCallback(cx, PreserveWrapper);
-#ifdef MOZ_ENABLE_PROFILER_SPS
- if (PseudoStack* stack = mozilla_get_pseudo_stack())
- stack->sampleContext(cx);
-#endif
JS_SetAccumulateTelemetryCallback(cx, AccumulateTelemetryCallback);
js::SetActivityCallback(cx, ActivityCallback, this);
JS_AddInterruptCallback(cx, InterruptCallback);
diff --git a/layout/base/RestyleTracker.cpp b/layout/base/RestyleTracker.cpp
index 7d68058d1..a954fda1a 100644
--- a/layout/base/RestyleTracker.cpp
+++ b/layout/base/RestyleTracker.cpp
@@ -61,9 +61,6 @@ RestyleTracker::Document() const {
struct RestyleEnumerateData : RestyleTracker::Hints {
RefPtr<dom::Element> mElement;
-#if defined(MOZ_ENABLE_PROFILER_SPS)
- UniquePtr<ProfilerBacktrace> mBacktrace;
-#endif
};
inline void
@@ -257,12 +254,6 @@ RestyleTracker::DoProcessRestyles()
data->mRestyleHint, MarkerTracingType::START)));
}
-#if defined(MOZ_ENABLE_PROFILER_SPS)
- Maybe<GeckoProfilerTracingRAII> profilerRAII;
- if (profiler_feature_active("restyle")) {
- profilerRAII.emplace("Paint", "Styles", Move(data->mBacktrace));
- }
-#endif
ProcessOneRestyle(element, data->mRestyleHint, data->mChangeHint,
data->mRestyleHintData);
AddRestyleRootsIfAwaitingRestyle(data->mDescendants);
@@ -337,9 +328,6 @@ RestyleTracker::DoProcessRestyles()
// We can move data since we'll be clearing mPendingRestyles after
// we finish enumerating it.
restyle->mRestyleHintData = Move(data->mRestyleHintData);
-#if defined(MOZ_ENABLE_PROFILER_SPS)
- restyle->mBacktrace = Move(data->mBacktrace);
-#endif
#ifdef RESTYLE_LOGGING
count++;
@@ -365,12 +353,6 @@ RestyleTracker::DoProcessRestyles()
index++, count);
LOG_RESTYLE_INDENT();
-#if defined(MOZ_ENABLE_PROFILER_SPS)
- Maybe<GeckoProfilerTracingRAII> profilerRAII;
- if (profiler_feature_active("restyle")) {
- profilerRAII.emplace("Paint", "Styles", Move(currentRestyle->mBacktrace));
- }
-#endif
if (isTimelineRecording) {
timelines->AddMarkerForDocShell(docShell, Move(
MakeUnique<RestyleTimelineMarker>(
diff --git a/layout/base/RestyleTracker.h b/layout/base/RestyleTracker.h
index 10a653cdb..5eb393e16 100644
--- a/layout/base/RestyleTracker.h
+++ b/layout/base/RestyleTracker.h
@@ -22,10 +22,6 @@
#include "GeckoProfiler.h"
#include "mozilla/Maybe.h"
-#if defined(MOZ_ENABLE_PROFILER_SPS)
-#include "ProfilerBacktrace.h"
-#endif
-
namespace mozilla {
class RestyleManager;
@@ -128,9 +124,6 @@ public:
// that we called AddPendingRestyle for and found the element this is
// the RestyleData for as its nearest restyle root.
nsTArray<RefPtr<Element>> mDescendants;
-#if defined(MOZ_ENABLE_PROFILER_SPS)
- UniquePtr<ProfilerBacktrace> mBacktrace;
-#endif
};
/**
@@ -265,11 +258,6 @@ RestyleTracker::AddPendingRestyleToTable(Element* aElement,
if (!existingData) {
RestyleData* rd =
new RestyleData(aRestyleHint, aMinChangeHint, aRestyleHintData);
-#if defined(MOZ_ENABLE_PROFILER_SPS)
- if (profiler_feature_active("restyle")) {
- rd->mBacktrace.reset(profiler_get_backtrace());
- }
-#endif
mPendingRestyles.Put(aElement, rd);
return false;
}
diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp
index 137efb3cd..7b8734928 100644
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -1012,7 +1012,13 @@ nsDocumentViewer::LoadComplete(nsresult aStatus)
nsIDocShell *docShell = window->GetDocShell();
NS_ENSURE_TRUE(docShell, NS_ERROR_UNEXPECTED);
- docShell->GetRestoringDocument(&restoring);
+ // Unfortunately, docShell->GetRestoringDocument() might no longer be set
+ // correctly. In particular, it can be false by now if someone took it upon
+ // themselves to block onload from inside restoration and unblock it later.
+ // But we can detect the restoring case very simply: by whether our
+ // document's readyState is COMPLETE.
+ restoring = (mDocument->GetReadyStateEnum() ==
+ nsIDocument::READYSTATE_COMPLETE);
if (!restoring) {
NS_ASSERTION(mDocument->IsXULDocument() || // readyState for XUL is bogus
mDocument->GetReadyStateEnum() ==
@@ -1023,6 +1029,13 @@ nsDocumentViewer::LoadComplete(nsresult aStatus)
nsIDocument::READYSTATE_UNINITIALIZED &&
NS_IsAboutBlank(mDocument->GetDocumentURI())),
"Bad readystate");
+#ifdef DEBUG
+ bool docShellThinksWeAreRestoring;
+ docShell->GetRestoringDocument(&docShellThinksWeAreRestoring);
+ MOZ_ASSERT(!docShellThinksWeAreRestoring,
+ "How can docshell think we are restoring if we don't have a "
+ "READYSTATE_COMPLETE document?");
+#endif // DEBUG
nsCOMPtr<nsIDocument> d = mDocument;
mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_COMPLETE);
diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp
index 4a54a8432..3106ff386 100644
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -1307,10 +1307,15 @@ nsPresContext::SetFullZoom(float aZoom)
void
nsPresContext::SetOverrideDPPX(float aDPPX)
{
- mOverrideDPPX = aDPPX;
-
- if (HasCachedStyleData()) {
- MediaFeatureValuesChanged(nsRestyleHint(0), nsChangeHint(0));
+ // SetOverrideDPPX is called during navigations, including history
+ // traversals. In that case, it's typically called with our current value,
+ // and we don't need to actually do anything.
+ if (aDPPX != mOverrideDPPX) {
+ mOverrideDPPX = aDPPX;
+
+ if (HasCachedStyleData()) {
+ MediaFeatureValuesChanged(nsRestyleHint(0), nsChangeHint(0));
+ }
}
}
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp
index 0b88948c3..3e5320c22 100644
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -4064,23 +4064,6 @@ PresShell::FlushPendingNotifications(mozilla::ChangesToFlush aFlush)
*/
mozFlushType flushType = aFlush.mFlushType;
-#ifdef MOZ_ENABLE_PROFILER_SPS
- static const char flushTypeNames[][20] = {
- "Content",
- "ContentAndNotify",
- "Style",
- "InterruptibleLayout",
- "Layout",
- "Display"
- };
-
- // Make sure that we don't miss things added to mozFlushType!
- MOZ_ASSERT(static_cast<uint32_t>(flushType) <= ArrayLength(flushTypeNames));
-
- PROFILER_LABEL_PRINTF("PresShell", "Flush",
- js::ProfileEntry::Category::GRAPHICS, "(Flush_%s)", flushTypeNames[flushType - 1]);
-#endif
-
#ifdef ACCESSIBILITY
#ifdef DEBUG
nsAccessibilityService* accService = GetAccService();
diff --git a/media/libopus/silk/NLSF_stabilize.c b/media/libopus/silk/NLSF_stabilize.c
index 1fa1ea379..8f3426b91 100644
--- a/media/libopus/silk/NLSF_stabilize.c
+++ b/media/libopus/silk/NLSF_stabilize.c
@@ -130,7 +130,7 @@ void silk_NLSF_stabilize(
/* Keep delta_min distance between the NLSFs */
for( i = 1; i < L; i++ )
- NLSF_Q15[i] = silk_max_int( NLSF_Q15[i], NLSF_Q15[i-1] + NDeltaMin_Q15[i] );
+ NLSF_Q15[i] = silk_max_int( NLSF_Q15[i], silk_ADD_SAT16( NLSF_Q15[i-1], NDeltaMin_Q15[i] ) );
/* Last NLSF should be no higher than 1 - NDeltaMin[L] */
NLSF_Q15[L-1] = silk_min_int( NLSF_Q15[L-1], (1<<15) - NDeltaMin_Q15[L] );
diff --git a/media/mtransport/third_party/nICEr/nicer.gyp b/media/mtransport/third_party/nICEr/nicer.gyp
index 9df4a4b28..470fa8eb6 100644
--- a/media/mtransport/third_party/nICEr/nicer.gyp
+++ b/media/mtransport/third_party/nICEr/nicer.gyp
@@ -231,18 +231,6 @@
'sources': [
],
}],
- ['moz_widget_toolkit_gonk==1', {
- 'defines' : [
- 'WEBRTC_GONK',
- 'NO_REG_RPC',
- ],
- }],
- # Gonk has its own nr_stun_get_addrs implementation.
- ['build_with_gonk==1', {
- 'defines': [
- "USE_PLATFORM_NR_STUN_GET_ADDRS",
- ]
- }],
['have_ethtool_cmd_speed_hi==0', {
'defines': [
"DONT_HAVE_ETHTOOL_SPEED_HI",
diff --git a/media/webrtc/signaling/signaling.gyp b/media/webrtc/signaling/signaling.gyp
index ee1941151..0fcf2ac5d 100644
--- a/media/webrtc/signaling/signaling.gyp
+++ b/media/webrtc/signaling/signaling.gyp
@@ -41,11 +41,6 @@
'target_defaults': {
'conditions': [
- ['moz_widget_toolkit_gonk==1', {
- 'defines' : [
- 'WEBRTC_GONK',
- ],
- }],
],
},
@@ -316,7 +311,7 @@
'cflags_mozilla': [
],
}],
- ['OS=="android" or moz_widget_toolkit_gonk==1', {
+ ['OS=="android"', {
'cflags_mozilla': [
# This warning complains about important MOZ_EXPORT attributes
# on forward declarations for Android API types.
diff --git a/media/webrtc/trunk/build/common.gypi b/media/webrtc/trunk/build/common.gypi
index 5382cdf41..68003ba06 100644
--- a/media/webrtc/trunk/build/common.gypi
+++ b/media/webrtc/trunk/build/common.gypi
@@ -428,7 +428,7 @@
}],
# Flags to use X11 on non-Mac POSIX platforms
- ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or moz_widget_toolkit_gonk==1', {
+ ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
'use_glib%': 0,
'use_x11%': 0,
}, {
diff --git a/media/webrtc/trunk/webrtc/build/common.gypi b/media/webrtc/trunk/webrtc/build/common.gypi
index 5c26c98e3..97bf78628 100644
--- a/media/webrtc/trunk/webrtc/build/common.gypi
+++ b/media/webrtc/trunk/webrtc/build/common.gypi
@@ -196,11 +196,6 @@
},
'target_defaults': {
'conditions': [
- ['moz_widget_toolkit_gonk==1', {
- 'defines' : [
- 'WEBRTC_GONK',
- ],
- }],
['restrict_webrtc_logging==1', {
'defines': ['WEBRTC_RESTRICT_LOGGING',],
}],
@@ -417,7 +412,7 @@
'msvs_disabled_warnings!': [4189,],
}],
# used on GONK as well
- ['enable_android_opensl==1 and (OS=="android" or moz_widget_toolkit_gonk==1)', {
+ ['enable_android_opensl==1 and OS=="android"', {
'defines': [
'WEBRTC_ANDROID_OPENSLES',
],
diff --git a/media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi b/media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi
index f6ad9cbd7..495ff23b7 100644
--- a/media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi
+++ b/media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi
@@ -92,18 +92,6 @@
'android',
],
}], # OS==android
- ['moz_widget_toolkit_gonk==1', {
- 'cflags_mozilla': [
- '-I$(ANDROID_SOURCE)/frameworks/wilhelm/include',
- '-I$(ANDROID_SOURCE)/frameworks/av/include',
- '-I$(ANDROID_SOURCE)/system/media/wilhelm/include',
- '-I$(ANDROID_SOURCE)/system/media/audio_effects/include',
- '-I$(ANDROID_SOURCE)/frameworks/native/include',
- ],
- 'include_dirs': [
- 'android',
- ],
- }], # moz_widget_toolkit_gonk==1
['enable_android_opensl==1', {
'include_dirs': [
'opensl',
@@ -162,14 +150,7 @@
'android/audio_track_jni.h',
],
'conditions': [
- ['moz_widget_toolkit_gonk==1', {
- 'sources': [
- # references to android/audio_manager to avoid platform-specific limits
- 'gonk/audio_manager.cc',
- 'gonk/audio_manager.h',
- ],
- }],
- ['OS=="android" or moz_widget_toolkit_gonk==1', {
+ ['OS=="android"', {
'link_settings': {
'libraries': [
'-llog',
diff --git a/media/webrtc/trunk/webrtc/system_wrappers/cpu_features_webrtc.gyp b/media/webrtc/trunk/webrtc/system_wrappers/cpu_features_webrtc.gyp
index 91d268048..8064f280e 100644
--- a/media/webrtc/trunk/webrtc/system_wrappers/cpu_features_webrtc.gyp
+++ b/media/webrtc/trunk/webrtc/system_wrappers/cpu_features_webrtc.gyp
@@ -11,7 +11,7 @@
'include_ndk_cpu_features%': 0,
},
'conditions': [
- ['OS=="android" or moz_widget_toolkit_gonk==1', {
+ ['OS=="android"', {
'targets': [
{
'target_name': 'cpu_features_android',
diff --git a/media/webrtc/trunk/webrtc/system_wrappers/system_wrappers.gyp b/media/webrtc/trunk/webrtc/system_wrappers/system_wrappers.gyp
index 68164b38a..fb76f34a5 100644
--- a/media/webrtc/trunk/webrtc/system_wrappers/system_wrappers.gyp
+++ b/media/webrtc/trunk/webrtc/system_wrappers/system_wrappers.gyp
@@ -119,7 +119,7 @@
'source/metrics_default.cc',
],
}],
- ['OS=="android" or moz_widget_toolkit_gonk==1', {
+ ['OS=="android"', {
'defines': [
'WEBRTC_THREAD_RR',
# TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC
diff --git a/memory/replace/dmd/DMD.cpp b/memory/replace/dmd/DMD.cpp
deleted file mode 100644
index 49eb27970..000000000
--- a/memory/replace/dmd/DMD.cpp
+++ /dev/null
@@ -1,2122 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if !defined(MOZ_PROFILING)
-#error "DMD requires MOZ_PROFILING"
-#endif
-
-#ifdef XP_WIN
-#include <windows.h>
-#include <process.h>
-#else
-#include <unistd.h>
-#endif
-
-#ifdef ANDROID
-#include <android/log.h>
-#endif
-
-#include "nscore.h"
-#include "mozilla/StackWalk.h"
-
-#include "js/HashTable.h"
-#include "js/Vector.h"
-
-#include "mozilla/Assertions.h"
-#include "mozilla/FastBernoulliTrial.h"
-#include "mozilla/HashFunctions.h"
-#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/JSONWriter.h"
-#include "mozilla/Likely.h"
-#include "mozilla/MemoryReporting.h"
-
-// CodeAddressService is defined entirely in the header, so this does not make
-// DMD depend on XPCOM's object file.
-#include "CodeAddressService.h"
-
-// replace_malloc.h needs to be included before replace_malloc_bridge.h,
-// which DMD.h includes, so DMD.h needs to be included after replace_malloc.h.
-// MOZ_REPLACE_ONLY_MEMALIGN saves us from having to define
-// replace_{posix_memalign,aligned_alloc,valloc}. It requires defining
-// PAGE_SIZE. Nb: sysconf() is expensive, but it's only used for (the obsolete
-// and rarely used) valloc.
-#define MOZ_REPLACE_ONLY_MEMALIGN 1
-
-#ifndef PAGE_SIZE
-#define DMD_DEFINED_PAGE_SIZE
-#ifdef XP_WIN
-#define PAGE_SIZE GetPageSize()
-static long GetPageSize()
-{
- SYSTEM_INFO si;
- GetSystemInfo(&si);
- return si.dwPageSize;
-}
-#else // XP_WIN
-#define PAGE_SIZE sysconf(_SC_PAGESIZE)
-#endif // XP_WIN
-#endif // PAGE_SIZE
-#include "replace_malloc.h"
-#undef MOZ_REPLACE_ONLY_MEMALIGN
-#ifdef DMD_DEFINED_PAGE_SIZE
-#undef DMD_DEFINED_PAGE_SIZE
-#undef PAGE_SIZE
-#endif // DMD_DEFINED_PAGE_SIZE
-
-#include "DMD.h"
-
-namespace mozilla {
-namespace dmd {
-
-class DMDBridge : public ReplaceMallocBridge
-{
- virtual DMDFuncs* GetDMDFuncs() override;
-};
-
-static DMDBridge* gDMDBridge;
-static DMDFuncs gDMDFuncs;
-
-DMDFuncs*
-DMDBridge::GetDMDFuncs()
-{
- return &gDMDFuncs;
-}
-
-inline void
-StatusMsg(const char* aFmt, ...)
-{
- va_list ap;
- va_start(ap, aFmt);
- gDMDFuncs.StatusMsg(aFmt, ap);
- va_end(ap);
-}
-
-//---------------------------------------------------------------------------
-// Utilities
-//---------------------------------------------------------------------------
-
-#ifndef DISALLOW_COPY_AND_ASSIGN
-#define DISALLOW_COPY_AND_ASSIGN(T) \
- T(const T&); \
- void operator=(const T&)
-#endif
-
-static const malloc_table_t* gMallocTable = nullptr;
-
-// Whether DMD finished initializing.
-static bool gIsDMDInitialized = false;
-
-// This provides infallible allocations (they abort on OOM). We use it for all
-// of DMD's own allocations, which fall into the following three cases.
-//
-// - Direct allocations (the easy case).
-//
-// - Indirect allocations in js::{Vector,HashSet,HashMap} -- this class serves
-// as their AllocPolicy.
-//
-// - Other indirect allocations (e.g. MozStackWalk) -- see the comments on
-// Thread::mBlockIntercepts and in replace_malloc for how these work.
-//
-// It would be nice if we could use the InfallibleAllocPolicy from mozalloc,
-// but DMD cannot use mozalloc.
-//
-class InfallibleAllocPolicy
-{
- static void ExitOnFailure(const void* aP);
-
-public:
- template <typename T>
- static T* maybe_pod_malloc(size_t aNumElems)
- {
- if (aNumElems & mozilla::tl::MulOverflowMask<sizeof(T)>::value)
- return nullptr;
- return (T*)gMallocTable->malloc(aNumElems * sizeof(T));
- }
-
- template <typename T>
- static T* maybe_pod_calloc(size_t aNumElems)
- {
- return (T*)gMallocTable->calloc(aNumElems, sizeof(T));
- }
-
- template <typename T>
- static T* maybe_pod_realloc(T* aPtr, size_t aOldSize, size_t aNewSize)
- {
- if (aNewSize & mozilla::tl::MulOverflowMask<sizeof(T)>::value)
- return nullptr;
- return (T*)gMallocTable->realloc(aPtr, aNewSize * sizeof(T));
- }
-
- static void* malloc_(size_t aSize)
- {
- void* p = gMallocTable->malloc(aSize);
- ExitOnFailure(p);
- return p;
- }
-
- template <typename T>
- static T* pod_malloc(size_t aNumElems)
- {
- T* p = maybe_pod_malloc<T>(aNumElems);
- ExitOnFailure(p);
- return p;
- }
-
- static void* calloc_(size_t aSize)
- {
- void* p = gMallocTable->calloc(1, aSize);
- ExitOnFailure(p);
- return p;
- }
-
- template <typename T>
- static T* pod_calloc(size_t aNumElems)
- {
- T* p = maybe_pod_calloc<T>(aNumElems);
- ExitOnFailure(p);
- return p;
- }
-
- // This realloc_ is the one we use for direct reallocs within DMD.
- static void* realloc_(void* aPtr, size_t aNewSize)
- {
- void* p = gMallocTable->realloc(aPtr, aNewSize);
- ExitOnFailure(p);
- return p;
- }
-
- // This realloc_ is required for this to be a JS container AllocPolicy.
- template <typename T>
- static T* pod_realloc(T* aPtr, size_t aOldSize, size_t aNewSize)
- {
- T* p = maybe_pod_realloc(aPtr, aOldSize, aNewSize);
- ExitOnFailure(p);
- return p;
- }
-
- static void* memalign_(size_t aAlignment, size_t aSize)
- {
- void* p = gMallocTable->memalign(aAlignment, aSize);
- ExitOnFailure(p);
- return p;
- }
-
- static void free_(void* aPtr) { gMallocTable->free(aPtr); }
-
- static char* strdup_(const char* aStr)
- {
- char* s = (char*) InfallibleAllocPolicy::malloc_(strlen(aStr) + 1);
- strcpy(s, aStr);
- return s;
- }
-
- template <class T>
- static T* new_()
- {
- void* mem = malloc_(sizeof(T));
- return new (mem) T;
- }
-
- template <class T, typename P1>
- static T* new_(P1 aP1)
- {
- void* mem = malloc_(sizeof(T));
- return new (mem) T(aP1);
- }
-
- template <class T>
- static void delete_(T* aPtr)
- {
- if (aPtr) {
- aPtr->~T();
- InfallibleAllocPolicy::free_(aPtr);
- }
- }
-
- static void reportAllocOverflow() { ExitOnFailure(nullptr); }
- bool checkSimulatedOOM() const { return true; }
-};
-
-// This is only needed because of the |const void*| vs |void*| arg mismatch.
-static size_t
-MallocSizeOf(const void* aPtr)
-{
- return gMallocTable->malloc_usable_size(const_cast<void*>(aPtr));
-}
-
-void
-DMDFuncs::StatusMsg(const char* aFmt, va_list aAp)
-{
-#ifdef ANDROID
- __android_log_vprint(ANDROID_LOG_INFO, "DMD", aFmt, aAp);
-#else
- // The +64 is easily enough for the "DMD[<pid>] " prefix and the NUL.
- char* fmt = (char*) InfallibleAllocPolicy::malloc_(strlen(aFmt) + 64);
- sprintf(fmt, "DMD[%d] %s", getpid(), aFmt);
- vfprintf(stderr, fmt, aAp);
- InfallibleAllocPolicy::free_(fmt);
-#endif
-}
-
-/* static */ void
-InfallibleAllocPolicy::ExitOnFailure(const void* aP)
-{
- if (!aP) {
- MOZ_CRASH("DMD out of memory; aborting");
- }
-}
-
-static double
-Percent(size_t part, size_t whole)
-{
- return (whole == 0) ? 0 : 100 * (double)part / whole;
-}
-
-// Commifies the number.
-static char*
-Show(size_t n, char* buf, size_t buflen)
-{
- int nc = 0, i = 0, lasti = buflen - 2;
- buf[lasti + 1] = '\0';
- if (n == 0) {
- buf[lasti - i] = '0';
- i++;
- } else {
- while (n > 0) {
- if (((i - nc) % 3) == 0 && i != 0) {
- buf[lasti - i] = ',';
- i++;
- nc++;
- }
- buf[lasti - i] = static_cast<char>((n % 10) + '0');
- i++;
- n /= 10;
- }
- }
- int firstCharIndex = lasti - i + 1;
-
- MOZ_ASSERT(firstCharIndex >= 0);
- return &buf[firstCharIndex];
-}
-
-//---------------------------------------------------------------------------
-// Options (Part 1)
-//---------------------------------------------------------------------------
-
-class Options
-{
- template <typename T>
- struct NumOption
- {
- const T mDefault;
- const T mMax;
- T mActual;
- NumOption(T aDefault, T aMax)
- : mDefault(aDefault), mMax(aMax), mActual(aDefault)
- {}
- };
-
- // DMD has several modes. These modes affect what data is recorded and
- // written to the output file, and the written data affects the
- // post-processing that dmd.py can do.
- //
- // Users specify the mode as soon as DMD starts. This leads to minimal memory
- // usage and log file size. It has the disadvantage that is inflexible -- if
- // you want to change modes you have to re-run DMD. But in practice changing
- // modes seems to be rare, so it's not much of a problem.
- //
- // An alternative possibility would be to always record and output *all* the
- // information needed for all modes. This would let you choose the mode when
- // running dmd.py, and so you could do multiple kinds of profiling on a
- // single DMD run. But if you are only interested in one of the simpler
- // modes, you'd pay the price of (a) increased memory usage and (b) *very*
- // large log files.
- //
- // Finally, another alternative possibility would be to do mode selection
- // partly at DMD startup or recording, and then partly in dmd.py. This would
- // give some extra flexibility at moderate memory and file size cost. But
- // certain mode pairs wouldn't work, which would be confusing.
- //
- enum class Mode
- {
- // For each live block, this mode outputs: size (usable and slop) and
- // (possibly) and allocation stack. This mode is good for live heap
- // profiling.
- Live,
-
- // Like "Live", but for each live block it also outputs: zero or more
- // report stacks. This mode is good for identifying where memory reporters
- // should be added. This is the default mode.
- DarkMatter,
-
- // Like "Live", but also outputs the same data for dead blocks. This mode
- // does cumulative heap profiling, which is good for identifying where large
- // amounts of short-lived allocations ("heap churn") occur.
- Cumulative,
-
- // Like "Live", but this mode also outputs for each live block the address
- // of the block and the values contained in the blocks. This mode is useful
- // for investigating leaks, by helping to figure out which blocks refer to
- // other blocks. This mode force-enables full stacks coverage.
- Scan
- };
-
- // With full stacks, every heap block gets a stack trace recorded for it.
- // This is complete but slow.
- //
- // With partial stacks, not all heap blocks will get a stack trace recorded.
- // A Bernoulli trial (see mfbt/FastBernoulliTrial.h for details) is performed
- // for each heap block to decide if it gets one. Because bigger heap blocks
- // are more likely to get a stack trace, even though most heap *blocks* won't
- // get a stack trace, most heap *bytes* will.
- enum class Stacks
- {
- Full,
- Partial
- };
-
- char* mDMDEnvVar; // a saved copy, for later printing
-
- Mode mMode;
- Stacks mStacks;
- bool mShowDumpStats;
-
- void BadArg(const char* aArg);
- static const char* ValueIfMatch(const char* aArg, const char* aOptionName);
- static bool GetLong(const char* aArg, const char* aOptionName,
- long aMin, long aMax, long* aValue);
- static bool GetBool(const char* aArg, const char* aOptionName, bool* aValue);
-
-public:
- explicit Options(const char* aDMDEnvVar);
-
- bool IsLiveMode() const { return mMode == Mode::Live; }
- bool IsDarkMatterMode() const { return mMode == Mode::DarkMatter; }
- bool IsCumulativeMode() const { return mMode == Mode::Cumulative; }
- bool IsScanMode() const { return mMode == Mode::Scan; }
-
- const char* ModeString() const;
-
- const char* DMDEnvVar() const { return mDMDEnvVar; }
-
- bool DoFullStacks() const { return mStacks == Stacks::Full; }
- size_t ShowDumpStats() const { return mShowDumpStats; }
-};
-
-static Options *gOptions;
-
-//---------------------------------------------------------------------------
-// The global lock
-//---------------------------------------------------------------------------
-
-// MutexBase implements the platform-specific parts of a mutex.
-
-#ifdef XP_WIN
-
-class MutexBase
-{
- CRITICAL_SECTION mCS;
-
- DISALLOW_COPY_AND_ASSIGN(MutexBase);
-
-public:
- MutexBase() { InitializeCriticalSection(&mCS); }
- ~MutexBase() { DeleteCriticalSection(&mCS); }
-
- void Lock() { EnterCriticalSection(&mCS); }
- void Unlock() { LeaveCriticalSection(&mCS); }
-};
-
-#else
-
-#include <pthread.h>
-#include <sys/types.h>
-
-class MutexBase
-{
- pthread_mutex_t mMutex;
-
- DISALLOW_COPY_AND_ASSIGN(MutexBase);
-
-public:
- MutexBase() { pthread_mutex_init(&mMutex, nullptr); }
-
- void Lock() { pthread_mutex_lock(&mMutex); }
- void Unlock() { pthread_mutex_unlock(&mMutex); }
-};
-
-#endif
-
-class Mutex : private MutexBase
-{
- bool mIsLocked;
-
- DISALLOW_COPY_AND_ASSIGN(Mutex);
-
-public:
- Mutex()
- : mIsLocked(false)
- {}
-
- void Lock()
- {
- MutexBase::Lock();
- MOZ_ASSERT(!mIsLocked);
- mIsLocked = true;
- }
-
- void Unlock()
- {
- MOZ_ASSERT(mIsLocked);
- mIsLocked = false;
- MutexBase::Unlock();
- }
-
- bool IsLocked() { return mIsLocked; }
-};
-
-// This lock must be held while manipulating global state such as
-// gStackTraceTable, gLiveBlockTable, gDeadBlockTable. Note that gOptions is
-// *not* protected by this lock because it is only written to by Options(),
-// which is only invoked at start-up and in ResetEverything(), which is only
-// used by SmokeDMD.cpp.
-static Mutex* gStateLock = nullptr;
-
-class AutoLockState
-{
- DISALLOW_COPY_AND_ASSIGN(AutoLockState);
-
-public:
- AutoLockState() { gStateLock->Lock(); }
- ~AutoLockState() { gStateLock->Unlock(); }
-};
-
-class AutoUnlockState
-{
- DISALLOW_COPY_AND_ASSIGN(AutoUnlockState);
-
-public:
- AutoUnlockState() { gStateLock->Unlock(); }
- ~AutoUnlockState() { gStateLock->Lock(); }
-};
-
-//---------------------------------------------------------------------------
-// Thread-local storage and blocking of intercepts
-//---------------------------------------------------------------------------
-
-#ifdef XP_WIN
-
-#define DMD_TLS_INDEX_TYPE DWORD
-#define DMD_CREATE_TLS_INDEX(i_) do { \
- (i_) = TlsAlloc(); \
- } while (0)
-#define DMD_DESTROY_TLS_INDEX(i_) TlsFree((i_))
-#define DMD_GET_TLS_DATA(i_) TlsGetValue((i_))
-#define DMD_SET_TLS_DATA(i_, v_) TlsSetValue((i_), (v_))
-
-#else
-
-#include <pthread.h>
-
-#define DMD_TLS_INDEX_TYPE pthread_key_t
-#define DMD_CREATE_TLS_INDEX(i_) pthread_key_create(&(i_), nullptr)
-#define DMD_DESTROY_TLS_INDEX(i_) pthread_key_delete((i_))
-#define DMD_GET_TLS_DATA(i_) pthread_getspecific((i_))
-#define DMD_SET_TLS_DATA(i_, v_) pthread_setspecific((i_), (v_))
-
-#endif
-
-static DMD_TLS_INDEX_TYPE gTlsIndex;
-
-class Thread
-{
- // Required for allocation via InfallibleAllocPolicy::new_.
- friend class InfallibleAllocPolicy;
-
- // When true, this blocks intercepts, which allows malloc interception
- // functions to themselves call malloc. (Nb: for direct calls to malloc we
- // can just use InfallibleAllocPolicy::{malloc_,new_}, but we sometimes
- // indirectly call vanilla malloc via functions like MozStackWalk.)
- bool mBlockIntercepts;
-
- Thread()
- : mBlockIntercepts(false)
- {}
-
- DISALLOW_COPY_AND_ASSIGN(Thread);
-
-public:
- static Thread* Fetch();
-
- bool BlockIntercepts()
- {
- MOZ_ASSERT(!mBlockIntercepts);
- return mBlockIntercepts = true;
- }
-
- bool UnblockIntercepts()
- {
- MOZ_ASSERT(mBlockIntercepts);
- return mBlockIntercepts = false;
- }
-
- bool InterceptsAreBlocked() const { return mBlockIntercepts; }
-};
-
-/* static */ Thread*
-Thread::Fetch()
-{
- Thread* t = static_cast<Thread*>(DMD_GET_TLS_DATA(gTlsIndex));
-
- if (MOZ_UNLIKELY(!t)) {
- // This memory is never freed, even if the thread dies. It's a leak, but
- // only a tiny one.
- t = InfallibleAllocPolicy::new_<Thread>();
- DMD_SET_TLS_DATA(gTlsIndex, t);
- }
-
- return t;
-}
-
-// An object of this class must be created (on the stack) before running any
-// code that might allocate.
-class AutoBlockIntercepts
-{
- Thread* const mT;
-
- DISALLOW_COPY_AND_ASSIGN(AutoBlockIntercepts);
-
-public:
- explicit AutoBlockIntercepts(Thread* aT)
- : mT(aT)
- {
- mT->BlockIntercepts();
- }
- ~AutoBlockIntercepts()
- {
- MOZ_ASSERT(mT->InterceptsAreBlocked());
- mT->UnblockIntercepts();
- }
-};
-
-//---------------------------------------------------------------------------
-// Location service
-//---------------------------------------------------------------------------
-
-class StringTable
-{
-public:
- StringTable()
- {
- MOZ_ALWAYS_TRUE(mSet.init(64));
- }
-
- const char*
- Intern(const char* aString)
- {
- StringHashSet::AddPtr p = mSet.lookupForAdd(aString);
- if (p) {
- return *p;
- }
-
- const char* newString = InfallibleAllocPolicy::strdup_(aString);
- MOZ_ALWAYS_TRUE(mSet.add(p, newString));
- return newString;
- }
-
- size_t
- SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
- {
- size_t n = 0;
- n += mSet.sizeOfExcludingThis(aMallocSizeOf);
- for (auto r = mSet.all(); !r.empty(); r.popFront()) {
- n += aMallocSizeOf(r.front());
- }
- return n;
- }
-
-private:
- struct StringHasher
- {
- typedef const char* Lookup;
-
- static uint32_t hash(const char* const& aS)
- {
- return HashString(aS);
- }
-
- static bool match(const char* const& aA, const char* const& aB)
- {
- return strcmp(aA, aB) == 0;
- }
- };
-
- typedef js::HashSet<const char*, StringHasher, InfallibleAllocPolicy> StringHashSet;
-
- StringHashSet mSet;
-};
-
-class StringAlloc
-{
-public:
- static char* copy(const char* aString)
- {
- return InfallibleAllocPolicy::strdup_(aString);
- }
- static void free(char* aString)
- {
- InfallibleAllocPolicy::free_(aString);
- }
-};
-
-struct DescribeCodeAddressLock
-{
- static void Unlock() { gStateLock->Unlock(); }
- static void Lock() { gStateLock->Lock(); }
- static bool IsLocked() { return gStateLock->IsLocked(); }
-};
-
-typedef CodeAddressService<StringTable, StringAlloc, DescribeCodeAddressLock>
- CodeAddressService;
-
-//---------------------------------------------------------------------------
-// Stack traces
-//---------------------------------------------------------------------------
-
-class StackTrace
-{
-public:
- static const uint32_t MaxFrames = 24;
-
-private:
- uint32_t mLength; // The number of PCs.
- const void* mPcs[MaxFrames]; // The PCs themselves.
-
-public:
- StackTrace() : mLength(0) {}
-
- uint32_t Length() const { return mLength; }
- const void* Pc(uint32_t i) const
- {
- MOZ_ASSERT(i < mLength);
- return mPcs[i];
- }
-
- uint32_t Size() const { return mLength * sizeof(mPcs[0]); }
-
- // The stack trace returned by this function is interned in gStackTraceTable,
- // and so is immortal and unmovable.
- static const StackTrace* Get(Thread* aT);
-
- // Hash policy.
-
- typedef StackTrace* Lookup;
-
- static uint32_t hash(const StackTrace* const& aSt)
- {
- return mozilla::HashBytes(aSt->mPcs, aSt->Size());
- }
-
- static bool match(const StackTrace* const& aA,
- const StackTrace* const& aB)
- {
- return aA->mLength == aB->mLength &&
- memcmp(aA->mPcs, aB->mPcs, aA->Size()) == 0;
- }
-
-private:
- static void StackWalkCallback(uint32_t aFrameNumber, void* aPc, void* aSp,
- void* aClosure)
- {
- StackTrace* st = (StackTrace*) aClosure;
- MOZ_ASSERT(st->mLength < MaxFrames);
- st->mPcs[st->mLength] = aPc;
- st->mLength++;
- MOZ_ASSERT(st->mLength == aFrameNumber);
- }
-};
-
-typedef js::HashSet<StackTrace*, StackTrace, InfallibleAllocPolicy>
- StackTraceTable;
-static StackTraceTable* gStackTraceTable = nullptr;
-
-typedef js::HashSet<const StackTrace*, js::DefaultHasher<const StackTrace*>,
- InfallibleAllocPolicy>
- StackTraceSet;
-
-typedef js::HashSet<const void*, js::DefaultHasher<const void*>,
- InfallibleAllocPolicy>
- PointerSet;
-typedef js::HashMap<const void*, uint32_t, js::DefaultHasher<const void*>,
- InfallibleAllocPolicy>
- PointerIdMap;
-
-// We won't GC the stack trace table until it this many elements.
-static uint32_t gGCStackTraceTableWhenSizeExceeds = 4 * 1024;
-
-/* static */ const StackTrace*
-StackTrace::Get(Thread* aT)
-{
- MOZ_ASSERT(gStateLock->IsLocked());
- MOZ_ASSERT(aT->InterceptsAreBlocked());
-
- // On Windows, MozStackWalk can acquire a lock from the shared library
- // loader. Another thread might call malloc while holding that lock (when
- // loading a shared library). So we can't be in gStateLock during the call
- // to MozStackWalk. For details, see
- // https://bugzilla.mozilla.org/show_bug.cgi?id=374829#c8
- // On Linux, something similar can happen; see bug 824340.
- // So let's just release it on all platforms.
- StackTrace tmp;
- {
- AutoUnlockState unlock;
- uint32_t skipFrames = 2;
- if (MozStackWalk(StackWalkCallback, skipFrames,
- MaxFrames, &tmp, 0, nullptr)) {
- // Handle the common case first. All is ok. Nothing to do.
- } else {
- tmp.mLength = 0;
- }
- }
-
- StackTraceTable::AddPtr p = gStackTraceTable->lookupForAdd(&tmp);
- if (!p) {
- StackTrace* stnew = InfallibleAllocPolicy::new_<StackTrace>(tmp);
- MOZ_ALWAYS_TRUE(gStackTraceTable->add(p, stnew));
- }
- return *p;
-}
-
-//---------------------------------------------------------------------------
-// Heap blocks
-//---------------------------------------------------------------------------
-
-// This class combines a 2-byte-aligned pointer (i.e. one whose bottom bit
-// is zero) with a 1-bit tag.
-//
-// |T| is the pointer type, e.g. |int*|, not the pointed-to type. This makes
-// is easier to have const pointers, e.g. |TaggedPtr<const int*>|.
-template <typename T>
-class TaggedPtr
-{
- union
- {
- T mPtr;
- uintptr_t mUint;
- };
-
- static const uintptr_t kTagMask = uintptr_t(0x1);
- static const uintptr_t kPtrMask = ~kTagMask;
-
- static bool IsTwoByteAligned(T aPtr)
- {
- return (uintptr_t(aPtr) & kTagMask) == 0;
- }
-
-public:
- TaggedPtr()
- : mPtr(nullptr)
- {}
-
- TaggedPtr(T aPtr, bool aBool)
- : mPtr(aPtr)
- {
- MOZ_ASSERT(IsTwoByteAligned(aPtr));
- uintptr_t tag = uintptr_t(aBool);
- MOZ_ASSERT(tag <= kTagMask);
- mUint |= (tag & kTagMask);
- }
-
- void Set(T aPtr, bool aBool)
- {
- MOZ_ASSERT(IsTwoByteAligned(aPtr));
- mPtr = aPtr;
- uintptr_t tag = uintptr_t(aBool);
- MOZ_ASSERT(tag <= kTagMask);
- mUint |= (tag & kTagMask);
- }
-
- T Ptr() const { return reinterpret_cast<T>(mUint & kPtrMask); }
-
- bool Tag() const { return bool(mUint & kTagMask); }
-};
-
-// A live heap block. Stores both basic data and data about reports, if we're
-// in DarkMatter mode.
-class LiveBlock
-{
- const void* mPtr;
- const size_t mReqSize; // size requested
-
- // The stack trace where this block was allocated, or nullptr if we didn't
- // record one.
- const StackTrace* const mAllocStackTrace;
-
- // This array has two elements because we record at most two reports of a
- // block.
- // - Ptr: |mReportStackTrace| - stack trace where this block was reported.
- // nullptr if not reported.
- // - Tag bit 0: |mReportedOnAlloc| - was the block reported immediately on
- // allocation? If so, DMD must not clear the report at the end of
- // Analyze(). Only relevant if |mReportStackTrace| is non-nullptr.
- //
- // |mPtr| is used as the key in LiveBlockTable, so it's ok for this member
- // to be |mutable|.
- //
- // Only used in DarkMatter mode.
- mutable TaggedPtr<const StackTrace*> mReportStackTrace_mReportedOnAlloc[2];
-
-public:
- LiveBlock(const void* aPtr, size_t aReqSize,
- const StackTrace* aAllocStackTrace)
- : mPtr(aPtr)
- , mReqSize(aReqSize)
- , mAllocStackTrace(aAllocStackTrace)
- , mReportStackTrace_mReportedOnAlloc() // all fields get zeroed
- {}
-
- const void* Address() const { return mPtr; }
-
- size_t ReqSize() const { return mReqSize; }
-
- size_t SlopSize() const
- {
- return MallocSizeOf(mPtr) - mReqSize;
- }
-
- const StackTrace* AllocStackTrace() const
- {
- return mAllocStackTrace;
- }
-
- const StackTrace* ReportStackTrace1() const
- {
- MOZ_ASSERT(gOptions->IsDarkMatterMode());
- return mReportStackTrace_mReportedOnAlloc[0].Ptr();
- }
-
- const StackTrace* ReportStackTrace2() const
- {
- MOZ_ASSERT(gOptions->IsDarkMatterMode());
- return mReportStackTrace_mReportedOnAlloc[1].Ptr();
- }
-
- bool ReportedOnAlloc1() const
- {
- MOZ_ASSERT(gOptions->IsDarkMatterMode());
- return mReportStackTrace_mReportedOnAlloc[0].Tag();
- }
-
- bool ReportedOnAlloc2() const
- {
- MOZ_ASSERT(gOptions->IsDarkMatterMode());
- return mReportStackTrace_mReportedOnAlloc[1].Tag();
- }
-
- void AddStackTracesToTable(StackTraceSet& aStackTraces) const
- {
- if (AllocStackTrace()) {
- MOZ_ALWAYS_TRUE(aStackTraces.put(AllocStackTrace()));
- }
- if (gOptions->IsDarkMatterMode()) {
- if (ReportStackTrace1()) {
- MOZ_ALWAYS_TRUE(aStackTraces.put(ReportStackTrace1()));
- }
- if (ReportStackTrace2()) {
- MOZ_ALWAYS_TRUE(aStackTraces.put(ReportStackTrace2()));
- }
- }
- }
-
- uint32_t NumReports() const
- {
- MOZ_ASSERT(gOptions->IsDarkMatterMode());
- if (ReportStackTrace2()) {
- MOZ_ASSERT(ReportStackTrace1());
- return 2;
- }
- if (ReportStackTrace1()) {
- return 1;
- }
- return 0;
- }
-
- // This is |const| thanks to the |mutable| fields above.
- void Report(Thread* aT, bool aReportedOnAlloc) const
- {
- MOZ_ASSERT(gOptions->IsDarkMatterMode());
- // We don't bother recording reports after the 2nd one.
- uint32_t numReports = NumReports();
- if (numReports < 2) {
- mReportStackTrace_mReportedOnAlloc[numReports].Set(StackTrace::Get(aT),
- aReportedOnAlloc);
- }
- }
-
- void UnreportIfNotReportedOnAlloc() const
- {
- MOZ_ASSERT(gOptions->IsDarkMatterMode());
- if (!ReportedOnAlloc1() && !ReportedOnAlloc2()) {
- mReportStackTrace_mReportedOnAlloc[0].Set(nullptr, 0);
- mReportStackTrace_mReportedOnAlloc[1].Set(nullptr, 0);
-
- } else if (!ReportedOnAlloc1() && ReportedOnAlloc2()) {
- // Shift the 2nd report down to the 1st one.
- mReportStackTrace_mReportedOnAlloc[0] =
- mReportStackTrace_mReportedOnAlloc[1];
- mReportStackTrace_mReportedOnAlloc[1].Set(nullptr, 0);
-
- } else if (ReportedOnAlloc1() && !ReportedOnAlloc2()) {
- mReportStackTrace_mReportedOnAlloc[1].Set(nullptr, 0);
- }
- }
-
- // Hash policy.
-
- typedef const void* Lookup;
-
- static uint32_t hash(const void* const& aPtr)
- {
- return mozilla::HashGeneric(aPtr);
- }
-
- static bool match(const LiveBlock& aB, const void* const& aPtr)
- {
- return aB.mPtr == aPtr;
- }
-};
-
-// A table of live blocks where the lookup key is the block address.
-typedef js::HashSet<LiveBlock, LiveBlock, InfallibleAllocPolicy> LiveBlockTable;
-static LiveBlockTable* gLiveBlockTable = nullptr;
-
-class AggregatedLiveBlockHashPolicy
-{
-public:
- typedef const LiveBlock* const Lookup;
-
- static uint32_t hash(const LiveBlock* const& aB)
- {
- return gOptions->IsDarkMatterMode()
- ? mozilla::HashGeneric(aB->ReqSize(),
- aB->SlopSize(),
- aB->AllocStackTrace(),
- aB->ReportedOnAlloc1(),
- aB->ReportedOnAlloc2())
- : mozilla::HashGeneric(aB->ReqSize(),
- aB->SlopSize(),
- aB->AllocStackTrace());
- }
-
- static bool match(const LiveBlock* const& aA, const LiveBlock* const& aB)
- {
- return gOptions->IsDarkMatterMode()
- ? aA->ReqSize() == aB->ReqSize() &&
- aA->SlopSize() == aB->SlopSize() &&
- aA->AllocStackTrace() == aB->AllocStackTrace() &&
- aA->ReportStackTrace1() == aB->ReportStackTrace1() &&
- aA->ReportStackTrace2() == aB->ReportStackTrace2()
- : aA->ReqSize() == aB->ReqSize() &&
- aA->SlopSize() == aB->SlopSize() &&
- aA->AllocStackTrace() == aB->AllocStackTrace();
- }
-};
-
-// A table of live blocks where the lookup key is everything but the block
-// address. For aggregating similar live blocks at output time.
-typedef js::HashMap<const LiveBlock*, size_t, AggregatedLiveBlockHashPolicy,
- InfallibleAllocPolicy>
- AggregatedLiveBlockTable;
-
-// A freed heap block.
-class DeadBlock
-{
- const size_t mReqSize; // size requested
- const size_t mSlopSize; // slop above size requested
-
- // The stack trace where this block was allocated.
- const StackTrace* const mAllocStackTrace;
-
-public:
- DeadBlock()
- : mReqSize(0)
- , mSlopSize(0)
- , mAllocStackTrace(nullptr)
- {}
-
- explicit DeadBlock(const LiveBlock& aLb)
- : mReqSize(aLb.ReqSize())
- , mSlopSize(aLb.SlopSize())
- , mAllocStackTrace(aLb.AllocStackTrace())
- {}
-
- ~DeadBlock() {}
-
- size_t ReqSize() const { return mReqSize; }
- size_t SlopSize() const { return mSlopSize; }
-
- const StackTrace* AllocStackTrace() const
- {
- return mAllocStackTrace;
- }
-
- void AddStackTracesToTable(StackTraceSet& aStackTraces) const
- {
- if (AllocStackTrace()) {
- MOZ_ALWAYS_TRUE(aStackTraces.put(AllocStackTrace()));
- }
- }
-
- // Hash policy.
-
- typedef DeadBlock Lookup;
-
- static uint32_t hash(const DeadBlock& aB)
- {
- return mozilla::HashGeneric(aB.ReqSize(),
- aB.SlopSize(),
- aB.AllocStackTrace());
- }
-
- static bool match(const DeadBlock& aA, const DeadBlock& aB)
- {
- return aA.ReqSize() == aB.ReqSize() &&
- aA.SlopSize() == aB.SlopSize() &&
- aA.AllocStackTrace() == aB.AllocStackTrace();
- }
-};
-
-// For each unique DeadBlock value we store a count of how many actual dead
-// blocks have that value.
-typedef js::HashMap<DeadBlock, size_t, DeadBlock, InfallibleAllocPolicy>
- DeadBlockTable;
-static DeadBlockTable* gDeadBlockTable = nullptr;
-
-// Add the dead block to the dead block table, if that's appropriate.
-void MaybeAddToDeadBlockTable(const DeadBlock& aDb)
-{
- if (gOptions->IsCumulativeMode() && aDb.AllocStackTrace()) {
- AutoLockState lock;
- if (DeadBlockTable::AddPtr p = gDeadBlockTable->lookupForAdd(aDb)) {
- p->value() += 1;
- } else {
- MOZ_ALWAYS_TRUE(gDeadBlockTable->add(p, aDb, 1));
- }
- }
-}
-
-// Add a pointer to each live stack trace into the given StackTraceSet. (A
-// stack trace is live if it's used by one of the live blocks.)
-static void
-GatherUsedStackTraces(StackTraceSet& aStackTraces)
-{
- MOZ_ASSERT(gStateLock->IsLocked());
- MOZ_ASSERT(Thread::Fetch()->InterceptsAreBlocked());
-
- aStackTraces.finish();
- MOZ_ALWAYS_TRUE(aStackTraces.init(512));
-
- for (auto r = gLiveBlockTable->all(); !r.empty(); r.popFront()) {
- r.front().AddStackTracesToTable(aStackTraces);
- }
-
- for (auto r = gDeadBlockTable->all(); !r.empty(); r.popFront()) {
- r.front().key().AddStackTracesToTable(aStackTraces);
- }
-}
-
-// Delete stack traces that we aren't using, and compact our hashtable.
-static void
-GCStackTraces()
-{
- MOZ_ASSERT(gStateLock->IsLocked());
- MOZ_ASSERT(Thread::Fetch()->InterceptsAreBlocked());
-
- StackTraceSet usedStackTraces;
- GatherUsedStackTraces(usedStackTraces);
-
- // Delete all unused stack traces from gStackTraceTable. The Enum destructor
- // will automatically rehash and compact the table.
- for (StackTraceTable::Enum e(*gStackTraceTable); !e.empty(); e.popFront()) {
- StackTrace* const& st = e.front();
- if (!usedStackTraces.has(st)) {
- e.removeFront();
- InfallibleAllocPolicy::delete_(st);
- }
- }
-
- // Schedule a GC when we have twice as many stack traces as we had right after
- // this GC finished.
- gGCStackTraceTableWhenSizeExceeds = 2 * gStackTraceTable->count();
-}
-
-//---------------------------------------------------------------------------
-// malloc/free callbacks
-//---------------------------------------------------------------------------
-
-static FastBernoulliTrial* gBernoulli;
-
-// In testing, a probability of 0.003 resulted in ~25% of heap blocks getting
-// a stack trace and ~80% of heap bytes getting a stack trace. (This is
-// possible because big heap blocks are more likely to get a stack trace.)
-//
-// We deliberately choose not to give the user control over this probability
-// (other than effectively setting it to 1 via --stacks=full) because it's
-// quite inscrutable and generally the user just wants "faster and imprecise"
-// or "slower and precise".
-//
-// The random number seeds are arbitrary and were obtained from random.org. If
-// you change them you'll need to change the tests as well, because their
-// expected output is based on the particular sequence of trial results that we
-// get with these seeds.
-static void
-ResetBernoulli()
-{
- new (gBernoulli) FastBernoulliTrial(0.003, 0x8e26eeee166bc8ca,
- 0x56820f304a9c9ae0);
-}
-
-static void
-AllocCallback(void* aPtr, size_t aReqSize, Thread* aT)
-{
- if (!aPtr) {
- return;
- }
-
- AutoLockState lock;
- AutoBlockIntercepts block(aT);
-
- size_t actualSize = gMallocTable->malloc_usable_size(aPtr);
-
- // We may or may not record the allocation stack trace, depending on the
- // options and the outcome of a Bernoulli trial.
- bool getTrace = gOptions->DoFullStacks() || gBernoulli->trial(actualSize);
- LiveBlock b(aPtr, aReqSize, getTrace ? StackTrace::Get(aT) : nullptr);
- MOZ_ALWAYS_TRUE(gLiveBlockTable->putNew(aPtr, b));
-}
-
-static void
-FreeCallback(void* aPtr, Thread* aT, DeadBlock* aDeadBlock)
-{
- if (!aPtr) {
- return;
- }
-
- AutoLockState lock;
- AutoBlockIntercepts block(aT);
-
- if (LiveBlockTable::Ptr lb = gLiveBlockTable->lookup(aPtr)) {
- if (gOptions->IsCumulativeMode()) {
- // Copy it out so it can be added to the dead block list later.
- new (aDeadBlock) DeadBlock(*lb);
- }
- gLiveBlockTable->remove(lb);
- } else {
- // We have no record of the block. It must be a bogus pointer, or one that
- // DMD wasn't able to see allocated. This should be extremely rare.
- }
-
- if (gStackTraceTable->count() > gGCStackTraceTableWhenSizeExceeds) {
- GCStackTraces();
- }
-}
-
-//---------------------------------------------------------------------------
-// malloc/free interception
-//---------------------------------------------------------------------------
-
-static void Init(const malloc_table_t* aMallocTable);
-
-} // namespace dmd
-} // namespace mozilla
-
-void
-replace_init(const malloc_table_t* aMallocTable)
-{
- mozilla::dmd::Init(aMallocTable);
-}
-
-ReplaceMallocBridge*
-replace_get_bridge()
-{
- return mozilla::dmd::gDMDBridge;
-}
-
-void*
-replace_malloc(size_t aSize)
-{
- using namespace mozilla::dmd;
-
- if (!gIsDMDInitialized) {
- // DMD hasn't started up, either because it wasn't enabled by the user, or
- // we're still in Init() and something has indirectly called malloc. Do a
- // vanilla malloc. (In the latter case, if it fails we'll crash. But
- // OOM is highly unlikely so early on.)
- return gMallocTable->malloc(aSize);
- }
-
- Thread* t = Thread::Fetch();
- if (t->InterceptsAreBlocked()) {
- // Intercepts are blocked, which means this must be a call to malloc
- // triggered indirectly by DMD (e.g. via MozStackWalk). Be infallible.
- return InfallibleAllocPolicy::malloc_(aSize);
- }
-
- // This must be a call to malloc from outside DMD. Intercept it.
- void* ptr = gMallocTable->malloc(aSize);
- AllocCallback(ptr, aSize, t);
- return ptr;
-}
-
-void*
-replace_calloc(size_t aCount, size_t aSize)
-{
- using namespace mozilla::dmd;
-
- if (!gIsDMDInitialized) {
- return gMallocTable->calloc(aCount, aSize);
- }
-
- Thread* t = Thread::Fetch();
- if (t->InterceptsAreBlocked()) {
- return InfallibleAllocPolicy::calloc_(aCount * aSize);
- }
-
- void* ptr = gMallocTable->calloc(aCount, aSize);
- AllocCallback(ptr, aCount * aSize, t);
- return ptr;
-}
-
-void*
-replace_realloc(void* aOldPtr, size_t aSize)
-{
- using namespace mozilla::dmd;
-
- if (!gIsDMDInitialized) {
- return gMallocTable->realloc(aOldPtr, aSize);
- }
-
- Thread* t = Thread::Fetch();
- if (t->InterceptsAreBlocked()) {
- return InfallibleAllocPolicy::realloc_(aOldPtr, aSize);
- }
-
- // If |aOldPtr| is nullptr, the call is equivalent to |malloc(aSize)|.
- if (!aOldPtr) {
- return replace_malloc(aSize);
- }
-
- // Be very careful here! Must remove the block from the table before doing
- // the realloc to avoid races, just like in replace_free().
- // Nb: This does an unnecessary hashtable remove+add if the block doesn't
- // move, but doing better isn't worth the effort.
- DeadBlock db;
- FreeCallback(aOldPtr, t, &db);
- void* ptr = gMallocTable->realloc(aOldPtr, aSize);
- if (ptr) {
- AllocCallback(ptr, aSize, t);
- MaybeAddToDeadBlockTable(db);
- } else {
- // If realloc fails, we undo the prior operations by re-inserting the old
- // pointer into the live block table. We don't have to do anything with the
- // dead block list because the dead block hasn't yet been inserted. The
- // block will end up looking like it was allocated for the first time here,
- // which is untrue, and the slop bytes will be zero, which may be untrue.
- // But this case is rare and doing better isn't worth the effort.
- AllocCallback(aOldPtr, gMallocTable->malloc_usable_size(aOldPtr), t);
- }
- return ptr;
-}
-
-void*
-replace_memalign(size_t aAlignment, size_t aSize)
-{
- using namespace mozilla::dmd;
-
- if (!gIsDMDInitialized) {
- return gMallocTable->memalign(aAlignment, aSize);
- }
-
- Thread* t = Thread::Fetch();
- if (t->InterceptsAreBlocked()) {
- return InfallibleAllocPolicy::memalign_(aAlignment, aSize);
- }
-
- void* ptr = gMallocTable->memalign(aAlignment, aSize);
- AllocCallback(ptr, aSize, t);
- return ptr;
-}
-
-void
-replace_free(void* aPtr)
-{
- using namespace mozilla::dmd;
-
- if (!gIsDMDInitialized) {
- gMallocTable->free(aPtr);
- return;
- }
-
- Thread* t = Thread::Fetch();
- if (t->InterceptsAreBlocked()) {
- return InfallibleAllocPolicy::free_(aPtr);
- }
-
- // Do the actual free after updating the table. Otherwise, another thread
- // could call malloc and get the freed block and update the table, and then
- // our update here would remove the newly-malloc'd block.
- DeadBlock db;
- FreeCallback(aPtr, t, &db);
- MaybeAddToDeadBlockTable(db);
- gMallocTable->free(aPtr);
-}
-
-namespace mozilla {
-namespace dmd {
-
-//---------------------------------------------------------------------------
-// Options (Part 2)
-//---------------------------------------------------------------------------
-
-// Given an |aOptionName| like "foo", succeed if |aArg| has the form "foo=blah"
-// (where "blah" is non-empty) and return the pointer to "blah". |aArg| can
-// have leading space chars (but not other whitespace).
-const char*
-Options::ValueIfMatch(const char* aArg, const char* aOptionName)
-{
- MOZ_ASSERT(!isspace(*aArg)); // any leading whitespace should not remain
- size_t optionLen = strlen(aOptionName);
- if (strncmp(aArg, aOptionName, optionLen) == 0 && aArg[optionLen] == '=' &&
- aArg[optionLen + 1]) {
- return aArg + optionLen + 1;
- }
- return nullptr;
-}
-
-// Extracts a |long| value for an option from an argument. It must be within
-// the range |aMin..aMax| (inclusive).
-bool
-Options::GetLong(const char* aArg, const char* aOptionName,
- long aMin, long aMax, long* aValue)
-{
- if (const char* optionValue = ValueIfMatch(aArg, aOptionName)) {
- char* endPtr;
- *aValue = strtol(optionValue, &endPtr, /* base */ 10);
- if (!*endPtr && aMin <= *aValue && *aValue <= aMax &&
- *aValue != LONG_MIN && *aValue != LONG_MAX) {
- return true;
- }
- }
- return false;
-}
-
-// Extracts a |bool| value for an option -- encoded as "yes" or "no" -- from an
-// argument.
-bool
-Options::GetBool(const char* aArg, const char* aOptionName, bool* aValue)
-{
- if (const char* optionValue = ValueIfMatch(aArg, aOptionName)) {
- if (strcmp(optionValue, "yes") == 0) {
- *aValue = true;
- return true;
- }
- if (strcmp(optionValue, "no") == 0) {
- *aValue = false;
- return true;
- }
- }
- return false;
-}
-
-Options::Options(const char* aDMDEnvVar)
- : mDMDEnvVar(aDMDEnvVar ? InfallibleAllocPolicy::strdup_(aDMDEnvVar)
- : nullptr)
- , mMode(Mode::DarkMatter)
- , mStacks(Stacks::Partial)
- , mShowDumpStats(false)
-{
- // It's no longer necessary to set the DMD env var to "1" if you want default
- // options (you can leave it undefined) but we still accept "1" for
- // backwards compatibility.
- char* e = mDMDEnvVar;
- if (e && strcmp(e, "1") != 0) {
- bool isEnd = false;
- while (!isEnd) {
- // Consume leading whitespace.
- while (isspace(*e)) {
- e++;
- }
-
- // Save the start of the arg.
- const char* arg = e;
-
- // Find the first char after the arg, and temporarily change it to '\0'
- // to isolate the arg.
- while (!isspace(*e) && *e != '\0') {
- e++;
- }
- char replacedChar = *e;
- isEnd = replacedChar == '\0';
- *e = '\0';
-
- // Handle arg
- bool myBool;
- if (strcmp(arg, "--mode=live") == 0) {
- mMode = Mode::Live;
- } else if (strcmp(arg, "--mode=dark-matter") == 0) {
- mMode = Mode::DarkMatter;
- } else if (strcmp(arg, "--mode=cumulative") == 0) {
- mMode = Mode::Cumulative;
- } else if (strcmp(arg, "--mode=scan") == 0) {
- mMode = Mode::Scan;
-
- } else if (strcmp(arg, "--stacks=full") == 0) {
- mStacks = Stacks::Full;
- } else if (strcmp(arg, "--stacks=partial") == 0) {
- mStacks = Stacks::Partial;
-
- } else if (GetBool(arg, "--show-dump-stats", &myBool)) {
- mShowDumpStats = myBool;
-
- } else if (strcmp(arg, "") == 0) {
- // This can only happen if there is trailing whitespace. Ignore.
- MOZ_ASSERT(isEnd);
-
- } else {
- BadArg(arg);
- }
-
- // Undo the temporary isolation.
- *e = replacedChar;
- }
- }
-
- if (mMode == Mode::Scan) {
- mStacks = Stacks::Full;
- }
-}
-
-void
-Options::BadArg(const char* aArg)
-{
- StatusMsg("\n");
- StatusMsg("Bad entry in the $DMD environment variable: '%s'.\n", aArg);
- StatusMsg("See the output of |mach help run| for the allowed options.\n");
- exit(1);
-}
-
-const char*
-Options::ModeString() const
-{
- switch (mMode) {
- case Mode::Live:
- return "live";
- case Mode::DarkMatter:
- return "dark-matter";
- case Mode::Cumulative:
- return "cumulative";
- case Mode::Scan:
- return "scan";
- default:
- MOZ_ASSERT(false);
- return "(unknown DMD mode)";
- }
-}
-
-//---------------------------------------------------------------------------
-// DMD start-up
-//---------------------------------------------------------------------------
-
-#ifdef XP_MACOSX
-static void
-NopStackWalkCallback(uint32_t aFrameNumber, void* aPc, void* aSp,
- void* aClosure)
-{
-}
-#endif
-
-// WARNING: this function runs *very* early -- before all static initializers
-// have run. For this reason, non-scalar globals such as gStateLock and
-// gStackTraceTable are allocated dynamically (so we can guarantee their
-// construction in this function) rather than statically.
-static void
-Init(const malloc_table_t* aMallocTable)
-{
- gMallocTable = aMallocTable;
- gDMDBridge = InfallibleAllocPolicy::new_<DMDBridge>();
-
- // DMD is controlled by the |DMD| environment variable.
- const char* e = getenv("DMD");
-
- if (e) {
- StatusMsg("$DMD = '%s'\n", e);
- } else {
- StatusMsg("$DMD is undefined\n", e);
- }
-
- // Parse $DMD env var.
- gOptions = InfallibleAllocPolicy::new_<Options>(e);
-
-#ifdef XP_MACOSX
- // On Mac OS X we need to call StackWalkInitCriticalAddress() very early
- // (prior to the creation of any mutexes, apparently) otherwise we can get
- // hangs when getting stack traces (bug 821577). But
- // StackWalkInitCriticalAddress() isn't exported from xpcom/, so instead we
- // just call MozStackWalk, because that calls StackWalkInitCriticalAddress().
- // See the comment above StackWalkInitCriticalAddress() for more details.
- (void)MozStackWalk(NopStackWalkCallback, /* skipFrames */ 0,
- /* maxFrames */ 1, nullptr, 0, nullptr);
-#endif
-
- gStateLock = InfallibleAllocPolicy::new_<Mutex>();
-
- gBernoulli = (FastBernoulliTrial*)
- InfallibleAllocPolicy::malloc_(sizeof(FastBernoulliTrial));
- ResetBernoulli();
-
- DMD_CREATE_TLS_INDEX(gTlsIndex);
-
- {
- AutoLockState lock;
-
- gStackTraceTable = InfallibleAllocPolicy::new_<StackTraceTable>();
- MOZ_ALWAYS_TRUE(gStackTraceTable->init(8192));
-
- gLiveBlockTable = InfallibleAllocPolicy::new_<LiveBlockTable>();
- MOZ_ALWAYS_TRUE(gLiveBlockTable->init(8192));
-
- // Create this even if the mode isn't Cumulative (albeit with a small
- // size), in case the mode is changed later on (as is done by SmokeDMD.cpp,
- // for example).
- gDeadBlockTable = InfallibleAllocPolicy::new_<DeadBlockTable>();
- size_t tableSize = gOptions->IsCumulativeMode() ? 8192 : 4;
- MOZ_ALWAYS_TRUE(gDeadBlockTable->init(tableSize));
- }
-
- gIsDMDInitialized = true;
-}
-
-//---------------------------------------------------------------------------
-// Block reporting and unreporting
-//---------------------------------------------------------------------------
-
-static void
-ReportHelper(const void* aPtr, bool aReportedOnAlloc)
-{
- if (!gOptions->IsDarkMatterMode() || !aPtr) {
- return;
- }
-
- Thread* t = Thread::Fetch();
-
- AutoBlockIntercepts block(t);
- AutoLockState lock;
-
- if (LiveBlockTable::Ptr p = gLiveBlockTable->lookup(aPtr)) {
- p->Report(t, aReportedOnAlloc);
- } else {
- // We have no record of the block. It must be a bogus pointer. This should
- // be extremely rare because Report() is almost always called in
- // conjunction with a malloc_size_of-style function.
- }
-}
-
-void
-DMDFuncs::Report(const void* aPtr)
-{
- ReportHelper(aPtr, /* onAlloc */ false);
-}
-
-void
-DMDFuncs::ReportOnAlloc(const void* aPtr)
-{
- ReportHelper(aPtr, /* onAlloc */ true);
-}
-
-//---------------------------------------------------------------------------
-// DMD output
-//---------------------------------------------------------------------------
-
-// The version number of the output format. Increment this if you make
-// backwards-incompatible changes to the format. See DMD.h for the version
-// history.
-static const int kOutputVersionNumber = 5;
-
-// Note that, unlike most SizeOf* functions, this function does not take a
-// |mozilla::MallocSizeOf| argument. That's because those arguments are
-// primarily to aid DMD track heap blocks... but DMD deliberately doesn't track
-// heap blocks it allocated for itself!
-//
-// SizeOfInternal should be called while you're holding the state lock and
-// while intercepts are blocked; SizeOf acquires the lock and blocks
-// intercepts.
-
-static void
-SizeOfInternal(Sizes* aSizes)
-{
- MOZ_ASSERT(gStateLock->IsLocked());
- MOZ_ASSERT(Thread::Fetch()->InterceptsAreBlocked());
-
- aSizes->Clear();
-
- StackTraceSet usedStackTraces;
- GatherUsedStackTraces(usedStackTraces);
-
- for (auto r = gStackTraceTable->all(); !r.empty(); r.popFront()) {
- StackTrace* const& st = r.front();
-
- if (usedStackTraces.has(st)) {
- aSizes->mStackTracesUsed += MallocSizeOf(st);
- } else {
- aSizes->mStackTracesUnused += MallocSizeOf(st);
- }
- }
-
- aSizes->mStackTraceTable =
- gStackTraceTable->sizeOfIncludingThis(MallocSizeOf);
-
- aSizes->mLiveBlockTable = gLiveBlockTable->sizeOfIncludingThis(MallocSizeOf);
-
- aSizes->mDeadBlockTable = gDeadBlockTable->sizeOfIncludingThis(MallocSizeOf);
-}
-
-void
-DMDFuncs::SizeOf(Sizes* aSizes)
-{
- aSizes->Clear();
-
- AutoBlockIntercepts block(Thread::Fetch());
- AutoLockState lock;
- SizeOfInternal(aSizes);
-}
-
-void
-DMDFuncs::ClearReports()
-{
- if (!gOptions->IsDarkMatterMode()) {
- return;
- }
-
- AutoLockState lock;
-
- // Unreport all blocks that were marked reported by a memory reporter. This
- // excludes those that were reported on allocation, because they need to keep
- // their reported marking.
- for (auto r = gLiveBlockTable->all(); !r.empty(); r.popFront()) {
- r.front().UnreportIfNotReportedOnAlloc();
- }
-}
-
-class ToIdStringConverter final
-{
-public:
- ToIdStringConverter()
- : mNextId(0)
- {
- MOZ_ALWAYS_TRUE(mIdMap.init(512));
- }
-
- // Converts a pointer to a unique ID. Reuses the existing ID for the pointer
- // if it's been seen before.
- const char* ToIdString(const void* aPtr)
- {
- uint32_t id;
- PointerIdMap::AddPtr p = mIdMap.lookupForAdd(aPtr);
- if (!p) {
- id = mNextId++;
- MOZ_ALWAYS_TRUE(mIdMap.add(p, aPtr, id));
- } else {
- id = p->value();
- }
- return Base32(id);
- }
-
- size_t sizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
- {
- return mIdMap.sizeOfExcludingThis(aMallocSizeOf);
- }
-
-private:
- // This function converts an integer to base-32. We use base-32 values for
- // indexing into the traceTable and the frameTable, for the following reasons.
- //
- // - Base-32 gives more compact indices than base-16.
- //
- // - 32 is a power-of-two, which makes the necessary div/mod calculations
- // fast.
- //
- // - We can (and do) choose non-numeric digits for base-32. When
- // inspecting/debugging the JSON output, non-numeric indices are easier to
- // search for than numeric indices.
- //
- char* Base32(uint32_t aN)
- {
- static const char digits[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef";
-
- char* b = mIdBuf + kIdBufLen - 1;
- *b = '\0';
- do {
- b--;
- if (b == mIdBuf) {
- MOZ_CRASH("Base32 buffer too small");
- }
- *b = digits[aN % 32];
- aN /= 32;
- } while (aN);
-
- return b;
- }
-
- PointerIdMap mIdMap;
- uint32_t mNextId;
-
- // |mIdBuf| must have space for at least eight chars, which is the space
- // needed to hold 'Dffffff' (including the terminating null char), which is
- // the base-32 representation of 0xffffffff.
- static const size_t kIdBufLen = 16;
- char mIdBuf[kIdBufLen];
-};
-
-// Helper class for converting a pointer value to a string.
-class ToStringConverter
-{
-public:
- const char* ToPtrString(const void* aPtr)
- {
- snprintf(kPtrBuf, sizeof(kPtrBuf) - 1, "%" PRIxPTR, (uintptr_t)aPtr);
- return kPtrBuf;
- }
-
-private:
- char kPtrBuf[32];
-};
-
-static void
-WriteBlockContents(JSONWriter& aWriter, const LiveBlock& aBlock)
-{
- size_t numWords = aBlock.ReqSize() / sizeof(uintptr_t*);
- if (numWords == 0) {
- return;
- }
-
- aWriter.StartArrayProperty("contents", aWriter.SingleLineStyle);
- {
- const uintptr_t** block = (const uintptr_t**)aBlock.Address();
- ToStringConverter sc;
- for (size_t i = 0; i < numWords; ++i) {
- aWriter.StringElement(sc.ToPtrString(block[i]));
- }
- }
- aWriter.EndArray();
-}
-
-static void
-AnalyzeImpl(UniquePtr<JSONWriteFunc> aWriter)
-{
- // Some blocks may have been allocated while creating |aWriter|. Those blocks
- // will be freed at the end of this function when |write| is destroyed. The
- // allocations will have occurred while intercepts were not blocked, so the
- // frees better be as well, otherwise we'll get assertion failures.
- // Therefore, this declaration must precede the AutoBlockIntercepts
- // declaration, to ensure that |write| is destroyed *after* intercepts are
- // unblocked.
- JSONWriter writer(Move(aWriter));
-
- AutoBlockIntercepts block(Thread::Fetch());
- AutoLockState lock;
-
- // Allocate this on the heap instead of the stack because it's fairly large.
- auto locService = InfallibleAllocPolicy::new_<CodeAddressService>();
-
- StackTraceSet usedStackTraces;
- MOZ_ALWAYS_TRUE(usedStackTraces.init(512));
-
- PointerSet usedPcs;
- MOZ_ALWAYS_TRUE(usedPcs.init(512));
-
- size_t iscSize;
-
- static int analysisCount = 1;
- StatusMsg("Dump %d {\n", analysisCount++);
-
- writer.Start();
- {
- writer.IntProperty("version", kOutputVersionNumber);
-
- writer.StartObjectProperty("invocation");
- {
- const char* var = gOptions->DMDEnvVar();
- if (var) {
- writer.StringProperty("dmdEnvVar", var);
- } else {
- writer.NullProperty("dmdEnvVar");
- }
-
- writer.StringProperty("mode", gOptions->ModeString());
- }
- writer.EndObject();
-
- StatusMsg(" Constructing the heap block list...\n");
-
- ToIdStringConverter isc;
- ToStringConverter sc;
-
- writer.StartArrayProperty("blockList");
- {
- // Lambda that writes out a live block.
- auto writeLiveBlock = [&](const LiveBlock& aB, size_t aNum) {
- aB.AddStackTracesToTable(usedStackTraces);
-
- MOZ_ASSERT_IF(gOptions->IsScanMode(), aNum == 1);
-
- writer.StartObjectElement(writer.SingleLineStyle);
- {
- if (gOptions->IsScanMode()) {
- writer.StringProperty("addr", sc.ToPtrString(aB.Address()));
- WriteBlockContents(writer, aB);
- }
- writer.IntProperty("req", aB.ReqSize());
- if (aB.SlopSize() > 0) {
- writer.IntProperty("slop", aB.SlopSize());
- }
-
- if (aB.AllocStackTrace()) {
- writer.StringProperty("alloc",
- isc.ToIdString(aB.AllocStackTrace()));
- }
-
- if (gOptions->IsDarkMatterMode() && aB.NumReports() > 0) {
- writer.StartArrayProperty("reps");
- {
- if (aB.ReportStackTrace1()) {
- writer.StringElement(isc.ToIdString(aB.ReportStackTrace1()));
- }
- if (aB.ReportStackTrace2()) {
- writer.StringElement(isc.ToIdString(aB.ReportStackTrace2()));
- }
- }
- writer.EndArray();
- }
-
- if (aNum > 1) {
- writer.IntProperty("num", aNum);
- }
- }
- writer.EndObject();
- };
-
- // Live blocks.
- if (!gOptions->IsScanMode()) {
- // At this point we typically have many LiveBlocks that differ only in
- // their address. Aggregate them to reduce the size of the output file.
- AggregatedLiveBlockTable agg;
- MOZ_ALWAYS_TRUE(agg.init(8192));
- for (auto r = gLiveBlockTable->all(); !r.empty(); r.popFront()) {
- const LiveBlock& b = r.front();
- b.AddStackTracesToTable(usedStackTraces);
-
- if (AggregatedLiveBlockTable::AddPtr p = agg.lookupForAdd(&b)) {
- p->value() += 1;
- } else {
- MOZ_ALWAYS_TRUE(agg.add(p, &b, 1));
- }
- }
-
- // Now iterate over the aggregated table.
- for (auto r = agg.all(); !r.empty(); r.popFront()) {
- const LiveBlock& b = *r.front().key();
- size_t num = r.front().value();
- writeLiveBlock(b, num);
- }
-
- } else {
- // In scan mode we cannot aggregate because we print each live block's
- // address and contents.
- for (auto r = gLiveBlockTable->all(); !r.empty(); r.popFront()) {
- const LiveBlock& b = r.front();
- b.AddStackTracesToTable(usedStackTraces);
-
- writeLiveBlock(b, 1);
- }
- }
-
- // Dead blocks.
- for (auto r = gDeadBlockTable->all(); !r.empty(); r.popFront()) {
- const DeadBlock& b = r.front().key();
- b.AddStackTracesToTable(usedStackTraces);
-
- size_t num = r.front().value();
- MOZ_ASSERT(num > 0);
-
- writer.StartObjectElement(writer.SingleLineStyle);
- {
- writer.IntProperty("req", b.ReqSize());
- if (b.SlopSize() > 0) {
- writer.IntProperty("slop", b.SlopSize());
- }
- if (b.AllocStackTrace()) {
- writer.StringProperty("alloc", isc.ToIdString(b.AllocStackTrace()));
- }
-
- if (num > 1) {
- writer.IntProperty("num", num);
- }
- }
- writer.EndObject();
- }
- }
- writer.EndArray();
-
- StatusMsg(" Constructing the stack trace table...\n");
-
- writer.StartObjectProperty("traceTable");
- {
- for (auto r = usedStackTraces.all(); !r.empty(); r.popFront()) {
- const StackTrace* const st = r.front();
- writer.StartArrayProperty(isc.ToIdString(st), writer.SingleLineStyle);
- {
- for (uint32_t i = 0; i < st->Length(); i++) {
- const void* pc = st->Pc(i);
- writer.StringElement(isc.ToIdString(pc));
- MOZ_ALWAYS_TRUE(usedPcs.put(pc));
- }
- }
- writer.EndArray();
- }
- }
- writer.EndObject();
-
- StatusMsg(" Constructing the stack frame table...\n");
-
- writer.StartObjectProperty("frameTable");
- {
- static const size_t locBufLen = 1024;
- char locBuf[locBufLen];
-
- for (PointerSet::Enum e(usedPcs); !e.empty(); e.popFront()) {
- const void* const pc = e.front();
-
- // Use 0 for the frame number. See the JSON format description comment
- // in DMD.h to understand why.
- locService->GetLocation(0, pc, locBuf, locBufLen);
- writer.StringProperty(isc.ToIdString(pc), locBuf);
- }
- }
- writer.EndObject();
-
- iscSize = isc.sizeOfExcludingThis(MallocSizeOf);
- }
- writer.End();
-
- if (gOptions->ShowDumpStats()) {
- Sizes sizes;
- SizeOfInternal(&sizes);
-
- static const size_t kBufLen = 64;
- char buf1[kBufLen];
- char buf2[kBufLen];
- char buf3[kBufLen];
-
- StatusMsg(" Execution measurements {\n");
-
- StatusMsg(" Data structures that persist after Dump() ends {\n");
-
- StatusMsg(" Used stack traces: %10s bytes\n",
- Show(sizes.mStackTracesUsed, buf1, kBufLen));
-
- StatusMsg(" Unused stack traces: %10s bytes\n",
- Show(sizes.mStackTracesUnused, buf1, kBufLen));
-
- StatusMsg(" Stack trace table: %10s bytes (%s entries, %s used)\n",
- Show(sizes.mStackTraceTable, buf1, kBufLen),
- Show(gStackTraceTable->capacity(), buf2, kBufLen),
- Show(gStackTraceTable->count(), buf3, kBufLen));
-
- StatusMsg(" Live block table: %10s bytes (%s entries, %s used)\n",
- Show(sizes.mLiveBlockTable, buf1, kBufLen),
- Show(gLiveBlockTable->capacity(), buf2, kBufLen),
- Show(gLiveBlockTable->count(), buf3, kBufLen));
-
- StatusMsg(" Dead block table: %10s bytes (%s entries, %s used)\n",
- Show(sizes.mDeadBlockTable, buf1, kBufLen),
- Show(gDeadBlockTable->capacity(), buf2, kBufLen),
- Show(gDeadBlockTable->count(), buf3, kBufLen));
-
- StatusMsg(" }\n");
- StatusMsg(" Data structures that are destroyed after Dump() ends {\n");
-
- StatusMsg(" Location service: %10s bytes\n",
- Show(locService->SizeOfIncludingThis(MallocSizeOf), buf1, kBufLen));
- StatusMsg(" Used stack traces set: %10s bytes\n",
- Show(usedStackTraces.sizeOfExcludingThis(MallocSizeOf), buf1, kBufLen));
- StatusMsg(" Used PCs set: %10s bytes\n",
- Show(usedPcs.sizeOfExcludingThis(MallocSizeOf), buf1, kBufLen));
- StatusMsg(" Pointer ID map: %10s bytes\n",
- Show(iscSize, buf1, kBufLen));
-
- StatusMsg(" }\n");
- StatusMsg(" Counts {\n");
-
- size_t hits = locService->NumCacheHits();
- size_t misses = locService->NumCacheMisses();
- size_t requests = hits + misses;
- StatusMsg(" Location service: %10s requests\n",
- Show(requests, buf1, kBufLen));
-
- size_t count = locService->CacheCount();
- size_t capacity = locService->CacheCapacity();
- StatusMsg(" Location service cache: "
- "%4.1f%% hit rate, %.1f%% occupancy at end\n",
- Percent(hits, requests), Percent(count, capacity));
-
- StatusMsg(" }\n");
- StatusMsg(" }\n");
- }
-
- InfallibleAllocPolicy::delete_(locService);
-
- StatusMsg("}\n");
-}
-
-void
-DMDFuncs::Analyze(UniquePtr<JSONWriteFunc> aWriter)
-{
- AnalyzeImpl(Move(aWriter));
- ClearReports();
-}
-
-//---------------------------------------------------------------------------
-// Testing
-//---------------------------------------------------------------------------
-
-void
-DMDFuncs::ResetEverything(const char* aOptions)
-{
- AutoLockState lock;
-
- // Reset options.
- InfallibleAllocPolicy::delete_(gOptions);
- gOptions = InfallibleAllocPolicy::new_<Options>(aOptions);
-
- // Clear all existing blocks.
- gLiveBlockTable->clear();
- gDeadBlockTable->clear();
-
- // Reset gBernoulli to a deterministic state. (Its current state depends on
- // all previous trials.)
- ResetBernoulli();
-}
-
-} // namespace dmd
-} // namespace mozilla
diff --git a/memory/replace/dmd/DMD.h b/memory/replace/dmd/DMD.h
deleted file mode 100644
index ca3ccab16..000000000
--- a/memory/replace/dmd/DMD.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef DMD_h___
-#define DMD_h___
-
-#include <string.h>
-#include <stdarg.h>
-
-#include "mozilla/DebugOnly.h"
-#include "mozilla/Move.h"
-#include "mozilla/Types.h"
-#include "mozilla/UniquePtr.h"
-
-#include "replace_malloc_bridge.h"
-
-namespace mozilla {
-
-class JSONWriteFunc;
-
-namespace dmd {
-
-struct Sizes
-{
- size_t mStackTracesUsed;
- size_t mStackTracesUnused;
- size_t mStackTraceTable;
- size_t mLiveBlockTable;
- size_t mDeadBlockTable;
-
- Sizes() { Clear(); }
- void Clear() { memset(this, 0, sizeof(Sizes)); }
-};
-
-// See further below for a description of each method. The DMDFuncs class
-// should contain a virtual method for each of them (except IsRunning,
-// which can be inferred from the DMDFuncs singleton existing).
-struct DMDFuncs
-{
- virtual void Report(const void*);
-
- virtual void ReportOnAlloc(const void*);
-
- virtual void ClearReports();
-
- virtual void Analyze(UniquePtr<JSONWriteFunc>);
-
- virtual void SizeOf(Sizes*);
-
- virtual void StatusMsg(const char*, va_list);
-
- virtual void ResetEverything(const char*);
-
-#ifndef REPLACE_MALLOC_IMPL
- // We deliberately don't use ReplaceMalloc::GetDMDFuncs here, because if we
- // did, the following would happen.
- // - The code footprint of each call to Get() larger as GetDMDFuncs ends
- // up inlined.
- // - When no replace-malloc library is loaded, the number of instructions
- // executed is equivalent, but don't necessarily fit in the same cache
- // line.
- // - When a non-DMD replace-malloc library is loaded, the overhead is
- // higher because there is first a check for the replace malloc bridge
- // and then for the DMDFuncs singleton.
- // Initializing the DMDFuncs singleton on the first access makes the
- // overhead even worse. Either Get() is inlined and massive, or it isn't
- // and a simple value check becomes a function call.
- static DMDFuncs* Get() { return sSingleton.Get(); }
-
-private:
- // Wrapper class keeping a pointer to the DMD functions. It is statically
- // initialized because it needs to be set early enough.
- // Debug builds also check that it's never accessed before the static
- // initialization actually occured, which could be the case if some other
- // static initializer ended up calling into DMD.
- class Singleton
- {
- public:
- Singleton()
- : mValue(ReplaceMalloc::GetDMDFuncs())
-#ifdef DEBUG
- , mInitialized(true)
-#endif
- {}
-
- DMDFuncs* Get()
- {
- MOZ_ASSERT(mInitialized);
- return mValue;
- }
-
- private:
- DMDFuncs* mValue;
-#ifdef DEBUG
- bool mInitialized;
-#endif
- };
-
- // This singleton pointer must be defined on the program side. In Gecko,
- // this is done in xpcom/base/nsMemoryInfoDumper.cpp.
- static /* DMDFuncs:: */Singleton sSingleton;
-#endif
-};
-
-#ifndef REPLACE_MALLOC_IMPL
-// Mark a heap block as reported by a memory reporter.
-inline void
-Report(const void* aPtr)
-{
- DMDFuncs* funcs = DMDFuncs::Get();
- if (funcs) {
- funcs->Report(aPtr);
- }
-}
-
-// Mark a heap block as reported immediately on allocation.
-inline void
-ReportOnAlloc(const void* aPtr)
-{
- DMDFuncs* funcs = DMDFuncs::Get();
- if (funcs) {
- funcs->ReportOnAlloc(aPtr);
- }
-}
-
-// Clears existing reportedness data from any prior runs of the memory
-// reporters. The following sequence should be used.
-// - ClearReports()
-// - run the memory reporters
-// - Analyze()
-// This sequence avoids spurious twice-reported warnings.
-inline void
-ClearReports()
-{
- DMDFuncs* funcs = DMDFuncs::Get();
- if (funcs) {
- funcs->ClearReports();
- }
-}
-
-// Determines which heap blocks have been reported, and dumps JSON output
-// (via |aWriter|) describing the heap.
-//
-// The following sample output contains comments that explain the format and
-// design choices. The output files can be quite large, so a number of
-// decisions were made to minimize size, such as using short property names and
-// omitting properties whenever possible.
-//
-// {
-// // The version number of the format, which will be incremented each time
-// // backwards-incompatible changes are made. A mandatory integer.
-// //
-// // Version history:
-// // - 1: Bug 1044709
-// // - 2: Bug 1094552
-// // - 3: Bug 1100851
-// // - 4: Bug 1121830
-// // - 5: Bug 1253512
-// "version": 5,
-//
-// // Information about how DMD was invoked. A mandatory object.
-// "invocation": {
-// // The contents of the $DMD environment variable. A string, or |null| if
-// // $DMD is undefined.
-// "dmdEnvVar": "--mode=dark-matter",
-//
-// // The profiling mode. A mandatory string taking one of the following
-// // values: "live", "dark-matter", "cumulative", "scan".
-// "mode": "dark-matter",
-// },
-//
-// // Details of all analyzed heap blocks. A mandatory array.
-// "blockList": [
-// // An example of a heap block.
-// {
-// // Requested size, in bytes. This is a mandatory integer.
-// "req": 3584,
-//
-// // Requested slop size, in bytes. This is mandatory if it is non-zero,
-// // but omitted otherwise.
-// "slop": 512,
-//
-// // The stack trace at which the block was allocated. An optional
-// // string that indexes into the "traceTable" object. If omitted, no
-// // allocation stack trace was recorded for the block.
-// "alloc": "A",
-//
-// // One or more stack traces at which this heap block was reported by a
-// // memory reporter. An optional array that will only be present in
-// // "dark-matter" mode. The elements are strings that index into
-// // the "traceTable" object.
-// "reps": ["B"]
-//
-// // The number of heap blocks with exactly the above properties. This
-// // is mandatory if it is greater than one, but omitted otherwise.
-// // (Blocks with identical properties don't have to be aggregated via
-// // this property, but it can greatly reduce output file size.)
-// "num": 5,
-//
-// // The address of the block. This is mandatory in "scan" mode, but
-// // omitted otherwise.
-// "addr": "4e4e4e4e",
-//
-// // The contents of the block, read one word at a time. This is
-// // mandatory in "scan" mode for blocks at least one word long, but
-// // omitted otherwise.
-// "contents": ["0", "6", "7f7f7f7f", "0"]
-// }
-// ],
-//
-// // The stack traces referenced by elements of the "blockList" array. This
-// // could be an array, but making it an object makes it easier to see
-// // which stacks correspond to which references in the "blockList" array.
-// "traceTable": {
-// // Each property corresponds to a stack trace mentioned in the "blocks"
-// // object. Each element is an index into the "frameTable" object.
-// "A": ["D", "E"],
-// "B": ["F", "G"]
-// },
-//
-// // The stack frames referenced by the "traceTable" object. The
-// // descriptions can be quite long, so they are stored separately from the
-// // "traceTable" object so that each one only has to be written once.
-// // This could also be an array, but again, making it an object makes it
-// // easier to see which frames correspond to which references in the
-// // "traceTable" object.
-// "frameTable": {
-// // Each property key is a frame key mentioned in the "traceTable" object.
-// // Each property value is a string containing a frame description. Each
-// // frame description must be in a format recognized by the stack-fixing
-// // scripts (e.g. fix_linux_stack.py), which require a frame number at
-// // the start. Because each stack frame description in this table can
-// // be shared between multiple stack traces, we use a dummy value of
-// // #00. The proper frame number can be reconstructed later by scripts
-// // that output stack traces in a conventional non-shared format.
-// "D": "#00: foo (Foo.cpp:123)",
-// "E": "#00: bar (Bar.cpp:234)",
-// "F": "#00: baz (Baz.cpp:345)",
-// "G": "#00: quux (Quux.cpp:456)"
-// }
-// }
-//
-// Implementation note: normally, this function wouldn't be templated, but in
-// that case, the function is compiled, which makes the destructor for the
-// UniquePtr fire up, and that needs JSONWriteFunc to be fully defined. That,
-// in turn, requires to include JSONWriter.h, which includes
-// double-conversion.h, which ends up breaking various things built with
-// -Werror for various reasons.
-//
-template <typename JSONWriteFunc>
-inline void
-Analyze(UniquePtr<JSONWriteFunc> aWriteFunc)
-{
- DMDFuncs* funcs = DMDFuncs::Get();
- if (funcs) {
- funcs->Analyze(Move(aWriteFunc));
- }
-}
-
-// Gets the size of various data structures. Used to implement a memory
-// reporter for DMD.
-inline void
-SizeOf(Sizes* aSizes)
-{
- DMDFuncs* funcs = DMDFuncs::Get();
- if (funcs) {
- funcs->SizeOf(aSizes);
- }
-}
-
-// Prints a status message prefixed with "DMD[<pid>]". Use sparingly.
-inline void
-StatusMsg(const char* aFmt, ...)
-{
- DMDFuncs* funcs = DMDFuncs::Get();
- if (funcs) {
- va_list ap;
- va_start(ap, aFmt);
- funcs->StatusMsg(aFmt, ap);
- va_end(ap);
- }
-}
-
-// Indicates whether or not DMD is running.
-inline bool
-IsRunning()
-{
- return !!DMDFuncs::Get();
-}
-
-// Resets all DMD options and then sets new ones according to those specified
-// in |aOptions|. Also clears all recorded data about allocations. Only used
-// for testing purposes.
-inline void
-ResetEverything(const char* aOptions)
-{
- DMDFuncs* funcs = DMDFuncs::Get();
- if (funcs) {
- funcs->ResetEverything(aOptions);
- }
-}
-#endif
-
-} // namespace dmd
-} // namespace mozilla
-
-#endif /* DMD_h___ */
diff --git a/memory/replace/dmd/README b/memory/replace/dmd/README
deleted file mode 100644
index eeca7047e..000000000
--- a/memory/replace/dmd/README
+++ /dev/null
@@ -1,2 +0,0 @@
-This is DMD. See https://wiki.mozilla.org/Performance/MemShrink/DMD for
-details on how to use it.
diff --git a/memory/replace/dmd/block_analyzer.py b/memory/replace/dmd/block_analyzer.py
deleted file mode 100644
index cc0da1e11..000000000
--- a/memory/replace/dmd/block_analyzer.py
+++ /dev/null
@@ -1,261 +0,0 @@
-#!/usr/bin/python
-
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# From a scan mode DMD log, extract some information about a
-# particular block, such as its allocation stack or which other blocks
-# contain pointers to it. This can be useful when investigating leaks
-# caused by unknown references to refcounted objects.
-
-import json
-import gzip
-import sys
-import argparse
-import re
-
-
-# The DMD output version this script handles.
-outputVersion = 5
-
-# If --ignore-alloc-fns is specified, stack frames containing functions that
-# match these strings will be removed from the *start* of stack traces. (Once
-# we hit a non-matching frame, any subsequent frames won't be removed even if
-# they do match.)
-allocatorFns = [
- 'malloc (',
- 'replace_malloc',
- 'replace_calloc',
- 'replace_realloc',
- 'replace_memalign',
- 'replace_posix_memalign',
- 'malloc_zone_malloc',
- 'moz_xmalloc',
- 'moz_xcalloc',
- 'moz_xrealloc',
- 'operator new(',
- 'operator new[](',
- 'g_malloc',
- 'g_slice_alloc',
- 'callocCanGC',
- 'reallocCanGC',
- 'vpx_malloc',
- 'vpx_calloc',
- 'vpx_realloc',
- 'vpx_memalign',
- 'js_malloc',
- 'js_calloc',
- 'js_realloc',
- 'pod_malloc',
- 'pod_calloc',
- 'pod_realloc',
- 'nsTArrayInfallibleAllocator::Malloc',
- # This one necessary to fully filter some sequences of allocation functions
- # that happen in practice. Note that ??? entries that follow non-allocation
- # functions won't be stripped, as explained above.
- '???',
-]
-
-####
-
-# Command line arguments
-
-def range_1_24(string):
- value = int(string)
- if value < 1 or value > 24:
- msg = '{:s} is not in the range 1..24'.format(string)
- raise argparse.ArgumentTypeError(msg)
- return value
-
-parser = argparse.ArgumentParser(description='Analyze the heap graph to find out things about an object. \
-By default this prints out information about blocks that point to the given block.')
-
-parser.add_argument('dmd_log_file_name',
- help='clamped DMD log file name')
-
-parser.add_argument('block',
- help='address of the block of interest')
-
-parser.add_argument('--info', dest='info', action='store_true',
- default=False,
- help='Print out information about the block.')
-
-parser.add_argument('-sfl', '--max-stack-frame-length', type=int,
- default=150,
- help='Maximum number of characters to print from each stack frame')
-
-parser.add_argument('-a', '--ignore-alloc-fns', action='store_true',
- help='ignore allocation functions at the start of traces')
-
-parser.add_argument('-f', '--max-frames', type=range_1_24,
- help='maximum number of frames to consider in each trace')
-
-parser.add_argument('-c', '--chain-reports', action='store_true',
- help='if only one block is found to hold onto the object, report the next one, too')
-
-
-####
-
-
-class BlockData:
- def __init__(self, json_block):
- self.addr = json_block['addr']
-
- if 'contents' in json_block:
- contents = json_block['contents']
- else:
- contents = []
- self.contents = []
- for c in contents:
- self.contents.append(int(c, 16))
-
- self.req_size = json_block['req']
-
- self.alloc_stack = json_block['alloc']
-
-
-def print_trace_segment(args, stacks, block):
- (traceTable, frameTable) = stacks
-
- for l in traceTable[block.alloc_stack]:
- # The 5: is to remove the bogus leading "#00: " from the stack frame.
- print ' ', frameTable[l][5:args.max_stack_frame_length]
-
-
-def show_referrers(args, blocks, stacks, block):
- visited = set([])
-
- anyFound = False
-
- while True:
- referrers = {}
-
- for b, data in blocks.iteritems():
- which_edge = 0
- for e in data.contents:
- if e == block:
- # 8 is the number of bytes per word on a 64-bit system.
- # XXX This means that this output will be wrong for logs from 32-bit systems!
- referrers.setdefault(b, []).append(8 * which_edge)
- anyFound = True
- which_edge += 1
-
- for r in referrers:
- sys.stdout.write('0x{} size = {} bytes'.format(blocks[r].addr, blocks[r].req_size))
- plural = 's' if len(referrers[r]) > 1 else ''
- sys.stdout.write(' at byte offset' + plural + ' ' + (', '.join(str(x) for x in referrers[r])))
- print
- print_trace_segment(args, stacks, blocks[r])
- print
-
- if args.chain_reports:
- if len(referrers) == 0:
- sys.stdout.write('Found no more referrers.\n')
- break
- if len(referrers) > 1:
- sys.stdout.write('Found too many referrers.\n')
- break
-
- sys.stdout.write('Chaining to next referrer.\n\n')
- for r in referrers:
- block = r
- if block in visited:
- sys.stdout.write('Found a loop.\n')
- break
- visited.add(block)
- else:
- break
-
- if not anyFound:
- print 'No referrers found.'
-
-
-def show_block_info(args, blocks, stacks, block):
- b = blocks[block]
- sys.stdout.write('block: 0x{}\n'.format(b.addr))
- sys.stdout.write('requested size: {} bytes\n'.format(b.req_size))
- sys.stdout.write('\n')
- sys.stdout.write('block contents: ')
- for c in b.contents:
- v = '0' if c == 0 else blocks[c].addr
- sys.stdout.write('0x{} '.format(v))
- sys.stdout.write('\n\n')
- sys.stdout.write('allocation stack:\n')
- print_trace_segment(args, stacks, b)
- return
-
-
-def cleanupTraceTable(args, frameTable, traceTable):
- # Remove allocation functions at the start of traces.
- if args.ignore_alloc_fns:
- # Build a regexp that matches every function in allocatorFns.
- escapedAllocatorFns = map(re.escape, allocatorFns)
- fn_re = re.compile('|'.join(escapedAllocatorFns))
-
- # Remove allocator fns from each stack trace.
- for traceKey, frameKeys in traceTable.items():
- numSkippedFrames = 0
- for frameKey in frameKeys:
- frameDesc = frameTable[frameKey]
- if re.search(fn_re, frameDesc):
- numSkippedFrames += 1
- else:
- break
- if numSkippedFrames > 0:
- traceTable[traceKey] = frameKeys[numSkippedFrames:]
-
- # Trim the number of frames.
- for traceKey, frameKeys in traceTable.items():
- if len(frameKeys) > args.max_frames:
- traceTable[traceKey] = frameKeys[:args.max_frames]
-
-
-def loadGraph(options):
- # Handle gzipped input if necessary.
- isZipped = options.dmd_log_file_name.endswith('.gz')
- opener = gzip.open if isZipped else open
-
- with opener(options.dmd_log_file_name, 'rb') as f:
- j = json.load(f)
-
- if j['version'] != outputVersion:
- raise Exception("'version' property isn't '{:d}'".format(outputVersion))
-
- invocation = j['invocation']
-
- block_list = j['blockList']
- blocks = {}
-
- for json_block in block_list:
- blocks[int(json_block['addr'], 16)] = BlockData(json_block)
-
- traceTable = j['traceTable']
- frameTable = j['frameTable']
-
- cleanupTraceTable(options, frameTable, traceTable)
-
- return (blocks, (traceTable, frameTable))
-
-
-def analyzeLogs():
- options = parser.parse_args()
-
- (blocks, stacks) = loadGraph(options)
-
- block = int(options.block, 16)
-
- if not block in blocks:
- print 'Object', block, 'not found in traces.'
- print 'It could still be the target of some nodes.'
- return
-
- if options.info:
- show_block_info(options, blocks, stacks, block)
- return
-
- show_referrers(options, blocks, stacks, block)
-
-
-if __name__ == "__main__":
- analyzeLogs()
diff --git a/memory/replace/dmd/dmd.py b/memory/replace/dmd/dmd.py
deleted file mode 100755
index d6b09f756..000000000
--- a/memory/replace/dmd/dmd.py
+++ /dev/null
@@ -1,890 +0,0 @@
-#! /usr/bin/env python
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-'''This script analyzes a JSON file emitted by DMD.'''
-
-from __future__ import print_function, division
-
-import argparse
-import collections
-import gzip
-import json
-import os
-import platform
-import re
-import shutil
-import sys
-import tempfile
-from bisect import bisect_right
-
-# The DMD output version this script handles.
-outputVersion = 5
-
-# If --ignore-alloc-fns is specified, stack frames containing functions that
-# match these strings will be removed from the *start* of stack traces. (Once
-# we hit a non-matching frame, any subsequent frames won't be removed even if
-# they do match.)
-allocatorFns = [
- # Matches malloc, replace_malloc, moz_xmalloc, vpx_malloc, js_malloc, pod_malloc, malloc_zone_*, g_malloc.
- 'malloc',
- # Matches calloc, replace_calloc, moz_xcalloc, vpx_calloc, js_calloc, pod_calloc, malloc_zone_calloc, pod_callocCanGC.
- 'calloc',
- # Matches realloc, replace_realloc, moz_xrealloc, vpx_realloc, js_realloc, pod_realloc, pod_reallocCanGC.
- 'realloc',
- # Matches memalign, posix_memalign, replace_memalign, replace_posix_memalign, moz_xmemalign, moz_xposix_memalign, vpx_memalign, malloc_zone_memalign.
- 'memalign',
- 'operator new(',
- 'operator new[](',
- 'g_slice_alloc',
- # This one necessary to fully filter some sequences of allocation functions
- # that happen in practice. Note that ??? entries that follow non-allocation
- # functions won't be stripped, as explained above.
- '???',
-]
-
-class Record(object):
- '''A record is an aggregation of heap blocks that have identical stack
- traces. It can also be used to represent the difference between two
- records.'''
-
- def __init__(self):
- self.numBlocks = 0
- self.reqSize = 0
- self.slopSize = 0
- self.usableSize = 0
- self.allocatedAtDesc = None
- self.reportedAtDescs = []
- self.usableSizes = collections.defaultdict(int)
-
- def isZero(self, args):
- return self.numBlocks == 0 and \
- self.reqSize == 0 and \
- self.slopSize == 0 and \
- self.usableSize == 0 and \
- len(self.usableSizes) == 0
-
- def negate(self):
- self.numBlocks = -self.numBlocks
- self.reqSize = -self.reqSize
- self.slopSize = -self.slopSize
- self.usableSize = -self.usableSize
-
- negatedUsableSizes = collections.defaultdict(int)
- for usableSize, count in self.usableSizes.items():
- negatedUsableSizes[-usableSize] = count
- self.usableSizes = negatedUsableSizes
-
- def subtract(self, r):
- # We should only be calling this on records with matching stack traces.
- # Check this.
- assert self.allocatedAtDesc == r.allocatedAtDesc
- assert self.reportedAtDescs == r.reportedAtDescs
-
- self.numBlocks -= r.numBlocks
- self.reqSize -= r.reqSize
- self.slopSize -= r.slopSize
- self.usableSize -= r.usableSize
-
- usableSizes1 = self.usableSizes
- usableSizes2 = r.usableSizes
- usableSizes3 = collections.defaultdict(int)
- for usableSize in usableSizes1:
- counts1 = usableSizes1[usableSize]
- if usableSize in usableSizes2:
- counts2 = usableSizes2[usableSize]
- del usableSizes2[usableSize]
- counts3 = counts1 - counts2
- if counts3 != 0:
- if counts3 < 0:
- usableSize = -usableSize
- counts3 = -counts3
- usableSizes3[usableSize] = counts3
- else:
- usableSizes3[usableSize] = counts1
-
- for usableSize in usableSizes2:
- usableSizes3[-usableSize] = usableSizes2[usableSize]
-
- self.usableSizes = usableSizes3
-
- @staticmethod
- def cmpByUsableSize(r1, r2):
- # Sort by usable size, then by req size.
- return cmp(abs(r1.usableSize), abs(r2.usableSize)) or \
- Record.cmpByReqSize(r1, r2)
-
- @staticmethod
- def cmpByReqSize(r1, r2):
- # Sort by req size.
- return cmp(abs(r1.reqSize), abs(r2.reqSize))
-
- @staticmethod
- def cmpBySlopSize(r1, r2):
- # Sort by slop size.
- return cmp(abs(r1.slopSize), abs(r2.slopSize))
-
- @staticmethod
- def cmpByNumBlocks(r1, r2):
- # Sort by block counts, then by usable size.
- return cmp(abs(r1.numBlocks), abs(r2.numBlocks)) or \
- Record.cmpByUsableSize(r1, r2)
-
-
-sortByChoices = {
- 'usable': Record.cmpByUsableSize, # the default
- 'req': Record.cmpByReqSize,
- 'slop': Record.cmpBySlopSize,
- 'num-blocks': Record.cmpByNumBlocks,
-}
-
-
-def parseCommandLine():
- # 24 is the maximum number of frames that DMD will produce.
- def range_1_24(string):
- value = int(string)
- if value < 1 or value > 24:
- msg = '{:s} is not in the range 1..24'.format(string)
- raise argparse.ArgumentTypeError(msg)
- return value
-
- description = '''
-Analyze heap data produced by DMD.
-If one file is specified, analyze it; if two files are specified, analyze the
-difference.
-Input files can be gzipped.
-Write to stdout unless -o/--output is specified.
-Stack traces are fixed to show function names, filenames and line numbers
-unless --no-fix-stacks is specified; stack fixing modifies the original file
-and may take some time. If specified, the BREAKPAD_SYMBOLS_PATH environment
-variable is used to find breakpad symbols for stack fixing.
-'''
- p = argparse.ArgumentParser(description=description)
-
- p.add_argument('-o', '--output', type=argparse.FileType('w'),
- help='output file; stdout if unspecified')
-
- p.add_argument('-f', '--max-frames', type=range_1_24,
- help='maximum number of frames to consider in each trace')
-
- p.add_argument('-s', '--sort-by', choices=sortByChoices.keys(),
- default='usable',
- help='sort the records by a particular metric')
-
- p.add_argument('-a', '--ignore-alloc-fns', action='store_true',
- help='ignore allocation functions at the start of traces')
-
- p.add_argument('--no-fix-stacks', action='store_true',
- help='do not fix stacks')
-
- p.add_argument('--clamp-contents', action='store_true',
- help='for a scan mode log, clamp addresses to the start of live blocks, or zero if not in one')
-
- p.add_argument('--print-clamp-stats', action='store_true',
- help='print information about the results of pointer clamping; mostly useful for debugging clamping')
-
- p.add_argument('--filter-stacks-for-testing', action='store_true',
- help='filter stack traces; only useful for testing purposes')
-
- p.add_argument('input_file',
- help='a file produced by DMD')
-
- p.add_argument('input_file2', nargs='?',
- help='a file produced by DMD; if present, it is diff\'d with input_file')
-
- return p.parse_args(sys.argv[1:])
-
-
-# Fix stacks if necessary: first write the output to a tempfile, then replace
-# the original file with it.
-def fixStackTraces(inputFilename, isZipped, opener):
- # This append() call is needed to make the import statements work when this
- # script is installed as a symlink.
- sys.path.append(os.path.dirname(__file__))
-
- bpsyms = os.environ.get('BREAKPAD_SYMBOLS_PATH', None)
- sysname = platform.system()
- if bpsyms and os.path.exists(bpsyms):
- import fix_stack_using_bpsyms as fixModule
- fix = lambda line: fixModule.fixSymbols(line, bpsyms)
- elif sysname == 'Linux':
- import fix_linux_stack as fixModule
- fix = lambda line: fixModule.fixSymbols(line)
- elif sysname == 'Darwin':
- import fix_macosx_stack as fixModule
- fix = lambda line: fixModule.fixSymbols(line)
- else:
- fix = None # there is no fix script for Windows
-
- if fix:
- # Fix stacks, writing output to a temporary file, and then
- # overwrite the original file.
- tmpFile = tempfile.NamedTemporaryFile(delete=False)
-
- # If the input is gzipped, then the output (written initially to
- # |tmpFile|) should be gzipped as well.
- #
- # And we want to set its pre-gzipped filename to '' rather than the
- # name of the temporary file, so that programs like the Unix 'file'
- # utility don't say that it was called 'tmp6ozTxE' (or something like
- # that) before it was zipped. So that explains the |filename=''|
- # parameter.
- #
- # But setting the filename like that clobbers |tmpFile.name|, so we
- # must get that now in order to move |tmpFile| at the end.
- tmpFilename = tmpFile.name
- if isZipped:
- tmpFile = gzip.GzipFile(filename='', fileobj=tmpFile)
-
- with opener(inputFilename, 'rb') as inputFile:
- for line in inputFile:
- tmpFile.write(fix(line))
-
- tmpFile.close()
-
- shutil.move(tmpFilename, inputFilename)
-
-
-def getDigestFromFile(args, inputFile):
- # Handle gzipped input if necessary.
- isZipped = inputFile.endswith('.gz')
- opener = gzip.open if isZipped else open
-
- # Fix stack traces unless otherwise instructed.
- if not args.no_fix_stacks:
- fixStackTraces(inputFile, isZipped, opener)
-
- if args.clamp_contents:
- clampBlockList(args, inputFile, isZipped, opener)
-
- with opener(inputFile, 'rb') as f:
- j = json.load(f)
-
- if j['version'] != outputVersion:
- raise Exception("'version' property isn't '{:d}'".format(outputVersion))
-
- # Extract the main parts of the JSON object.
- invocation = j['invocation']
- dmdEnvVar = invocation['dmdEnvVar']
- mode = invocation['mode']
- blockList = j['blockList']
- traceTable = j['traceTable']
- frameTable = j['frameTable']
-
- # Insert the necessary entries for unrecorded stack traces. Note that 'ut'
- # and 'uf' will not overlap with any keys produced by DMD's
- # ToIdStringConverter::Base32() function.
- unrecordedTraceID = 'ut'
- unrecordedFrameID = 'uf'
- traceTable[unrecordedTraceID] = [unrecordedFrameID]
- frameTable[unrecordedFrameID] = \
- '#00: (no stack trace recorded due to --stacks=partial)'
-
- # For the purposes of this script, 'scan' behaves like 'live'.
- if mode == 'scan':
- mode = 'live'
-
- if not mode in ['live', 'dark-matter', 'cumulative']:
- raise Exception("bad 'mode' property: '{:s}'".format(mode))
-
- # Remove allocation functions at the start of traces.
- if args.ignore_alloc_fns:
- # Build a regexp that matches every function in allocatorFns.
- escapedAllocatorFns = map(re.escape, allocatorFns)
- fn_re = re.compile('|'.join(escapedAllocatorFns))
-
- # Remove allocator fns from each stack trace.
- for traceKey, frameKeys in traceTable.items():
- numSkippedFrames = 0
- for frameKey in frameKeys:
- frameDesc = frameTable[frameKey]
- if re.search(fn_re, frameDesc):
- numSkippedFrames += 1
- else:
- break
- if numSkippedFrames > 0:
- traceTable[traceKey] = frameKeys[numSkippedFrames:]
-
- # Trim the number of frames.
- for traceKey, frameKeys in traceTable.items():
- if len(frameKeys) > args.max_frames:
- traceTable[traceKey] = frameKeys[:args.max_frames]
-
- def buildTraceDescription(traceTable, frameTable, traceKey):
- frameKeys = traceTable[traceKey]
- fmt = ' #{:02d}{:}'
-
- if args.filter_stacks_for_testing:
- # When running SmokeDMD.cpp, every stack trace should contain at
- # least one frame that contains 'DMD.cpp', from either |DMD.cpp| or
- # |SmokeDMD.cpp|. (Or 'dmd.cpp' on Windows.) If we see such a
- # frame, we replace the entire stack trace with a single,
- # predictable frame. There is too much variation in the stack
- # traces across different machines and platforms to do more precise
- # matching, but this level of matching will result in failure if
- # stack fixing fails completely.
- for frameKey in frameKeys:
- frameDesc = frameTable[frameKey]
- if 'DMD.cpp' in frameDesc or 'dmd.cpp' in frameDesc:
- return [fmt.format(1, ': ... DMD.cpp ...')]
-
- # The frame number is always '#00' (see DMD.h for why), so we have to
- # replace that with the correct frame number.
- desc = []
- for n, frameKey in enumerate(traceTable[traceKey], start=1):
- desc.append(fmt.format(n, frameTable[frameKey][3:]))
- return desc
-
- # Aggregate blocks into records. All sufficiently similar blocks go into a
- # single record.
-
- if mode in ['live', 'cumulative']:
- liveOrCumulativeRecords = collections.defaultdict(Record)
- elif mode == 'dark-matter':
- unreportedRecords = collections.defaultdict(Record)
- onceReportedRecords = collections.defaultdict(Record)
- twiceReportedRecords = collections.defaultdict(Record)
-
- heapUsableSize = 0
- heapBlocks = 0
-
- recordKeyPartCache = {}
-
- for block in blockList:
- # For each block we compute a |recordKey|, and all blocks with the same
- # |recordKey| are aggregated into a single record. The |recordKey| is
- # derived from the block's 'alloc' and 'reps' (if present) stack
- # traces.
- #
- # We use frame descriptions (e.g. "#00: foo (X.cpp:99)") when comparing
- # traces for equality. We can't use trace keys or frame keys because
- # they're not comparable across different DMD runs (which is relevant
- # when doing diffs).
- #
- # Using frame descriptions also fits in with the stack trimming done
- # for --max-frames, which requires that stack traces with common
- # beginnings but different endings to be considered equivalent. E.g. if
- # we have distinct traces T1:[A:D1,B:D2,C:D3] and T2:[X:D1,Y:D2,Z:D4]
- # and we trim the final frame of each they should be considered
- # equivalent because the untrimmed frame descriptions (D1 and D2)
- # match.
- #
- # Having said all that, during a single invocation of dmd.py on a
- # single DMD file, for a single frameKey value the record key will
- # always be the same, and we might encounter it 1000s of times. So we
- # cache prior results for speed.
- def makeRecordKeyPart(traceKey):
- if traceKey in recordKeyPartCache:
- return recordKeyPartCache[traceKey]
-
- recordKeyPart = str(map(lambda frameKey: frameTable[frameKey],
- traceTable[traceKey]))
- recordKeyPartCache[traceKey] = recordKeyPart
- return recordKeyPart
-
- allocatedAtTraceKey = block.get('alloc', unrecordedTraceID)
- if mode in ['live', 'cumulative']:
- recordKey = makeRecordKeyPart(allocatedAtTraceKey)
- records = liveOrCumulativeRecords
- elif mode == 'dark-matter':
- recordKey = makeRecordKeyPart(allocatedAtTraceKey)
- if 'reps' in block:
- reportedAtTraceKeys = block['reps']
- for reportedAtTraceKey in reportedAtTraceKeys:
- recordKey += makeRecordKeyPart(reportedAtTraceKey)
- if len(reportedAtTraceKeys) == 1:
- records = onceReportedRecords
- else:
- records = twiceReportedRecords
- else:
- records = unreportedRecords
-
- record = records[recordKey]
-
- if 'req' not in block:
- raise Exception("'req' property missing in block'")
-
- reqSize = block['req']
- slopSize = block.get('slop', 0)
-
- if 'num' in block:
- num = block['num']
- else:
- num = 1
-
- usableSize = reqSize + slopSize
- heapUsableSize += num * usableSize
- heapBlocks += num
-
- record.numBlocks += num
- record.reqSize += num * reqSize
- record.slopSize += num * slopSize
- record.usableSize += num * usableSize
- if record.allocatedAtDesc == None:
- record.allocatedAtDesc = \
- buildTraceDescription(traceTable, frameTable,
- allocatedAtTraceKey)
-
- if mode in ['live', 'cumulative']:
- pass
- elif mode == 'dark-matter':
- if 'reps' in block and record.reportedAtDescs == []:
- f = lambda k: buildTraceDescription(traceTable, frameTable, k)
- record.reportedAtDescs = map(f, reportedAtTraceKeys)
- record.usableSizes[usableSize] += num
-
- # All the processed data for a single DMD file is called a "digest".
- digest = {}
- digest['dmdEnvVar'] = dmdEnvVar
- digest['mode'] = mode
- digest['heapUsableSize'] = heapUsableSize
- digest['heapBlocks'] = heapBlocks
- if mode in ['live', 'cumulative']:
- digest['liveOrCumulativeRecords'] = liveOrCumulativeRecords
- elif mode == 'dark-matter':
- digest['unreportedRecords'] = unreportedRecords
- digest['onceReportedRecords'] = onceReportedRecords
- digest['twiceReportedRecords'] = twiceReportedRecords
- return digest
-
-
-def diffRecords(args, records1, records2):
- records3 = {}
-
- # Process records1.
- for k in records1:
- r1 = records1[k]
- if k in records2:
- # This record is present in both records1 and records2.
- r2 = records2[k]
- del records2[k]
- r2.subtract(r1)
- if not r2.isZero(args):
- records3[k] = r2
- else:
- # This record is present only in records1.
- r1.negate()
- records3[k] = r1
-
- for k in records2:
- # This record is present only in records2.
- records3[k] = records2[k]
-
- return records3
-
-
-def diffDigests(args, d1, d2):
- if (d1['mode'] != d2['mode']):
- raise Exception("the input files have different 'mode' properties")
-
- d3 = {}
- d3['dmdEnvVar'] = (d1['dmdEnvVar'], d2['dmdEnvVar'])
- d3['mode'] = d1['mode']
- d3['heapUsableSize'] = d2['heapUsableSize'] - d1['heapUsableSize']
- d3['heapBlocks'] = d2['heapBlocks'] - d1['heapBlocks']
- if d1['mode'] in ['live', 'cumulative']:
- d3['liveOrCumulativeRecords'] = \
- diffRecords(args, d1['liveOrCumulativeRecords'],
- d2['liveOrCumulativeRecords'])
- elif d1['mode'] == 'dark-matter':
- d3['unreportedRecords'] = diffRecords(args, d1['unreportedRecords'],
- d2['unreportedRecords'])
- d3['onceReportedRecords'] = diffRecords(args, d1['onceReportedRecords'],
- d2['onceReportedRecords'])
- d3['twiceReportedRecords'] = diffRecords(args, d1['twiceReportedRecords'],
- d2['twiceReportedRecords'])
- return d3
-
-
-def printDigest(args, digest):
- dmdEnvVar = digest['dmdEnvVar']
- mode = digest['mode']
- heapUsableSize = digest['heapUsableSize']
- heapBlocks = digest['heapBlocks']
- if mode in ['live', 'cumulative']:
- liveOrCumulativeRecords = digest['liveOrCumulativeRecords']
- elif mode == 'dark-matter':
- unreportedRecords = digest['unreportedRecords']
- onceReportedRecords = digest['onceReportedRecords']
- twiceReportedRecords = digest['twiceReportedRecords']
-
- separator = '#' + '-' * 65 + '\n'
-
- def number(n):
- '''Format a number with comma as a separator.'''
- return '{:,d}'.format(n)
-
- def perc(m, n):
- return 0 if n == 0 else (100 * m / n)
-
- def plural(n):
- return '' if n == 1 else 's'
-
- # Prints to stdout, or to file if -o/--output was specified.
- def out(*arguments, **kwargs):
- print(*arguments, file=args.output, **kwargs)
-
- def printStack(traceDesc):
- for frameDesc in traceDesc:
- out(frameDesc)
-
- def printRecords(recordKind, records, heapUsableSize):
- RecordKind = recordKind.capitalize()
- out(separator)
- numRecords = len(records)
- cmpRecords = sortByChoices[args.sort_by]
- sortedRecords = sorted(records.values(), cmp=cmpRecords, reverse=True)
- kindBlocks = 0
- kindUsableSize = 0
- maxRecord = 1000
-
- # First iteration: get totals, etc.
- for record in sortedRecords:
- kindBlocks += record.numBlocks
- kindUsableSize += record.usableSize
-
- # Second iteration: print.
- if numRecords == 0:
- out('# no {:} heap blocks\n'.format(recordKind))
-
- kindCumulativeUsableSize = 0
- for i, record in enumerate(sortedRecords, start=1):
- # Stop printing at the |maxRecord|th record.
- if i == maxRecord:
- out('# {:}: stopping after {:,d} heap block records\n'.
- format(RecordKind, i))
- break
-
- kindCumulativeUsableSize += record.usableSize
-
- out(RecordKind + ' {')
- out(' {:} block{:} in heap block record {:,d} of {:,d}'.
- format(number(record.numBlocks),
- plural(record.numBlocks), i, numRecords))
- out(' {:} bytes ({:} requested / {:} slop)'.
- format(number(record.usableSize),
- number(record.reqSize),
- number(record.slopSize)))
-
- abscmp = lambda (usableSize1, _1), (usableSize2, _2): \
- cmp(abs(usableSize1), abs(usableSize2))
- usableSizes = sorted(record.usableSizes.items(), cmp=abscmp,
- reverse=True)
-
- hasSingleBlock = len(usableSizes) == 1 and usableSizes[0][1] == 1
-
- if not hasSingleBlock:
- out(' Individual block sizes: ', end='')
- if len(usableSizes) == 0:
- out('(no change)', end='')
- else:
- isFirst = True
- for usableSize, count in usableSizes:
- if not isFirst:
- out('; ', end='')
- out('{:}'.format(number(usableSize)), end='')
- if count > 1:
- out(' x {:,d}'.format(count), end='')
- isFirst = False
- out()
-
- out(' {:4.2f}% of the heap ({:4.2f}% cumulative)'.
- format(perc(record.usableSize, heapUsableSize),
- perc(kindCumulativeUsableSize, heapUsableSize)))
- if mode in ['live', 'cumulative']:
- pass
- elif mode == 'dark-matter':
- out(' {:4.2f}% of {:} ({:4.2f}% cumulative)'.
- format(perc(record.usableSize, kindUsableSize),
- recordKind,
- perc(kindCumulativeUsableSize, kindUsableSize)))
- out(' Allocated at {')
- printStack(record.allocatedAtDesc)
- out(' }')
- if mode in ['live', 'cumulative']:
- pass
- elif mode == 'dark-matter':
- for n, reportedAtDesc in enumerate(record.reportedAtDescs):
- again = 'again ' if n > 0 else ''
- out(' Reported {:}at {{'.format(again))
- printStack(reportedAtDesc)
- out(' }')
- out('}\n')
-
- return (kindUsableSize, kindBlocks)
-
-
- def printInvocation(n, dmdEnvVar, mode):
- out('Invocation{:} {{'.format(n))
- if dmdEnvVar == None:
- out(' $DMD is undefined')
- else:
- out(' $DMD = \'' + dmdEnvVar + '\'')
- out(' Mode = \'' + mode + '\'')
- out('}\n')
-
- # Print command line. Strip dirs so the output is deterministic, which is
- # needed for testing.
- out(separator, end='')
- out('# ' + ' '.join(map(os.path.basename, sys.argv)) + '\n')
-
- # Print invocation(s).
- if type(dmdEnvVar) is not tuple:
- printInvocation('', dmdEnvVar, mode)
- else:
- printInvocation(' 1', dmdEnvVar[0], mode)
- printInvocation(' 2', dmdEnvVar[1], mode)
-
- # Print records.
- if mode in ['live', 'cumulative']:
- liveOrCumulativeUsableSize, liveOrCumulativeBlocks = \
- printRecords(mode, liveOrCumulativeRecords, heapUsableSize)
- elif mode == 'dark-matter':
- twiceReportedUsableSize, twiceReportedBlocks = \
- printRecords('twice-reported', twiceReportedRecords, heapUsableSize)
-
- unreportedUsableSize, unreportedBlocks = \
- printRecords('unreported', unreportedRecords, heapUsableSize)
-
- onceReportedUsableSize, onceReportedBlocks = \
- printRecords('once-reported', onceReportedRecords, heapUsableSize)
-
- # Print summary.
- out(separator)
- out('Summary {')
- if mode in ['live', 'cumulative']:
- out(' Total: {:} bytes in {:} blocks'.
- format(number(liveOrCumulativeUsableSize),
- number(liveOrCumulativeBlocks)))
- elif mode == 'dark-matter':
- fmt = ' {:15} {:>12} bytes ({:6.2f}%) in {:>7} blocks ({:6.2f}%)'
- out(fmt.
- format('Total:',
- number(heapUsableSize),
- 100,
- number(heapBlocks),
- 100))
- out(fmt.
- format('Unreported:',
- number(unreportedUsableSize),
- perc(unreportedUsableSize, heapUsableSize),
- number(unreportedBlocks),
- perc(unreportedBlocks, heapBlocks)))
- out(fmt.
- format('Once-reported:',
- number(onceReportedUsableSize),
- perc(onceReportedUsableSize, heapUsableSize),
- number(onceReportedBlocks),
- perc(onceReportedBlocks, heapBlocks)))
- out(fmt.
- format('Twice-reported:',
- number(twiceReportedUsableSize),
- perc(twiceReportedUsableSize, heapUsableSize),
- number(twiceReportedBlocks),
- perc(twiceReportedBlocks, heapBlocks)))
- out('}\n')
-
-
-#############################
-# Pretty printer for DMD JSON
-#############################
-
-def prettyPrintDmdJson(out, j):
- out.write('{\n')
-
- out.write(' "version": {0},\n'.format(j['version']))
- out.write(' "invocation": ')
- json.dump(j['invocation'], out, sort_keys=True)
- out.write(',\n')
-
- out.write(' "blockList": [')
- first = True
- for b in j['blockList']:
- out.write('' if first else ',')
- out.write('\n ')
- json.dump(b, out, sort_keys=True)
- first = False
- out.write('\n ],\n')
-
- out.write(' "traceTable": {')
- first = True
- for k, l in j['traceTable'].iteritems():
- out.write('' if first else ',')
- out.write('\n "{0}": {1}'.format(k, json.dumps(l)))
- first = False
- out.write('\n },\n')
-
- out.write(' "frameTable": {')
- first = True
- for k, v in j['frameTable'].iteritems():
- out.write('' if first else ',')
- out.write('\n "{0}": {1}'.format(k, json.dumps(v)))
- first = False
- out.write('\n }\n')
-
- out.write('}\n')
-
-
-##################################################################
-# Code for clamping addresses using conservative pointer analysis.
-##################################################################
-
-# Start is the address of the first byte of the block, while end is
-# the address of the first byte after the final byte in the block.
-class AddrRange:
- def __init__(self, block, length):
- self.block = block
- self.start = int(block, 16)
- self.length = length
- self.end = self.start + self.length
-
- assert self.start > 0
- assert length >= 0
-
-
-class ClampStats:
- def __init__(self):
- # Number of pointers already pointing to the start of a block.
- self.startBlockPtr = 0
-
- # Number of pointers pointing to the middle of a block. These
- # are clamped to the start of the block they point into.
- self.midBlockPtr = 0
-
- # Number of null pointers.
- self.nullPtr = 0
-
- # Number of non-null pointers that didn't point into the middle
- # of any blocks. These are clamped to null.
- self.nonNullNonBlockPtr = 0
-
-
- def clampedBlockAddr(self, sameAddress):
- if sameAddress:
- self.startBlockPtr += 1
- else:
- self.midBlockPtr += 1
-
- def nullAddr(self):
- self.nullPtr += 1
-
- def clampedNonBlockAddr(self):
- self.nonNullNonBlockPtr += 1
-
- def log(self):
- sys.stderr.write('Results:\n')
- sys.stderr.write(' Number of pointers already pointing to start of blocks: ' + str(self.startBlockPtr) + '\n')
- sys.stderr.write(' Number of pointers clamped to start of blocks: ' + str(self.midBlockPtr) + '\n')
- sys.stderr.write(' Number of non-null pointers not pointing into blocks clamped to null: ' + str(self.nonNullNonBlockPtr) + '\n')
- sys.stderr.write(' Number of null pointers: ' + str(self.nullPtr) + '\n')
-
-
-# Search the block ranges array for a block that address points into.
-# The search is carried out in an array of starting addresses for each blocks
-# because it is faster.
-def clampAddress(blockRanges, blockStarts, clampStats, address):
- i = bisect_right(blockStarts, address)
-
- # Any addresses completely out of the range should have been eliminated already.
- assert i > 0
- r = blockRanges[i - 1]
- assert r.start <= address
-
- if address >= r.end:
- assert address < blockRanges[i].start
- clampStats.clampedNonBlockAddr()
- return '0'
-
- clampStats.clampedBlockAddr(r.start == address)
- return r.block
-
-
-def clampBlockList(args, inputFileName, isZipped, opener):
- # XXX This isn't very efficient because we end up reading and writing
- # the file multiple times.
- with opener(inputFileName, 'rb') as f:
- j = json.load(f)
-
- if j['version'] != outputVersion:
- raise Exception("'version' property isn't '{:d}'".format(outputVersion))
-
- # Check that the invocation is reasonable for contents clamping.
- invocation = j['invocation']
- if invocation['mode'] != 'scan':
- raise Exception("Log was taken in mode " + invocation['mode'] + " not scan")
-
- sys.stderr.write('Creating block range list.\n')
- blockList = j['blockList']
- blockRanges = []
- for block in blockList:
- blockRanges.append(AddrRange(block['addr'], block['req']))
- blockRanges.sort(key=lambda r: r.start)
-
- # Make sure there are no overlapping blocks.
- prevRange = blockRanges[0]
- for currRange in blockRanges[1:]:
- assert prevRange.end <= currRange.start
- prevRange = currRange
-
- sys.stderr.write('Clamping block contents.\n')
- clampStats = ClampStats()
- firstAddr = blockRanges[0].start
- lastAddr = blockRanges[-1].end
-
- blockStarts = []
- for r in blockRanges:
- blockStarts.append(r.start)
-
- for block in blockList:
- # Small blocks don't have any contents.
- if not 'contents' in block:
- continue
-
- cont = block['contents']
- for i in range(len(cont)):
- address = int(cont[i], 16)
-
- if address == 0:
- clampStats.nullAddr()
- continue
-
- # If the address is before the first block or after the last
- # block then it can't be within a block.
- if address < firstAddr or address >= lastAddr:
- clampStats.clampedNonBlockAddr()
- cont[i] = '0'
- continue
-
- cont[i] = clampAddress(blockRanges, blockStarts, clampStats, address)
-
- # Remove any trailing nulls.
- while len(cont) and cont[-1] == '0':
- cont.pop()
-
- if args.print_clamp_stats:
- clampStats.log()
-
- sys.stderr.write('Saving file.\n')
- tmpFile = tempfile.NamedTemporaryFile(delete=False)
- tmpFilename = tmpFile.name
- if isZipped:
- tmpFile = gzip.GzipFile(filename='', fileobj=tmpFile)
- prettyPrintDmdJson(tmpFile, j)
- tmpFile.close()
- shutil.move(tmpFilename, inputFileName)
-
-
-def main():
- args = parseCommandLine()
- digest = getDigestFromFile(args, args.input_file)
- if args.input_file2:
- digest2 = getDigestFromFile(args, args.input_file2)
- digest = diffDigests(args, digest, digest2)
- printDigest(args, digest)
-
-
-if __name__ == '__main__':
- main()
-
diff --git a/memory/replace/dmd/moz.build b/memory/replace/dmd/moz.build
deleted file mode 100644
index 9fdec727d..000000000
--- a/memory/replace/dmd/moz.build
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-EXPORTS += [
- 'DMD.h',
-]
-
-SOURCES += [
- '../../../mfbt/HashFunctions.cpp',
- '../../../mfbt/JSONWriter.cpp',
- '../../../mfbt/Poison.cpp',
- '../../../mozglue/misc/StackWalk.cpp',
- 'DMD.cpp',
-]
-
-SOURCES += [
- '../../../nsprpub/lib/libc/src/strcpy.c',
-]
-
-SharedLibrary('dmd')
-
-DEFINES['MOZ_NO_MOZALLOC'] = True
-DEFINES['IMPL_MFBT'] = True
-DEFINES['XPCOM_GLUE'] = True
-
-if CONFIG['MOZ_OPTIMIZE']:
- DEFINES['MOZ_OPTIMIZE'] = True
-
-DISABLE_STL_WRAPPING = True
-
-if CONFIG['OS_ARCH'] == 'WINNT':
- OS_LIBS += [
- 'dbghelp',
- ]
-
-TEST_DIRS += ['test']
diff --git a/memory/replace/dmd/test/SmokeDMD.cpp b/memory/replace/dmd/test/SmokeDMD.cpp
deleted file mode 100644
index acf76267f..000000000
--- a/memory/replace/dmd/test/SmokeDMD.cpp
+++ /dev/null
@@ -1,379 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// This program is used by the DMD xpcshell test. It is run under DMD and
-// produces some output. The xpcshell test then post-processes and checks this
-// output.
-//
-// Note that this file does not have "Test" or "test" in its name, because that
-// will cause the build system to not record breakpad symbols for it, which
-// will stop the post-processing (which includes stack fixing) from working
-// correctly.
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "mozilla/Assertions.h"
-#include "mozilla/JSONWriter.h"
-#include "mozilla/UniquePtr.h"
-#include "DMD.h"
-
-using mozilla::JSONWriter;
-using mozilla::MakeUnique;
-using namespace mozilla::dmd;
-
-DMDFuncs::Singleton DMDFuncs::sSingleton;
-
-class FpWriteFunc : public mozilla::JSONWriteFunc
-{
-public:
- explicit FpWriteFunc(const char* aFilename)
- {
- mFp = fopen(aFilename, "w");
- if (!mFp) {
- fprintf(stderr, "SmokeDMD: can't create %s file: %s\n",
- aFilename, strerror(errno));
- exit(1);
- }
- }
-
- ~FpWriteFunc() { fclose(mFp); }
-
- void Write(const char* aStr) { fputs(aStr, mFp); }
-
-private:
- FILE* mFp;
-};
-
-// This stops otherwise-unused variables from being optimized away.
-static void
-UseItOrLoseIt(void* aPtr, int aSeven)
-{
- char buf[64];
- int n = sprintf(buf, "%p\n", aPtr);
- if (n == 20 + aSeven) {
- fprintf(stderr, "well, that is surprising");
- }
-}
-
-// This function checks that heap blocks that have the same stack trace but
-// different (or no) reporters get aggregated separately.
-void Foo(int aSeven)
-{
- char* a[6];
- for (int i = 0; i < aSeven - 1; i++) {
- a[i] = (char*) malloc(128 - 16*i);
- }
-
- // Oddly, some versions of clang will cause identical stack traces to be
- // generated for adjacent calls to Report(), which breaks the test. Inserting
- // the UseItOrLoseIt() calls in between is enough to prevent this.
-
- Report(a[2]); // reported
-
- UseItOrLoseIt(a[2], aSeven);
-
- for (int i = 0; i < aSeven - 5; i++) {
- Report(a[i]); // reported
- }
-
- UseItOrLoseIt(a[2], aSeven);
-
- Report(a[3]); // reported
-
- // a[4], a[5] unreported
-}
-
-void
-TestEmpty(const char* aTestName, const char* aMode)
-{
- char filename[128];
- sprintf(filename, "complete-%s-%s.json", aTestName, aMode);
- auto f = MakeUnique<FpWriteFunc>(filename);
-
- char options[128];
- sprintf(options, "--mode=%s --stacks=full", aMode);
- ResetEverything(options);
-
- // Zero for everything.
- Analyze(Move(f));
-}
-
-void
-TestFull(const char* aTestName, int aNum, const char* aMode, int aSeven)
-{
- char filename[128];
- sprintf(filename, "complete-%s%d-%s.json", aTestName, aNum, aMode);
- auto f = MakeUnique<FpWriteFunc>(filename);
-
- // The --show-dump-stats=yes is there just to give that option some basic
- // testing, e.g. ensure it doesn't crash. It's hard to test much beyond that.
- char options[128];
- sprintf(options, "--mode=%s --stacks=full --show-dump-stats=yes", aMode);
- ResetEverything(options);
-
- // Analyze 1: 1 freed, 9 out of 10 unreported.
- // Analyze 2: still present and unreported.
- int i;
- char* a = nullptr;
- for (i = 0; i < aSeven + 3; i++) {
- a = (char*) malloc(100);
- UseItOrLoseIt(a, aSeven);
- }
- free(a);
-
- // A no-op.
- free(nullptr);
-
- // Note: 16 bytes is the smallest requested size that gives consistent
- // behaviour across all platforms with jemalloc.
- // Analyze 1: reported.
- // Analyze 2: thrice-reported.
- char* a2 = (char*) malloc(16);
- Report(a2);
-
- // Analyze 1: reported.
- // Analyze 2: reportedness carries over, due to ReportOnAlloc.
- char* b = (char*) malloc(10);
- ReportOnAlloc(b);
-
- // ReportOnAlloc, then freed.
- // Analyze 1: freed, irrelevant.
- // Analyze 2: freed, irrelevant.
- char* b2 = (char*) malloc(16);
- ReportOnAlloc(b2);
- free(b2);
-
- // Analyze 1: reported 4 times.
- // Analyze 2: freed, irrelevant.
- char* c = (char*) calloc(10, 3);
- Report(c);
- for (int i = 0; i < aSeven - 4; i++) {
- Report(c);
- }
-
- // Analyze 1: ignored.
- // Analyze 2: irrelevant.
- Report((void*)(intptr_t)i);
-
- // jemalloc rounds this up to 8192.
- // Analyze 1: reported.
- // Analyze 2: freed.
- char* e = (char*) malloc(4096);
- e = (char*) realloc(e, 7169);
- Report(e);
-
- // First realloc is like malloc; second realloc is shrinking.
- // Analyze 1: reported.
- // Analyze 2: re-reported.
- char* e2 = (char*) realloc(nullptr, 1024);
- e2 = (char*) realloc(e2, 512);
- Report(e2);
-
- // First realloc is like malloc; second realloc creates a min-sized block.
- // XXX: on Windows, second realloc frees the block.
- // Analyze 1: reported.
- // Analyze 2: freed, irrelevant.
- char* e3 = (char*) realloc(nullptr, 1023);
-//e3 = (char*) realloc(e3, 0);
- MOZ_ASSERT(e3);
- Report(e3);
-
- // Analyze 1: freed, irrelevant.
- // Analyze 2: freed, irrelevant.
- char* f1 = (char*) malloc(64);
- free(f1);
-
- // Analyze 1: ignored.
- // Analyze 2: irrelevant.
- Report((void*)(intptr_t)0x0);
-
- // Analyze 1: mixture of reported and unreported.
- // Analyze 2: all unreported.
- Foo(aSeven);
-
- // Analyze 1: twice-reported.
- // Analyze 2: twice-reported.
- char* g1 = (char*) malloc(77);
- ReportOnAlloc(g1);
- ReportOnAlloc(g1);
-
- // Analyze 1: mixture of reported and unreported.
- // Analyze 2: all unreported.
- // Nb: this Foo() call is deliberately not adjacent to the previous one. See
- // the comment about adjacent calls in Foo() for more details.
- Foo(aSeven);
-
- // Analyze 1: twice-reported.
- // Analyze 2: once-reported.
- char* g2 = (char*) malloc(78);
- Report(g2);
- ReportOnAlloc(g2);
-
- // Analyze 1: twice-reported.
- // Analyze 2: once-reported.
- char* g3 = (char*) malloc(79);
- ReportOnAlloc(g3);
- Report(g3);
-
- // All the odd-ball ones.
- // Analyze 1: all unreported.
- // Analyze 2: all freed, irrelevant.
- // XXX: no memalign on Mac
-//void* w = memalign(64, 65); // rounds up to 128
-//UseItOrLoseIt(w, aSeven);
-
- // XXX: posix_memalign doesn't work on B2G
-//void* x;
-//posix_memalign(&y, 128, 129); // rounds up to 256
-//UseItOrLoseIt(x, aSeven);
-
- // XXX: valloc doesn't work on Windows.
-//void* y = valloc(1); // rounds up to 4096
-//UseItOrLoseIt(y, aSeven);
-
- // XXX: C11 only
-//void* z = aligned_alloc(64, 256);
-//UseItOrLoseIt(z, aSeven);
-
- if (aNum == 1) {
- // Analyze 1.
- Analyze(Move(f));
- }
-
- ClearReports();
-
- //---------
-
- Report(a2);
- Report(a2);
- free(c);
- free(e);
- Report(e2);
- free(e3);
-//free(w);
-//free(x);
-//free(y);
-//free(z);
-
- // Do some allocations that will only show up in cumulative mode.
- for (int i = 0; i < 100; i++) {
- free(malloc(128));
- }
-
- if (aNum == 2) {
- // Analyze 2.
- Analyze(Move(f));
- }
-}
-
-void
-TestPartial(const char* aTestName, const char* aMode, int aSeven)
-{
- char filename[128];
- sprintf(filename, "complete-%s-%s.json", aTestName, aMode);
- auto f = MakeUnique<FpWriteFunc>(filename);
-
- char options[128];
- sprintf(options, "--mode=%s", aMode);
- ResetEverything(options);
-
- int kTenThousand = aSeven + 9993;
- char* s;
-
- // The output of this function is deterministic but it relies on the
- // probability and seeds given to the FastBernoulliTrial instance in
- // ResetBernoulli(). If they change, the output will change too.
-
- // Expected fraction with stacks: (1 - (1 - 0.003) ** 16) = 0.0469.
- // So we expect about 0.0469 * 10000 == 469.
- // We actually get 511.
- for (int i = 0; i < kTenThousand; i++) {
- s = (char*) malloc(16);
- UseItOrLoseIt(s, aSeven);
- }
-
- // Expected fraction with stacks: (1 - (1 - 0.003) ** 128) = 0.3193.
- // So we expect about 0.3193 * 10000 == 3193.
- // We actually get 3136.
- for (int i = 0; i < kTenThousand; i++) {
- s = (char*) malloc(128);
- UseItOrLoseIt(s, aSeven);
- }
-
- // Expected fraction with stacks: (1 - (1 - 0.003) ** 1024) = 0.9539.
- // So we expect about 0.9539 * 10000 == 9539.
- // We actually get 9531.
- for (int i = 0; i < kTenThousand; i++) {
- s = (char*) malloc(1024);
- UseItOrLoseIt(s, aSeven);
- }
-
- Analyze(Move(f));
-}
-
-void
-TestScan(int aSeven)
-{
- auto f = MakeUnique<FpWriteFunc>("basic-scan.json");
-
- ResetEverything("--mode=scan");
-
- uintptr_t* p = (uintptr_t*) malloc(6 * sizeof(uintptr_t*));
- UseItOrLoseIt(p, aSeven);
-
- // Hard-coded values checked by scan-test.py
- p[0] = 0x123; // outside a block, small value
- p[1] = 0x0; // null
- p[2] = (uintptr_t)((uint8_t*)p - 1); // pointer outside a block, but nearby
- p[3] = (uintptr_t)p; // pointer to start of a block
- p[4] = (uintptr_t)((uint8_t*)p + 1); // pointer into a block
- p[5] = 0x0; // trailing null
-
- Analyze(Move(f));
-}
-
-void
-RunTests()
-{
- // This test relies on the compiler not doing various optimizations, such as
- // eliding unused malloc() calls or unrolling loops with fixed iteration
- // counts. So we compile it with -O0 (or equivalent), which probably prevents
- // that. We also use the following variable for various loop iteration
- // counts, just in case compilers might unroll very small loops even with
- // -O0.
- int seven = 7;
-
- // Make sure that DMD is actually running; it is initialized on the first
- // allocation.
- int *x = (int*)malloc(100);
- UseItOrLoseIt(x, seven);
- MOZ_RELEASE_ASSERT(IsRunning());
-
- // Please keep this in sync with run_test in test_dmd.js.
-
- TestEmpty("empty", "live");
- TestEmpty("empty", "dark-matter");
- TestEmpty("empty", "cumulative");
-
- TestFull("full", 1, "live", seven);
- TestFull("full", 1, "dark-matter", seven);
-
- TestFull("full", 2, "dark-matter", seven);
- TestFull("full", 2, "cumulative", seven);
-
- TestPartial("partial", "live", seven);
-
- TestScan(seven);
-}
-
-int main()
-{
- RunTests();
-
- return 0;
-}
diff --git a/memory/replace/dmd/test/basic-scan-32-expected.txt b/memory/replace/dmd/test/basic-scan-32-expected.txt
deleted file mode 100644
index 9f6f4db32..000000000
--- a/memory/replace/dmd/test/basic-scan-32-expected.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o basic-scan-32-actual.txt --clamp-contents basic-scan.json
-
-Invocation {
- $DMD = '--mode=scan'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 1 block in heap block record 1 of 1
- 32 bytes (24 requested / 8 slop)
- 100.00% of the heap (100.00% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 32 bytes in 1 blocks
-}
-
diff --git a/memory/replace/dmd/test/basic-scan-64-expected.txt b/memory/replace/dmd/test/basic-scan-64-expected.txt
deleted file mode 100644
index 59effc07b..000000000
--- a/memory/replace/dmd/test/basic-scan-64-expected.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o basic-scan-64-actual.txt --clamp-contents basic-scan.json
-
-Invocation {
- $DMD = '--mode=scan'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 1 block in heap block record 1 of 1
- 48 bytes (48 requested / 0 slop)
- 100.00% of the heap (100.00% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 48 bytes in 1 blocks
-}
-
diff --git a/memory/replace/dmd/test/complete-empty-cumulative-expected.txt b/memory/replace/dmd/test/complete-empty-cumulative-expected.txt
deleted file mode 100644
index 2486015d0..000000000
--- a/memory/replace/dmd/test/complete-empty-cumulative-expected.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o complete-empty-cumulative-actual.txt complete-empty-cumulative.json
-
-Invocation {
- $DMD = '--mode=cumulative --stacks=full'
- Mode = 'cumulative'
-}
-
-#-----------------------------------------------------------------
-
-# no cumulative heap blocks
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 0 bytes in 0 blocks
-}
-
diff --git a/memory/replace/dmd/test/complete-empty-dark-matter-expected.txt b/memory/replace/dmd/test/complete-empty-dark-matter-expected.txt
deleted file mode 100644
index 0020cddde..000000000
--- a/memory/replace/dmd/test/complete-empty-dark-matter-expected.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o complete-empty-dark-matter-actual.txt complete-empty-dark-matter.json
-
-Invocation {
- $DMD = '--mode=dark-matter --stacks=full'
- Mode = 'dark-matter'
-}
-
-#-----------------------------------------------------------------
-
-# no twice-reported heap blocks
-
-#-----------------------------------------------------------------
-
-# no unreported heap blocks
-
-#-----------------------------------------------------------------
-
-# no once-reported heap blocks
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 0 bytes (100.00%) in 0 blocks (100.00%)
- Unreported: 0 bytes ( 0.00%) in 0 blocks ( 0.00%)
- Once-reported: 0 bytes ( 0.00%) in 0 blocks ( 0.00%)
- Twice-reported: 0 bytes ( 0.00%) in 0 blocks ( 0.00%)
-}
-
diff --git a/memory/replace/dmd/test/complete-empty-live-expected.txt b/memory/replace/dmd/test/complete-empty-live-expected.txt
deleted file mode 100644
index d0d172196..000000000
--- a/memory/replace/dmd/test/complete-empty-live-expected.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o complete-empty-live-actual.txt complete-empty-live.json
-
-Invocation {
- $DMD = '--mode=live --stacks=full'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-# no live heap blocks
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 0 bytes in 0 blocks
-}
-
diff --git a/memory/replace/dmd/test/complete-full1-dark-matter-expected.txt b/memory/replace/dmd/test/complete-full1-dark-matter-expected.txt
deleted file mode 100644
index 2c7d6b634..000000000
--- a/memory/replace/dmd/test/complete-full1-dark-matter-expected.txt
+++ /dev/null
@@ -1,265 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o complete-full1-dark-matter-actual.txt complete-full1-dark-matter.json
-
-Invocation {
- $DMD = '--mode=dark-matter --stacks=full --show-dump-stats=yes'
- Mode = 'dark-matter'
-}
-
-#-----------------------------------------------------------------
-
-Twice-reported {
- 1 block in heap block record 1 of 4
- 80 bytes (79 requested / 1 slop)
- 0.66% of the heap (0.66% cumulative)
- 29.41% of twice-reported (29.41% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
- Reported again at {
- #01: ... DMD.cpp ...
- }
-}
-
-Twice-reported {
- 1 block in heap block record 2 of 4
- 80 bytes (78 requested / 2 slop)
- 0.66% of the heap (1.32% cumulative)
- 29.41% of twice-reported (58.82% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
- Reported again at {
- #01: ... DMD.cpp ...
- }
-}
-
-Twice-reported {
- 1 block in heap block record 3 of 4
- 80 bytes (77 requested / 3 slop)
- 0.66% of the heap (1.98% cumulative)
- 29.41% of twice-reported (88.24% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
- Reported again at {
- #01: ... DMD.cpp ...
- }
-}
-
-Twice-reported {
- 1 block in heap block record 4 of 4
- 32 bytes (30 requested / 2 slop)
- 0.26% of the heap (2.25% cumulative)
- 11.76% of twice-reported (100.00% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
- Reported again at {
- #01: ... DMD.cpp ...
- }
-}
-
-#-----------------------------------------------------------------
-
-Unreported {
- 9 blocks in heap block record 1 of 3
- 1,008 bytes (900 requested / 108 slop)
- Individual block sizes: 112 x 9
- 8.33% of the heap (8.33% cumulative)
- 81.82% of unreported (81.82% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Unreported {
- 2 blocks in heap block record 2 of 3
- 112 bytes (112 requested / 0 slop)
- Individual block sizes: 64; 48
- 0.93% of the heap (9.26% cumulative)
- 9.09% of unreported (90.91% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Unreported {
- 2 blocks in heap block record 3 of 3
- 112 bytes (112 requested / 0 slop)
- Individual block sizes: 64; 48
- 0.93% of the heap (10.19% cumulative)
- 9.09% of unreported (100.00% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-#-----------------------------------------------------------------
-
-Once-reported {
- 1 block in heap block record 1 of 11
- 8,192 bytes (7,169 requested / 1,023 slop)
- 67.72% of the heap (67.72% cumulative)
- 77.34% of once-reported (77.34% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 1 block in heap block record 2 of 11
- 1,024 bytes (1,023 requested / 1 slop)
- 8.47% of the heap (76.19% cumulative)
- 9.67% of once-reported (87.01% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 1 block in heap block record 3 of 11
- 512 bytes (512 requested / 0 slop)
- 4.23% of the heap (80.42% cumulative)
- 4.83% of once-reported (91.84% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 2 blocks in heap block record 4 of 11
- 240 bytes (240 requested / 0 slop)
- Individual block sizes: 128; 112
- 1.98% of the heap (82.41% cumulative)
- 2.27% of once-reported (94.11% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 2 blocks in heap block record 5 of 11
- 240 bytes (240 requested / 0 slop)
- Individual block sizes: 128; 112
- 1.98% of the heap (84.39% cumulative)
- 2.27% of once-reported (96.37% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 1 block in heap block record 6 of 11
- 96 bytes (96 requested / 0 slop)
- 0.79% of the heap (85.19% cumulative)
- 0.91% of once-reported (97.28% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 1 block in heap block record 7 of 11
- 96 bytes (96 requested / 0 slop)
- 0.79% of the heap (85.98% cumulative)
- 0.91% of once-reported (98.19% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 1 block in heap block record 8 of 11
- 80 bytes (80 requested / 0 slop)
- 0.66% of the heap (86.64% cumulative)
- 0.76% of once-reported (98.94% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 1 block in heap block record 9 of 11
- 80 bytes (80 requested / 0 slop)
- 0.66% of the heap (87.30% cumulative)
- 0.76% of once-reported (99.70% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 1 block in heap block record 10 of 11
- 16 bytes (16 requested / 0 slop)
- 0.13% of the heap (87.43% cumulative)
- 0.15% of once-reported (99.85% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 1 block in heap block record 11 of 11
- 16 bytes (10 requested / 6 slop)
- 0.13% of the heap (87.57% cumulative)
- 0.15% of once-reported (100.00% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 12,096 bytes (100.00%) in 30 blocks (100.00%)
- Unreported: 1,232 bytes ( 10.19%) in 13 blocks ( 43.33%)
- Once-reported: 10,592 bytes ( 87.57%) in 13 blocks ( 43.33%)
- Twice-reported: 272 bytes ( 2.25%) in 4 blocks ( 13.33%)
-}
-
diff --git a/memory/replace/dmd/test/complete-full1-live-expected.txt b/memory/replace/dmd/test/complete-full1-live-expected.txt
deleted file mode 100644
index eaa1883e1..000000000
--- a/memory/replace/dmd/test/complete-full1-live-expected.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o complete-full1-live-actual.txt complete-full1-live.json
-
-Invocation {
- $DMD = '--mode=live --stacks=full --show-dump-stats=yes'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 1 block in heap block record 1 of 12
- 8,192 bytes (7,169 requested / 1,023 slop)
- 67.72% of the heap (67.72% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 1 block in heap block record 2 of 12
- 1,024 bytes (1,023 requested / 1 slop)
- 8.47% of the heap (76.19% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 9 blocks in heap block record 3 of 12
- 1,008 bytes (900 requested / 108 slop)
- Individual block sizes: 112 x 9
- 8.33% of the heap (84.52% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 6 blocks in heap block record 4 of 12
- 528 bytes (528 requested / 0 slop)
- Individual block sizes: 128; 112; 96; 80; 64; 48
- 4.37% of the heap (88.89% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 6 blocks in heap block record 5 of 12
- 528 bytes (528 requested / 0 slop)
- Individual block sizes: 128; 112; 96; 80; 64; 48
- 4.37% of the heap (93.25% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 1 block in heap block record 6 of 12
- 512 bytes (512 requested / 0 slop)
- 4.23% of the heap (97.49% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 1 block in heap block record 7 of 12
- 80 bytes (79 requested / 1 slop)
- 0.66% of the heap (98.15% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 1 block in heap block record 8 of 12
- 80 bytes (78 requested / 2 slop)
- 0.66% of the heap (98.81% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 1 block in heap block record 9 of 12
- 80 bytes (77 requested / 3 slop)
- 0.66% of the heap (99.47% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 1 block in heap block record 10 of 12
- 32 bytes (30 requested / 2 slop)
- 0.26% of the heap (99.74% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 1 block in heap block record 11 of 12
- 16 bytes (16 requested / 0 slop)
- 0.13% of the heap (99.87% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 1 block in heap block record 12 of 12
- 16 bytes (10 requested / 6 slop)
- 0.13% of the heap (100.00% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 12,096 bytes in 30 blocks
-}
-
diff --git a/memory/replace/dmd/test/complete-full2-cumulative-expected.txt b/memory/replace/dmd/test/complete-full2-cumulative-expected.txt
deleted file mode 100644
index 5a225b9b8..000000000
--- a/memory/replace/dmd/test/complete-full2-cumulative-expected.txt
+++ /dev/null
@@ -1,173 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o complete-full2-cumulative-actual.txt complete-full2-cumulative.json
-
-Invocation {
- $DMD = '--mode=cumulative --stacks=full --show-dump-stats=yes'
- Mode = 'cumulative'
-}
-
-#-----------------------------------------------------------------
-
-Cumulative {
- 100 blocks in heap block record 1 of 17
- 12,800 bytes (12,800 requested / 0 slop)
- Individual block sizes: 128 x 100
- 42.37% of the heap (42.37% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 2 of 17
- 8,192 bytes (7,169 requested / 1,023 slop)
- 27.12% of the heap (69.49% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 3 of 17
- 4,096 bytes (4,096 requested / 0 slop)
- 13.56% of the heap (83.05% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 10 blocks in heap block record 4 of 17
- 1,120 bytes (1,000 requested / 120 slop)
- Individual block sizes: 112 x 10
- 3.71% of the heap (86.76% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 5 of 17
- 1,024 bytes (1,024 requested / 0 slop)
- 3.39% of the heap (90.15% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 6 of 17
- 1,024 bytes (1,023 requested / 1 slop)
- 3.39% of the heap (93.54% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 6 blocks in heap block record 7 of 17
- 528 bytes (528 requested / 0 slop)
- Individual block sizes: 128; 112; 96; 80; 64; 48
- 1.75% of the heap (95.29% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 6 blocks in heap block record 8 of 17
- 528 bytes (528 requested / 0 slop)
- Individual block sizes: 128; 112; 96; 80; 64; 48
- 1.75% of the heap (97.03% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 9 of 17
- 512 bytes (512 requested / 0 slop)
- 1.69% of the heap (98.73% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 10 of 17
- 80 bytes (79 requested / 1 slop)
- 0.26% of the heap (98.99% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 11 of 17
- 80 bytes (78 requested / 2 slop)
- 0.26% of the heap (99.26% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 12 of 17
- 80 bytes (77 requested / 3 slop)
- 0.26% of the heap (99.52% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 13 of 17
- 64 bytes (64 requested / 0 slop)
- 0.21% of the heap (99.74% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 14 of 17
- 32 bytes (30 requested / 2 slop)
- 0.11% of the heap (99.84% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 15 of 17
- 16 bytes (16 requested / 0 slop)
- 0.05% of the heap (99.89% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 16 of 17
- 16 bytes (16 requested / 0 slop)
- 0.05% of the heap (99.95% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Cumulative {
- 1 block in heap block record 17 of 17
- 16 bytes (10 requested / 6 slop)
- 0.05% of the heap (100.00% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 30,208 bytes in 135 blocks
-}
-
diff --git a/memory/replace/dmd/test/complete-full2-dark-matter-expected.txt b/memory/replace/dmd/test/complete-full2-dark-matter-expected.txt
deleted file mode 100644
index 5f9585a8c..000000000
--- a/memory/replace/dmd/test/complete-full2-dark-matter-expected.txt
+++ /dev/null
@@ -1,140 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o complete-full2-dark-matter-actual.txt complete-full2-dark-matter.json
-
-Invocation {
- $DMD = '--mode=dark-matter --stacks=full --show-dump-stats=yes'
- Mode = 'dark-matter'
-}
-
-#-----------------------------------------------------------------
-
-Twice-reported {
- 1 block in heap block record 1 of 2
- 80 bytes (77 requested / 3 slop)
- 2.81% of the heap (2.81% cumulative)
- 83.33% of twice-reported (83.33% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
- Reported again at {
- #01: ... DMD.cpp ...
- }
-}
-
-Twice-reported {
- 1 block in heap block record 2 of 2
- 16 bytes (16 requested / 0 slop)
- 0.56% of the heap (3.37% cumulative)
- 16.67% of twice-reported (100.00% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
- Reported again at {
- #01: ... DMD.cpp ...
- }
-}
-
-#-----------------------------------------------------------------
-
-Unreported {
- 9 blocks in heap block record 1 of 3
- 1,008 bytes (900 requested / 108 slop)
- Individual block sizes: 112 x 9
- 35.39% of the heap (35.39% cumulative)
- 48.84% of unreported (48.84% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Unreported {
- 6 blocks in heap block record 2 of 3
- 528 bytes (528 requested / 0 slop)
- Individual block sizes: 128; 112; 96; 80; 64; 48
- 18.54% of the heap (53.93% cumulative)
- 25.58% of unreported (74.42% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Unreported {
- 6 blocks in heap block record 3 of 3
- 528 bytes (528 requested / 0 slop)
- Individual block sizes: 128; 112; 96; 80; 64; 48
- 18.54% of the heap (72.47% cumulative)
- 25.58% of unreported (100.00% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-#-----------------------------------------------------------------
-
-Once-reported {
- 1 block in heap block record 1 of 4
- 512 bytes (512 requested / 0 slop)
- 17.98% of the heap (17.98% cumulative)
- 74.42% of once-reported (74.42% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 1 block in heap block record 2 of 4
- 80 bytes (79 requested / 1 slop)
- 2.81% of the heap (20.79% cumulative)
- 11.63% of once-reported (86.05% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 1 block in heap block record 3 of 4
- 80 bytes (78 requested / 2 slop)
- 2.81% of the heap (23.60% cumulative)
- 11.63% of once-reported (97.67% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-Once-reported {
- 1 block in heap block record 4 of 4
- 16 bytes (10 requested / 6 slop)
- 0.56% of the heap (24.16% cumulative)
- 2.33% of once-reported (100.00% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
- Reported at {
- #01: ... DMD.cpp ...
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 2,848 bytes (100.00%) in 27 blocks (100.00%)
- Unreported: 2,064 bytes ( 72.47%) in 21 blocks ( 77.78%)
- Once-reported: 688 bytes ( 24.16%) in 4 blocks ( 14.81%)
- Twice-reported: 96 bytes ( 3.37%) in 2 blocks ( 7.41%)
-}
-
diff --git a/memory/replace/dmd/test/complete-partial-live-expected.txt b/memory/replace/dmd/test/complete-partial-live-expected.txt
deleted file mode 100644
index e7f27b0ee..000000000
--- a/memory/replace/dmd/test/complete-partial-live-expected.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o complete-partial-live-actual.txt complete-partial-live.json
-
-Invocation {
- $DMD = '--mode=live'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 9,531 blocks in heap block record 1 of 4
- 9,759,744 bytes (9,759,744 requested / 0 slop)
- Individual block sizes: 1,024 x 9,531
- 83.56% of the heap (83.56% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 16,822 blocks in heap block record 2 of 4
- 1,510,672 bytes (1,510,672 requested / 0 slop)
- Individual block sizes: 1,024 x 469; 128 x 6,864; 16 x 9,489
- 12.93% of the heap (96.49% cumulative)
- Allocated at {
- #01: (no stack trace recorded due to --stacks=partial)
- }
-}
-
-Live {
- 3,136 blocks in heap block record 3 of 4
- 401,408 bytes (401,408 requested / 0 slop)
- Individual block sizes: 128 x 3,136
- 3.44% of the heap (99.93% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-Live {
- 511 blocks in heap block record 4 of 4
- 8,176 bytes (8,176 requested / 0 slop)
- Individual block sizes: 16 x 511
- 0.07% of the heap (100.00% cumulative)
- Allocated at {
- #01: ... DMD.cpp ...
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 11,680,000 bytes in 30,000 blocks
-}
-
diff --git a/memory/replace/dmd/test/moz.build b/memory/replace/dmd/test/moz.build
deleted file mode 100644
index 11cab5c4c..000000000
--- a/memory/replace/dmd/test/moz.build
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-GeckoSimplePrograms([
- 'SmokeDMD',
-], linkage=None)
-
-# See the comment at the top of SmokeDMD.cpp:RunTests().
-if CONFIG['OS_ARCH'] == 'WINNT':
- CXXFLAGS += ['-Og-']
-else:
- CXXFLAGS += ['-O0']
-
-DEFINES['MOZ_NO_MOZALLOC'] = True
-
-DISABLE_STL_WRAPPING = True
-
-XPCSHELL_TESTS_MANIFESTS += [
- 'xpcshell.ini',
-]
-
-if CONFIG['GNU_CXX']:
- CXXFLAGS += ['-Wno-error=shadow']
diff --git a/memory/replace/dmd/test/scan-test.py b/memory/replace/dmd/test/scan-test.py
deleted file mode 100644
index f031ae88f..000000000
--- a/memory/replace/dmd/test/scan-test.py
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /usr/bin/env python
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-'''Testing for the JSON file emitted by DMD heap scan mode when running SmokeDMD.'''
-
-from __future__ import print_function, division
-
-import argparse
-import gzip
-import json
-import sys
-
-# The DMD output version this script handles.
-outputVersion = 5
-
-
-def parseCommandLine():
- description = '''
-Ensure that DMD heap scan mode creates the correct output when run with SmokeDMD.
-This is only for testing. Input files can be gzipped.
-'''
- p = argparse.ArgumentParser(description=description)
-
- p.add_argument('--clamp-contents', action='store_true',
- help='expect that the contents of the JSON input file have had their addresses clamped')
-
- p.add_argument('input_file',
- help='a file produced by DMD')
-
- return p.parse_args(sys.argv[1:])
-
-
-def checkScanContents(contents, expected):
- if len(contents) != len(expected):
- raise Exception("Expected " + str(len(expected)) + " things in contents but found " + str(len(contents)))
-
- for i in range(len(expected)):
- if contents[i] != expected[i]:
- raise Exception("Expected to find " + expected[i] + " at offset " + str(i) + " but found " + contents[i])
-
-
-def main():
- args = parseCommandLine()
-
- # Handle gzipped input if necessary.
- isZipped = args.input_file.endswith('.gz')
- opener = gzip.open if isZipped else open
-
- with opener(args.input_file, 'rb') as f:
- j = json.load(f)
-
- if j['version'] != outputVersion:
- raise Exception("'version' property isn't '{:d}'".format(outputVersion))
-
- invocation = j['invocation']
-
- mode = invocation['mode']
- if mode != 'scan':
- raise Exception("bad 'mode' property: '{:s}'".format(mode))
-
- blockList = j['blockList']
-
- if len(blockList) != 1:
- raise Exception("Expected only one block")
-
- b = blockList[0]
-
- # The expected values are based on hard-coded values in SmokeDMD.cpp.
- if args.clamp_contents:
- expected = ['0', '0', '0', b['addr'], b['addr']]
- else:
- addr = int(b['addr'], 16)
- expected = ['123', '0', str(format(addr - 1, 'x')), b['addr'],
- str(format(addr + 1, 'x')), '0']
-
- checkScanContents(b['contents'], expected)
-
-
-if __name__ == '__main__':
- main()
diff --git a/memory/replace/dmd/test/script-diff-dark-matter-expected.txt b/memory/replace/dmd/test/script-diff-dark-matter-expected.txt
deleted file mode 100644
index 382f4eee5..000000000
--- a/memory/replace/dmd/test/script-diff-dark-matter-expected.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o script-diff-dark-matter-actual.txt script-diff-dark-matter1.json script-diff-dark-matter2.json
-
-Invocation 1 {
- $DMD = '--mode=dark-matter'
- Mode = 'dark-matter'
-}
-
-Invocation 2 {
- $DMD is undefined
- Mode = 'dark-matter'
-}
-
-#-----------------------------------------------------------------
-
-Twice-reported {
- -1 blocks in heap block record 1 of 1
- -1,088 bytes (-1,064 requested / -24 slop)
- Individual block sizes: -1,024; -127; 63
- 15.46% of the heap (15.46% cumulative)
- 100.00% of twice-reported (100.00% cumulative)
- Allocated at {
- #01: F (F.cpp:99)
- }
- Reported at {
- #01: R1 (R1.cpp:99)
- }
- Reported again at {
- #01: R2 (R2.cpp:99)
- }
-}
-
-#-----------------------------------------------------------------
-
-Unreported {
- 4 blocks in heap block record 1 of 5
- 16,384 bytes (16,384 requested / 0 slop)
- Individual block sizes: 4,096 x 4
- -232.76% of the heap (-232.76% cumulative)
- 371.01% of unreported (371.01% cumulative)
- Allocated at {
- #01: E (E.cpp:99)
- }
-}
-
-Unreported {
- 7 blocks in heap block record 2 of 5
- -11,968 bytes (-12,016 requested / 48 slop)
- Individual block sizes: -15,360; 2,048; 512 x 2; 128; -127; 64 x 4; 63
- 170.02% of the heap (-62.74% cumulative)
- -271.01% of unreported (100.00% cumulative)
- Allocated at {
- #01: F (F.cpp:99)
- }
-}
-
-Unreported {
- 0 blocks in heap block record 3 of 5
- 0 bytes (-384 requested / 384 slop)
- Individual block sizes: (no change)
- -0.00% of the heap (-62.74% cumulative)
- 0.00% of unreported (100.00% cumulative)
- Allocated at {
- #01: C (C.cpp:99)
- }
-}
-
-Unreported {
- -2 blocks in heap block record 4 of 5
- 0 bytes (0 requested / 0 slop)
- Individual block sizes: 8,192 x 2; -4,096 x 4
- -0.00% of the heap (-62.74% cumulative)
- 0.00% of unreported (100.00% cumulative)
- Allocated at {
- #01: B (B.cpp:99)
- }
-}
-
-Unreported {
- 0 blocks in heap block record 5 of 5
- 0 bytes (0 requested / 0 slop)
- Individual block sizes: 20,480; -16,384; -8,192; 4,096
- -0.00% of the heap (-62.74% cumulative)
- 0.00% of unreported (100.00% cumulative)
- Allocated at {
- #01: (no stack trace recorded due to --stacks=partial)
- }
-}
-
-#-----------------------------------------------------------------
-
-Once-reported {
- -3 blocks in heap block record 1 of 2
- -10,240 bytes (-10,192 requested / -48 slop)
- Individual block sizes: -4,096 x 2; -2,048
- 145.48% of the heap (145.48% cumulative)
- 98.77% of once-reported (98.77% cumulative)
- Allocated at {
- #01: D (D.cpp:99)
- }
- Reported at {
- #01: R1 (R1.cpp:99)
- }
-}
-
-Once-reported {
- -1 blocks in heap block record 2 of 2
- -127 bytes (-151 requested / 24 slop)
- 1.80% of the heap (147.28% cumulative)
- 1.23% of once-reported (100.00% cumulative)
- Allocated at {
- #01: F (F.cpp:99)
- }
- Reported at {
- #01: R1 (R1.cpp:99)
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: -7,039 bytes (100.00%) in 4 blocks (100.00%)
- Unreported: 4,416 bytes (-62.74%) in 9 blocks (225.00%)
- Once-reported: -10,367 bytes (147.28%) in -4 blocks (-100.00%)
- Twice-reported: -1,088 bytes ( 15.46%) in -1 blocks (-25.00%)
-}
-
diff --git a/memory/replace/dmd/test/script-diff-dark-matter1.json b/memory/replace/dmd/test/script-diff-dark-matter1.json
deleted file mode 100644
index c8edafebe..000000000
--- a/memory/replace/dmd/test/script-diff-dark-matter1.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "version": 5,
- "invocation": {
- "dmdEnvVar": "--mode=dark-matter",
- "mode": "dark-matter"
- },
- "blockList": [
- {"req": 4096, "alloc": "A", "num": 4},
-
- {"req": 4096, "alloc": "B", "num": 3},
- {"req": 4096, "alloc": "B"},
-
- {"req": 4096, "alloc": "C", "num": 2},
- {"req": 4096, "alloc": "C", "num": 2},
-
- {"req": 4096, "alloc": "D", "reps": ["R1"], "num": 2},
- {"req": 2000, "slop": 48, "alloc": "D", "reps": ["R1"]},
-
- {"req": 15360, "alloc": "F"},
- {"req": 512, "alloc": "F", "num": 2},
- {"req": 127, "alloc": "F"},
- {"req": 1024, "alloc": "F", "reps": ["R1"]},
- {"req": 127, "alloc": "F", "reps": ["R1"]},
- {"req": 1000, "slop": 24, "alloc": "F", "reps": ["R1", "R2"]},
- {"req": 127, "alloc": "F", "reps": ["R1", "R2"]},
-
- {"req": 4096 },
- {"req": 8192 },
- {"req": 16384 }
- ],
- "traceTable": {
- "A": ["AA"],
- "B": ["BB"],
- "C": ["CC"],
- "D": ["DD"],
- "E": ["EE"],
- "F": ["FF"],
- "R1": ["RR1"],
- "R2": ["RR2"]
- },
- "frameTable": {
- "AA": "#00: A (A.cpp:99)",
- "BB": "#00: B (B.cpp:99)",
- "CC": "#00: C (C.cpp:99)",
- "DD": "#00: D (D.cpp:99)",
- "EE": "#00: E (E.cpp:99)",
- "FF": "#00: F (F.cpp:99)",
- "RR1": "#00: R1 (R1.cpp:99)",
- "RR2": "#00: R2 (R2.cpp:99)"
- }
-}
diff --git a/memory/replace/dmd/test/script-diff-dark-matter2.json b/memory/replace/dmd/test/script-diff-dark-matter2.json
deleted file mode 100644
index a001040c0..000000000
--- a/memory/replace/dmd/test/script-diff-dark-matter2.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "version": 5,
- "invocation": {
- "dmdEnvVar": null,
- "mode": "dark-matter"
- },
- "blockList": [
- {"req": 4096, "alloc": "A", "num": 4},
-
- {"req": 8192, "alloc": "B"},
- {"req": 8192, "alloc": "B"},
-
- {"req": 4000, "slop": 96, "alloc": "C", "num": 4},
-
- {"req": 4096, "alloc": "E", "num": 4},
-
- {"req": 2000, "slop": 48, "alloc": "F"},
- {"req": 1000, "slop": 24, "alloc": "F", "reps": ["R1"]},
- {"req": 512, "alloc": "F"},
- {"req": 512, "alloc": "F"},
- {"req": 512, "alloc": "F"},
- {"req": 512, "alloc": "F"},
- {"req": 128, "alloc": "F"},
- {"req": 63, "alloc": "F", "reps": ["R1", "R2"]},
- {"req": 64, "alloc": "F", "num": 4},
- {"req": 63, "alloc": "F"},
-
- {"req": 4096, "num": 2 },
- {"req": 20480 }
- ],
- "traceTable": {
- "A": ["AA"],
- "B": ["BB"],
- "C": ["CC"],
- "D": ["DD"],
- "E": ["EE"],
- "F": ["FF"],
- "R1": ["RR1"],
- "R2": ["RR2"]
- },
- "frameTable": {
- "AA": "#00: A (A.cpp:99)",
- "BB": "#00: B (B.cpp:99)",
- "CC": "#00: C (C.cpp:99)",
- "DD": "#00: D (D.cpp:99)",
- "EE": "#00: E (E.cpp:99)",
- "FF": "#00: F (F.cpp:99)",
- "RR1": "#00: R1 (R1.cpp:99)",
- "RR2": "#00: R2 (R2.cpp:99)"
- }
-}
diff --git a/memory/replace/dmd/test/script-diff-live-expected.txt b/memory/replace/dmd/test/script-diff-live-expected.txt
deleted file mode 100644
index ecd291ad8..000000000
--- a/memory/replace/dmd/test/script-diff-live-expected.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o script-diff-live-actual.txt script-diff-live1.json script-diff-live2.json
-
-Invocation 1 {
- $DMD = '--mode=live'
- Mode = 'live'
-}
-
-Invocation 2 {
- $DMD = '--mode=live --stacks=partial'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 4 blocks in heap block record 1 of 6
- 16,384 bytes (16,384 requested / 0 slop)
- Individual block sizes: 4,096 x 4
- -232.76% of the heap (-232.76% cumulative)
- Allocated at {
- #01: E (E.cpp:99)
- }
-}
-
-Live {
- 5 blocks in heap block record 2 of 6
- -13,183 bytes (-13,231 requested / 48 slop)
- Individual block sizes: -15,360; 2,048; -1,024; 512 x 2; 128; -127 x 3; 64 x 4; 63 x 2
- 187.29% of the heap (-45.48% cumulative)
- Allocated at {
- #01: F (F.cpp:99)
- }
-}
-
-Live {
- -3 blocks in heap block record 3 of 6
- -10,240 bytes (-10,192 requested / -48 slop)
- Individual block sizes: -4,096 x 2; -2,048
- 145.48% of the heap (100.00% cumulative)
- Allocated at {
- #01: D (D.cpp:99)
- }
-}
-
-Live {
- 0 blocks in heap block record 4 of 6
- 0 bytes (-384 requested / 384 slop)
- Individual block sizes: (no change)
- -0.00% of the heap (100.00% cumulative)
- Allocated at {
- #01: C (C.cpp:99)
- }
-}
-
-Live {
- 0 blocks in heap block record 5 of 6
- 0 bytes (0 requested / 0 slop)
- Individual block sizes: 20,480; -16,384; -8,192; 4,096
- -0.00% of the heap (100.00% cumulative)
- Allocated at {
- #01: (no stack trace recorded due to --stacks=partial)
- }
-}
-
-Live {
- -2 blocks in heap block record 6 of 6
- 0 bytes (0 requested / 0 slop)
- Individual block sizes: 8,192 x 2; -4,096 x 4
- -0.00% of the heap (100.00% cumulative)
- Allocated at {
- #01: B (B.cpp:99)
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: -7,039 bytes in 4 blocks
-}
-
diff --git a/memory/replace/dmd/test/script-diff-live1.json b/memory/replace/dmd/test/script-diff-live1.json
deleted file mode 100644
index 87e07aed5..000000000
--- a/memory/replace/dmd/test/script-diff-live1.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "version": 5,
- "invocation": {
- "dmdEnvVar": "--mode=live",
- "mode": "live"
- },
- "blockList": [
- {"req": 4096, "alloc": "A", "num": 4},
-
- {"req": 4096, "alloc": "B", "num": 4},
-
- {"req": 4096, "alloc": "C", "num": 4},
-
- {"req": 4096, "alloc": "D"},
- {"req": 4096, "alloc": "D"},
- {"req": 2000, "slop": 48, "alloc": "D"},
-
- {"req": 15360, "alloc": "F"},
- {"req": 512, "alloc": "F"},
- {"req": 512, "alloc": "F"},
- {"req": 127, "alloc": "F"},
- {"req": 1024, "alloc": "F"},
- {"req": 127, "alloc": "F"},
- {"req": 1000, "slop": 24, "alloc": "F"},
- {"req": 127, "alloc": "F"},
-
- {"req": 4096 },
- {"req": 8192 },
- {"req": 16384 }
- ],
- "traceTable": {
- "A": ["AA"],
- "B": ["BB"],
- "C": ["CC"],
- "D": ["DD"],
- "E": ["EE"],
- "F": ["FF"],
- "R1": ["RR1"],
- "R2": ["RR2"]
- },
- "frameTable": {
- "AA": "#00: A (A.cpp:99)",
- "BB": "#00: B (B.cpp:99)",
- "CC": "#00: C (C.cpp:99)",
- "DD": "#00: D (D.cpp:99)",
- "EE": "#00: E (E.cpp:99)",
- "FF": "#00: F (F.cpp:99)",
- "RR1": "#00: R1 (R1.cpp:99)",
- "RR2": "#00: R2 (R2.cpp:99)"
- }
-}
diff --git a/memory/replace/dmd/test/script-diff-live2.json b/memory/replace/dmd/test/script-diff-live2.json
deleted file mode 100644
index 4c7476f4c..000000000
--- a/memory/replace/dmd/test/script-diff-live2.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "version": 5,
- "invocation": {
- "dmdEnvVar": "--mode=live --stacks=partial",
- "mode": "live"
- },
- "blockList": [
- {"req": 4096, "alloc": "A", "num": 3},
- {"req": 4096, "alloc": "A"},
-
- {"req": 8192, "alloc": "B"},
- {"req": 8192, "alloc": "B"},
-
- {"req": 4000, "slop": 96, "alloc": "C", "num": 4},
-
- {"req": 4096, "alloc": "E"},
- {"req": 4096, "alloc": "E"},
- {"req": 4096, "alloc": "E"},
- {"req": 4096, "alloc": "E"},
-
- {"req": 2000, "slop": 48, "alloc": "F"},
- {"req": 1000, "slop": 24, "alloc": "F"},
- {"req": 512, "alloc": "F", "num": 4},
- {"req": 128, "alloc": "F"},
- {"req": 63, "alloc": "F"},
- {"req": 64, "alloc": "F", "num": 4},
- {"req": 63, "alloc": "F"},
-
- {"req": 4096 },
- {"req": 4096 },
- {"req": 20480 }
- ],
- "traceTable": {
- "A": ["AA"],
- "B": ["BB"],
- "C": ["CC"],
- "D": ["DD"],
- "E": ["EE"],
- "F": ["FF"],
- "R1": ["RR1"],
- "R2": ["RR2"]
- },
- "frameTable": {
- "AA": "#00: A (A.cpp:99)",
- "BB": "#00: B (B.cpp:99)",
- "CC": "#00: C (C.cpp:99)",
- "DD": "#00: D (D.cpp:99)",
- "EE": "#00: E (E.cpp:99)",
- "FF": "#00: F (F.cpp:99)",
- "RR1": "#00: R1 (R1.cpp:99)",
- "RR2": "#00: R2 (R2.cpp:99)"
- }
-}
diff --git a/memory/replace/dmd/test/script-ignore-alloc-fns-expected.txt b/memory/replace/dmd/test/script-ignore-alloc-fns-expected.txt
deleted file mode 100644
index af9a0f6e9..000000000
--- a/memory/replace/dmd/test/script-ignore-alloc-fns-expected.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o script-ignore-alloc-fns-actual.txt --ignore-alloc-fns script-ignore-alloc-fns.json
-
-Invocation {
- $DMD is undefined
- Mode = 'dark-matter'
-}
-
-#-----------------------------------------------------------------
-
-# no twice-reported heap blocks
-
-#-----------------------------------------------------------------
-
-Unreported {
- 1 block in heap block record 1 of 4
- 1,048,576 bytes (1,048,576 requested / 0 slop)
- 93.22% of the heap (93.22% cumulative)
- 93.22% of unreported (93.22% cumulative)
- Allocated at {
- #01: A (A.cpp:99)
- }
-}
-
-Unreported {
- 1 block in heap block record 2 of 4
- 65,536 bytes (65,536 requested / 0 slop)
- 5.83% of the heap (99.05% cumulative)
- 5.83% of unreported (99.05% cumulative)
- Allocated at {
- #01: js::jit::JitRuntime::initialize(JSContext*) (Ion.cpp:301)
- }
-}
-
-Unreported {
- 1 block in heap block record 3 of 4
- 8,192 bytes (8,000 requested / 192 slop)
- 0.73% of the heap (99.78% cumulative)
- 0.73% of unreported (99.78% cumulative)
- Allocated at {
- #01: mozilla::Vector::growStorageBy(unsigned long) (Vector.h:802)
- #02: D (D.cpp:99)
- }
-}
-
-Unreported {
- 1 block in heap block record 4 of 4
- 2,500 bytes (2,500 requested / 0 slop)
- 0.22% of the heap (100.00% cumulative)
- 0.22% of unreported (100.00% cumulative)
- Allocated at {
- #01: g_type_create_instance (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0)
- #02: not_an_alloc_function_so_alloc_functions_below_here_will_not_be_stripped (blah)
- #03: replace_posix_memalign (replace_malloc.h:120)
- #04: ??? (/lib/x86_64-linux-gnu/libglib-2.0.so.0)
- #05: another_non_alloc_function (blah)
- }
-}
-
-#-----------------------------------------------------------------
-
-# no once-reported heap blocks
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 1,124,804 bytes (100.00%) in 4 blocks (100.00%)
- Unreported: 1,124,804 bytes (100.00%) in 4 blocks (100.00%)
- Once-reported: 0 bytes ( 0.00%) in 0 blocks ( 0.00%)
- Twice-reported: 0 bytes ( 0.00%) in 0 blocks ( 0.00%)
-}
-
diff --git a/memory/replace/dmd/test/script-ignore-alloc-fns.json b/memory/replace/dmd/test/script-ignore-alloc-fns.json
deleted file mode 100644
index 7e9446a78..000000000
--- a/memory/replace/dmd/test/script-ignore-alloc-fns.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "version": 5,
- "invocation": {
- "dmdEnvVar": null,
- "mode": "dark-matter"
- },
- "blockList": [
- {"req": 1048576, "alloc": "A"},
- {"req": 65536, "alloc": "B"},
- {"req": 8000, "slop": 192, "alloc": "C"},
- {"req": 2500, "alloc": "D"}
- ],
- "traceTable": {
- "A": ["AA", "AB", "AC", "AD"],
- "B": ["BA", "BB", "BC"],
- "C": ["CA", "CB", "CC", "CD"],
- "D": ["DA", "DB", "DD", "DD", "DE", "DF", "DG", "DH", "DI", "DJ"]
- },
- "frameTable": {
- "AA": "#00: replace_malloc (DMD.cpp:1106)",
- "AB": "#00: moz_xmalloc (mozalloc.cpp:68)",
- "AC": "#00: operator new(unsigned long) (mozalloc.h:208)",
- "AD": "#00: A (A.cpp:99)",
-
- "BA": "#00: replace_calloc (DMD.cpp:1125)",
- "BB": "#00: js_calloc(unsigned long) (Utility.h:107)",
- "BC": "#06: js::jit::JitRuntime::initialize(JSContext*) (Ion.cpp:301)",
-
- "CA": "#00: replace_realloc (DMD.cpp:1153)",
- "CB": "#00: bool* mozilla::MallocAllocPolicy::pod_realloc<bool>(bool*, unsigned long, unsigned long) (AllocPolicy.h:74)",
- "CC": "#00: mozilla::Vector::growStorageBy(unsigned long) (Vector.h:802)",
- "CD": "#00: D (D.cpp:99)",
-
- "DA": "#00: replace_memalign (DMD.cpp:1181)",
- "DB": "#00: replace_posix_memalign (replace_malloc.h:120)",
- "DC": "#00: ??? (/lib/x86_64-linux-gnu/libglib-2.0.so.0)",
- "DD": "#00: g_slice_alloc (/lib/x86_64-linux-gnu/libglib-2.0.so.0)",
- "DE": "#00: g_slice_alloc0 (/lib/x86_64-linux-gnu/libglib-2.0.so.0)",
- "DF": "#00: g_type_create_instance (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0)",
- "DG": "#00: not_an_alloc_function_so_alloc_functions_below_here_will_not_be_stripped (blah)",
- "DH": "#00: replace_posix_memalign (replace_malloc.h:120)",
- "DI": "#00: ??? (/lib/x86_64-linux-gnu/libglib-2.0.so.0)",
- "DJ": "#00: another_non_alloc_function (blah)"
- }
-}
-
diff --git a/memory/replace/dmd/test/script-max-frames-1-expected.txt b/memory/replace/dmd/test/script-max-frames-1-expected.txt
deleted file mode 100644
index 65a00762b..000000000
--- a/memory/replace/dmd/test/script-max-frames-1-expected.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o script-max-frames-1-actual.txt --max-frames=1 script-max-frames.json
-
-Invocation {
- $DMD = '--mode=live --stacks=full'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 4 blocks in heap block record 1 of 1
- 4,416 bytes (4,404 requested / 12 slop)
- Individual block sizes: 4,096; 128; 112; 80
- 100.00% of the heap (100.00% cumulative)
- Allocated at {
- #01: E (E.cpp:99)
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 4,416 bytes in 4 blocks
-}
-
diff --git a/memory/replace/dmd/test/script-max-frames-3-expected.txt b/memory/replace/dmd/test/script-max-frames-3-expected.txt
deleted file mode 100644
index 5df491473..000000000
--- a/memory/replace/dmd/test/script-max-frames-3-expected.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o script-max-frames-3-actual.txt --max-frames=3 --no-fix-stacks script-max-frames.json
-
-Invocation {
- $DMD = '--mode=live --stacks=full'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 2 blocks in heap block record 1 of 3
- 4,224 bytes (4,224 requested / 0 slop)
- Individual block sizes: 4,096; 128
- 95.65% of the heap (95.65% cumulative)
- Allocated at {
- #01: E (E.cpp:99)
- #02: F (F.cpp:99)
- #03: G (G.cpp:99)
- }
-}
-
-Live {
- 1 block in heap block record 2 of 3
- 112 bytes (100 requested / 12 slop)
- 2.54% of the heap (98.19% cumulative)
- Allocated at {
- #01: E (E.cpp:99)
- #02: X (X.cpp:99)
- #03: Y (Y.cpp:99)
- }
-}
-
-Live {
- 1 block in heap block record 3 of 3
- 80 bytes (80 requested / 0 slop)
- 1.81% of the heap (100.00% cumulative)
- Allocated at {
- #01: E (E.cpp:99)
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 4,416 bytes in 4 blocks
-}
-
diff --git a/memory/replace/dmd/test/script-max-frames-8-expected.txt b/memory/replace/dmd/test/script-max-frames-8-expected.txt
deleted file mode 100644
index d1ba7c7f1..000000000
--- a/memory/replace/dmd/test/script-max-frames-8-expected.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o script-max-frames-8-actual.txt --max-frames=8 script-max-frames.json
-
-Invocation {
- $DMD = '--mode=live --stacks=full'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 1 block in heap block record 1 of 4
- 4,096 bytes (4,096 requested / 0 slop)
- 92.75% of the heap (92.75% cumulative)
- Allocated at {
- #01: E (E.cpp:99)
- #02: F (F.cpp:99)
- #03: G (G.cpp:99)
- #04: H (H.cpp:99)
- #05: I (I.cpp:99)
- #06: J (J.cpp:99)
- #07: K (K.cpp:99)
- #08: L (L.cpp:99)
- }
-}
-
-Live {
- 1 block in heap block record 2 of 4
- 128 bytes (128 requested / 0 slop)
- 2.90% of the heap (95.65% cumulative)
- Allocated at {
- #01: E (E.cpp:99)
- #02: F (F.cpp:99)
- #03: G (G.cpp:99)
- #04: R (R.cpp:99)
- #05: S (S.cpp:99)
- #06: T (T.cpp:99)
- #07: U (U.cpp:99)
- #08: V (V.cpp:99)
- }
-}
-
-Live {
- 1 block in heap block record 3 of 4
- 112 bytes (100 requested / 12 slop)
- 2.54% of the heap (98.19% cumulative)
- Allocated at {
- #01: E (E.cpp:99)
- #02: X (X.cpp:99)
- #03: Y (Y.cpp:99)
- #04: Z (Z.cpp:99)
- }
-}
-
-Live {
- 1 block in heap block record 4 of 4
- 80 bytes (80 requested / 0 slop)
- 1.81% of the heap (100.00% cumulative)
- Allocated at {
- #01: E (E.cpp:99)
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 4,416 bytes in 4 blocks
-}
-
diff --git a/memory/replace/dmd/test/script-max-frames.json b/memory/replace/dmd/test/script-max-frames.json
deleted file mode 100644
index 690d50fa7..000000000
--- a/memory/replace/dmd/test/script-max-frames.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "version": 5,
- "invocation": {
- "dmdEnvVar": "--mode=live --stacks=full",
- "mode": "live"
- },
- "blockList": [
- {"req": 4096, "alloc": "A"},
- {"req": 128, "alloc": "B"},
- {"req": 100, "slop":12, "alloc": "C"},
- {"req": 80, "alloc": "D"}
- ],
- "traceTable": {
- "A": ["E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P"],
- "B": ["E", "F", "G", "R", "S", "T", "U", "V"],
- "C": ["E", "X", "Y", "Z"],
- "D": ["E"]
- },
- "frameTable": {
- "E": "#00: E (E.cpp:99)",
- "F": "#00: F (F.cpp:99)",
- "G": "#00: G (G.cpp:99)",
- "H": "#00: H (H.cpp:99)",
- "I": "#00: I (I.cpp:99)",
- "J": "#00: J (J.cpp:99)",
- "K": "#00: K (K.cpp:99)",
- "L": "#00: L (L.cpp:99)",
- "M": "#00: M (M.cpp:99)",
- "N": "#00: N (N.cpp:99)",
- "O": "#00: O (O.cpp:99)",
- "P": "#00: P (P.cpp:99)",
- "Q": "#00: Q (Q.cpp:99)",
- "R": "#00: R (R.cpp:99)",
- "S": "#00: S (S.cpp:99)",
- "T": "#00: T (T.cpp:99)",
- "U": "#00: U (U.cpp:99)",
- "V": "#00: V (V.cpp:99)",
- "W": "#00: W (W.cpp:99)",
- "X": "#00: X (X.cpp:99)",
- "Y": "#00: Y (Y.cpp:99)",
- "Z": "#00: Z (Z.cpp:99)"
- }
-}
diff --git a/memory/replace/dmd/test/script-sort-by-num-blocks-expected.txt b/memory/replace/dmd/test/script-sort-by-num-blocks-expected.txt
deleted file mode 100644
index 8de03d953..000000000
--- a/memory/replace/dmd/test/script-sort-by-num-blocks-expected.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o script-sort-by-num-blocks-actual.txt --sort-by=num-blocks script-sort-by.json.gz
-
-Invocation {
- $DMD = '--mode=live'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 8 blocks in heap block record 1 of 3
- 16,384 bytes (8,200 requested / 8,184 slop)
- Individual block sizes: 2,048 x 8
- 33.32% of the heap (33.32% cumulative)
- Allocated at {
- #01: C (C.cpp:99)
- }
-}
-
-Live {
- 5 blocks in heap block record 2 of 3
- 16,400 bytes (12,016 requested / 4,384 slop)
- Individual block sizes: 4,096 x 4; 16
- 33.35% of the heap (66.67% cumulative)
- Allocated at {
- #01: B (B.cpp:99)
- }
-}
-
-Live {
- 5 blocks in heap block record 3 of 3
- 16,392 bytes (16,392 requested / 0 slop)
- Individual block sizes: 4,096 x 4; 8
- 33.33% of the heap (100.00% cumulative)
- Allocated at {
- #01: A (A.cpp:99)
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 49,176 bytes in 18 blocks
-}
-
diff --git a/memory/replace/dmd/test/script-sort-by-req-expected.txt b/memory/replace/dmd/test/script-sort-by-req-expected.txt
deleted file mode 100644
index 3ab21ba8f..000000000
--- a/memory/replace/dmd/test/script-sort-by-req-expected.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o script-sort-by-req-actual.txt --sort-by=req --no-fix-stacks script-sort-by.json.gz
-
-Invocation {
- $DMD = '--mode=live'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 5 blocks in heap block record 1 of 3
- 16,392 bytes (16,392 requested / 0 slop)
- Individual block sizes: 4,096 x 4; 8
- 33.33% of the heap (33.33% cumulative)
- Allocated at {
- #01: A (A.cpp:99)
- }
-}
-
-Live {
- 5 blocks in heap block record 2 of 3
- 16,400 bytes (12,016 requested / 4,384 slop)
- Individual block sizes: 4,096 x 4; 16
- 33.35% of the heap (66.68% cumulative)
- Allocated at {
- #01: B (B.cpp:99)
- }
-}
-
-Live {
- 8 blocks in heap block record 3 of 3
- 16,384 bytes (8,200 requested / 8,184 slop)
- Individual block sizes: 2,048 x 8
- 33.32% of the heap (100.00% cumulative)
- Allocated at {
- #01: C (C.cpp:99)
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 49,176 bytes in 18 blocks
-}
-
diff --git a/memory/replace/dmd/test/script-sort-by-slop-expected.txt b/memory/replace/dmd/test/script-sort-by-slop-expected.txt
deleted file mode 100644
index c325c7ed4..000000000
--- a/memory/replace/dmd/test/script-sort-by-slop-expected.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o script-sort-by-slop-actual.txt --sort-by=slop script-sort-by.json.gz
-
-Invocation {
- $DMD = '--mode=live'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 8 blocks in heap block record 1 of 3
- 16,384 bytes (8,200 requested / 8,184 slop)
- Individual block sizes: 2,048 x 8
- 33.32% of the heap (33.32% cumulative)
- Allocated at {
- #01: C (C.cpp:99)
- }
-}
-
-Live {
- 5 blocks in heap block record 2 of 3
- 16,400 bytes (12,016 requested / 4,384 slop)
- Individual block sizes: 4,096 x 4; 16
- 33.35% of the heap (66.67% cumulative)
- Allocated at {
- #01: B (B.cpp:99)
- }
-}
-
-Live {
- 5 blocks in heap block record 3 of 3
- 16,392 bytes (16,392 requested / 0 slop)
- Individual block sizes: 4,096 x 4; 8
- 33.33% of the heap (100.00% cumulative)
- Allocated at {
- #01: A (A.cpp:99)
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 49,176 bytes in 18 blocks
-}
-
diff --git a/memory/replace/dmd/test/script-sort-by-usable-expected.txt b/memory/replace/dmd/test/script-sort-by-usable-expected.txt
deleted file mode 100644
index 8239a4759..000000000
--- a/memory/replace/dmd/test/script-sort-by-usable-expected.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-#-----------------------------------------------------------------
-# dmd.py --filter-stacks-for-testing -o script-sort-by-usable-actual.txt --sort-by=usable script-sort-by.json.gz
-
-Invocation {
- $DMD = '--mode=live'
- Mode = 'live'
-}
-
-#-----------------------------------------------------------------
-
-Live {
- 5 blocks in heap block record 1 of 3
- 16,400 bytes (12,016 requested / 4,384 slop)
- Individual block sizes: 4,096 x 4; 16
- 33.35% of the heap (33.35% cumulative)
- Allocated at {
- #01: B (B.cpp:99)
- }
-}
-
-Live {
- 5 blocks in heap block record 2 of 3
- 16,392 bytes (16,392 requested / 0 slop)
- Individual block sizes: 4,096 x 4; 8
- 33.33% of the heap (66.68% cumulative)
- Allocated at {
- #01: A (A.cpp:99)
- }
-}
-
-Live {
- 8 blocks in heap block record 3 of 3
- 16,384 bytes (8,200 requested / 8,184 slop)
- Individual block sizes: 2,048 x 8
- 33.32% of the heap (100.00% cumulative)
- Allocated at {
- #01: C (C.cpp:99)
- }
-}
-
-#-----------------------------------------------------------------
-
-Summary {
- Total: 49,176 bytes in 18 blocks
-}
-
diff --git a/memory/replace/dmd/test/script-sort-by.json.gz b/memory/replace/dmd/test/script-sort-by.json.gz
deleted file mode 100644
index fa7da08c2..000000000
--- a/memory/replace/dmd/test/script-sort-by.json.gz
+++ /dev/null
Binary files differ
diff --git a/memory/replace/dmd/test/test_dmd.js b/memory/replace/dmd/test/test_dmd.js
deleted file mode 100644
index b9d4b90dd..000000000
--- a/memory/replace/dmd/test/test_dmd.js
+++ /dev/null
@@ -1,226 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-*/
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components
-
-Cu.import("resource://gre/modules/FileUtils.jsm");
-
-// The xpcshell test harness sets PYTHON so we can read it here.
-var gEnv = Cc["@mozilla.org/process/environment;1"]
- .getService(Ci.nsIEnvironment);
-var gPythonName = gEnv.get("PYTHON");
-
-// If we're testing locally, the executable file is in "CurProcD". Otherwise,
-// it is in another location that we have to find.
-function getExecutable(aFilename) {
- let file = FileUtils.getFile("CurProcD", [aFilename]);
- if (!file.exists()) {
- file = FileUtils.getFile("CurWorkD", []);
- while (file.path.includes("xpcshell")) {
- file = file.parent;
- }
- file.append("bin");
- file.append(aFilename);
- }
- return file;
-}
-
-var gIsWindows = Cc["@mozilla.org/xre/app-info;1"]
- .getService(Ci.nsIXULRuntime).OS === "WINNT";
-var gDmdTestFile = getExecutable("SmokeDMD" + (gIsWindows ? ".exe" : ""));
-
-var gDmdScriptFile = getExecutable("dmd.py");
-
-var gScanTestFile = FileUtils.getFile("CurWorkD", ["scan-test.py"]);
-
-function readFile(aFile) {
- let fstream = Cc["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Ci.nsIFileInputStream);
- let cstream = Cc["@mozilla.org/intl/converter-input-stream;1"]
- .createInstance(Ci.nsIConverterInputStream);
- fstream.init(aFile, -1, 0, 0);
- cstream.init(fstream, "UTF-8", 0, 0);
-
- let data = "";
- let str = {};
- let read = 0;
- do {
- // Read as much as we can and put it in str.value.
- read = cstream.readString(0xffffffff, str);
- data += str.value;
- } while (read != 0);
-
- cstream.close(); // this closes fstream
- return data.replace(/\r/g, ""); // normalize line endings
-}
-
-function runProcess(aExeFile, aArgs) {
- let process = Cc["@mozilla.org/process/util;1"]
- .createInstance(Components.interfaces.nsIProcess);
- process.init(aExeFile);
- process.run(/* blocking = */true, aArgs, aArgs.length);
- return process.exitValue;
-}
-
-function test(aPrefix, aArgs) {
- // DMD writes the JSON files to CurWorkD, so we do likewise here with
- // |actualFile| for consistency. It is removed once we've finished.
- let expectedFile = FileUtils.getFile("CurWorkD", [aPrefix + "-expected.txt"]);
- let actualFile = FileUtils.getFile("CurWorkD", [aPrefix + "-actual.txt"]);
-
- // Run dmd.py on the JSON file, producing |actualFile|.
-
- let args = [
- gDmdScriptFile.path,
- "--filter-stacks-for-testing",
- "-o", actualFile.path
- ].concat(aArgs);
-
- runProcess(new FileUtils.File(gPythonName), args);
-
- // Compare |expectedFile| with |actualFile|. We produce nice diffs with
- // /usr/bin/diff on systems that have it (Mac and Linux). Otherwise (Windows)
- // we do a string compare of the file contents and then print them both if
- // they don't match.
-
- let success;
- try {
- let rv = runProcess(new FileUtils.File("/usr/bin/diff"),
- ["-u", expectedFile.path, actualFile.path]);
- success = rv == 0;
-
- } catch (e) {
- let expectedData = readFile(expectedFile);
- let actualData = readFile(actualFile);
- success = expectedData === actualData;
- if (!success) {
- expectedData = expectedData.split("\n");
- actualData = actualData.split("\n");
- for (let i = 0; i < expectedData.length; i++) {
- print("EXPECTED:" + expectedData[i]);
- }
- for (let i = 0; i < actualData.length; i++) {
- print(" ACTUAL:" + actualData[i]);
- }
- }
- }
-
- ok(success, aPrefix);
-
- actualFile.remove(true);
-}
-
-// Run scan-test.py on the JSON file and see if it succeeds.
-function scanTest(aJsonFilePath, aExtraArgs) {
- let args = [
- gScanTestFile.path,
- aJsonFilePath,
- ].concat(aExtraArgs);
-
- return runProcess(new FileUtils.File(gPythonName), args) == 0;
-}
-
-function run_test() {
- let jsonFile, jsonFile2;
-
- // These tests do complete end-to-end testing of DMD, i.e. both the C++ code
- // that generates the JSON output, and the script that post-processes that
- // output.
- //
- // Run these synchronously, because test() updates the complete*.json files
- // in-place (to fix stacks) when it runs dmd.py, and that's not safe to do
- // asynchronously.
-
- gEnv.set(gEnv.get("DMD_PRELOAD_VAR"), gEnv.get("DMD_PRELOAD_VALUE"));
-
- runProcess(gDmdTestFile, []);
-
- function test2(aTestName, aMode) {
- let name = "complete-" + aTestName + "-" + aMode;
- jsonFile = FileUtils.getFile("CurWorkD", [name + ".json"]);
- test(name, [jsonFile.path]);
- jsonFile.remove(true);
- }
-
- // Please keep this in sync with RunTests() in SmokeDMD.cpp.
-
- test2("empty", "live");
- test2("empty", "dark-matter");
- test2("empty", "cumulative");
-
- test2("full1", "live");
- test2("full1", "dark-matter");
-
- test2("full2", "dark-matter");
- test2("full2", "cumulative");
-
- test2("partial", "live");
-
- // Heap scan testing.
- jsonFile = FileUtils.getFile("CurWorkD", ["basic-scan.json"]);
- ok(scanTest(jsonFile.path), "Basic scan test");
-
- let is64Bit = Components.classes["@mozilla.org/xre/app-info;1"]
- .getService(Components.interfaces.nsIXULRuntime).is64Bit;
- let basicScanFileName = "basic-scan-" + (is64Bit ? "64" : "32");
- test(basicScanFileName, ["--clamp-contents", jsonFile.path]);
- ok(scanTest(jsonFile.path, ["--clamp-contents"]), "Scan with address clamping");
-
- // Run the generic test a second time to ensure that the first time produced
- // valid JSON output. "--clamp-contents" is passed in so we don't have to have
- // more variants of the files.
- test(basicScanFileName, ["--clamp-contents", jsonFile.path]);
- jsonFile.remove(true);
-
- // These tests only test the post-processing script. They use hand-written
- // JSON files as input. Ideally the JSON files would contain comments
- // explaining how they work, but JSON doesn't allow comments, so I've put
- // explanations here.
-
- // This just tests that stack traces of various lengths are truncated
- // appropriately. The number of records in the output is different for each
- // of the tested values.
- jsonFile = FileUtils.getFile("CurWorkD", ["script-max-frames.json"]);
- test("script-max-frames-8",
- ["--max-frames=8", jsonFile.path]);
- test("script-max-frames-3",
- ["--max-frames=3", "--no-fix-stacks", jsonFile.path]);
- test("script-max-frames-1",
- ["--max-frames=1", jsonFile.path]);
-
- // This file has three records that are shown in a different order for each
- // of the different sort values. It also tests the handling of gzipped JSON
- // files.
- jsonFile = FileUtils.getFile("CurWorkD", ["script-sort-by.json.gz"]);
- test("script-sort-by-usable",
- ["--sort-by=usable", jsonFile.path]);
- test("script-sort-by-req",
- ["--sort-by=req", "--no-fix-stacks", jsonFile.path]);
- test("script-sort-by-slop",
- ["--sort-by=slop", jsonFile.path]);
- test("script-sort-by-num-blocks",
- ["--sort-by=num-blocks", jsonFile.path]);
-
- // This file has several real stack traces taken from Firefox execution, each
- // of which tests a different allocator function (or functions).
- jsonFile = FileUtils.getFile("CurWorkD", ["script-ignore-alloc-fns.json"]);
- test("script-ignore-alloc-fns",
- ["--ignore-alloc-fns", jsonFile.path]);
-
- // This tests "live"-mode diffs.
- jsonFile = FileUtils.getFile("CurWorkD", ["script-diff-live1.json"]);
- jsonFile2 = FileUtils.getFile("CurWorkD", ["script-diff-live2.json"]);
- test("script-diff-live",
- [jsonFile.path, jsonFile2.path]);
-
- // This tests "dark-matter"-mode diffs.
- jsonFile = FileUtils.getFile("CurWorkD", ["script-diff-dark-matter1.json"]);
- jsonFile2 = FileUtils.getFile("CurWorkD", ["script-diff-dark-matter2.json"]);
- test("script-diff-dark-matter",
- [jsonFile.path, jsonFile2.path]);
-}
diff --git a/memory/replace/dmd/test/xpcshell.ini b/memory/replace/dmd/test/xpcshell.ini
deleted file mode 100644
index adb82147b..000000000
--- a/memory/replace/dmd/test/xpcshell.ini
+++ /dev/null
@@ -1,35 +0,0 @@
-[DEFAULT]
-support-files =
- basic-scan-32-expected.txt
- basic-scan-64-expected.txt
- complete-empty-live-expected.txt
- complete-empty-dark-matter-expected.txt
- complete-empty-cumulative-expected.txt
- complete-full1-live-expected.txt
- complete-full1-dark-matter-expected.txt
- complete-full2-dark-matter-expected.txt
- complete-full2-cumulative-expected.txt
- complete-partial-live-expected.txt
- scan-test.py
- script-max-frames.json
- script-max-frames-8-expected.txt
- script-max-frames-3-expected.txt
- script-max-frames-1-expected.txt
- script-sort-by.json.gz
- script-sort-by-usable-expected.txt
- script-sort-by-req-expected.txt
- script-sort-by-slop-expected.txt
- script-sort-by-num-blocks-expected.txt
- script-ignore-alloc-fns.json
- script-ignore-alloc-fns-expected.txt
- script-diff-live1.json
- script-diff-live2.json
- script-diff-live-expected.txt
- script-diff-dark-matter1.json
- script-diff-dark-matter2.json
- script-diff-dark-matter-expected.txt
-
-# Bug 1077230 explains why this test is disabled on Mac 10.6.
-[test_dmd.js]
-dmd = true
-skip-if = !(os=='linux' || os=='win' || (os=='mac' && os_version!='10.6'))
diff --git a/memory/replace/moz.build b/memory/replace/moz.build
index e850637cb..881c76334 100644
--- a/memory/replace/moz.build
+++ b/memory/replace/moz.build
@@ -12,5 +12,3 @@ DIRS += [
if CONFIG['MOZ_REPLACE_MALLOC_LINKAGE'] == 'dummy library':
DIRS += ['dummy']
-if CONFIG['MOZ_DMD']:
- DIRS += ['dmd']
diff --git a/mobile/android/app/mobile.js b/mobile/android/app/mobile.js
index c0eba6596..ef4764d88 100644
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -636,9 +636,11 @@ pref("media.eme.apiVisible", false);
// optimize images memory usage
pref("image.downscale-during-decode.enabled", true);
+#ifdef MOZ_SAFE_BROWSING
pref("browser.safebrowsing.downloads.enabled", false);
pref("browser.safebrowsing.id", @MOZ_APP_UA_NAME@);
+#endif
// True if this is the first time we are showing about:firstrun
pref("browser.firstrun.show.uidiscovery", true);
diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js
index b00e1af15..e2706f4b2 100644
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -57,8 +57,10 @@ XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerParent",
XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
- "resource://gre/modules/SafeBrowsing.jsm");
+#ifdef MOZ_SAFE_BROWSING
+ XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
+ "resource://gre/modules/SafeBrowsing.jsm");
+#endif
XPCOMUtils.defineLazyModuleGetter(this, "BrowserUtils",
"resource://gre/modules/BrowserUtils.jsm");
@@ -530,8 +532,10 @@ var BrowserApp = {
InitLater(() => Services.search.init(), Services, "search");
InitLater(() => DownloadNotifications.init(), window, "DownloadNotifications");
+#ifdef MOZ_SAFE_BROWSING
// Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008.
InitLater(() => SafeBrowsing.init(), window, "SafeBrowsing");
+#endif
InitLater(() => Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager));
InitLater(() => LoginManagerParent.init(), window, "LoginManagerParent");
diff --git a/mobile/android/components/MobileComponents.manifest b/mobile/android/components/MobileComponents.manifest
index 8cf8f9a27..5194de48f 100644
--- a/mobile/android/components/MobileComponents.manifest
+++ b/mobile/android/components/MobileComponents.manifest
@@ -14,7 +14,9 @@ contract @mozilla.org/network/protocol/about;1?what=privatebrowsing {322ba47e-70
#ifdef MOZ_SERVICES_HEALTHREPORT
contract @mozilla.org/network/protocol/about;1?what=healthreport {322ba47e-7047-4f71-aebf-cb7d69325cd9}
#endif
+#ifdef MOZ_SAFE_BROWSING
contract @mozilla.org/network/protocol/about;1?what=blocked {322ba47e-7047-4f71-aebf-cb7d69325cd9}
+#endif
contract @mozilla.org/network/protocol/about;1?what=accounts {322ba47e-7047-4f71-aebf-cb7d69325cd9}
contract @mozilla.org/network/protocol/about;1?what=logins {322ba47e-7047-4f71-aebf-cb7d69325cd9}
diff --git a/mobile/android/confvars.sh b/mobile/android/confvars.sh
index a804afe22..869d0332e 100644
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -24,6 +24,7 @@ MOZ_ANDROID_APPLICATION_CLASS=org.mozilla.gecko.GeckoApplication
MOZ_ANDROID_BROWSER_INTENT_CLASS=org.mozilla.gecko.BrowserApp
MOZ_ANDROID_SEARCH_INTENT_CLASS=org.mozilla.search.SearchActivity
+MOZ_SAFE_BROWSING=
MOZ_NO_SMART_CARDS=1
MOZ_XULRUNNER=
diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in
index 067f9dde1..188682d3b 100644
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -29,9 +29,6 @@
#ifndef MOZ_STATIC_JS
@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
#endif
-#ifdef MOZ_DMD
-@BINPATH@/@DLL_PREFIX@dmd@DLL_SUFFIX@
-#endif
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
@@ -177,9 +174,6 @@
@BINPATH@/components/layout_xul.xpt
@BINPATH@/components/locale.xpt
@BINPATH@/components/lwbrk.xpt
-#ifdef MOZ_ENABLE_PROFILER_SPS
-@BINPATH@/components/memory_profiler.xpt
-#endif
@BINPATH@/components/mimetype.xpt
@BINPATH@/components/mozfind.xpt
@BINPATH@/components/necko_about.xpt
@@ -209,9 +203,6 @@
@BINPATH@/components/plugin.xpt
@BINPATH@/components/pref.xpt
@BINPATH@/components/prefetch.xpt
-#ifdef MOZ_ENABLE_PROFILER_SPS
-@BINPATH@/components/profiler.xpt
-#endif
@BINPATH@/components/rdf.xpt
@BINPATH@/components/satchel.xpt
@BINPATH@/components/saxparser.xpt
@@ -417,12 +408,14 @@
; Modules
@BINPATH@/modules/*
+#ifdef MOZ_SAFE_BROWSING
; Safe Browsing
@BINPATH@/components/nsURLClassifier.manifest
@BINPATH@/components/nsUrlClassifierHashCompleter.js
@BINPATH@/components/nsUrlClassifierListManager.js
@BINPATH@/components/nsUrlClassifierLib.js
@BINPATH@/components/url-classifier.xpt
+#endif
; Private Browsing
@BINPATH@/components/privatebrowsing.xpt
diff --git a/mobile/android/moz.configure b/mobile/android/moz.configure
index 0ab0b113e..9f622f6ef 100644
--- a/mobile/android/moz.configure
+++ b/mobile/android/moz.configure
@@ -62,7 +62,6 @@ option(env='MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER',
set_config('MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER',
depends_if('MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER')(lambda _: True))
-imply_option('MOZ_SOCIAL', False)
imply_option('MOZ_SERVICES_HEALTHREPORT', True)
imply_option('MOZ_ANDROID_HISTORY', True)
diff --git a/mobile/android/themes/core/jar.mn b/mobile/android/themes/core/jar.mn
index 248c00253..6bca48990 100644
--- a/mobile/android/themes/core/jar.mn
+++ b/mobile/android/themes/core/jar.mn
@@ -18,8 +18,6 @@ chrome.jar:
skin/aboutMemory.css (aboutMemory.css)
skin/aboutPrivateBrowsing.css (aboutPrivateBrowsing.css)
skin/aboutReader.css (aboutReader.css)
- skin/aboutReaderContent.css (aboutReaderContent.css)
- skin/aboutReaderControls.css (aboutReaderControls.css)
skin/aboutSupport.css (aboutSupport.css)
skin/content.css (content.css)
skin/scrollbar.css (scrollbar-apz.css)
@@ -31,8 +29,6 @@ chrome.jar:
% override chrome://global/skin/about.css chrome://browser/skin/about.css
% override chrome://global/skin/aboutMemory.css chrome://browser/skin/aboutMemory.css
% override chrome://global/skin/aboutReader.css chrome://browser/skin/aboutReader.css
-% override chrome://global/skin/aboutReaderContent.css chrome://browser/skin/aboutReaderContent.css
-% override chrome://global/skin/aboutReaderControls.css chrome://browser/skin/aboutReaderControls.css
% override chrome://global/skin/aboutSupport.css chrome://browser/skin/aboutSupport.css
% override chrome://global/skin/media/videocontrols.css chrome://browser/skin/touchcontrols.css
% override chrome://global/skin/netError.css chrome://browser/skin/netError.css
diff --git a/modules/freetype2/CMakeLists.txt b/modules/freetype2/CMakeLists.txt
index 7c2243b3b..ad8ded0bb 100644
--- a/modules/freetype2/CMakeLists.txt
+++ b/modules/freetype2/CMakeLists.txt
@@ -1,6 +1,6 @@
# CMakeLists.txt
#
-# Copyright 2013-2016 by
+# Copyright 2013-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# Written originally by John Cary <cary@txcorp.com>
@@ -12,35 +12,40 @@
# fully.
#
#
-# As a preliminary, create a compilation directory and change into it, for
-# example
+# The following will 1. create a build directory and 2. change into it and
+# call cmake to configure the build with default parameters as a static
+# library.
#
-# mkdir ~/freetype2.compiled
-# cd ~/freetype2.compiled
-#
-# Now you can say
-#
-# cmake <path-to-freetype2-src-dir>
-#
-# to create a Makefile that builds a static version of the library.
+# cmake -E make_directory build
+# cmake -E chdir build cmake ..
#
# For a dynamic library, use
#
-# cmake <path-to-freetype2-src-dir> -D BUILD_SHARED_LIBS:BOOL=true
+# cmake -E chdir build cmake -D BUILD_SHARED_LIBS:BOOL=true ..
#
# For a framework on OS X, use
#
-# cmake <path-to-freetype2-src-dir> -D BUILD_FRAMEWORK:BOOL=true -G Xcode
-#
-# instead.
+# cmake -E chdir build cmake -G Xcode -D BUILD_FRAMEWORK:BOOL=true ..
#
# For an iOS static library, use
#
-# cmake -D IOS_PLATFORM=OS -G Xcode <path-to-freetype2-src-dir>
+# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=OS ..
#
# or
#
-# cmake -D IOS_PLATFORM=SIMULATOR -G Xcode <path-to-freetype2-src-dir>
+# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR ..
+#
+# Finally, build the project with:
+#
+# cmake --build build
+#
+# Install it with
+#
+# (sudo) cmake --build build --target install
+#
+# A binary distribution can be made with
+#
+# cmake --build build --config Release --target package
#
# Please refer to the cmake manual for further options, in particular, how
# to modify compilation and linking parameters.
@@ -59,28 +64,33 @@
# . `CMakeLists.txt' is provided as-is since it is normally not used by the
# developer team.
#
-# . If you want to disable the automatic generation of the distribution
-# targets, add the `-D FREETYPE_NO_DIST=true' command line argument.
-#
-# . Set the `WITH_ZLIB', `WITH_BZip2', `WITH_PNG', and `WITH_HarfBuzz'
-# CMake variables to `ON' or `OFF' to force or skip using a dependency.
+# . Set the `FT_WITH_ZLIB', `FT_WITH_BZIP2', `FT_WITH_PNG', and
+# `FT_WITH_HARFBUZZ' CMake variables to `ON' to force using a dependency.
# Leave a variable undefined (which is the default) to use the dependency
-# only if it is available. Example:
+# only if it is available. Set `CMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE' to
+# disable a dependency completely (CMake package name, so `BZip2' instead of
+# `BZIP2'). Example:
#
-# cmake ... -DWITH_ZLIB=ON -DWITH_HarfBuzz=OFF ...
+# cmake -DFT_WITH_ZLIB=ON -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE [...]
#
# . Installation of FreeType can be controlled with the CMake variables
# `SKIP_INSTALL_HEADERS', `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL'
# (this is compatible with the same CMake variables in zlib's CMake
# support).
+# FreeType explicitly marks the API to be exported and relies on the compiler
+# to hide all other symbols. CMake supports a C_VISBILITY_PRESET property
+# starting with 2.8.12.
+cmake_minimum_required(VERSION 2.8.12)
-cmake_minimum_required(VERSION 2.6)
-
+if (NOT CMAKE_VERSION VERSION_LESS 3.3)
+ # Allow symbol visibility settings also on static libraries. CMake < 3.3
+ # only sets the propery on a shared library build.
+ cmake_policy(SET CMP0063 NEW)
+endif ()
include(CheckIncludeFile)
-
# CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which
# configures the base build environment and references the toolchain file
if (APPLE)
@@ -116,30 +126,47 @@ else ()
endif ()
-project(freetype)
+project(freetype C)
+set(VERSION_MAJOR "2")
+set(VERSION_MINOR "9")
+set(VERSION_PATCH "1")
+
+# SOVERSION scheme: CURRENT.AGE.REVISION
+# If there was an incompatible interface change:
+# Increment CURRENT. Set AGE and REVISION to 0
+# If there was a compatible interface change:
+# Increment AGE. Set REVISION to 0
+# If the source code was changed, but there were no interface changes:
+# Increment REVISION.
+set(LIBRARY_VERSION "6.16.0")
+set(LIBRARY_SOVERSION "6")
+
+# These options mean "require x and complain if not found". They'll get
+# optionally found anyway. Use `-DCMAKE_DISABLE_FIND_PACKAGE_x=TRUE` to disable
+# searching for a packge entirely (x is the CMake package name, so "BZip2"
+# instead of "BZIP2").
+option(FT_WITH_ZLIB "Use system zlib instead of internal library." OFF)
+option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF)
+option(FT_WITH_PNG "Support PNG compressed OpenType embedded bitmaps." OFF)
+option(FT_WITH_HARFBUZZ "Improve auto-hinting of OpenType fonts." OFF)
-if (WIN32 AND NOT MINGW AND BUILD_SHARED_LIBS)
- message(FATAL_ERROR "Building shared libraries on Windows needs MinGW")
-endif ()
# Disallow in-source builds
if ("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
message(FATAL_ERROR
- "
-In-source builds are not permitted! Make a separate folder for"
- " building, e.g.,"
- "
- mkdir build; cd build; cmake .."
- "
-Before that, remove the files created by this failed run with"
- "
- rm -rf CMakeCache.txt CMakeFiles")
+ "In-source builds are not permitted! Make a separate folder for"
+ " building, e.g.,\n"
+ " cmake -E make_directory build\n"
+ " cmake -E chdir build cmake ..\n"
+ "Before that, remove the files created by this failed run with\n"
+ " cmake -E remove CMakeCache.txt\n"
+ " cmake -E remove_directory CMakeFiles")
endif ()
# Add local cmake modules
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/builds/cmake)
+list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/builds/cmake)
if (BUILD_FRAMEWORK)
@@ -152,45 +179,32 @@ if (BUILD_FRAMEWORK)
endif ()
-set(VERSION_MAJOR "2")
-set(VERSION_MINOR "7")
-set(VERSION_PATCH "1")
-
-set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
-set(SHARED_LIBRARY_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
-
-
-# Compiler definitions for building the library
-add_definitions(-DFT2_BUILD_LIBRARY)
-
-
# Find dependencies
-foreach (d ZLIB BZip2 PNG HarfBuzz)
- string(TOUPPER "${d}" D)
-
- if (DEFINED WITH_${d} OR DEFINED WITH_${D})
- if (WITH_${d} OR WITH_${D})
- find_package(${d} QUIET REQUIRED)
- endif ()
- else ()
- find_package(${d} QUIET)
- endif ()
-
- if (${d}_FOUND OR ${D}_FOUND)
- message(STATUS "Building with ${d}")
- endif ()
-endforeach ()
+if (FT_WITH_HARFBUZZ)
+ find_package(HarfBuzz 1.3.0 REQUIRED)
+else ()
+ find_package(HarfBuzz 1.3.0)
+endif ()
+if (FT_WITH_PNG)
+ find_package(PNG REQUIRED)
+else ()
+ find_package(PNG)
+endif ()
-message(STATUS
- "Creating directory ${PROJECT_BINARY_DIR}/include/freetype/config")
-file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/include/freetype/config")
+if (FT_WITH_ZLIB)
+ find_package(ZLIB REQUIRED)
+else ()
+ find_package(ZLIB)
+endif ()
+if (FT_WITH_BZIP2)
+ find_package(BZip2 REQUIRED)
+else ()
+ find_package(BZip2)
+endif ()
# Create the configuration file
-message(STATUS
- "Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
-
if (UNIX)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
@@ -200,38 +214,27 @@ if (UNIX)
FTCONFIG_H)
if (HAVE_UNISTD_H)
string(REGEX REPLACE
- "#undef +(HAVE_UNISTD_H)" "#define \\1"
+ "#undef +(HAVE_UNISTD_H)" "#define \\1 1"
FTCONFIG_H "${FTCONFIG_H}")
endif ()
if (HAVE_FCNTL_H)
string(REGEX REPLACE
- "#undef +(HAVE_FCNTL_H)" "#define \\1"
+ "#undef +(HAVE_FCNTL_H)" "#define \\1 1"
FTCONFIG_H "${FTCONFIG_H}")
endif ()
if (HAVE_STDINT_H)
string(REGEX REPLACE
- "#undef +(HAVE_STDINT_H)" "#define \\1"
+ "#undef +(HAVE_STDINT_H)" "#define \\1 1"
FTCONFIG_H "${FTCONFIG_H}")
endif ()
string(REPLACE "/undef " "#undef "
FTCONFIG_H "${FTCONFIG_H}")
- file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h-new"
- "${FTCONFIG_H}")
-else ()
- file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
- FTCONFIG_H)
- file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h-new"
+ file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
"${FTCONFIG_H}")
endif ()
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h-new"
- "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
# Create the options file
-message(STATUS
- "Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
-
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h"
FTOPTION_H)
if (ZLIB_FOUND)
@@ -254,16 +257,8 @@ if (HARFBUZZ_FOUND)
"/\\* +(#define +FT_CONFIG_OPTION_USE_HARFBUZZ) +\\*/" "\\1"
FTOPTION_H "${FTOPTION_H}")
endif ()
-file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h-new"
+file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h"
"${FTOPTION_H}")
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h-new"
- "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
-
-
-# Specify library include directories
-include_directories("${PROJECT_SOURCE_DIR}/include")
-include_directories(BEFORE "${PROJECT_BINARY_DIR}/include")
file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h")
@@ -278,13 +273,11 @@ set(BASE_SRCS
src/base/ftbdf.c
src/base/ftbitmap.c
src/base/ftcid.c
- src/base/ftfntfmt.c
src/base/ftfstype.c
src/base/ftgasp.c
src/base/ftglyph.c
src/base/ftgxval.c
src/base/ftinit.c
- src/base/ftlcdfil.c
src/base/ftmm.c
src/base/ftotval.c
src/base/ftpatent.c
@@ -316,22 +309,24 @@ set(BASE_SRCS
)
if (WIN32)
- set(BASE_SRCS ${BASE_SRCS} builds/windows/ftdebug.c)
+ enable_language(RC)
+ list(APPEND BASE_SRCS builds/windows/ftdebug.c
+ src/base/ftver.rc)
elseif (WINCE)
- set(BASE_SRCS ${BASE_SRCS} builds/wince/ftdebug.c)
+ list(APPEND BASE_SRCS builds/wince/ftdebug.c)
else ()
- set(BASE_SRCS ${BASE_SRCS} src/base/ftdebug.c)
+ list(APPEND BASE_SRCS src/base/ftdebug.c)
endif ()
-
if (BUILD_FRAMEWORK)
- set(BASE_SRCS
- ${BASE_SRCS}
- builds/mac/freetype-Info.plist
- )
+ list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
endif ()
-set(CMAKE_DEBUG_POSTFIX d)
+
+if (NOT DISABLE_FORCE_DEBUG_POSTFIX)
+ set(CMAKE_DEBUG_POSTFIX d)
+endif()
+
add_library(freetype
${PUBLIC_HEADERS}
@@ -340,15 +335,35 @@ add_library(freetype
${BASE_SRCS}
)
+set_target_properties(
+ freetype PROPERTIES
+ C_VISIBILITY_PRESET hidden)
+
+target_compile_definitions(
+ freetype PRIVATE FT2_BUILD_LIBRARY)
+
+if (WIN32)
+ target_compile_definitions(
+ freetype PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS)
+endif ()
if (BUILD_SHARED_LIBS)
set_target_properties(freetype PROPERTIES
- VERSION ${PROJECT_VERSION}
- SOVERSION ${SHARED_LIBRARY_VERSION}
- COMPILE_DEFINITIONS freetype_EXPORTS
- )
+ VERSION ${LIBRARY_VERSION}
+ SOVERSION ${LIBRARY_SOVERSION})
endif ()
+target_include_directories(
+ freetype BEFORE # Pick up ftconfig.h and ftoption.h generated above.
+ PRIVATE "${PROJECT_BINARY_DIR}/include")
+
+target_include_directories(
+ freetype
+ PRIVATE "${PROJECT_SOURCE_DIR}/include")
+
+target_include_directories(
+ freetype
+ PUBLIC $<INSTALL_INTERFACE:include/freetype2>)
if (BUILD_FRAMEWORK)
set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
@@ -362,91 +377,121 @@ if (BUILD_FRAMEWORK)
)
endif ()
-if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
- target_include_directories(freetype
- PUBLIC $<INSTALL_INTERFACE:include/freetype2>)
-endif ()
-if (CMAKE_VERSION VERSION_LESS 2.8.12)
- set(MAYBE_PRIVATE "")
-else ()
- set(MAYBE_PRIVATE "PRIVATE")
-endif ()
+set(PKG_CONFIG_REQUIRED_PRIVATE "")
if (ZLIB_FOUND)
- target_link_libraries(freetype ${MAYBE_PRIVATE} ${ZLIB_LIBRARIES})
- include_directories(${ZLIB_INCLUDE_DIRS})
+ target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES})
+ target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS})
+ list(APPEND PKG_CONFIG_REQUIRED_PRIVATE zlib)
endif ()
if (BZIP2_FOUND)
- target_link_libraries(freetype ${MAYBE_PRIVATE} ${BZIP2_LIBRARIES})
- include_directories(${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
+ target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES})
+ target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
+ list(APPEND PKG_CONFIG_REQUIRED_PRIVATE bzip2)
endif ()
if (PNG_FOUND)
- add_definitions(${PNG_DEFINITIONS})
- target_link_libraries(freetype ${MAYBE_PRIVATE} ${PNG_LIBRARIES})
- include_directories(${PNG_INCLUDE_DIRS})
+ target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES})
+ target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS})
+ target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS})
+ list(APPEND PKG_CONFIG_REQUIRED_PRIVATE libpng)
endif ()
if (HARFBUZZ_FOUND)
- target_link_libraries(freetype ${MAYBE_PRIVATE} ${HARFBUZZ_LIBRARIES})
- include_directories(${HARFBUZZ_INCLUDE_DIRS})
+ target_link_libraries(freetype PRIVATE ${HARFBUZZ_LIBRARIES})
+ target_include_directories(freetype PRIVATE ${HARFBUZZ_INCLUDE_DIRS})
+ list(APPEND PKG_CONFIG_REQUIRED_PRIVATE harfbuzz)
endif ()
-# Installations
-# Note the trailing slash in the argument to the `DIRECTORY' directive
+# Installation
+include(GNUInstallDirs)
+
if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
- install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
- DESTINATION include/freetype2
- PATTERN "internal" EXCLUDE
- PATTERN "ftconfig.h" EXCLUDE
- PATTERN "ftoption.h" EXCLUDE
- )
- install(FILES
- ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
- ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
- DESTINATION include/freetype2/freetype/config
- )
+ install(
+ # Note the trailing slash in the argument to `DIRECTORY'!
+ DIRECTORY ${PROJECT_SOURCE_DIR}/include/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2
+ COMPONENT headers
+ PATTERN "internal" EXCLUDE
+ PATTERN "ftconfig.h" EXCLUDE
+ PATTERN "ftoption.h" EXCLUDE)
+ install(
+ FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
+ ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config
+ COMPONENT headers)
endif ()
if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
- install(TARGETS freetype
+ # Generate the pkg-config file
+ if (UNIX)
+ file(READ ${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in FREETYPE2_PC_IN)
+
+ string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}")
+
+ string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX}
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%exec_prefix%" "\${prefix}"
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%libdir%" "\${prefix}/${CMAKE_INSTALL_LIBDIR}"
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%includedir%" "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}"
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%ft_version%" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}"
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%LIBS_PRIVATE%" "" # All libs support pkg-config
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+
+ file(WRITE ${PROJECT_BINARY_DIR}/freetype2.pc ${FREETYPE2_PC_IN})
+
+ install(
+ FILES ${PROJECT_BINARY_DIR}/freetype2.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+ COMPONENT pkgconfig)
+ endif ()
+
+ install(
+ TARGETS freetype
+ EXPORT freetype-targets
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ FRAMEWORK DESTINATION Library/Frameworks
+ COMPONENT libraries)
+ install(
EXPORT freetype-targets
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
- FRAMEWORK DESTINATION Library/Frameworks
- )
- install(EXPORT freetype-targets
- DESTINATION lib/cmake/freetype
- FILE freetype-config.cmake
- )
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
+ FILE freetype-config.cmake
+ COMPONENT headers)
endif ()
# Packaging
-# CPack version numbers for release tarball name.
+set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The FreeType font rendering library.")
+set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/docs/LICENSE.TXT")
+
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
-set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}})
-if (NOT DEFINED CPACK_PACKAGE_DESCRIPTION_SUMMARY)
- set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CMAKE_PROJECT_NAME}")
-endif ()
-if (NOT DEFINED CPACK_SOURCE_PACKAGE_FILE_NAME)
- set(CPACK_SOURCE_PACKAGE_FILE_NAME
- "${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}-r${PROJECT_REV}"
- CACHE INTERNAL "tarball basename"
- )
-endif ()
-set(CPACK_SOURCE_GENERATOR TGZ)
-set(CPACK_SOURCE_IGNORE_FILES
- "/CVS/;/.svn/;.swp$;.#;/#;/build/;/serial/;/ser/;/parallel/;/par/;~;/preconfig.out;/autom4te.cache/;/.config")
-set(CPACK_GENERATOR TGZ)
-include(CPack)
+set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+if (WIN32)
+ set(CPACK_GENERATOR ZIP)
+else()
+ set(CPACK_GENERATOR TGZ)
+endif()
+
+set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
+set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers")
+set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION
+ "Library used to build programs which use FreeType")
+set(CPACK_COMPONENT_HEADERS_DESCRIPTION
+ "C/C++ header files for use with FreeType")
+set(CPACK_COMPONENT_HEADERS_DEPENDS libraries)
+set(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
+set(CPACK_COMPONENT_HEADERS_GROUP "Development")
-# Add `make dist' target if FREETYPE_DIST is set (which is the default)
-if (NOT DEFINED FREETYPE_NO_DIST)
- add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
-endif ()
-
-# eof
+include(CPack)
diff --git a/modules/freetype2/ChangeLog b/modules/freetype2/ChangeLog
index 23f574823..806b8354a 100644
--- a/modules/freetype2/ChangeLog
+++ b/modules/freetype2/ChangeLog
@@ -1,15 +1,16 @@
-2016-09-08 Werner Lemberg <wl@gnu.org>
+2018-05-01 Werner Lemberg <wl@gnu.org>
- * Version 2.7.1 released.
+ * Version 2.9.1 released.
=========================
- Tag sources with `VER-2-7-1'.
+ Tag sources with `VER-2-9-1'.
- * docs/VERSION.TXT: Add entry for version 2.7.1.
+ * docs/VERSION.TXT: Add entry for version 2.9.1.
+ * docs/CHANGES: Updated.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
- builds/windows/vc2005/index.html,
+ src/base/ftver.rc, builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
@@ -23,2074 +24,2319 @@
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
- builds/wince/vc2008-ce/index.html: s/2.7/2.7.1/, s/27/271/.
+ builds/wince/vc2008-ce/index.html: s/2.9/2.9.1/, s/29/291/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
- * builds/unix/configure.raw (version_info): Set to 19:0:13.
+ * builds/unix/configure.raw (version_info): Set to 22:1:16.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
-2016-12-30 Werner Lemberg <wl@gnu.org>
+ * include/freetype/ftgasp.h: Use FT_BEGIN_HEADER and FT_END_HEADER.
+
+2018-04-26 Werner Lemberg <wl@gnu.org>
- [ftfuzzer] Replace `rand' with an xorshift algorithm.
+ Another fix for handling invalid format 2 cmaps.
- * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'.
- (Random): Implement and use a 32bit `xorshift' algorithm.
+ Sigh.
-2016-12-30 Werner Lemberg <wl@gnu.org>
+ Reported as
- [ftfuzzer] Restrict number of tested bitmap strikes.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8003
- Malformed fonts often have large values for the number of bitmap
- strikes, and FreeType doesn't check the validity of all bitmap
- strikes in advance.
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid
+ an endless loop.
- Reported as
+2018-04-24 Ben Wagner <bungeman@google.com>
+
+ [base] Avoid undefined behaviour in lcd filtering code (#53727).
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353
+ * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
+ Ensure `height > 0'.
- * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'.
- (Random): Small class to provide n randomly selected numbers
- (without repitition) out of the value set [1,N].
- (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap
- strikes.
+2018-04-22 Werner Lemberg <wl@gnu.org>
-2016-12-29 Werner Lemberg <wl@gnu.org>
+ * src/base/ftoutln.c (FT_Outline_Decompose): Improve error tracing.
- [truetype] Variation font API stability issues.
+2018-04-22 Alexei Podtelezhnikov <apodtele@gmail.com>
- Make some functions work before a call to `TT_Set_MM_Blend'.
+ [base] Fix bitmap emboldening.
- * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if
- we don't blend.
- (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we
- don't blend.
+ Bug introduced after release 2.8.
-2016-12-29 Werner Lemberg <wl@gnu.org>
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer): We use
+ `FT_QALLOC_MULT', which doesn't zero out the buffer. Adjust the
+ bitmap copying code to take care of this fact.
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data.
+2018-04-22 Werner Lemberg <wl@gnu.org>
+
+ Another fix for handling invalid format 2 cmaps.
+
+ The previous commit was incomplete.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7928
+
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid
+ an endless loop.
-2016-12-29 Werner Lemberg <wl@gnu.org>
+2018-04-19 Werner Lemberg <wl@gnu.org
- [truetype] Tracing fixes.
+ [autofit] Add support for Georgian Mtavruli characters.
- * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct
- information.
- (TT_Set_Var_Design): Fix typo.
- (TT_Get_Var_Design): Fix typos.
+ This will be part of the forthcoming Unicode 11.0.
-2016-12-29 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afblue.dat: Add blue zone data for Mtavruli.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
- */*: Use `0.5f' for tracing 16.16 numbers.
+ * src/autofit/afscript.h: Add Mtavruli standard character.
-2016-12-29 Werner Lemberg <wl@gnu.org>
+2018-04-18 Werner Lemberg <wl@gnu.org>
- [pcf] Protect against gzip bombs.
+ Fix handling of invalid format 2 cmaps.
- Fix suggested by Kostya; reported as
+ The problem was introduced after the last release.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345
+ Reported as
- * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to
- 1024.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7828
-2016-12-28 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Avoid endless loop.
- [psnames] Only declare, not define, data in `pstables.h' (#49949).
+2018-04-17 Werner Lemberg <wl@gnu.org>
- Pdfium includes `pstables.h' a second time; moving the definition
- from `pstables.h' to `psmodule.c' saves more than 60kByte data
- segment space for this case.
+ [truetype] Integer overflow issues.
- * src/tools/glnames.py (StringTable::dump,
- StringTable::dump_sublist, dump_encoding, dump_array): Emit
- additional code to only define tables if `DEFINE_PS_TABLES' is set.
+ Reported as
- * src/psnames/pstables.h: Regenerated.
- * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7739
-2016-12-28 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttinterp.c (Ins_CEILING): Use FT_PIX_CEIL_LONG.
- [cff] Catch `blend' op in non-variant fonts.
+2018-04-16 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Integer overflow issues.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7718
- * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>: Don't
- allow `blend' op for non-variant fonts.
+ * src/truetype/ttinterp.c (Ins_MIRP): Use ADD_LONG.
-2016-12-28 Werner Lemberg <wl@gnu.org>
+2018-04-15 Alexei Podtelezhnikov <apodtele@gmail.com>
- [cff] Better check of number of blends.
+ [build] Use `info' function of make 3.81.
- * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>,
- src/cff/cffparse.c (cff_parse_blend): Compare number of blends with
- stack size.
+ * configure, docs/INSTALL, docs/INSTALL.CROSS, docs/INSTALL.GNU,
+ docs/INSTALL.UNIX, docs/MAKEPP: Bump make version requirements.
-2016-12-27 Werner Lemberg <wl@gnu.org>
+ * builds/detect.mk (std_setup): Replace `echo' with `info'.
+ (dos_setup): Removed.
+ * builds/unix/install.mk, builds/modules.mk, builds/dos/detect.mk,
+ builds/windows/detect.mk, builds/os2/detect.mk: Updated.
+ * builds/newline: No longer needed.
- Documentation updates.
+2018-04-15 Werner Lemberg <wl@gnu.org>
- * docs/CHANGES: Add missing information.
+ [truetype]: Limit `SLOOP' bytecode argument to 16 bits.
- * docs/formats.txt: Rewritten and updated.
+ This fixes
-2016-12-27 Werner Lemberg <wl@gnu.org>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7707
- [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'.
+ * src/truetype/ttinterp.c (Ins_SLOOP): Do it.
- * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement.
- (TT_Set_Var_Design): Fix tracing.
+2018-04-14 Werner Lemberg <wl@gnu.org>
- * src/type1/t1load.c (T1_Get_Var_Design): Implement.
+ [truetype] Integer overflow issues.
-2016-12-24 Werner Lemberg <wl@gnu.org>
+ Reported as
- * src/truetype/ttpload.c (tt_face_load_hdmx): Ignore `version'.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7652
- Problem reported by å¼µä¿ŠèŠ <418092625@qq.com>.
+ * src/truetype/ttinterp.c (Ins_MDAP): Use SUB_LONG.
-2016-12-24 Werner Lemberg <wl@gnu.org>
+2018-04-14 Werner Lemberg <wl@gnu.org>
- * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values.
+ [autofit] Update to Unicode 11.0.0.
- Some fonts seem to have the `version' field in the wrong byte order.
+ But no support new scripts (volunteers welcomed).
- Problem reported by å¼µä¿ŠèŠ <418092625@qq.com>.
+ * src/autofit/afranges.c (af_arab_nonbase_uniranges,
+ af_beng_nonbase_uniranges, af_cakm_nonbase_uniranges,
+ af_deva_nonbase_uniranges, af_geor_uniranges,
+ af_gujr_nonbase_uniranges, af_mlym_nonbase_uniranges,
+ af_nkoo_nonbase_uniranges, af_telu_nonbase_uniranges,
+ af_hani_uniranges): Add new data.
-2016-12-24 Werner Lemberg <wl@gnu.org>
+2018-04-10 Nikolaus Waxweiler <madigens@gmail.com>
- * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length.
+ * CMakeLists.txt, builds/cmake/FindHarfBuzz.cmake: Extensive
+ modernization measures.
- This trivial fix allows us to accept more fonts.
+ This brings up the minimum required CMake version to 2.8.12.
- Problem reported by å¼µä¿ŠèŠ <418092625@qq.com>.
+ The installation paths follow the GNU defaults now, e.g. installing on a
+ 64 bit host will place binaries into the lib64/ folder on e.g. Fedora.
-2016-12-24 Werner Lemberg <wl@gnu.org>
+ Symbols are hidden by default (e.g. `-fvisibility=hidden' on GCC).
- * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing.
+ CMake will no longer look for a C++ compiler.
-2016-12-22 Werner Lemberg <wl@gnu.org>
+ Library and .so version now match the Autotools build.
- * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909).
+ Comments in the build file and informational messages now use platform
+ agnostic example commands.
-2016-12-22 Werner Lemberg <wl@gnu.org>
+ ftoption.h and ftconfig.h are written directly without a redundant `-new'
+ copy.
- Ensure used preprocessor symbols are defined (#49790).
+ External dependencies are expressed as option()s and will turn up as such
+ in cmake-gui.
- * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
- include/freetype/config/ftconfig.h: Check `__GNUC__', `__IBMC__',
- and `__SUNPRO_C' correctly.
+ Internal: Properties such as dependencies and include directories are now
+ privately set on the freetype library instead of globally.
+
+ The CPack definitions have been cleaned up, the `make dist' has been
+ removed. Source packages generated with CPack don't contain Autotools
+ files and aren't used by the maintainters anyway.
+
+ On Windows, src/base/ftver.rc is compiled to decorate the library with
+ version and copyright information.
+
+ A pkg-config file is now generated and installed.
-2016-12-22 Werner Lemberg <wl@gnu.org>
+2018-04-09 Werner Lemberg <wl@gnu.org>
- * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'.
+ [truetype] Integer overflow issues.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=308
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7453
-2016-12-22 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttinterp.c (Round_Super, Round_Super_45): Use
+ ADD_LONG and SUB_LONG.
- [cff] Protect against invalid `vsindex' and `blend' values.
+2018-04-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [windows, wince] Clean up legacy project files.
+
+ * builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/freetype.dsp: Remove per-file compile flags.
+
+2018-04-04 Werner Lemberg <wl@gnu.org>
+
+ [cff, type1] Sanitize `BlueFuzz' and `BlueShift'.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7371
+
+ * src/cff/cffload.c (cff_load_private_dict): Sanitize
+ `priv->blue_shift' and `priv->blue_fuzz' to avoid overflows later
+ on.
+
+ * src/type1/t1load.c (T1_Open_Face): Ditto.
+
+2018-04-04 Ben Wagner <bungeman@google.com>
+
+ * src/truetype/ttobjs.c (trick_names): Add 3 tricky fonts (#53554),
+ `DFHei-Md-HK-BF', `DFKaiShu-Md-HK-BF' and `DFMing-Bd-HK-BF'.
+ (tt_check_trickyness_sfnt_ids): Add checksums for 3 tricky fonts
+ in above.
+
+2018-04-01 Werner Lemberg <wl@gnu.org>
+
+ * builds/toplevel.mk (work): Use $(SEP).
+
+ This fixes the `make refdoc' using Cygwin: $(CAT) is `type' on this
+ platform, and this program only understands backslashes in paths.
- * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVSINDEX,
- cf2_cmdBLEND>: Implement it.
+ Reported by Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>.
-2016-12-22 Werner Lemberg <wl@gnu.org>
+2018-03-30 Werner Lemberg <wl@gnu.org>
- [ftfuzzer] Always use Adobe CFF engine.
+ [truetype] Fix memory leak (only if tracing is on).
- * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var) [FT_DEBUG_LEVEL_TRACE}: Fix
it.
-2016-12-21 Werner Lemberg <wl@gnu.org>
+2018-03-23 Ben Wagner <bungeman@google.com>
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
+ [sfnt] Correctly handle missing bitmaps in sbix format (#53404).
- I should really stop coding late in the evening...
+ * src/sfnt/ttfsbit.c (tt_face_load_sbix_image): Fix return value.
- Thanks again to Ben for checking.
+2018-03-23 Ben Wagner <bungeman@google.com>
-2016-12-21 Werner Lemberg <wl@gnu.org>
+ [truetype] Fix advance of empty glyphs in bitmap fonts (#53393).
- [autofit] Support variation fonts.
+ * src/truetype/ttgload.c (TT_Load_Glyph): Apply scaling to metrics
+ for empty bitmaps.
- (This ChangeLog entry was added later on.)
+2018-03-22 Werner Lemberg <wl@gnu.org>
- * src/autofit/afglobal.c (af_face_globals_free): Remove useless
- code.
+ Remove `ftlcdfil.c' and `ftfntfmt.c' from build files (#53415).
- * src/base/ftmm.c (FT_Set_MM_Design_Coordinates,
- * FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
- FT_Set_Var_Blend_Coordinates): Finalize
- auto-hinter data to enforce recomputation. Note that this is a
- brute-force method which should be improved.
+ builds/amiga/makefile, builds/amiga/makefile.os4,
+ builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
+ builds/mac/FreeType.m68k_far.make.txt,
+ builds/mac/FreeType.ppc_carbon.make.txt,
+ builds/mac/FreeType.ppc_classic.make.txt,
+ builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/freetype.vcxproj.filters,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj, vms_make.com: Do it.
+
+2018-03-13 Werner Lemberg <wl@gnu.org>
-2016-12-21 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttcmap.c (tt_cmap2_validate): Fix potential numeric
+ overflow.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
+2018-03-13 Werner Lemberg <wl@gnu.org>
- Don't apply deltas twice for non-phantom points.
+ Fix cmap format 2 handling (#53320).
- Spotted by Ben Wagner.
+ The patch introduced for #52646 was not correct.
-2016-12-21 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition.
- [cff, truetype] Another try for #49829.
+2018-03-10 Nikolaus Waxweiler <madigens@gmail.com>
- * src/cff/cffdrivr.c: Don't include
- `FT_SERVICE_METRICS_VARIATIONS_H'.
- (cff_get_advances): Use `ttface->variation_support'.
+ * CMakeLists.txt (BASE_SRCS): Update to changes from 2018-03-05.
- * src/truetype/ttdriver.c (tt_get_advances): Use
- `ttface->variation_support'.
+2018-03-09 Chun-wei Fan <fanc999@yahoo.com.tw>
- * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
- load_truetype_glyph): Use `ttface->variation_support'.
+ * CMakeLists.txt [win32]: Allow MSVC DLL builds (#53287).
-2016-12-21 Werner Lemberg <wl@gnu.org>
+ Do not limit DLL builds to MinGW, since we already have
+ `__declspec(dllexport)' directives in `ftconfig.h'.
+ Also suppress more warnings for POSIX functions.
- [truetype, sfnt] Introduce font variation flags to `TT_Face'.
+2018-03-08 Hugh McMaster <hugh.mcmaster@outlook.com>
- * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX):
- New macros describing available functionality of various OpenType
- tables related to font variation.
- (TT_Face): New fields `variation_support' and `mvar_support',
- replacing and extending `use_fvar'.
+ Make installation of `freetype-config' optional (#53093).
- * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use
- `variation_support'.
+ * builds/unix/configure.raw: Add option `--enable-freetype-config'
+ and set `INSTALL_FT2_CONFIG'.
+ * builds/unix/unix-def.in (INSTALL_FT2_CONFIG): Define.
+ * builds/unix/install.mk (install): Handle it.
- * src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support'
- field.
- (TT_Vary_Apply_Glyph_Deltas): Updated.
+2018-03-05 Werner Lemberg <wl@gnu.org>
-2016-12-21 Werner Lemberg <wl@gnu.org>
+ Make `ftlcdfil.c' part of the `base' module.
- [base] Improve sanity check for Mac resources (#49888).
+ `ftobjs.c' needs `ft_lcd_padding'.
- * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not
- positive.
+ Problem reported by duhuanpeng <548708880@qq.com>.
-2016-12-20 Werner Lemberg <wl@gnu.org>
+ * modules.cfg (BASE_EXTENSIONS): Don't include `ftlcdfil.c'.
- [base] More sanity checks for Mac resources.
+ * src/base/ftbase.c: Include `ftlcdfil.c'.
+ * src/base/rules.mk (BASE_SRC): Add `ftlcdfil.c'.
+ * src/base/Jamfile (_sources): Adjusted.
- We use
+ * docs/INSTALL.ANY: Updated.
- https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format
+2018-03-05 Werner Lemberg <wl@gnu.org>
- and
+ Make `ftfntfmt.c' part of the `base' module.
- https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151
+ `ftobjs.c' needs `FT_Get_Font_Format'.
- as references.
+ Problem reported by duhuanpeng <548708880@qq.com>.
- * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short
- for `res_id'.
+ * modules.cfg (BASE_EXTENSIONS): Don't include `ftfntfmt.c'.
- * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Extract map length
- and use it to improve sanity checks.
- Follow the specification more closely;in particular, all data types
- are signed, not unsigned.
- (FT_Raccess_Get_DataOffsets): Follow the specification more closely;
- in particular, all data types are signed, not unsigned.
- Add some sanity checks.
+ * src/base/ftbase.c: Include `ftfntfmt.c'.
+ * src/base/rules.mk (BASE_SRC): Add `ftfntfmt.c'.
+ * src/base/Jamfile (_sources): Adjusted.
-2016-12-20 Werner Lemberg <wl@gnu.org>
+ * docs/INSTALL.ANY: Updated.
- [truetype] Improve logic for getting fast advance widths.
+2018-03-01 Werner Lemberg <wl@gnu.org>
- * src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c
- (tt_get_advances): Use `is_default_instance' for test; this gets
- recomputed after changing blend coordinates.
+ * src/truetype/ttinterp.c (TT_RunIns): Fix tracing arguments.
-2016-12-20 Ben Wagner <bungeman@google.com>
- Werner Lemberg <wl@gnu.org>
+2018-02-23 Werner Lemberg <wl@gnu.org>
- [truetype] Fix linear metrics of GX variation fonts (#49829).
+ * builds/unix/configure.raw: Need HarfBuzz 1.3.0 or newer.
- When asking for an unhinted non-default variations,
- `linearVertAdvance' is currently the value from the `hmtx' table
- instead of the actual value after applying the variation. `HVAR'
- support fixes this, but fonts will exist without that table and will
- need sane fallback.
+ Problem reported by Alan Coopersmith <alan.coopersmith@oracle.com>.
- Problem also reported as
+2018-02-17 Werner Lemberg <wl@gnu.org>
- https://bugs.chromium.org/p/skia/issues/detail?id=5917
+ [sfnt] Prefer `CBDT'/`CBLC' over `glyf' table (#53154).
- * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
- load_truetype_glyph): Implement linear advance adjustments if `HVAR'
- or `VVAR' tables are missing.
+2018-02-06 Werner Lemberg <wl@gnu.org>
-2016-12-20 Werner Lemberg <wl@gnu.org>
+ [truetype] Integer overflow issues.
- [cff, truetype] Fast advance width retrieval for fonts with HVAR.
+ Reported as
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6027
- * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM.
+ * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIAP, Ins_MIRP): Use
+ SUB_LONG; avoid FT_ABS.
- * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
- (cff_get_advances): Test for HVAR and VVAR.
+2018-02-04 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR.
+ [unix] Use -fvisibility=hidden.
-2016-12-18 Werner Lemberg <wl@gnu.org>
+ It is now widely recommended that ELF shared libraries hide symbols
+ except those with explicit __attribute__((visibility("default"))).
+ This is supported by all major compilers and should rather be an
+ option in libtool.
+
+ * builds/unix/configure.raw: Add -fvisibility=hidden to CFLAGS.
+ * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+ include/freetype/config/ftconfig.h (FT_EXPORT): Use visibility
+ attribute.
- [base] Fix invalid mac font recursion.
+2018-01-27 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Better protection against invalid VF data.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5739
- * src/base/ftobjs.c (FT_Open_Face): Code moved to...
- (ft_open_face_internal): ... this function.
- Add a parameter to control whether we try special Mac font handling
- in case of failure.
- (FT_Open_Face, FT_New_Face, FT_New_Memory_Face,
- open_face_from_buffer): Use `ft_open_face_internal'.
+ Bug introduced in commit 08cd62deedefe217f2ea50e392923ce8b5bc7ac7.
-2016-12-18 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttgxvar.c (TT_Set_Var_Design): Always initialize
+ `normalizedcoords'.
- * src/cff/cffobjs.c (cff_face_init): Make named instances work.
+2018-01-27 Werner Lemberg <wl@gnu.org>
-2016-12-18 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference.
- [truetype, cff] Extend `get_var_blend' function of MM service.
+ Reported as
- In particular, we need access to named instance data.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5736
- * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
- Add argument for `FT_MM_Var'.
+2018-01-27 Werner Lemberg <wl@gnu.org>
- * src/cff/cffload.c (cff_get_var_blend): Updated.
- * src/cff/cffload.h: Updated.
+ * src/truetype/ttgxvar.c (tt_set_mm_blend): Minor.
- * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
+2018-01-27 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (tt_get_var_blend): Updated.
- Accept value `NULL' for arguments.
- * src/truetype/ttgxvar.h: Updated.
+ [truetype] Better trace VF instances.
-2016-12-18 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttgxvar.c (ft_var_to_normalized): Don't emit number
+ of coordinates.
+ (TT_Get_MM_Var): Trace instance indices names.
+ (TT_Set_Var_Design): Updated.
- [sfnt] Handle `fvar' with zero axes as a non-MM font.
+2018-01-27 Werner Lemberg <wl@gnu.org>
- This is better behaviour than exiting with an error.
+ [truetype] Beautify tracing of VF axis records.
- * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar'
- field.
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Show axis records in a
+ table-like manner.
- * src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also
- updating the validation code.
- Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS.
+2018-01-26 Ben Wagner <bungeman@google.com>
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation
- code.
+ [truetype] Fix multiple calls of `FT_Get_MM_Var' (#52955).
-2016-12-18 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Set
+ `face->blend->num_axis' in case we have to initialize the
+ `face->blend'.
- Minor GX code shuffling.
+2018-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
- * include/freetype/internal/tttypes.h (TT_Face): Move
- `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT
- block.
+ [apinames] Anonymous version map for GNU linker.
- * src/sfnt/sfobjs.c (sfnt_init_face): Updated.
- * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro.
- (TT_Load_Glyph): Use it.
+ * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.3.
+ (OutputFormat): Add `OUTPUT_GNU_VERMAP'.
+ (names_dump): Handle it.
+ (usage): Updated.
+ (main): Handle new command line flag `-wL'.
-2016-12-18 Werner Lemberg <wl@gnu.org>
+2018-01-21 Alexei Podtelezhnikov <apodtele@gmail.com>
- [cff] Better handling of non-CFF font formats.
+ [unix] Call libtool to clean up.
- * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a
- signature, so return `FT_Err_Unknown_File_Format' more often.
+ * builds/unix/install.mk (clean_project_unix, distclean_project_unix):
+ Use libtool.
+ * builds/freetype.mk: Minor.
-2016-12-17 Werner Lemberg <wl@gnu.org>
+2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code.
+ * src/base/ftver.rc: Fix mingw-w64 compilation.
-2016-12-17 Werner Lemberg <wl@gnu.org>
+2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code.
+ [build] Enable VERSIONINFO resource for Cygwin/MinGW.
-2016-12-17 Werner Lemberg <wl@gnu.org>
+ * builds/unix/configure.raw: Check for resource compiler.
+ * builds/unix/unix-cc.in: Conditionally set up resource compiler.
+ * builds/freetype.mk: Add conditional rule for `ftver.rc'.
+ * src/base/ftver.rc: Copyright notice and year update.
- [sfnt, truetype] Various sanitizing fixes.
+2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is
- zero, set `num_instances' to zero.
+ [build] Move VERSIONINFO resource.
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with
- zero axes as invalid.
+ * builds/windows/vc2010/freetype.vcxproj: Updated.
+ * builds/windows/ftver.rc: Move file from here...
+ * src/base/ftver.rc: ... to here.
- * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading
- `loca', `cvt', `fpgm', and `prep' table.
+2018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-12-17 Werner Lemberg <wl@gnu.org>
+ [build] Expand dllexport/dllimport to Cygwin/MinGW.
- Improve tracing of `FT_Open_Face'.
+ * include/freetype/config/ftconfig.h: Respect DLL_EXPORT,
+ s/_MSC_VER/_WIN32/.
+ * builds/unix/ftconfig.in: Replicate here.
+ * builds/vms/ftconfig.h: Replicate here.
- * src/base/ftobjs.c (FT_Open_Face): Return info on number of
- available faces and numbered instances, or the indices of the
- requested face and numbered instance.
+2018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts.
+ [build] Improve and document MSVC build.
-2016-12-17 Werner Lemberg <wl@gnu.org>
+ * include/freetype/config/ftconfig.h: Guard dllexport/dllimport
+ attributes with _DLL and FT2_DLLIMPORT.
+ * builds/windows/vc2010/index.html: Update documentation.
- * src/cff/cffload.c (cff_load_private_dict): Always init `blend'.
+2018-01-10 Steve Robinson <ssrobins@gmail.com>
- Reported as
+ * CMakeLists.txt [win32]: Suppress warnings for POSIX functions.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295
+2018-01-10 Ewald Hew <ewaldhew@gmail.com>
-2016-12-16 Werner Lemberg <wl@gnu.org>
+ [psaux] Correctly handle Flex features (#52846).
- [truetype] Fix `cvar' sanity test.
+ * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO,
+ cf2_cmdHMOVETO>: Do not move if doing Flex.
- Reported by Dave Arnold.
+2018-01-09 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask.
+ * builds/windows/vc2010/freetype.sln: Synchronize with the project.
-2016-12-16 Werner Lemberg <wl@gnu.org>
+2018-01-08 Werner Lemberg <wl@gnu.org>
- [cff, truetype] Remove compiler warnings; fix `make multi'.
+ * Version 2.9 released.
+ =======================
- * src/cff/cf2font.h: Include `cffload.h'.
- * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and
- FT_SERVICE_MULTIPLE_MASTERS_H.
- (cff_vstore_load): Eliminate `vsSize'.
- (cff_load_private_dict): Tag as `FT_LOCAL_DEF'.
+ Tag sources with `VER-2-9'.
- * src/cff/cffload.h: Include `cffobjs.h'.
- Provide declaration for `cff_load_private_dict'.
+ * docs/VERSION.TXT: Add entry for version 2.9.
+
+ * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2005/index.html,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2008/index.html,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/index.html,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/index.html,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/index.html,
+ builds/windows/ftver.rc,
+ builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2005-ce/index.html,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/index.html: s/2.8.1/2.9/, s/281/29/.
- * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate
- `minorVersion' and `map_offset'.
+ * include/freetype/freetype.h (FREETYPE_MINOR): Set to 9.
+ (FREETYPE_PATCH): Set to 0.
-2016-12-16 Werner Lemberg <wl@gnu.org>
+ * builds/unix/configure.raw (version_info): Set to 22:0:16.
+ * CMakeLists.txt (VERSION_PATCH): Set to 0.
- [cff] Fix heap buffer overflow (#49858).
+2018-01-07 Werner Lemberg <wl@gnu.org>
- * src/cff/cffparse.c (cff_parser_run): Add one more stack size
- check.
+ Add check for librt, needed for `ftbench' (#52824).
-2016-12-15 Werner Lemberg <wl@gnu.org>
+ * builds/unix/configure.raw (LIB_CLOCK_GETTIME): Define; this will
+ hold `-lrt' if necessary.
- Fix clang warnings.
+ * builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): New variable.
- * src/cff/cffload.c (cff_blend_doBlend): Add cast.
- (cff_subfont_load): Set `error' correctly.
+2018-01-07 Ewald Hew <ewaldhew@gmail.com>
- * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo.
+ [psaux] Fix Type 1 glyphs with too many stem hints.
-2016-12-15 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+ According to the CFF specification, charstrings can have up to 96 stem
+ hints. Due to hint replacement routines in Type 1 charstrings, some
+ glyphs are rejected by the Adobe engine, which implements the above
+ limit. This fix turns off hinting for such glyphs.
- [cff] Implement CFF2 support (2/2).
+ * src/psaux/pshints.c (cf2_hintmap_build): Reset the error from calling
+ `cf2_hintmask_setAll' on a problematic Type 1 charstring and turn off
+ hinting.
- The font variation code. All parts dependent on the GX code in the
- `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
- In other words, you can still compile the `cff' module without
- defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2
- support without font variation).
+2018-01-06 Werner Lemberg <wl@gnu.org>
- * src/cff/cf2font.c (cf2_font_setup): Add support for font
- variation.
- * src/cff/cf2font.h (CF2_Font): Add fields for variation data.
+ Add `FT_Done_MM_Var'.
- * src/cff/cf2ft.c (cf2_free_instance): Free blend data.
- (cf2_getVStore, cf2_getNormalizedVector): New functions.
- * src/cff/cf2ft.h: Updated.
+ This is necessary in case the application's memory routines differ
+ from FreeType. A typical example is a Python application on Windows
+ that calls FreeType compiled as a DLL via the `ctypes' interface.
- * src/cff/cf2intrp.c: Include `cffload.h'.
- (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with...
- (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values.
- (cf2_doBlend): New function.
- (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes.
+ * include/freetype/ftmm.h, src/base/ftmm.c (FT_Done_MM_Var): Declare
+ and define.
- * src/cff/cffload.c (FT_fdot14ToFixed): New macro.
- (cff_vstore_done, cff_vstore_load): New functions.
- (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector,
- cff_blend_check_vector): New functions.
- (cff_load_private_dict): Add arguments for blend vector.
- Handle blend data.
- (cff_subfont_load, cff_subfont_done): Updated.
- (cff_font_load): Handle CFF2 variation store data.
- (cff_font_done): Updated.
- * src/cff/cffload.h: Include `cffparse.h'.
- Updated.
+ * docs/CHANGES: Updated.
- * src/cff/cffobjs.c (cff_face_done): Updated.
+2018-01-03 Werner Lemberg <wl@gnu.org>
- * src/cff/cffparse.c: Include `cffload.h'.
- (cff_parse_num): Handle internal value 255.
- (cff_parse_vsindex, cff_parse_blend): New functions.
- (CFF_FIELD_BLEND): New macro.
- (cff_parser_run): Updated.
- * src/cff/cffparse.h (cff_kind_blend): New enum value.
+ [truetype] Round offsets of glyph components only if hinting is on.
- * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend'
- dictionary values.
+ * src/truetype/ttgload.c (TT_Process_Composite_Component): Implement
+ it.
- * src/cff/cfftypes.h (CFF_VarData, CFF_AxisCoords, CFF_VarRegion,
- CFF_VStore, CFF_Blend): New structures.
- (CFF_FontRecDict): Add `vstore_offset' field.
- (CFF_Private): Add `vsindex' field.
- (CFF_SubFont): Add fields for blend data.
- (CFF_Font): Add `vstore' field.
+2018-01-03 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): `CFF2' is equal to `gvar',
- since glyph variation data is directly embedded.
- (TT_Set_MM_Blend): Don't load `gvar' table for CFF2 fonts.
+ * src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code.
-2016-12-15 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+ This is a better fix than the previous commit, which is now
+ reverted.
- [cff] Implement CFF2 support (1/2).
+2018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com>
- This commit does not contain the blend code for font variation
- support, which follows in another commit.
+ Move internal LCD-related declarations.
- You should ignore whitespace while inspecting this commit.
+ * include/freetype/ftlcdfil.h (ft_lcd_padding, ft_lcd_filter_fir):
+ Move from here...
+ * include/freetype/internal/ftobjs.h: ... to here.
- * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2'
- member.
+2018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member.
+ * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
+ [_MSC_VER]: Limit Visual C++ attributes.
- * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2'
- flag.
- (cf2_getMaxstack): New function.
- * src/cff/cf2ft.h: Updated.
+2018-01-03 Werner Lemberg <wl@gnu.org>
- * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum.
- (cf2_interpT2CharString): Handle CFF2 differences.
- Add tracing message for errors.
+ [truetype] Make blend/design coordinate round-tripping work.
- * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index):
- Update for CFF2.
+ Behdad reported that setting blend coordinates, then getting design
+ coordinates did incorrectly return the default instance's
+ coordinates.
- * src/cff/cffload.c (FT_FIXED_ONE): New macro.
- (cff_index_init, cff_index_load_offsets, cff_index_access_element,
- cff_index_get_name, cff_ft_select_get, cff_load_private_dict,
- cff_subfont_load, cff_font_load): Handle CFF2.
- * src/cff/cffload.h: Updated.
+ * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix it.
- * src/cff/cffobjs.c (cff_face_init): Handle CFF2.
+2017-12-31 Werner Lemberg <wl@gnu.org>
- * src/cff/cffparse.c (cff_parse_maxstack): New function.
- (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed
- * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New
- macros.
- (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New
- macros.
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop.
- * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend
- stuff).
+ Reported as
- * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field.
- (CFF_FontRecDict): Add `maxstack' field.
- (CFF_Private): Add `subfont' field.
- (CFF_Font): Add `top_dict_length' and `cff2' fields.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4838
- * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table.
+2017-12-31 Werner Lemberg <wl@gnu.org>
-2016-12-15 Werner Lemberg <wl@gnu.org>
- Dave Arnold <darnold@adobe.com>
+ Synchronize other Windows project files.
- [truetype] Provide HVAR advance width variation as a service.
+ * builds/windows/*: Add missing files.
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+2017-12-31 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated.
+ Update Visual C 2010 project files.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Prevent
- double adjustment of advance width.
+ Problem reported by Hin-Tak.
- * src/sfnt/ttmtx.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
- (tt_face_get_metrics): Apply metrics variations.
+ * builds/windows/vc2010/freetype.vcxproj: Add files `ftbdf.c' and
+ `ftcid.c'.
+ Sort entries.
+ * builds/windows/vc2010/freetype.vcxproj.filter: Ditto.
+ Fix members of `FT_MODULE' group.
-2016-12-15 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+2017-12-30 Werner Lemberg <wl@gnu.org>
- [truetype] Provide function to apply `HVAR' advance width variation.
+ * builds/vms/ftconfig.h: Synchronize with unix `ftconfig.in' file.
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+2017-12-28 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (tt_hadvance_adjust): New function.
- * src/truetype/ttgxvar.h: Updated.
+ * builds/unix/ftconfig.in: Synchronize with main `ftconfig.h' file.
-2016-12-15 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+ Reported by Nikolaus.
- [truetype] Add `HVAR' table parsing.
+2017-12-27 Werner Lemberg <wl@gnu.org>
- Note that this is not complete yet; it only handles advance width
- variation.
+ Fix compiler warnings.
- Activation of the code follows in another commit.
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Make `pitch' and
+ `new_pitch' unsigned.
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+ * src/base/ftpsprop.c: Include FT_INTERNAL_POSTSCRIPT_PROPS_H.
- * include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member.
+2017-12-27 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.h (GX_HVarData, GX_AxisCoords, GX_HVarRegion,
- GX_HVStore, GX_WidthMap): New auxiliary structures for...
- (GX_HVarTable): ... HVAR main structure.
- (GX_BlendRec): Add data for HVAR loading.
+ Fixes for `make multi'.
- * src/truetype/ttgxvar.c (FT_FIXED_ONE, FT_fdot14ToFixed,
- FT_intToFixed, FT_fixedToInt): New macros.
- (ft_var_load_hvar): New function.
- (TT_Get_MM_Var): Updated.
- (tt_done_blend): Deallocate HVAR data.
+ * include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'.
+ (ps_property_get): Harmonize declaration with corresponding
+ function typedef.
-2016-12-15 Dave Arnold <darnold@adobe.com>
+ * include/freety[e/internal/fttrace.h: Add `trace_psprops'.
- [cff] Extend number parsing.
+ * src/base/ftpsprop.c: Include necessary header files.
+ (FT_COMPONENT): Define.
+ (ps_property_set): Tag with `FT_BASE_CALLBACK_DEF'.
+ (ps_property_get): Tag with `FT_BASE_CALLBACK_DEF'.
+ Harmonize declaration with corresponding function typedef.
- The forthcoming CFF2 support needs a dynamic parsing limit.
+2017-12-27 Werner Lemberg <wl@gnu.org>
- * src/cff/cffparse.c (cff_parse_num, do_fixed, cff_parse_fixed,
- cff_parse_fixed_scaled, cff_parse_fixed_dynamic): Add argument for
- parser.
- (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict,
- cff_parse_multiple_master, cff_parse_cid_ros, cff_parser_run): Updated.
+ Provide support for intra-module callback functions.
- * src/cff/cffparse.h (cff_parse_num): Export locally.
+ This is needed especially for `make multi' with C++.
-2016-12-15 Dave Arnold <darnold@adobe.com>
+ * include/freetype/config/ftconfig.h (FT_BASE_CALLBACK,
+ FT_BASE_CALLBACK_DEF): New macros.
- [cff] Implement dynamic stack size for Adobe engine.
+2017-12-25 Ewald Hew <ewaldhew@gmail.com>
- This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for
- the forthcoming CFF2 support.
+ Move PostScript drivers' property handlers to `base'.
- * src/cff/cf2stack.c (cf2_stack_init): Add argument for stack size.
- (cf2_stack_free): Deallocate stack.
- (cf2_stack_count, cf2_stack_pushInt, cf2_stack_pushFixed,
- cf2_stack_popInt, cf2_stack_popFixed, cf2_stack_getReal,
- cf2_stack_clear): Updated.
- (cf2_stack_setReal, cf2_stack_pop): New functions.
+ This reduces the amount of duplicated code across PostScript
+ drivers.
- * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member.
- Update function declarations.
+ * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c
+ ({cff,cid,t1}_property_{get,set}): Moved to...
+ * include/freetype/internal/ftpsprop.h: ...this new file.
+ (ps_property_{get,set}): New functions to replace moved ones.
- * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated.
+ * src/base/ftpsprop.c: New file that implements above functions.
- * src/cff/cffparse.c (cff_parser_init): Add parameter for stack
- size; return error code.
- (cff_parser_done): New function.
- (cff_parser_run): Updated.
+ * include/freetype/internal/internal.h
+ (FT_INTERNAL_POSTSCRIPT_PROPS_H): New macro.
- * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make
- `stack' a pointer.
- Update function declarations.
+ * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c:
+ Updated.
- * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load):
+ * src/base/Jamfile, src/base/rules.mk (BASE_SRC), src/base/ftbase.c:
Updated.
-2016-12-15 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+2017-12-20 Werner Lemberg <wl@gnu.org>
- [cff] Code shuffling.
+ Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new.
- * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset'
- fields.
+ We exit early if the current design or blend coordinates are
+ identical to the new ones.
- * src/cff/cffload.c (cff_subfont_load): Change last argument to
- `CFF_Font'
- Split off parsing of private dictionary into...
- (cff_load_private_dict): ...this new function.
- (cff_font_load): Updated.
+ * src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Set_Var_Design):
+ Implement it, returning internal error code -1 if there will be no
+ variation change.
-2016-12-14 Werner Lemberg <wl@gnu.org>
+ * src/type1/t1load.c (t1_set_mm_blend): Ditto.
- [sfnt, truetype] Add framework for Metrics Variations service.
+ * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
+ FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Updated.
- No effect yet; service functions will be implemented later on.
+2017-12-18 Werner Lemberg <wl@gnu.org>
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+ [sfnt] Fix charmap type 2 iterator (#52646).
- * include/freetype/internal/services/svmetric.h: New file.
+ The subsetted demo font of the report that exhibits the bug has a
+ very unusual type 2 cmap for Unicode(!): It contains only two
+ sub-headers, one for one-byte characters (covering the range 0x20 to
+ 0xFA), and a second one for higher byte 0x01 (just for character
+ code U+0131).
- * include/freetype/internal/ftserv.h
- (FT_SERVICE_METRICS_VARIATIONS_H): New macro.
+ Before this commit, the iterator wasn't able to correctly handle a
+ sub-header for higher byte 0x01.
- * include/freetype/internal/tttypes.h (TT_Face): New field `var'.
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix character increment
+ for outer loop.
- * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
- (sfnt_init_face): Initialize `face->var'.
+2017-12-18 Matthias Clasen <matthias.clasen@gmail.com>
- * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
- (tt_service_metrics_variations): New service.
- (tt_services): Updated.
+ [truetype] Fix clamping, minor tracing code beautification.
- * src/truetype/ttpic.h: Updated.
+ * src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of
+ design coordinates.
+ Use clamped value.
-2016-12-14 Werner Lemberg <wl@gnu.org>
+2017-12-18 Werner Lemberg <wl@gnu.org>
- [cff] Add Multiple Masters service.
+ * src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff.
- The code simply uses the MM functions from the `truetype' module.
+2017-12-18 Werner Lemberg <wl@gnu.org>
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+ * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688).
- * include/freetype/internal/tttypes.h (TT_Face): New field `mm'.
+2017-12-18 Werner Lemberg <wl@gnu.org>
- * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
- (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var,
- cff_set_var_design, cff_get_var_design): New functions.
- (cff_service_multi_masters): New service.
- (cff_services): Updated.
+ [truetype] Fix previous commit.
- * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New
- functions.
- * src/cff/cffload.h: Updated.
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle
+ unhinted phantom points, which must be properly scaled.
+
+2017-12-18 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Don't apply HVAR and VVAR deltas twice (#52683).
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Always adjust
+ `pp1' to `pp4', except if we have an HVAR and/or VVAR table.
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Handle
+ alternative code branch identically w.r.t. presence of an HVAR
+ and/or VVAR table.
+
+2017-12-17 Jonathan Kew <jfkthame@gmail.com>
+
+ [truetype] Correctly handle variation font phantom points (#52683).
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom
+ point indices.
+
+2017-12-17 Jonathan Kew <jfkthame@gmail.com>
+
+ Fix incorrect advance width scaling (#52683).
+
+ * src/base/ftadvance.c (FT_Get_Advances): Always respect the
+ FT_LOAD_NO_SCALE flag if present.
+
+2017-12-16 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * builds/windows/vc2010/freetype.vcxproj: AfterBuild copy.
+ * objs/.gitignore: Ignore almost everything.
+
+2017-12-11 Werner Lemberg <wl@gnu.org>
- * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro.
+ Fix compiler warning (#52640).
- * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
- (sfnt_init_face): Initialize `face->mm'.
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Remove unused
+ variable.
-2016-12-14 Werner Lemberg <wl@gnu.org>
+2017-12-08 Azzuro <azzuro@team-mediaportal.com>
- Extend functionality of `ft_module_get_service'.
+ * builds/windows/vc2010/freetype.vcxproj: Adjust output directory.
- It can now differentiate between local and global searches.
+ This allows builds with different configurations in parallel.
- * src/base/ftobjs.c (ft_module_get_service): Add `global' argument.
- (FT_Get_TrueType_Engine_Type): Updated.
+2017-12-08 Werner Lemberg <wl@gnu.org>
- * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated.
+ Fix `make setup dos', second try (#52622).
- * include/freetype/internal/ftobjs.h: Updated.
- * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE):
+ * builds/detect.mk (dos_setup): Don't use literal `>' character at
+ all. Mixing the different escaping rules from make, dos, and
+ windows is too fragile.
+
+2017-12-08 Werner Lemberg <wl@gnu.org>
+
+ [docmaker] Fix code section parsing.
+
+ Stuff like
+
+ {
+ <bla>
+ }
+
+ confused the parser, which incorrectly treated `<bla>' as a markup
+ tag.
+
+ * src/tools/docmaker/content.py (ContentProcessor::process_content):
+ Apply `re_markup_tags' only outside of code sections.
+
+2017-12-08 Werner Lemberg <wl@gnu.org>
+
+ New `ftdriver.h' file, covering all driver modules.
+
+ This reduces redundancy and increases synergy; it also reduces the
+ number of header files.
+
+ * include/freetype/config/ftheader.h (FT_DRIVER_H): New macro.
+ (FT_AUTOHINTER_H, FT_CFF_DRIVER_H, FT_TRUETYPE_DRIVER_H,
+ FT_PCF_DRIVER_H, FT_TYPE1_DRIVER_H): Make them aliases to
+ FT_DRIVER_H.
+
+ * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
+ include/freetype/ftpcfdrv.h, include/freetype/ftt1drv.h,
+ include/freetype/ftttdrv.h: Replaced with...
+ * include/freetype/ftdriver.h: ...this new file.
+ (FT_CFF_HINTING_ADOBE, FT_T1_HINTING_ADOBE): Renamed to...
+ (FT_HINTING_ADOBE): ... this new macro.
+ (FT_CFF_HINTING_FREETYPE, FT_T1_HINTING_FREETYPE): Renamed to...
+ (FT_HINTING_FREETYPE): ... this new macro.
+
+ * src/*/*: Updated accordingly.
+
+2017-12-08 Werner Lemberg <wl@gnu.org>
+
+ Move `ftdriver.h' to `ftdrv.h'.
+
+ * include/freetype/internal/ftdriver.h: Renamed to...
+ * include/freetype/internal/ftdrv.h: ... this name.
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_DRIVER_H):
Updated.
-2016-12-14 Werner Lemberg <wl@gnu.org>
+2017-12-08 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning.
+ Fix access to uninitalized memory (#52613).
-2016-12-14 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+ Also reported as
- [sfnt, cff] Minor preparations.
+ https://bugs.chromium.org/p/chromium/issues/detail?id=791317
- * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR,
- TTAG_VVAR): New SFNT table tags.
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer): If increasing the
+ bitmap size needs a larger bitmap buffer, assure that the new memory
+ areas are initialized also.
- * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast.
+2017-12-08 Werner Lemberg <wl@gnu.org>
-2016-12-10 Werner Lemberg <wl@gnu.org>
+ Fix `make setup dos' (#52622).
- [truetype, type1] Add `get_var_blend' to MM service.
+ * builds/detect.mk (dos_setup): Properly escape literal `>'
+ character.
- For internal use; we want to share code between the forthcoming CFF2
- support and TrueType.
+2017-12-07 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
- New typedef.
- (MultiMasters): Add `get_var_blend'.
- (FT_Service_MultiMasters): Updated.
+ Fix C++ compilation.
- * src/truetype/ttgxvar.c (tt_get_var_blend): New function.
- * src/truetype/ttgxvar.h: Updated.
+ * src/psaux/psauxmod.h: Use FT_CALLBACK_TABLE macro where necessary.
- * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
- * src/type1/t1driver.c (t1_service_multi_masters): Updated.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix warning.
-2016-12-10 Werner Lemberg <wl@gnu.org>
+2017-12-07 Werner Lemberg <wl@gnu.org>
- [truetype, type1] Add `done_blend' to MM service.
+ Fix `make multi'.
- For internal use; we want to share code between the forthcoming CFF2
- support and TrueType.
+ * include/freetype/internal/fttrace.h: Remove unused tracing macros.
+ s/pshalgo2/pshalgo/.
+ Add `trace_cffdecode'.
+ * src/pshinter/pshalgo.c (FT_COMPONENT): Updated.
- * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func):
- New typedef.
- (MultiMasters): Add `done_blend'.
- (FT_Service_MultiMasters): Updated.
+ * src/cff/cffload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
+ * src/cff/cffobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H and
+ FT_SERVICE_CFF_TABLE_LOAD_H.
- * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument.
- * src/truetype/ttgxvar.h: Updated.
+ * src/cid/cidriver.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
- * src/truetype/ttobjs.c (TT_Face_Done): Updated.
+ * src/psaux/cffdecode.c: Include FT_FREETYPE_H and
+ FT_INTERNAL_DEBUG_H.
+ (FT_COMPONENT): Define.
+ * src/psaux/cffdecode.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
+ * src/psaux/psauxmod.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
+ Declare `cff_builder_funcs' and `ps_builder_funcs'.
+ * src/psaux/psft.c: Include `psobjs.h' and `cffdecode.h'.
+ * src/psaux/psobjs.c : Include `psauxmod.h'.
- * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
- * src/type1/t1driver.c (t1_service_multi_masters): Updated.
+2017-12-07 Werner Lemberg <wl@gnu.org>
-2016-12-09 Werner Lemberg <wl@gnu.org>
+ * include/freetype/config/ftheader.h: Some clean-up.
- [sfnt] Revert change from 2016-12-08.
+ This commit removes documentation of deprecated macros and does some
+ minor streamlining.
- I missed the functionality of `ft_module_get_service', which makes
- the change unnecessary.
+2017-12-06 Werner Lemberg <wl@gnu.org>
-2016-12-08 Werner Lemberg <wl@gnu.org>
+ * builds/symbian/bld.inf: Updated.
- Add framework to support services with 8 functions.
+2017-12-06 Werner Lemberg <wl@gnu.org>
- We will need this for CFF variation font support.
+ New header file `ftparams.h' that collects all parameter tags.
- * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8):
- New macro.
+ * include/freetype/config/ftheader.h (FT_PARAMETER_TAGS_H): New
+ macro.
+ (FT_TRUETYPE_UNPATENTED_H, FT_UNPATENTED_HINTING_H): Define it to
+ `ftparams.h'.
-2016-12-08 Werner Lemberg <wl@gnu.org>
+ * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
+ include/freetype/ftincrem.h, include/freetype/ftlcdfil.h,
+ include/freetype/ftsnames.h, include/freetype/ftt1drv.h: Include
+ FT_PARAMETER_TAGS_H.
+ Move FT_PARAM_TAG_XXX definitions to...
+ * include/freetype/ftparams.h: ...this new file.
- [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface.
+ * include/freetype/ttunpat.h: Remove. No longer needed.
- CFF2 fonts will need access to those two functions.
+2017-12-05 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H.
- (SFNT_Interface): Add `get_glyph_name' and `get_name_index' members.
- (FT_DEFINE_SFNT_INTERFACE): Updated.
+ Improve tracing messages by using singular and plural forms.
- * src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index):
- Fix signatures to exactly correspond to the glyph dict service
- function typedefs.
- (sfnt_interface): Updated.
+ * src/*/*.c: Implement it.
-2016-12-06 Dave Arnold <darnold@adobe.com>
+2017-12-04 Werner Lemberg <wl@gnu.org>
- Add `FT_Get_Var_Design_Coordinates' function.
+ [truetype] Allow shared points in `cvar' table (#52532).
- Note that the low-level functions aren't implemented yet.
+ * src/truetype/ttgxvar.c (tt_face_vary_cvt): Implement it by copying
+ and adjusting the corresponding code from
+ `TT_Vary_Apply_Glyph_Deltas'.
- * include/freetype/ftmm.h: Declare.
+2017-11-28 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/services/svmm.h
- (FT_Get_Var_Design_Func): New typedef.
- (MultiMasters): New MM service function `get_var_design'.
- (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
- Update all callers.
+ [truetype] Improving tracing of composite glyphs.
- * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement.
+ * src/truetype/ttgload.c (TT_Load_Composite_Glyph)
+ [FT_DEBUG_LEVEL_TRACE]: Show composite glyph information.
- * src/truetype/ttdriver.c: Updated.
+2017-11-27 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to
- handle `get_var_design' service.
- * src/truetype/ttgxvar.h: Updated.
+ [type1] Allow (again) `/Encoding' with >256 elements (#52464).
- * src/type1/t1driver.c: Updated.
+ In version 2.6.1, this has been disallowed to better reject
+ malformed fonts; however, this restriction was too strong. This
+ time, we only take the first 256 elements into account, since
+ encoding arrays are always accessed with a 8bit integer, according
+ to the PostScript Language Reference.
- * src/type1/t1load.c (T1_Get_Var_Design): New dummp function to
- handle `get_var_design' service.
- * src/type1/t1load.h: Updated.
+ * src/type1/t1load.c (parse_encoding): Implement it.
-2016-12-06 Werner Lemberg <wl@gnu.org>
+2017-11-27 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
- * src/type1/t1load.c (parse_subrs): Fix memory leak.
+ Fix last commit (#52522).
- The `subrs' keyword might erroneously occur multiple times.
+ * builds/freetype.mk: Set `FT_OPTION_H' and `FTOPTION_FLAG'
+ properly if we have `ftoption.h' in `BUILD_DIR'.
- Reported as
+2017-11-24 Werner Lemberg <wl@gnu.org>
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231
+ [unix] Install a massaged `ftoption.h' file (#51780).
-2016-12-01 Werner Lemberg <wl@gnu.org>
+ * builds/unix/configure.raw (ftoption_set, ftoption_unset): New
+ auxiliary functions to construct...
+ (FTOPTION_H_SED): ... this new variable.
+ Apply it as a sed argument while copying `ftoption.h' to the
+ `builds/unix' directory (using `AC_CONFIG_FILES').
+ Simplify code of test that checks cpp's computation of bit length
+ (the test previously created an empty `ftoption.h' file and deleted
+ it immediately afterwards); without this change, it can happen on my
+ GNU/Linux box that `configure's execution of `config.status' doesn't
+ create `ftoption.h' (no idea why this happens).
- [gzip] Improve building with external zlib (#49673).
+ * builds/unix/install.mk (install): Install
+ `builds/unix/ftoption.h'.
- Building FreeType with external zlib 1.2.8 makes msvc 14 stop with
- the following error.
+ * builds/unix/unix-def.in (DISTCLEAN): Updated.
- ftgzip.c
- zlib-1.2.8\zlib.h(86): error C2061:
- syntax error: identifier 'z_const'
- zlib-1.2.8\zlib.h(94): error C2054:
- expected '(' to follow 'z_const'
- zlib-1.2.8\zlib.h(94): error C2085:
- 'msg': not in formal parameter list
- ...
- zlib-1.2.8\zlib.h(877): fatal error C1003:
- error count exceeds 100; stopping compilation
+ * builds/unix/.gitignore: Updated.
- The error happens because FreeType keeps an own copy of zlib-1.1.4
- under `src/gzip'. When building `src/gzip/ftgzip.c' with
- FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses
+2017-11-23 Tor Andersson <tor.andersson@artifex.com>
- #include <zlib.h>
+ Silence unused function warnings (#52465).
- which correctly finds an external `zlib.h', but `zlib.h' itself has
- a line
+ Some static function declarations cause unused function warnings if
+ certain config options are turned off via `ftoption.h'.
- #include "zconf.h"
+ * src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h,
+ src/truetype/ttgxvar.h: Add #ifdef guards around these sections.
- which makes Visual Studio 2015 find `src/gzip/zconf.h' while
- compiling the files in `src/gzip'.
+2017-11-22 Ewald Hew <ewaldhew@gmail.com>
- * src/gzip/zconf.h: Rename to...
- * src/gzip/ftzconf.h: ... this.
- * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated.
+ * src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting.
-2016-12-01 Oleksandr Chekhovskyi <oleksandr.chekhovskyi@gmail.com>
+ Reported as
- [autofit] Fix Emscripten crash (patch #9180).
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4377
- Function calls through pointers must use a matching signature to
- work on Emscripten, since such calls are dispatched through lookup
- tables grouped by signature.
+2017-11-22 Ewald Hew <ewaldhew@gmail.com>
- * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix
- typedef.
+ [psaux] Fix CFF advance widths. (#52466)
-2016-11-29 Werner Lemberg <wl@gnu.org>
+ Glyph advance widths were being written to the new `PS_Decoder' but not
+ saved to the underlying format specific decoder. This caused pure CFF
+ fonts to have bad advance width.
- [smooth] Revert previous commit. Already fixed with 6ca54c64.
+ * include/freetype/internal/psaux.h (PS_Decoder): Change `glyph_width'
+ field to pointer.
+ Remove unused fields.
+ * src/psaux/psobjs.c (ps_decoder_init): Change `glyph_width' from copy
+ to reference.
+ Remove unused.
+ * src/psaux/psft.c (cf2_setGlyphWidth): Update code.
-2016-11-29 Werner Lemberg <wl@gnu.org>
+2017-11-15 Vlad Tsyrklevich <vtsyrklevich@google.com>
- [smooth] Avoid conditional jump on uninitialized value (#49711).
+ * include/freetype/ftrender.h: Fix `FT_Renderer_RenderFunc' type.
- * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'.
+2017-11-14 Nikolaus Waxweiler <madigens@gmail.com>
-2016-11-27 Nikolaus Waxweiler <madigens@gmail.com>
+ Use Adobe hinting engine for `light' hinting of both CFF and Type 1.
- [autofit] Code shuffling.
+ Since Ewald Hew factored the Adobe hinting engine out of the CFF
+ driver code, we can now use it on Type 1 (and CID) font formats, as
+ both have the same hinting philosophy.
- Also improve some comments and remove unused code.
+ This change activates the Adobe hinter when in LIGHT mode, and
+ therefore always unless explicitly asking for the auto-hinter. This
+ makes LIGHT behavior consistent with CFF fonts. As of this commit,
+ the hinting engine table looks as follows.
- No functional change.
+ LIGHT NORMAL
+ -------------------------
+ TrueType Auto v40
+ CFF Adobe Adobe
+ Type 1 Adobe Adobe
- * src/autofit/afloader.c (af_loader_load_g): Merged with...
- (af_loader_load_glyph): ...this function.
- Split off emboldening code into...
- (af_loader_embolden_glyph_in_slot): ... this function.
+2017-11-10 Yuri Levchenko <yuri_levchenko@boolat.com>
-2016-11-17 Werner Lemberg <wl@gnu.org>
+ * CMakeLists.txt: Add `DISABLE_FORCE_DEBUG_PREFIX' option.
- Better support of LLP64 systems with gcc (and clang).
+2017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com>
- * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'.
+ * src/base/ftobjs.c (FT_Load_Glyph): Relocate condition.
- * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and
- suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'.
+2017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-11-10 Werner Lemberg <wl@gnu.org>
+ * src/smooth/ftgrays.c (gray_set_cell): Fix uninitialized variables.
- Fix `lcd_weights' array size.
+2017-11-03 Ewald Hew <ewaldhew@gmail.com>
- * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it.
+ [psaux] Fix PostScript interpreter rewinding in Type 1 mode. (#52251)
- Reported by Nikolaus.
+ The interpreter in Type 1 mode rewinds the charstring after collecting
+ all hints for building the initial hintmap (commit d52dd7f). However,
+ some charstrings use `endchar' in a final subroutine call, rewinding to
+ the start of that subroutine, and only a small section of the actual
+ glyph is drawn.
-2016-11-06 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdENDCHAR>:
+ Ensure we are on the top level charstring before rewinding.
- * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing.
+2017-11-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2016-11-06 Werner Lemberg <wl@gnu.org>
+ [truetype] Add more tricky fonts.
- [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format.
+ See the report by Yang Yinsen.
+ https://lists.gnu.org/archive/html/freetype-devel/2017-11/msg00000.html
- It's unavoidable to call the PNG engine, but to get the metrics it
- is sufficient to read the PNG image's header only.
+ * src/truetype/ttobjs.c (trick_names): Add `DFGothic-EB',
+ `DFGyoSho-Lt', `DFHSGothic-W5', `DFHSMincho-W3' and `DFHSMincho-W7'.
+ (tt_check_trickyness_sfnt_ids): Add checksums for DFGothic-EB,
+ DFGyoSho-Lt, DFHSGothic-W5, DFHSMincho-W3 and DFHSMincho-W7. Also
+ add checksums for DLCLiShu and DLCHayBold which their family names
+ were already listed but their checksums were previously unknown.
- * src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the
- allocation of the glyph slot.
- * src/sfnt/pngshim.h: Updated.
- * src/sfnt/ttsbit.c (tt_sbit_decoder_load_png,
- tt_face_load_sbix_image, tt_face_load_sbit_image): Updated.
+2017-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-11-06 Werner Lemberg <wl@gnu.org>
+ [smooth] Fix complex rendering at high ppem.
- [sfnt] Speed up `sbix' lookup.
+ We used to split large glyphs into horizontal bands and continue
+ bisecting them still horizontally if that was not enough. This is
+ guaranteed to fail when a single scanline cannot fit into the
+ rendering memory pool. Now we bisect the bands vertically so that
+ the smallest unit is a column of the band height, which is guranteed
+ to fit into memory.
- This also fixes a bug introduced in 2016-10-01 which prevents
- display of embedded bitmap fonts that use the `sbix' format.
+ * src/smooth/ftgrays.c (gray_convert_glyph): Implement it.
- * src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and
- offset also in `ebdt_size' and `ebdt_start', respectively. This
- makes the test for an embedded bitmap data table succeed for this
- format.
+2017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
- (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Use
- `ebdt_size' and `ebdt_start'
- (tt_face_load_sbix_image): Ditto.
+ [smooth] Improve complex rendering at high ppem.
-2016-11-06 Seigo Nonaka <nona@google.com>
- Werner Lemberg <wl@gnu.org>
+ At large sizes almost but not exactly horizontal segments can quickly
+ drain the rendering pool. This patch at least avoids filling the pool
+ with trivial cells. Beyond this, we can only increase the pool size.
- Introduce a way of quickly retrieving (embedded) bitmap metrics.
+ Reported, analyzed, and tested by Colin Fahey.
- `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph
- until the user calls `FT_Render_Glyph'. However, it always
- allocates memory for bitmaps and copies or decodes the contents of a
- bitmap glyph, which can be quite slow for PNG data.
+ * src/smooth/ftgrays.c (gray_set_cell): Do not record trivial cells.
- * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New
- macro.
+2017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if
- FT_LOAD_BITMAP_METRICS_ONLY is used.
+ [base] Improve tracing in FT_Load_Glyph, FT_*_Size.
- * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap,
- tt_sbit_decoder_load_bitmap): Add argument to control allocation of
- the glyph slot.
- (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound,
- tt_face_load_sbit_image): Updated.
+ * src/base/ftobjs.c (FT_Load_Glyph): Tag tracing messages with
+ function name, glyph index, and load flags.
+ (FT_Select_Metrics, FT_Request_Metrics): Remove all tracing.
+ (FT_Select_Size, FT_Request_Size): Improve tracing.
- * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if
- `FT_LOAD_BITMAP_METRICS_ONLY' is set.
+2017-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add
- argument to control allocation of the glyph slot.
- * src/pfr/pfrobjs (pfr_slot_load): Updated.
+ [base] Improve tracing in FT_Render_Glyph.
- * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
+ * src/base/ftobjs.c (FT_Render_Glyph_Internal): Add total coverage
+ calculations and downgrade Netpbm dump to bitmap:7.
- * docs/CHANGES: Updated.
+2017-10-15 Ewald Hew <ewaldhew@gmail.com>
-2016-11-06 Werner Lemberg <wl@gnu.org>
+ [cff] Fix segfault on missing `psaux' (#52218)
- Synchronize with gnulib (#49448).
+ * src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr.
- * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
- builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in
- current version of `intprops.h'.
- Other minor synchronization to reduce code differences between the
- three files.
+ * modules.cfg: Update dependency list.
-2016-11-03 Behdad Esfahbod <behdad@behdad.org>
+2017-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
- [truetype] Clamp variation requests to valid range.
+ [base, cff] Fix MSVC warnings.
- This is required by OpenType 1.8; it also avoids rounding surprises.
+ * src/base/ftobjs.c (FT_New_Library): C4702: unreachable code.
+ (ft_glyphslot_preset_bitmap): C4244: possible loss of data.
+ * src/cff/cffload.c (cff_blend_doBlend): C4244: possible loss of data.
+ Turn `sum' into unsigned.
- * src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates
- outside of the allowed range to always stay within the range instead
- of producing an error.
+2017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-10-29 Werner Lemberg <wl@gnu.org>
+ [base] Netpbm image tracing.
- [truetype] Remove clang warnings.
+ * src/base/ftobjs.c (FT_Load_Glyph): Trace bitmap size.
+ (FT_Render_Glyph_Internal): Trace bitmap in Netpbm format.
- * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for
- loop counter handling.
+ * src/smooth/ftgrays.c (gray_sweep): Sweep remnants of span tracing.
- * src/truetype/ttinterp.c: Updated.
- (Ins_SCANTYPE): Use signed constant.
- (TT_RunIns): Ensure `num_twilight_points' is 16bit.
+2017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-10-27 Werner Lemberg <wl@gnu.org>
+ * builds/windows/ftdebug.c (FT_Message): Print to stderr.
+ * builds/wince/ftdebug.c (FT_Message): Ditto.
- [truetype] Fix commit from 2014-11-24.
+2017-10-14 Behdad Esfahbod <behdad@behdad.org>
- Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
+ [afshaper] Delay creating `hb_set' objects until needed.
- * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking
- logic.
+ In runs on Noto Naskh Arabic, this results in 89 sets created
+ instead of 340 before. Makes auto-hinter setup with HarfBuzz
+ enabled 20% to 30% faster.
-2016-10-26 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afshaper.c (af_shaper_get_coverage): Implement it.
- Add `FT_Get_{MM,Var}_Blend_Coordinates' functions.
+2017-10-12 Ewald Hew <ewaldhew@gmail.com>
- * include/freetype/ftmm.h: Declare.
+ [type1, cid] Add hinting engine switch.
- * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func):
- New typedef.
- (MultiMasters): New MM service function `get_mm_blend'.
- (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
- Update all callers.
+ Implement property service in `type1' and `cid' drivers to allow
+ switching between FreeType or Adobe hinting engine when both are
+ available.
- * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates,
- FT_Get_Var_Blend_Coordinates): Implement.
+ * src/cid/cidriver.c (cid_property_{set,get}, cid_services),
+ src/type1/t1driver.c (t1_property_{set,get}, t1_services): Add
+ Properties service.
- * src/truetype/ttdriver.c: Updated.
+ * src/cid/cidobjs.c (cid_driver_init), src/type1/t1objs.c
+ (T1_Driver_Init): Add default property values.
- * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle
- `get_mm_blend' service.
- * src/truetype/ttgxvar.h: Updated.
+2017-10-12 Ewald Hew <ewaldhew@gmail.com>
- * src/type1/t1driver.c: Updated.
+ Add T1_CONFIG_OPTION_OLD_ENGINE configuration option.
- * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle
- `get_mm_blend' service.
- * src/type1/t1load.h: Updated.
+ This controls whether the old Type 1 engine gets compiled into FreeType.
+ It is disabled by default.
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (T1_CONFIG_OPTION_OLD_ENGINE): New macro.
+
+ * include/freetype/internal/psaux.h (PS_Decoder): Remove unused field.
+ * include/freetype/internal/psaux.h, src/cid/cidgload.c
+ (cid_load_glyph), src/psaux/psauxmod.c, src/psaux/psobjs.c
+ (ps_builder_add_point), src/psaux/t1decode.c
+ (t1_lookup_glyph_by_stdcharcode, t1_decoder_parse_glyph,
+ t1operator_seac, t1_decoder_parse_charstrings), src/psaux/t1decode.h,
+ src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Surround
+ relevant code with macro.
+ Minor code changes.
+
+2017-10-12 Ewald Hew <ewaldhew@gmail.com>
+
+ Extract width parsing from Type 1 parser.
- * docs/CHANGES: Document.
+ Duplicate the fast advance width calculations from the old parser.
+ This is to facilitate adding options for compiling out the old parser.
-2016-10-26 Werner Lemberg <wl@gnu.org>
+ * src/psaux/t1decode.{c,h} (t1_decoder_parse_metrics): New function.
+ * include/freetype/internal/psaux.h (T1_Decoder_Funcs): New entry
+ `parse_metrics'.
+ * src/psaux/psauxmod.c: Set the new entry.
- * src/type1/t1load.c (parse_subrs): Fix limit check.
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String),
+ src/cid/cidgload.c (cid_load_glyph): Separate
+ conditional for selecting engine.
+
+2017-10-09 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftoutln.c (FT_Outline_Translate): Fix integer overflow.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81
+ https://bugs.chromium.org/p/chromium/issues/detail?id=772775
-2016-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-10-08 Werner Lemberg <wl@gnu.org>
- [cff] Correct cmap format reporting (#24819).
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Integer overflows.
- * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic
- charmap instead of guessing its format and language.
+ Reported as
-2016-10-22 Werner Lemberg <wl@gnu.org>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3579
- [truetype] Fix SCANTYPE instruction (#49394).
+2017-10-07 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits.
+ [sfnt] Adjust behaviour of PS font names for variation fonts.
-2016-10-22 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Use a named instance's
+ PS name only if no variation is applied.
- [sfnt] Improve handling of invalid post 2.5 tables [#49393].
+2017-10-07 Werner Lemberg <wl@gnu.org>
- * src/sfnt/ttpost.c (load_format_25): We need at least a single
- table entry.
+ [cff, truetype] Adjust behaviour of named instances.
-2016-10-14 Werner Lemberg <wl@gnu.org>
+ This commit completely separates the interaction between named
+ instances and variation functions. In particular, resetting the
+ variation returns to the current named instance (if set) and not to
+ the base font.
- [truetype] Fix handling of `cvar' table data.
+ As a side effect, variation functions no longer change the named
+ instance index.
- Reported as
+ * src/cff/cffobjs.c (cff_face_init): Use MM service's `set_instance'
+ function.
+ Also apply `MVAR' table to named instances.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add cast.
+ (tt_set_mm_blend): No longer check whether requested variation
+ coincides with a named instance.
+ (TT_Set_Var_Design): Use current named instance for default
+ coordinates.
+ * src/truetype/ttobjs.c (tt_face_init): Use `TT_Set_Named_Instance'.
- * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT
- indices.
+2017-10-07 Werner Lemberg <wl@gnu.org>
-2016-10-11 Werner Lemberg <wl@gnu.org>
+ Make `FT_Set_Named_Instance' work.
- [psaux] Fix handling of invalid flex subrs.
+ * src/cff/cffdrivr.c (cff_set_instance): New function.
+ (cff_service_multi_masters): Register it.
- Problem reported as
+ * src/truetype/ttgxvar.c (TT_Set_Named_Instance): New function.
+ * src/truetype/ttgxvar.h: Updated.
+ * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Register
+ it.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52
+ * src/type1/t1load.c (T1_Reset_MM_Blend): New function.
+ * src/type1/t1load.h: Updated.
+ * src/type1/t1driver.c (t1_service_multi_masters): Register it.
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
- <op_callothersubr>: Set `flex_state' after error checking.
+2017-10-07 Werner Lemberg <wl@gnu.org>
-2016-10-11 Werner Lemberg <wl@gnu.org>
+ Make `FT_FACE_FLAG_VARIATION' work.
- * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation.
+ * include/freetype/internal/tttypes.h (TT_Face): Remove
+ `is_default_instance'; this can be replaced with a combination of
+ `FT_IS_VARIATION' and `FT_IS_INSTANCE'.
-2016-10-08 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffdrivr.c (cff_get_advances): Updated.
- * src/cid/cidload.c (cid_face_open): Properly propagate `error'.
+ * src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/sfobjs.c
+ (sfnt_init_face): Updated.
-2016-10-08 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttdriver.c (tt_get_advances), src/truetype/ttgload.c
+ (TT_Process_Simple_Glyph, load_truetype_glyph, IS_DEFAULT_INSTANCE),
+ src/truetype/ttgxvar.c (tt_set_mm_blend): Updated.
+ * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
+ Handle `FT_FACE_FLAG_VARIATION'.
- [cid] Fix parsing of subr offsets.
+ * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Handle
+ `FT_FACE_FLAG_VARIATION'.
- Bug introduced 2016-05-16.
+2017-10-07 Werner Lemberg <wl@gnu.org>
- * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error.
+ New function `FT_Set_Named_Instance'.
-2016-10-01 Werner Lemberg <wl@gnu.org>
+ No effect yet.
- [sfnt] Disable bitmap strikes if we don't have a bitmap data table.
+ * src/base/ftmm.c (FT_Set_Named_Instance): New function.
- * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have
- a bitmap data table.
+ * include/freetype/ftmm.h: Updated.
-2016-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-10-07 Werner Lemberg <wl@gnu.org>
- [smooth] Remove impossibility.
+ Add macros for checking whether a font variation is active.
- * src/smooth/ftgrays.c (TWorker): Rearrange fields.
- (gray_convert_glyph): Remove impossible condition and clean up.
+ * include/freetype/freetype.h (FT_FACE_FLAG_VARIATION,
+ FT_IS_VARIATION): New macros.
+ No effect yet.
-2016-09-29 Werner Lemberg <wl@gnu.org>
+2017-10-07 Werner Lemberg <wl@gnu.org>
- [pcf] Enrich family name with foundry name and glyph width info.
+ Add framework for setting named instance in MM service.
- This is a very old patch from openSuSE (from 2006, submitted to
- FreeType in 2011) that I forgot to apply.
+ * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func):
+ New function typedef.
+ (MultiMasters): Add `set_instance' member.
+ (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
- https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch
+ * src/cff/cffdrivr.c (cff_service_multi_masters),
+ src/truetype/ttdriver (tt_service_gx_multi_masters),
+ src/type1/t1driver.c (t1_service_multi_masters): Updated.
- Prepend the foundry name plus a space to the family name. There are
- many fonts just called `Fixed' which look completely different, and
- which have nothing to do with each other. When selecting `Fixed' in
- KDE or Gnome one gets results that appear rather random, the style
- changes often if one changes the size and one cannot select some
- fonts at all.
+2017-10-07 Werner Lemberg <wl@gnu.org>
- We also check whether we have `wide' characters; all put together,
- we get family names like `Sony Fixed' or `Misc Fixed Wide'.
+ [type1] Minor code shuffling.
- * src/pcf/pcfread.c (pcf_load_font): Implement it.
+ * src/type1/t1load.c (T1_Set_MM_Blend): Make it a wrapper of...
+ (t1_set_mm_blend): ...this new function.
+ (T1_Set_MM_Design): Use `t1_set_mm_blend'.
- * docs/CHANGES: Document it.
+2017-10-05 Werner Lemberg <wl@gnu.org>
-2016-09-29 Werner Lemberg <wl@gnu.org>
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Fix integer
+ overflow.
- [ftfuzzer] Speed up.
+ Reported as
- * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't
- check for embedded bitmaps if we have a non-default instance.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3539
-2016-09-29 Werner Lemberg <wl@gnu.org>
+2017-10-05 Werner Lemberg <wl@gnu.org>
- [truetype] Disallow bitmap strokes for non-default instances.
+ Fix compiler warnings.
- Also speed up access of default instances if GX variations are
- active.
+ * src/cff/cffdrivr.c (cff_ps_get_font_extra): Avoid code that relies
+ on numeric overflow.
+ Add cast.
- * include/freetype/internal/tttypes.h (TT_FaceRec): Add
- `is_default_instance' member.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix variable
+ types, add cast.
- * src/sfnt/sfobjs.c (sfnt_init_face): Initialize
- `is_default_instance'.
+2017-10-04 John Tytgat <John.Tytgat@esko.com>
- * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
- load_truetype_glyph): Add test for default instance.
- (TT_Load_Glyph): Load embedded bitmaps for default instance only.
+ [cff] Add support for `FSType'.
- * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute
- `is_default_instance'.
+ * include/freetype/internal/cfftypes.h (CFF_FontRec): Add
+ `font_extra' entry.
-2016-09-29 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffdrivr.c (cff_ps_get_font_extra): New function to
+ retrieve FSType info from the embedded PostScript data.
+ (cff_service_ps_info): Register function.
- [truetype] Clean up `TT_Face' structure.
+ * src/cff/cffload.c (cff_font_done): Free `font_extra'.
- * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused
- fields `horz_metrics' and `vert_metrics'.
- Update documentation.
+2017-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/sfnt/sfobjs.c (sfnt_done_face): Updated.
+ Signedness fixes in bitmap presetting.
-2016-09-28 Werner Lemberg <wl@gnu.org>
+ Reported as
- More FT_ZERO usage.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3514.
- * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
- s/ft_memset/FT_MEM_ZERO/.
+ * src/raster/ftrend1.c (ft_raster1_render): Exlicitly signed height.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Explicitly unsigned
+ subtraction.
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
- s/ft_memset/FT_ARRAY_ZERO/.
+2017-09-29 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/raster/ftraster.c (FT_ZERO): Define.
- (ft_black_new): Use it.
- * src/raster/ftrend1.c (ft_raster1_get_cbox):
- s/FT_MEM_ZERO/FT_ZERO/.
+ Bitmap metrics presetting [2/2].
- * src/smooth/ftgrays.c (FT_ZERO): Define.
- (gray_raster_new): Use it.
- * src/smooth/ftsmooth.c (ft_smooth_get_cbox):
- s/FT_MEM_ZERO/FT_ZERO/.
+ * src/base/ftobjs.c (FT_Load_Glyph): Preset the bitmap metrics when
+ appropriate but `FT_Render_Glyph' is not called.
+ * include/freetype/freetype.h (FT_GlyphSlotRec): Document the change.
-2016-09-28 Werner Lemberg <wl@gnu.org>
+2017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com>
- */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
+ [smooth, raster] Miscellaneous cleanups.
-2016-09-27 Werner Lemberg <wl@gnu.org>
+ * src/raster/ftrend1.c (ft_raster1_render): Clean up the exit.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Reduce
+ translations and clean up the exit.
+ (ft_smooth_render_lcd, ft_smooth_render_lcd): Remove unused `error'.
- [truetype] Trace number of executed opcodes.
+2017-09-28 Ben Wagner <bungeman@google.com>
- * src/truetype/ttinterp.c (TT_RunIns): Implement it.
+ [truetype] Really, really fix #52082.
-2016-09-27 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
- [truetype] Speed up `TT_Load_Glyph'.
+2017-09-28 Werner Lemberg <wl@gnu.org>
- This avoids additional calls to `tt_face_lookup_table' for the
- `glyf' table, which can be expensive.
+ * src/psaux/psintrp.c (cf2_doStems): Fix integer overflow.
- * include/freetype/internal/tttypes.h (TT_LoaderRec): Move
- `glyf_offset' field to ...
- (TT_FaceRec): ... this structure.
- * src/truetype/ttgload.c (load_truetype_glyph): Updated.
- (tt_loader_init): Move initialization of `glyf_offset' to ...
- * src/truetype/ttpload.c (tt_face_load_loca): ... this function.
+ Reported as
-2016-09-27 Werner Lemberg <wl@gnu.org>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3510
- [truetype] Introduce dynamic limits for some bytecode opcodes.
+2017-09-28 Ewald Hew <ewaldhew@gmail.com>
- This speeds up FreeType's handling of malformed fonts.
+ * src/cid/cidgload.c (cid_slot_load_glyph): Fix memory leak.
- * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number
- of twilight points, the total number of negative jumps, and the
- total number of loops in LOOPCALL opcodes. The values are based on
- the number of points and entries in the CVT table.
- (Ins_JMPR): Test negative jump counter.
- (Ins_LOOPCALL): Test loopcall counter.
+ Reported as
- * src/truetype/ttinterp.h (TT_ExecContext): Updated.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3489
- * docs/CHANGES: Updated.
+2017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-09-25 Werner Lemberg <wl@gnu.org>
+ Bitmap metrics presetting [1/2].
- [truetype] Sanitize only last entry of `loca' table.
+ This mainly just extracts the code for presetting the bitmap metrics
+ from the monochrome, grayscale, and LCD renderers into a separate
+ function.
- Without this patch, a loca sequence like `0 100000 0 100000 ...',
- where value 100000 is larger than the `glyf' table size, makes
- FreeType handle the whole `glyf' table as a single glyph again and
- again, which is certainly invalid (and can be very slow, too).
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): New function that
+ calculates prospective bitmap metrics for the given rendering mode.
+ * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap):
+ Declare it.
- * src/truetype/ttpload.c (tt_face_get_location): Implement.
- Improve tracing messages.
+ * src/base/ftlcdfil.c (ft_lcd_padding): New helper function that adds
+ padding to CBox taking into account pecularities of LCD rendering.
+ * include/freetype/ftlcdfil.h (ft_lcd_padding): Declare it.
-2016-09-25 Werner Lemberg <wl@gnu.org>
+ * src/raster/ftrend1.c (ft_raster1_render): Reworked to use
+ `ft_glyphslot_preset_bitmap'.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
+ (ft_smooth_render_lcd, ft_smooth_render_lcd): The pixel_mode setting
+ is moved to `ft_glyphslot_preset_bitmap'.
- * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo.
+2017-09-28 Ewald Hew <ewaldhew@gmail.com>
-2016-09-24 Werner Lemberg <wl@gnu.org>
+ [psaux] Fix compiler warning.
- [autofit] Tracing fixes.
+ * src/psaux/pshints.c (cf2_hintmap_dump): Add switch for tracing
+ code.
- * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping
- functions only if we actually do tracing.
+2017-09-27 Werner Lemberg <wl@gnu.org>
-2016-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
- [smooth] Reduce divisions in the line renderer.
+2017-09-25 Werner Lemberg <wl@gnu.org>
- We don't need some divisions if a line segments stays within a single
- row or a single column of pixels.
+ [psaux] Fix compiler warnings.
- * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions
- conditional.
+ * src/psaux/psft.c (cf2_initLocalRegionBuffer): Remove redundant
+ test.
-2016-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/psaux/psintrp.c (cf2_interpT2CharString)
+ <cf2_escCALLOTHERSUBR>: Add casts.
- * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table.
+ * src/psaux/psobjs.c (ps_decoder_init): Add cast.
-2016-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- [smooth] Another tiny speed-up.
+ [psaux] Minor fixes.
- * src/smooth/ftgrays.c (gray_find_cell): Merge into...
- (gray_record_cell): ... this function.
+ * include/freetype/internal/psaux.h, src/psaux/psobjs.{c,h}:
+ Rearrange `ps_builder_init' arguments to conventional order.
-2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/psaux/psft.c (cf2_decoder_parse_charstrings): Add a check and
+ notice for `SubFont' in Type 1 mode.
- * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [psaux] Move `psdecode' into `psobjs'.
- [smooth] Fix valgrind warning and reoptimize.
+ As the former only contains a single procedure, move it into
+ `psobjs' for simplicity. Also change the parameter order to the
+ conventional one.
- The algorithm calls `gray_set_cell' at the start of each new contour
- or when the contours cross the cell boundaries. Double-checking for
- that is wasteful.
+ * src/psaux/psdecode.c (ps_decoder_init): Moved to...
+ * src/psaux/psobjs.c: ...Here.
+ * src/psaux/psdecode.h, src/psaux/psobjs.h: Ditto.
- * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell.
- (gray_convert_glyph): Remove initialization introduced by 44b172e88.
+ * include/freetype/internal/psaux.h (PSAux_ServiceRec): Update
+ `ps_decoder_init' function signature.
-2016-09-10 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffgload.c, src/cid/cidgload.c, src/type1/t1gload.c:
+ Update calls.
- [sfnt] Fix previous commit.
+ * src/psaux/psaux.c, src/psaux/psauxmod.c: Update includes.
- Problems reported as
+ * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRV_SRC):
+ Update file references.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- We now map the strike index right before accessing the physical
- data, not earlier.
+ [psaux] Fix Type 1 hinting.
- * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map'
- after creating the map so that...
+ Type 1 hinting breaks sometimes when mid-charstring hints should
+ have been in the initial hintmap. This fix adds a preprocessing
+ pass that reads all hints and builds the correct initial hintmap
+ first, before proceeding to build the glyph outline.
- * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function
- can be used before and after setting up `sbit_strike_map'.
- (tt_face_set_sbit_strike): Revert change.
- (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index.
+ * src/psaux/psintrp.c (cf2_interpT2CharString): New
+ `initial_map_ready' boolean flag.
+ Ignore outline commands and hint changes on first pass.
+ <cf2_cmdENDCHAR>: Add section to build hintmap and rewind.
- * src/truetype/ttdriver.c (tt_size_select): Revert change.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-09-09 Werner Lemberg <wl@gnu.org>
+ [psaux] Add tracing for hints.
- [ftfuzzer] Minor improvements.
+ * src/psaux/pshints.c (cf2_hintmap_dump): New function.
+ (cf2_hintmap_insertHint): Trace incoming and inserted hints.
+ (cf2_hintmap_build): Dump hintmap before and after hint adjustment.
- * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore
- invalid strikes.
- Use better values for call to `FT_Set_Char_Size'.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-09-09 Werner Lemberg <wl@gnu.org>
+ [psaux] Minor fixes.
- [sfnt] Don't provide (completely) broken strike data.
+ * src/psaux/psintrp.c (cf2_interpT2CharString): Fix check for pop
+ results.
+ s/font->decoder/decoder/ where necessary.
+ <cf2_cmdHSTEM, cf2_cmdVSTEM, cf2_escHSTEM3, cf2_escVSTEM3>: Use
+ offset parameter in `cf2_doStems' instead of doing correction for
+ left-sidebearing.
- FreeType tries to sanitize strike header data; we now reject
- completely broken ones.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * include/freetype/internal/tttypes.h (TT_FaceRec): New
- `sbit_strike_map' array pointer.
+ [cid] Use the new engine.
- * src/base/ftobjs.c (FT_Match_Size): Reject matches where either
- width or height would be zero.
- Add tracing message in case of error.
+ * src/cid/cidgload.c: Update includes.
+ (cid_load_glyph, cid_slot_load_glyph): Implement changes to glyph
+ loading code as with `type1' module.
- * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map',
- only using (more or less) valid strike header data for
- FT_Face's `available_sizes' array.
- (sfnt_done_face): Updated.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use
- `sbit_strike_map'.
- (tt_face_load_strike_metrics): Improve tracing.
+ [cid] Add Adobe engine configuration.
- * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'.
+ This is similar to what was done in the `type1' module.
-2016-09-08 Werner Lemberg <wl@gnu.org>
+ * src/cid/cidriver.c (t1cid_driver_class): Update declaration.
+ * src/cid/cidobjs.c: Include FT_TYPE1_DRIVER_H.
+ (cid_driver_init): Update code.
- * Version 2.7 released.
- =======================
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ [psaux] Change subfont synthesis for CID fonts.
- Tag sources with `VER-2-7'.
+ Change `t1_make_subfont' to take in the Private dict record as an
+ argument. This is because Type 1 and CID font records in FreeType
+ have this in different places.
- * docs/VERSION.TXT: Add entry for version 2.7.
+ * src/psaux/psobjs.c (t1_make_subfont): Change `T1_Face' to
+ `FT_Face' so that CID is also accepted.
+ Take `PS_Private' as an argument and let caller figure out where the
+ Private dict actually is.
+ Update references.
- * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
- builds/windows/vc2005/index.html,
- builds/windows/vc2008/freetype.vcproj,
- builds/windows/vc2008/index.html,
- builds/windows/vc2010/freetype.vcxproj,
- builds/windows/vc2010/index.html,
- builds/windows/visualc/freetype.dsp,
- builds/windows/visualc/freetype.vcproj,
- builds/windows/visualc/index.html,
- builds/windows/visualce/freetype.dsp,
- builds/windows/visualce/freetype.vcproj,
- builds/windows/visualce/index.html,
- builds/wince/vc2005-ce/freetype.vcproj,
- builds/wince/vc2005-ce/index.html,
- builds/wince/vc2008-ce/freetype.vcproj,
- builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/.
+ * include/freetype/internal/psaux.h, src/psaux/psobjs.h: Update
+ declaration.
- * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7.
- (FREETYPE_PATCH): Set to 0.
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Update
+ call.
- * builds/unix/configure.raw (version_info): Set to 18:6:12.
- * CMakeLists.txt (VERSION_MINOR): Set to 7.
- (VERSION_PATCH): Set to 0.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * docs/CHANGES: Updated.
+ [type1] Switch to Adobe engine.
-2016-09-08 Werner Lemberg <wl@gnu.org>
+ * src/type1/t1objs.c (T1_Driver_Init): Set default to Adobe engine.
- * src/truetype/ttinterp.c: Include `ttgxvar.h'.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- This fixes the `multi' build.
+ [psaux] Extend Adobe interpreter (seac).
-2016-09-08 Werner Lemberg <wl@gnu.org>
+ This concludes the changes needed to add Type 1 support.
- [autofit] Another improvement to Armenian support.
+ * src/psaux/psintrp.c: Update includes.
+ (cf2_interpT2CharString) <cf2_escSEAC>: Implement this similarly to
+ implied seac for CFF.
- Suggested by Hrant H Papazian <hpapazian@gmail.com>.
+ * src/psaux/t1decode.c (t1_lookup_glyph_by_stdcharcode_ps): New
+ function to look up the glyph index.
- * src/autofit/afscript.h: Use better suited characters to derive
- default stem widths.
+ * src/psaux/psft.c (cf2_getT1SeacComponent,
+ cf2_freeT1SeacComponent): New functions to get the charstrings for
+ seac components.
-2016-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/psaux/t1decode.h, src/psaux/psft.h: Update declarations.
- * src/smooth/ftgrays.c (gray_hline): Microptimize.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [psaux] Extend Adobe interpreter (flex in callothersubr).
- [smooth] Operate in absolute bitmap coordinates.
+ * src/psaux/psintrp.c (cf2_interpT2CharString)
+ <cf2_escCALLOTHERSUBR>: Fix Flex feature handling (OtherSubrs 0, 1,
+ 2).
+ <cf2_cmdRMOVETO>: Do not actually move the `glyphPath' while doing
+ flex. This is to avoid closing the current contour.
- Simpler bitmap addressing improves performance by 1.5%.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/smooth/ftgrays.c (gray_TWorker): Remove count fields.
- (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline,
- gray_sweep, gray_convert_glyph, gray_raster_render): Updated.
+ [psaux] Extend Adobe interpreter (callothersubr).
-2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/psaux/psintrp.c (cf2_interpT2CharString)
+ <cf2_escCALLOTHERSUBR>: Copy code from
+ `t1_decoder_parse_charstrings' (in `t1decode.c').
+ OtherSubr 3 (change hints) should reset the hintmask, so that the
+ new hints are applied.
+ Fix function calls and stack access.
- [smooth] Improve contour start (take 2).
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
- instead of...
- (gray_start_cell): ... this function, which is removed.
- (gray_convert_glyph): Make initial y-coordinate invalid.
+ [psaux] Extend Adobe interpreter (pop).
-2016-09-06 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psintrp.c (cf2_interpT2CharString): Change how unhandled
+ OtherSubr results are stored. Implement the PostScript stack using
+ an array.
+ <cf2_escPOP>: Ensure that the stack is not cleared after getting
+ `OtherSubr' results.
+ Fix stack access.
- [type1] MM fonts support exactly zero named instances (#48748).
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero.
+ [psaux] Extend Adobe interpreter (callsubr).
-2016-09-06 Jonathan Kew <jfkthame@gmail.com>
+ * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
+ Type 1 mode.
- [cff] Fix uninitialized memory.
+ * src/psaux/psft.c (cf2_initLocalRegionBuffer): Add Type 1 mode.
- Problem reported as
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- https://bugzilla.mozilla.org/show_bug.cgi?id=1270288
+ [psaux] Extend Adobe interpreter (div, four-byte numbers).
- * src/cff/cf2interp.c (cf2_interpT2CharString): Initialize `storage'
- array to handle a `get' opcode without a previous `put'.
+ * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escDIV>: Add
+ Type 1 mode. Type 1 requires large integers to be followed by
+ `div'; cf. `Adobe Type 1 Font Format', section 6.2.
+ <op == 255>: Push Type 1 four-byte numbers as `Int' always. This is
+ to ensure `div' and `callsubr' get values they can use.
-2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert.
+ [psaux] Extend Adobe interpreter (hints).
-2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
+ cf2_cmdVSTEM>: Add correction for left sidebearing in Type 1 mode.
+ Allow adding hints mid-charstring.
+ <cf2_escVSTEM3, cf2_escHSTEM3>: Translate into equivalent commands
+ for three normal stem hints. This requires some recalculation of
+ stem positions.
+ Correction for left sidebearing.
- [smooth] Improve contour start.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
- instead of...
- (gray_start_cell): ... this function, which is removed.
+ [psaux] Extend Adobe interpreter (hsbw, sbw).
-2016-09-05 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psintrp.c (cf2_doStems): `hsbw' or `sbw' must be the
+ first operation in a Type 1 charstring.
+ (cf2_interpT2CharString): Remove unused variables.
+ <cf2_cmdHMOVETO, cf2_cmdVMOVETO, cf2_cmdRMOVETO>: `hsbw' or `sbw'
+ must be the first operation in a Type 1 charstring.
+ <cf2_cmdHSBW, cf2_escSBW>: Fix data access and add correction for
+ left sidebearing.
- [cff] Fix memory initialization.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q'
- variants of FreeType's memory allocation macros don't do zeroing.
+ [psaux] Extend Adobe interpreter (setcurrentpoint).
-2016-09-05 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psintrp.c (cf2_interpT2CharString)
+ <cf2_escSETCURRENTPT>: Fix stack access.
- [ftrandom] Minor improvements.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
- 500.
+ [psaux] Extend Adobe interpreter (closepath).
- * src/tools/ftrandom/Makefile (CFLAGS): Split off include
- directories to ...
- (INCLUDES): ... this new variable.
- (LDFLAGS): New variable.
- (ftrandom.o, ftrandom): Updated.
+ * src/psaux/psintrp.c (cf2_interpT2CharString) <c2f_cmdCLOSEPATH>:
+ Use the right builder function. We can use the `haveWidth' boolean
+ already present, instead of implementing `parse_state'.
-2016-09-05 Werner Lemberg <wl@gnu.org>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- [autofit] Improve Armenian support.
+ [psaux] Add Type 1 operations to Adobe CFF interpreter.
- Thanks to Hrant H Papazian <hpapazian@gmail.com> for help.
+ The following Type 1 specific ops have been added (copied from
+ `t1decode'):
- * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve
- selection of characters.
+ closepath
+ vstem3
+ hstem3
+ seac
+ sbw
+ callothersubr
+ pop
+ setcurrentpoint
+ hsbw
- * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+ The following require a Type 1 mode, because of differences in
+ specification:
-2016-09-04 Werner Lemberg <wl@gnu.org>
+ hstem
+ vstem
+ vmoveto
+ callsubr
+ div
+ rmoveto
+ hmoveto
+ Numbers
- [ftrandom] Improve Makefile.
+ The subsequent commits will implement these changes and adapt
+ accesses of data and objects to the new interpreter.
- It now supports both a normal build (`./configure && make') and a
- development build (`make devel').
+ NOTE: Will not compile in the meantime!
- * src/tools/ftrandom/Makefile (VPATH): Set it so that
- `libfreetype.a' gets searched in both `objs' (for the development
- build) and `objs/.libs' (for a normal build which uses libtool).
- (LIBS): Add missing libraries.
- (ftrandom.o): New rule.
- (ftrandom): Use automatic variables.
+ * src/psaux/psintrp.c: Add opcodes to enum.
+ (cf2_interpT2CharString): Copy relevant code over from
+ `t1_decoder_parse_charstrings' (in `t1decode.c').
-2016-09-03 Werner Lemberg <wl@gnu.org>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- [truetype] More fixes for handling of GX deltas.
+ [type1] Fixes for rendering.
- Problems reported by Bob Taylor <Bob.Taylor@monotype.com>.
+ The Type 1 advance width calculation passes null for glyph slot,
+ etc, which can cause null pointer access in the new interpreter.
+ Fall back to the old one for now.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough
- sanity test for glyph variation array header size.
- Always set stream position before reading packed x and y deltas.
- Fix thinko w.r.t. `localpoints' array.
+ Fix the large glyph retry code and ensure hinting and scaling flags
+ are set properly.
-2016-09-03 Werner Lemberg <wl@gnu.org>
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add a
+ check for metrics_only.
+ Set the `force_scaling' flag.
+ (T1_Parse_Glyph): Updated.
+ (T1_Load_Glyph): Add `hinting' and `scaled' flags.
- [ftrandom] Various fixes.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better
- default.
- (error_fraction): Make it of type `double' to work as advertized –
- this was completely broken.
- Update all related code.
- (error_count, fcnt): Make it unsigned to fix compiler warnings.
- Update all related code.
- (fontlist): Change `len' member to `long' to fix compiler warnings.
- (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag
- unused variables.
- (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings.
- (ExecuteTest): Ditto.
- Call `FT_Done_FreeType'.
- (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned
- int'.
- (usage): Improve output.
- (main): Fix compiler warnings.
+ [psaux] Add missing objects (2/2).
- * src/tools/ftrandom/README: Updated.
+ Synthesize a `SubFont' object for Type 1 fonts. This is used in the
+ interpreter to access Private dict data, which are stored in
+ different places for Type 1 and CFF. This allows the same data to
+ be used in either mode.
-2016-09-03 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psobjs.c (t1_make_subfont): New procedure to copy
+ required values to a dummy `CFF_SubFont' object. This is similar to
+ `cff_make_private_dict'.
+ * src/psaux/psobjs.h: Add the new declaration.
- [base] Avoid negative bitmap stroke dimensions (#48985).
+ * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Ditto.
+ Add this to the PSAux Service for future use with CID fonts.
- * src/base/ftobjs.c (FT_Open_Face): Check whether negation was
- actually successful. For example, this can fail for value
- -32768 if the type is `signed short'. If there are problems,
- disable the stroke.
+ * src/type1/t1gload.c: Include FT_INTERNAL_CFF_TYPES_H.
+ (T1_Parse_Glyph_And_Get_Char_String): Add the call.
-2016-09-03 Werner Lemberg <wl@gnu.org>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- [cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
+ [psaux] Add missing objects for Type 1 (1/2).
- * src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
+ Move `CF2_Font' instance to `PS_Decoder'. This is the context for
+ the interpreter and since it is currently stored in `CFF_Font', is
+ unavailable in Type 1 mode.
-2016-09-02 Werner Lemberg <wl@gnu.org>
+ * include/freetype/internal/psaux.h (T1_Decoder, PS_Decoder): New
+ `cf2_instance' field.
- [unix] Enable 64bit support in file system access (#48962).
+ * src/psaux/psdecode.c (ps_decoder_init): Copy `cf2_instance' to
+ `PS_Decoder'.
- * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'.
+ * src/psaux/t1decode.c (t1_decoder_done): Add finalization code.
-2016-09-02 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psft.c (cf2_decoder_parse_charstrings): Update accesses.
- [sfnt] Avoid left shift of negative value (#48980).
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned
- constant.
+ Allow `type1' module to use the Adobe engine.
-2016-09-02 Werner Lemberg <wl@gnu.org>
+ Add the callback and some conditionals to switch between the two
+ engines.
- * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
+ * include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Change
+ function declarations.
+ * src/psaux/psauxmod.c (T1_Decoder_FuncsRec): Register the
+ callbacks.
-2016-09-02 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psobjs.c (ps_builder_add_point): Add conditionals for
+ number conversion.
- Some preparations for the next release.
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add code
+ to choose which renderer to use.
- * include/freetype/config/ftoption.h
- (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable.
+ * src/cid/cidgload.c (cid_load_glyph): Update call.
+ * src/base/ftobjs.c, src/psaux/psobjs.c, src/type1/t1gload.c: Update
+ includes.
- * docs/CHANGES: Updated.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-09-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [type1] Add Adobe engine configuration.
- [smooth] Simplify span rendering more.
+ Use the previously changed PS_Driver in type1 module to store
+ hinting engine configuration.
- It turns out that there is significant cost associated with `FT_Span'
- creation and calls to `gray_render_span' because it happerns so
- frequently. This removes these steps from our internal use but leaves
- it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain
- is about 5%.
+ * include/freetype/ftt1drv.h: New file.
+ Duplicate and rename config options from CFF.
+ * include/freetype/config/ftheader.h (FT_TYPE1_DRIVER_H): New macro.
- * src/smooth/ftgrays.c (gray_render_span): Removed. The code is
- migrated to...
- (gray_hline): ... here.
+ * src/type1/t1driver.c (t1_driver_class): Update declaration.
+ * src/type1/t1objs.c: Include FT_TYPE1_DRIVER_H.
+ (T1_Driver_Init): Update code.
-2016-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- [smooth] Streamline pixmap drawing a bit more.
+ [cff] Move and rename `CFF_Driver'.
- Zero coverage is unlikely (1 out of 256) to warrant checking. This
- gives 0.5% speed improvement in rendering simple glyphs.
+ This is so that we can use the same hinting engine parameters for
+ Type 1.
- * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
+ * include/freetype/internal/cffotypes.h (CFF_Driver): Rename and
+ move to...
+ * include/freetype/internal/psaux.h (PS_Driver): ...here.
-2016-08-29 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffload.c,
+ src/cff/cffobjs.c, src/cff/cffobjs.h, src/psaux/psft.c,
+ src/psaux/psobjs.c: Update references.
- [smooth] Streamline pixmap drawing.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- This gives 2% speed improvement in rendering simple glyphs.
+ [psaux, type1] Reorganize object fields.
- * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a
- pointer to its bottom-left and pitch to be used in...
- (gray_TWorker): ... here.
- (gray_render_span): Move pixmap flow check from here...
- (gray_raster_render): .. to here.
+ Make some fields more generic, so that we can access them the same
+ way regardless of Type 1 or CFF.
-2016-08-27 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * include/freetype/internal/psaux.h (PS_Builder): Change `TT_Face'
+ to `FT_Face'.
+ Remove unused fields.
- [smooth] Reduce stack of band boundaries.
+ * src/psaux/psft.c: Update all accesses of `PS_Builder.face'.
+ Add some asserts to guard against casting `T1_Face' as `TT_Face'.
- * src/smooth/ftgrays.c (gray_TBand): Removed.
- (gray_convert_glyph): Updated to stack band boundaries concisely.
+ * src/type1/t1objs.h (T1_GlyphSlot): Reorder fields to follow
+ `CFF_GlyphSlot', so that we can pretend they are the same in the
+ interpreter.
-2016-08-26 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psobjs.c (ps_builder_init, ps_builder_add_point):
+ Updated with above changes.
- * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-08-26 Werner Lemberg <wl@gnu.org>
+ [psaux] Prepare for Type 1 mode.
- [cid] Fix commit from 2016-05-16.
+ Add some checks for Type 1 data passing through.
- * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
+ * src/psaux/psfont.h (CF2_Font): Add `isT1' flag.
+ * src/psaux/psfont.c (cf2_font_setup): Skip the variations and blend
+ code which is not applicable for Type 1.
-2016-08-26 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psft.c (cf2_decoder_parse_charstrings): Avoid accessing
+ `decoder->cff' in Type 1 mode.
+ Copy `is_t1' flag to `CF2_Font'.
- [sfnt] Cache offset and size to bitmap data table.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- This commit avoids `EBDT' and friends being looked up again and
- again while loading a single embedded bitmap.
+ [psaux, cff] Use the new objects.
- * include/freetype/internal/tttypes.h (TT_FaceRec)
- [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and
- `ebdt_size'.
+ * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix
+ switching between new and old engines.
- * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ...
- (tt_face_load_sbit): ... this function; also store the table size
- and offset.
+ * src/cff/cffgload.c, src/cff/cffparse.c: Update calls.
-2016-08-26 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/psaux/psblues.c, src/psaux/psfont.c, src/psaux/psfont.h,
+ src/psaux/psft.c, src/psaux/psft.h, src/psaux/psintrp.c: Update all
+ to use new objects.
- * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks.
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
-2016-08-26 Werner Lemberg <wl@gnu.org>
+ [psaux] Objects for new interpreter (part 2).
- [type1] Fix heap buffer overflow.
+ Make the new objects copy over values. They are essentially wrapper
+ types for the different decoders/builders.
- Reported as
+ * include/freetype/internal/psaux.h: Update declarations.
+ (PS_Builder): Add `is_t1' flag.
+ (PS_Decoder_{Get,Free}_Glyph_Callback): Renamed to...
+ (CFF_Decoder_{Get,Free}_Glyph_Callback: ... this.
+ (PS_Decoder): Updated.
+ Add `t1_parse_callback' member.
+ (PSAux_ServiceRec): Add `ps_decoder_init' member.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
+ * src/psaux/psdecode.h, src/psaux/psobjs.h: Update declarations.
- * src/type1/t1load.c (parse_charstrings): Reject fonts that don't
- contain glyph names.
+ * src/psaux/psdecode.c, src/psaux/psobjs.c: Implement copy with two
+ modes.
-2016-08-25 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psauxmod.c: Add builder and decoder functions to `PSAux'
+ service.
- [sfnt] Fix previous commit (#48901).
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
+ [psaux] Add objects for new interpreter.
-2016-08-25 Werner Lemberg <wl@gnu.org>
+ Introduce `PS_Decoder' and `PS_Builder' which include all fields
+ from either Type 1 or CFF decoders/builders.
- [sfnt] Speed up handling of invalid format 4 cmaps.
+ * include/freetype/internal/psaux.h (PS_Builder, PS_Decoder): New
+ structs.
- * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add
- tests for `num_glyph' from `tt_cmap4_char_map_linear'.
+ * src/psaux/psobjs.c, src/psaux/psobjs.h: Add `PS_Builder'
+ functions.
-2016-08-25 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psdecode.c, src/psaux/psdecode.h: New files to hold
+ `PS_Decoder' initialization functions.
- * include/freetype/internal/ftdriver.h: Remove unused typedefs.
+ * src/psaux/psaux.c, src/psaux/Jamfile (_sources),
+ src/psaux/rules.mk (PSAUX_DRV_SRC): Updated.
-2016-08-22 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- [smooth] Simplify span rendering.
+ [psaux] Rename files.
- This removes unnecessary complexity of span merging and buffering.
- Instead, the spans are rendered as they come, speeding up the
- rendering by about 5% as a result.
+ Replace the `cf2' file name prefix with `ps' as the Adobe engine
+ will be used for both PostScript Types 1 and 2 (CFF) instead of just
+ CFF.
- * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
- (gray_TWorker): Remove span buffer and related fields.
- (gray_sweep, gray_hline): Updated.
+ s/cf2/ps/ for all following.
- * include/freetype/ftimage.h: Remove documentation note about
- `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
+ * src/psaux/cf2*: Rename files.
+ * src/psaux/*: Update includes.
-2016-08-16 Werner Lemberg <wl@gnu.org>
+ * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRC_SRC,
+ PSAUX_DRV_H): Update file references.
- [truetype] Fix `MPS' instruction.
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- According to Greg Hitchcock, MPS in DWrite really returns the point
- size.
+ [psaux] Minor fix.
- * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member.
+ Use `MultiMasters' service in `psaux' instead of a call to `cff'.
+ The project builds if CFF_CONFIG_OPTION_OLD_ENGINE is not defined.
- * src/truetype/ttdriver.c (tt_size_request): Set `point_size'.
+ * src/psaux/cf2ft.c: Update includes.
+ (cf2_getNormalizedVector): Use `mm->get_var_blend' instead of
+ `cff_get_var_blend'.
- * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize'
- member.
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/truetype/ttinterp.c (TT_Load_Context): Updated.
- (Ins_MPS): Fix instruction.
+ [psaux, cff] Move `cff_random' into `psaux' service.
-2016-08-16 Werner Lemberg <wl@gnu.org>
+ NOTE: Does not compile!
- [lzw] Optimize last commit.
+ Minor fix to allow both `cff' and `psaux' to use `cff_random'.
- * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into
- conditional clause.
+ * src/cff/cffload.c (cff_random): Move to...
+ * src/psaux/psobjs.c: Here.
+ * src/cff/cffload.h: Move corresponding declaration to
+ `src/psaux/psobjs.h'.
-2016-08-16 Werner Lemberg <wl@gnu.org>
+ * include/freetype/internal/psaux.h (PSAux_ServiceRec): Register the
+ function here...
+ * src/psaux/psauxmod.c: And here.
- [lzw] Avoid invalid left shift.
+ * src/cff/cffload.c, src/psaux/cf2intrp.c: Update code.
- Reported as
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- https://bugzilla.mozilla.org/show_bug.cgi?id=1295366
+ [cff] Move struct declarations to `freetype/internal'.
- * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
+ NOTE: Does not compile!
-2016-08-16 Werner Lemberg <wl@gnu.org>
+ This is so that the CFF functions moved to `psaux' can access the
+ same structs that they need.
- [lzw] Avoid buffer overrun.
+ * src/cff/cfftypes.h: Moved to...
+ * include/freetype/internal/cfftypes.h: ...Here.
- Reported as
+ * src/cff/cffobjs.h: Moved the struct declarations to...
+ * include/freetype/internal/cffotypes.h: ... this new file.
- https://bugzilla.mozilla.org/show_bug.cgi?id=1273283
+ * include/freetype/internal/internal.h (FT_INTERNAL_CFF_TYPES_H,
+ FT_INTERNAL_CFF_OBJECT_TYPES_H): New macros.
- * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't
- underflow.
+ * src/cff/cffcmap.h, src/cff/cffdrivr.c, src/cff/cffgload.c,
+ src/cff/cffgload.h, src/cff/cffload.h, src/cff/cffobjs.c,
+ src/cff/cffobjs.h, src/cff/cffparse.h, src/psaux/psobjs.h,
+ include/freetype/internal/psaux.h,
+ include/freetype/internal/services/svcfftl.h: Update includes.
-2016-08-16 Werner Lemberg <wl@gnu.org>
+ * src/cff/rules.mk (CFF_DRV_H): Updated.
- [truetype] Fix compiler warning.
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/truetype/ttgload.c (load_truetype_glyph): Add cast.
+ [psaux, cff] Add new service for inter-module calls.
-2016-08-13 Werner Lemberg <wl@gnu.org>
+ NOTE: Does not compile!
- [winfonts] Avoid zero bitmap width and height.
+ This is to allow CFF functions moved to `psaux' to call functions
+ declared in `src/cff/cffload.h'.
- Reported as
+ * include/freetype/internal/services/svcfftl.h: New file, setting up
+ a `CFFLoad' service.
- https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
+ * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC10,
+ FT_DEFINE_SERVICEDESCREC): New macros.
+ (FT_SERVICE_CFF_TABLE_LOAD_H): New macro.
- * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
- (FNT_Load_Glyph): Check for zero pitch.
+ * src/cff/cffdrivr.c, src/cff/cffpic.h: Register the new service.
-2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/cff/cfftypes.h (CFF_FontRec), src/psaux/cf2font.h
+ (CF2_FontRec): Add service interface.
- * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
+ * src/cff/cffobjs.c, src/psaux/cf2font.c, src/psaux/cf2ft.c,
+ src/psaux/cf2intrp.c, src/psaux/cffdecode.c: Use the new service.
-2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
+ [psaux, cff] Add callbacks for inter-module calls.
-2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+ NOTE: Does not compile!
- * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
+ * include/freetype/internal/psaux.h: Add function pointer
+ declarations.
-2016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com>
+ * src/psaux/cffdecode.c (cff_decoder_init): Update to take in
+ callbacks.
+ * src/psaux/cffdecode.h: Ditto.
- * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
+ * src/cff/cffgload.c (cff_compute_max_advance, cff_slot_load):
+ Update calls to pass in callbacks.
+ * src/psaux/cf2ft.c, src/psaux/cffdecode.c: Use them.
-2016-08-10 Werner Lemberg <wl@gnu.org>
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- [sfnt] Use correct type for `italicAngle' field (#48732).
+ [psaux, cff] Create new `PSAux' service interface entries.
- * src/sfnt/ttload.c (tt_face_load_post): Fix types.
+ NOTE: Does not compile!
-2016-08-06 Jon Spencer <jon@jonspencer.ca>
+ * include/freetype/internal/psaux.h: Include
+ FT_INTERNAL_TRUETYPE_TYPES_H.
+ (CFF_Builder_FuncsRec, CFF_Decocer_FuncsRec): New function tables.
+ (CFF_Builder): Updated.
+ Fix for forward declaration.
+ (PSAux_ServiceRec): New field `cff_decoder_funcs'.
- [sfnt] Fix `FT_Get_Advance' for bitmap strikes.
+ * src/psaux/psauxmod.c (cff_builder_funcs, cff_decoder_funcs): New
+ function tables.
+ (PSAux_Interface): Updated.
- `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the
- advance value from the font table and then scales it by the
- `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't
- set that value for bitmap fonts and the advance gets scaled to zero.
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Add `psaux'
+ service interface.
- Taken from
+ * src/cff/cffgload.c, src/cff/cffobjs.c, src/cff/cffparse.c: Update
+ function calls to use psaux service.
- https://github.com/behdad/harfbuzz/issues/252
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
- <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
+ [psaux, cff] Move CFF builder components into `psaux' module.
-2016-08-06 Behdad Esfahbod <behdad@behdad.org>
+ NOTE: Does not compile!
- [truetype] Fix GX variation handling of composites.
+ * src/cff/cffgload.c
+ (cff_builder_{init,done,add_point,add_point1,add_contour,start_point,close_contour},
+ cff_check_points): Move to...
+ * src/psaux/psobjs.c: Here.
- * src/truetype/ttgload.c (load_truetype_glyph)
- [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
+ * src/cff/cffgload.h: Move corresponding declarations to
+ `src/psaux/psobjs.h'.
-2016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/cff/cffgload.h (CFF_Builder): Move struct declaration to...
+ * include/freetype/internal/psaux.h: Here.
- [smooth] Minor refactoring.
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
- Updated.
+ [psaux, cff] Move CFF decoder components into `psaux' module.
+
+ NOTE: Does not compile!
+
+ * src/cff/cffgload.c (CFF_Operator,
+ CFF_COUNT_{CHECK_WIDTH,EXACT,CLEAR_STACK}, cff_argument_counts,
+ cff_operator_seac, cff_compute_bias,
+ cff_lookup_glyph_by_stdcharcode,
+ cff_decoder_{parse_charstrings,init,prepare}): Move to...
+ * src/psaux/cffdecode.c: This new file.
-2016-07-29 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffgload.h: Move corresponding declarations to...
+ * src/psaux/cffdecode.h: This new file.
- [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
+ * src/cff/cffgload.h (CFF_MAX_{OPERANDS,SUBRS_CALLS,TRANS_ELEMENTS},
+ CFF_Decoder_Zone, CFF_Decoder): Move declarations to...
+ * include/freetype/internal/psaux.h: Here.
- Since 2016-05-16 we detect infinite recursion directly.
+ * src/psaux/cf2ft.h: Update include.
- * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
- `maxComponentDepth'.
- * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
- `maxComponentDepth' is not valid. Instead, simply adjust its value
- and emit a tracing message.
+ * src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Update with
+ the new file.
-2016-07-26 Werner Lemberg <wl@gnu.org>
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
+ [psaux, cff] Move Adobe's engine components into `psaux' module.
- No functional change.
+ This is the first patch of a sequence to move the Type 2 charstring
+ processing capability from the `cff' module to the `psaux' module.
-2016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net>
+ NOTE: Does not compile!
- [truetype] Record the end of IDEFs.
+ * src/cff/cf2*: Move these files to...
+ * src/psaux/cf2*: Here.
- To match the logic in FDEF. The value of the end is only used for
- bound-checking in `Ins_JMPR', so it may not have been obvious that
- it was not recorded. Tested (as part of Font Validator 2.0) all the
- fonts on Fedora and did not see any change.
+ * src/cff/Jamfile (_sources), src/cff/rules.mk (CFF_DRV_SRC,
+ CFF_DRV_H), src/cff/cff.c, src/cff/cffgload.c: Remove file
+ references.
- * src/truetype/ttinterp.c (Ins_IDEF): Updated.
+ * src/psaux/Jamfile (_sources), src/psaux/rules.mk, src/psaux/psaux.c
+ (PSAUX_DRV_SRC, PSAUX_DRV_H): Add file references.
-2016-07-19 Werner Lemberg <wl@gnu.org>
+2017-09-24 Alexei Podtelezhnikov <apodtele@gmail.com>
- [truetype] Sanitizer fix, second try.
+ Tweak per-face LCD filtering controls.
- * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
- tests and use only one slot more.
+ Thing are simpler with a NULL-function pointer.
-2016-07-19 Werner Lemberg <wl@gnu.org>
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
+ pointer to the filter function.
+ (FT_LibraryRec): Remove unused `lcd_filter'.
+ (FT_Bitmap_LcdFilterFunc, ft_lcd_filter_fir): Move from here...
+ * include/freetype/ftlcdfil.h (FT_Bitmap_LcdFilterFunc,
+ ft_lcd_filter_fir): ... to here.
- [truetype] Sanitizer fix.
+ * src/base/ftobjs.c (ft_open_face_internal): NULL-initialize the
+ per-face filter.
+ (FT_Face_Properties): Set it.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Simplify.
- * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
- to fix nested loops.
+ * src/base/ftlcdfil.c (ft_lcd_filter_fir, FT_Libary_SetLcdFilter):
+ Minor.
-2016-07-18 Werner Lemberg <wl@gnu.org>
+2017-09-24 Jonathan Kew <jfkthame@gmail.com>
- [truetype] Make GETDATA work only for GX fonts.
+ [sfnt] Fix `premultiply_data' (#52092).
- * src/truetype/ttinterp.c (opcode_name): Updated.
- (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
- (TT_RunIns): Updated.
+ * src/sfnt/pngshim.c (premultiply_data): Don't use vector extension
+ if we have less than 16 bytes of data.
-2016-07-17 Werner Lemberg <wl@gnu.org>
+2017-09-24 Werner Lemberg <wl@gnu.org>
- [truetype] Add support for Apple's
+ [otvalid] Fix handling of ValueRecords.
- GETDATA[], opcode 0x92
+ For GPOS pair positioning format 1 the description of ValueRecords
+ in the OpenType specification (1.8.2, from today) is wrong – the
+ offset has to be taken from the parent structure; in this case the
+ `PairSet' table.
- bytecode instruction. It always returns 17, and we have absolutely
- no idea what it is good for...
+ * src/otvalid/otvgpos.c (otv_PairSet_validate): Set `extra3'.
+ (otv_PairPos_validate): Adjust.
- * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
- (Ins_GETDATA): New function.
- (TT_RunIns): Add it.
+2017-09-23 Werner Lemberg <wl@gnu.org>
-2016-07-16 Werner Lemberg <wl@gnu.org>
+ [otvalid] Handle `GSUB' and `GPOS' v1.1 tables.
- [truetype] Add bytecode support for GX variation fonts.
+ * src/otvalid/otvgsub.c (otv_GSUB_validate), src/otvalid/otvgpos.c
+ (otv_GPOS_validate): Implement it.
- This commit implements undocumented (but confirmed) stuff from
- Apple's old bytecode engine.
+2017-09-23 Werner Lemberg <wl@gnu.org>
- GETVARIATION[], opcode 0x91
- This opcode pushes normalized variation coordinates for all axes
- onto the stack (in 2.14 format). Coordinate of first axis gets
- pushed first.
+ [otvalid] Update common table handling to OpenType 1.8.2.
- GETINFO[], selector bit 3
- If GX variation support is enabled, bit 10 of the result is set
- to 1.
+ * src/otvalid/otvcommn.c (otv_Device_validate): Handle
+ VariationIndex subtable.
+ (otv_Lookup_validate): Handle MarkFilteringSet.
- * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
- (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
- (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
- bit 3, checking support for variation glyph hinting.
- (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
- to implement opcode 0x91.
- (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
+2017-09-23 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-07-16 Werner Lemberg <wl@gnu.org>
+ [build] Windows-style DLL versioning.
- [truetype] Fix GETINFO bytecode instruction.
+ * build/windows/ftver.rc: New VERSIONINFO resource.
+ * build/windows/vc2010/freetype.vcxproj: Further improvements.
- * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
- stretching information.
+2017-09-23 Ben Wagner <bungeman@google.com>
-2016-07-16 Behdad Esfahbod <behdad@behdad.org>
+ [truetype] Really fix #52082.
- [truetype] Make all glyphs in `Zycon' GX font work.
+ * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
- * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
- tests.
+2017-09-23 Werner Lemberg <wl@gnu.org>
-2016-07-16 Werner Lemberg <wl@gnu.org>
+ [otvalid] Handle `GDEF' v1.2 and v1.3 tables.
- [truetype] Fix GX delta tracing.
+ No validation of variation stuff yet.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
- relative point movements.
+ * src/otvalid/otvgdef.c (otv_MarkGlyphSets_validate): New function.
+ (otv_GDEF_validate): Implement it.
-2016-07-16 Behdad Esfahbod <behdad@behdad.org>
+2017-09-22 Werner Lemberg <wl@gnu.org>
- [truetype] More fixes for GX.
+ [otvalid] Handle `BASE' v1.1 table.
- This finally fixes the rendering of the cyclist and the lizard in
- the `Zycon' font.
+ No validation of variation stuff yet.
- * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
- index is always cumulative.
+ * src/otvalid/otvbase.c (otv_BASE_validate): Implement it.
- (tt_handle_deltas): Rename to...
- (tt_interpolate_deltas): ... This.
- Add new parameter for output point array.
- Update caller.
+2017-09-22 Werner Lemberg <wl@gnu.org>
- (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
- the intermediate results of `tt_interpolate_deltas' that are to be
- added to `outline->points'.
+ [otvalid] Macros for 32bit offset support.
-2016-07-15 Werner Lemberg <wl@gnu.org>
+ * src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE32,
+ OTV_OPTIONAL_OFFSET32, OTV_SIZE_CHECK32): New macros.
+
+2017-09-21 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [build] Simplify Visual C++ 2010 project.
+
+ * build/windows/vc2010/freetype.vcxproj: Remove fake singlethreaded
+ configurations and tweak.
+
+2017-09-21 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Integer overflow (#52082).
+
+ * src/truetype/ttinterp.c (Ins_MDRP): Avoid FT_ABS.
+
+2017-09-21 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix postscript name for default instance of variation fonts.
+
+ Problem reported by Behdad.
+
+ * src/sfnt/sfdriver.c (sfnt_get_ps_name): Test
+ `is_default_instance'.
- * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
+2017-09-21 Werner Lemberg <wl@gnu.org>
- `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
+ [truetype] Fix `mmvar' array pointers, part 2.
- Reported by Alexei.
+ The previous commit was incomplete.
-2016-07-16 Nikolaus Waxweiler <madigens@gmail.com>
+ * src/truetype/ttgxvar.c: Properly initialize sub-array offsets for
+ `master' also.
- * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
+2017-09-21 Werner Lemberg <wl@gnu.org>
- Problem reported by Hin-Tak Leung.
+ [truetype] Fix `mmvar' array pointers.
-2016-07-15 Werner Lemberg <wl@gnu.org>
+ Without this change, clang's AddressSanitizer reports many runtime
+ errors due to misaligned addresses.
- [autofit] Update and improve segment and edge tracing.
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use multiples of pointer
+ size for sub-array offsets into `mmvar'.
- * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
- `delta' also.
- Don't show first point of segment as a replacement for `pos'; this
- is (a) misleading, since the difference to `pos' can be almost
- arbitrarily large in corner cases, and (b) it is better to have all
- segment data in font units instead of a single value given in output
- space coordinates.
- Improve layout.
- (af_glyph_hints_dump_edges): Show px->units and units->px conversion
- values for convenience.
- Improve layout.
+2017-09-20 Werner Lemberg <wl@gnu.org>
-2016-07-15 Werner Lemberg <wl@gnu.org>
+ [truetype] Integer overflows.
- [autofit] For edges, reject segments wider than 1px (#41334).
+ Changes triggered by
- * src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3429
- * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
- `delta'.
- (af_latin_hints_compute_edges): Reject segments with a delta larger
- than 0.5px.
+ * src/truetype/ttinterp.c (Ins_SHPIX, Ins_DELTAP): Use NEG_LONG.
+ (Ins_MIAP): Use SUB_LONG.
-2016-07-14 Werner Lemberg <wl@gnu.org>
+2017-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
- * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
+ [build] Fix DLL builds in Visual C++ project.
-2016-07-14 Werner Lemberg <wl@gnu.org>
+ * build/windows/vc2010/freetype.vcxproj: Use DynamicLibrary in Debug
+ and Release configurations.
+ * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
+ [_DLL]: Use Visual C++ extensions.
- [sfnt] Fix `face_index' value in `FT_Face' for named instances.
+2017-09-19 John Tytgat <John.Tytgat@esko.com>
- * src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
+ [cff] Fix family name logic of pure CFF fontdata (#52056).
-2016-07-14 Werner Lemberg <wl@gnu.org>
+ 1. If `FamilyName' is present in the CFF font, use this for
+ FT_Face's `family_name'.
+ 2. Otherwise, use the face name and chop off any subset prefix.
+ 3. If at this point FT_Face's `family_name' is set, use this
+ together with the full name to determine the style.
+ 4. Otherwise, use `CIDFontName' as FT_Face's `family_name'.
+ 5. If we don't have a valid style, use "Regular".
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
+ Previously, FT_Face's `family_name' entry for pure CFF fontdata
+ nearly always was the fontname itself, instead of the `FamilyName'
+ entry in the CFF font (assuming there is one).
-2016-07-14 Behdad Esfahbod <behdad@behdad.org>
+ * src/cff/cffobjs.c (cff_face_init) [pure_cff]: Implement it.
- [truetype] Fix gxvar delta interpolation.
+2017-09-18 Alexei Podtelezhnikov <apodtele@gmail.com>
- The coordinates of the base font should be used for interpolation
- purposes, NOT the current points (i.e., the result of accumulation
- of previous deltas).
+ [build] Declutter Visual C++ 2010-2017 project.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
- `points_org' before looping over all tuples.
+ * build/windows/vc2010/freetype.vcxproj: Use MaxSpeed (/02)
+ optimization for Release configuration throughout the project.
----------------------------------------------------------------------------
-Copyright 2016 by
+Copyright 2017-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/ChangeLog.20 b/modules/freetype2/ChangeLog.20
index 07775fffe..63e3116bd 100644
--- a/modules/freetype2/ChangeLog.20
+++ b/modules/freetype2/ChangeLog.20
@@ -1338,7 +1338,7 @@
(cff_compute_bias): Use `U' for constant.
* src/cid/cidload.c (cid_decrypt): Ditto.
* src/psaux/psobjs.c (T1_Decrypt): Ditto.
- * src/psaux/t1decode.c (T1_Decoder_Parse_CharStrings): Ditto.
+ * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto.
* src/sfnt/ttload.c (TT_Load_Kern): Remove unused `version'
variable.
* src/sfnt/ttsbit.c (TT_Load_SBit_Image): Remove unused `top'
@@ -1524,7 +1524,7 @@
* src/base/ftcalc.c (FT_DivFix): Fixed a bug in the 64-bit code that
created incorrect scale factors!
- (FT_Round_Fix, FT_CeilFix, FT_FloorFix): Minor improvements.
+ (FT_RoundFix, FT_CeilFix, FT_FloorFix): Minor improvements.
2001-05-12 Werner Lemberg <wl@gnu.org>
@@ -2159,7 +2159,7 @@
* include/freetype/internal/t2types.h,
include/freetype/internal/cfftypes.h: Changed the structures for
- CFF_Encoding and CFF_Encoding for the new implementations of the
+ CFF_Charset and CFF_Encoding for the new implementations of the
charset and encoding parsers in the CFF driver.
* src/cff/t2gload.c (t2_lookup_glyph_by_stdcharcode,
@@ -2597,7 +2597,7 @@
----------------------------------------------------------------------------
-Copyright 2000-2016 by
+Copyright 2000-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/ChangeLog.21 b/modules/freetype2/ChangeLog.21
index 855c86dde..1adc81783 100644
--- a/modules/freetype2/ChangeLog.21
+++ b/modules/freetype2/ChangeLog.21
@@ -170,7 +170,7 @@
FTC_CACHE_TRYLOOP_END): New macros.
* src/cache/ftccache.c (FTC_Cache_NewNode), src/cache/ftcsbits.c
- (ftc_snode_compare): Use FT_CACHE_TRYLOOP and FTC_CACE_TRYLOOP_END.
+ (ftc_snode_compare): Use FT_CACHE_TRYLOOP and FTC_CACHE_TRYLOOP_END.
2005-05-23 Werner Lemberg <wl@gnu.org>
@@ -617,7 +617,7 @@
`ft_get_adobe_glyph_index', a new function defined in `pstables.h'.
(ps_get_macintosh_name, ps_get_standard_strings): Updated.
- * src/base/ftobjs.c (FT_Set_Char_Sizes): Handle fractional sizes
+ * src/base/ftobjs.c (FT_Set_Char_Size): Handle fractional sizes
more carefully. This fixes Savannah bug #12263.
2005-03-06 David Turner <david@freetype.org>
@@ -1819,7 +1819,7 @@
2004-08-11 Detlef Würkner <TetiSoft@apg.lahn.de>
* src/base/ftrfork.c (FT_Raccess_Guess)
- [!FT_CONFIG_OPTION_GUESSING_EMBEDDED_FORK]: Remove compiler
+ [!FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK]: Remove compiler
warnings.
2004-08-06 Adam Piotrowski <st_intel@poczta.onet.pl>
@@ -2101,7 +2101,7 @@
2004-06-08 David Turner <david@freetype.org>
- * include/freetype/freetype.h (FT_GlyphMetrics): Move `lsb_delta'
+ * include/freetype/freetype.h (FT_Glyph_Metrics): Move `lsb_delta'
and `rsb_delta' elements to...
(FT_GlyphSlotRec): Here to retain binary compatibility with older
FreeType versions.
@@ -2528,7 +2528,7 @@
* src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(TT_Process_Simple_Glyph, load_truetype_glyph)
- [TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts.
+ [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Support GX var fonts.
* src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
@@ -2864,7 +2864,7 @@
(psh_blues_snap_stem): Don't use blue_shift but blue_threshold.
* src/pshinter/pshalgo.c (PSH_STRONG_THRESHOLD_MAXIMUM): New macro.
- (psh_glyph_find_string_points): Use PSH_STRONG_THRESHOLD_MAXIMUM.
+ (psh_glyph_find_strong_points): Use PSH_STRONG_THRESHOLD_MAXIMUM.
(psh_glyph_find_blue_points): New function. Needed for fonts like
p052003l.pfb (URW Palladio L Roman) which have flex curves at the
base line within blue zones, but the flex curves aren't covered by
@@ -3361,7 +3361,7 @@
* src/base/ftstroke.c: Include FT_INTERNAL_OBJECTS_H.
(FT_Outline_GetOutsideBorder): Inverse result.
- (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_GlyphStrokeBorder): New
+ (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_Glyph_StrokeBorder): New
functions.
(FT_Stroker_EndSubPath): Close path if needed.
(FT_Stroker_Set, FT_Stroker_ParseOutline): Use FT_Stroker_Rewind.
@@ -3493,8 +3493,8 @@
2003-12-23 David Turner <david@freetype.org>
* include/freetype/internal/ftobjs.h (FT_PAD_FLOOR, FT_PAD_ROUND,
- FT_PAD_CEIL, FT_PIX_FLOOR, FT_PIX_ROUND, FT_CEIL): New macros. They
- are used to avoid compiler warnings with very pedantic compilers.
+ FT_PAD_CEIL, FT_PIX_FLOOR, FT_PIX_ROUND, FT_PIX_CEIL): New macros.
+ They are used to avoid compiler warnings with very pedantic compilers.
Note that `(x) & -64' causes a warning if (x) is not signed. Use
`(x) & ~63' instead!
Updated all related code.
@@ -4231,7 +4231,7 @@
(t42_parse_encoding): Use `ft_isdigit'.
- * src/base/ftmm.c (ft_face_get_mm_service): Return FT_Err_OK if
+ * src/base/ftmm.c (ft_face_get_mm_service): Return FT_Err_Ok if
success.
2003-10-05 Werner Lemberg <wl@gnu.org>
@@ -4355,7 +4355,7 @@
new POSTSCRIPT_NAMES service.
* src/psaux/t1decode.h (t1_lookup_glyph_by_stdcharcode,
t1_decode_init): Use new POSTSCRIPT_NAMES service.
- * src/psaux/t1cmap.h, src/psaux/t1decode.h: Dont' include
+ * src/psaux/t1cmap.h, src/psaux/t1decode.h: Don't include
FT_INTERNAL_POSTSCRIPT_NAMES_H.
* src/psnames/psmodule.c: Don't include
@@ -4749,8 +4749,7 @@
* include/freetype/ttunpat.h: Fixing documentation comment.
* include/freetype/config/ftoption.h, devel/ftoption.h
- (TT_CONFIG_OPTION_OPTION_COMPILE_UNPATENTED_HINTING): Replaced
- with...
+ (TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING): Replaced with...
(TT_CONFIG_OPTION_UNPATENTED_HINTING): This. Updated all users.
(TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING): Removed.
@@ -5024,7 +5023,7 @@
drivers.
* src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code.
- (FT_Set_Pixel_Size): Assign value to `metrics' after validation of
+ (FT_Set_Pixel_Sizes): Assign value to `metrics' after validation of
arguments.
2003-06-20 Werner Lemberg <wl@gnu.org>
@@ -5200,7 +5199,7 @@
* src/cid/cidload.c (cid_load_keyword): Handle
T1_FIELD_LOCATION_BBOX.
(parse_font_bbox): Commented out.
- (cid_field_record): Comment out element for parsing FontBBox.
+ (cid_field_records): Comment out element for parsing FontBBox.
* src/type42/t42parse.c (t42_parse_font_bbox): Commented out.
(t42_keywords): Handle FontBBox with T1_FIELD_BBOX, not with
@@ -5916,7 +5915,7 @@
2003-04-23 Werner Lemberg <wl@gnu.org>
* src/pfr/pfrload.c (pfr_extra_item_load_font_id): Use FT_PtrDist
- instead of FT_Uint for `len'.
+ instead of FT_UInt for `len'.
2003-04-22 Werner Lemberg <wl@gnu.org>
@@ -6550,7 +6549,7 @@
* src/cache/ftcsbits.c (ftc_sbit_node_load): Fixed a small bug that
caused problems with embedded bitmaps.
- * src/otlayout/otlayout.h, src/otlyaout/otlconf.h,
+ * src/otlayout/otlayout.h, src/otlayout/otlconf.h,
src/otlayout/otlgsub.c, src/otlayout/otlgsub.h,
src/otlayout/otlparse.c, src/otlayout/otlparse.h,
src/otlayout/otlutils.h: Updating the OpenType Layout code, adding
@@ -6996,7 +6995,7 @@
2002-09-08 David Turner <david@freetype.org>
- Various updates to correctly support sub-pixel rendering.
+ Various updates to correctly support subpixel rendering.
* include/freetype/config/ftmodule.h: Add two renderers for LCD.
@@ -7239,7 +7238,7 @@
(ft_smooth_render, ft_smooth_render_lcd, ft_smooth_render_lcd_v):
New functions.
- (ft_smooth_locd_renderer_class, ft_smooth_lcdv_renderer_class): New
+ (ft_smooth_lcd_renderer_class, ft_smooth_lcdv_renderer_class): New
classes.
* src/truetype/ttobjs.c (TT_{Done,New}_GlyphZone): Renamed to...
@@ -7376,7 +7375,7 @@
* src/pcf/pcfdriver.c (PCF_Glyph_Load): Fix computation of
horiBearingX.
- * src/bdf/bdfdrivr.c (BDF_GlyphLoad): Fix computation of
+ * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Fix computation of
horiBearingY.
2002-08-16 George Williams <gww@silcom.com>
@@ -7581,7 +7580,7 @@
* include/freetype/cache/ftccache.h, src/cache/ftccache.i,
src/cache/ftccache.c [!FTC_CACHE_USE_LINEAR_HASHING]: Removed.
- (FTC_CACHE_USE_LINEAR_HASHING: Removed also.
+ (FTC_CACHE_USE_LINEAR_HASHING): Removed also.
FT_CONFIG_OPTION_USE_CMAPS is now the default.
@@ -7603,7 +7602,7 @@
* src/cid/cidriver.c (Cid_Get_Char_Index, Cid_Get_Next_Char):
Removed.
- (t1_cid_driver_class): Updated.
+ (t1cid_driver_class): Updated.
* src/truetype/ttdriver.c (tt_driver_class): Updated.
* src/type1/t1driver.c (Get_Char_Index, Get_Next_Char): Removed
(t1_driver_class): Updated.
@@ -7698,7 +7697,7 @@
CFF_Done_SubFont -> cff_subfont_done
CFF_Load_Font -> cff_font_load
CFF_Done_Font -> cff_font_done
- CFF_Size_Get_Global_Funcs -> cff_size_get_global_funcs
+ CFF_Size_Get_Globals_Funcs -> cff_size_get_globals_funcs
CFF_Size_Done -> cff_size_done
CFF_Size_Init -> cff_size_init
CFF_Size_Reset -> cff_size_reset
@@ -8636,7 +8635,7 @@
src/pfr/*: New files.
* include/freetype/config/ftmodule.h,
- include/freetype/internal/fttrace.h, src/Jamefile: Updated.
+ include/freetype/internal/fttrace.h, src/Jamfile: Updated.
* src/type1/t1gload.h (T1_Load_Glyph), src/type1/t1gload.c
(T1_Load_Glyph): Fixed incorrect parameter sign-ness in callback
@@ -9063,7 +9062,7 @@
FT_Glyph_Name_Requester => FT_Face_GetGlyphNameFunc
FT_Name_Index_Requester => FT_Face_GetGlyphNameIndexFunc
- * src/base/ftapi.c: New file. It contains backwards compatibility
+ * src/base/ftapi.c: New file. It contains backward compatibility
functions.
* include/freetype/internal/psaux.h, src/cid/cidload.c,
@@ -9106,7 +9105,7 @@
FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings.
* src/base/ftcalc.c (FT_MulFix): Ditto.
* src/cff/cffdrivr.c (cff_get_name_index): Ditto.
- * src/cff/cffobjs.c (CFF_Size_Get_Global_Funcs, CFF_Size_Init,
+ * src/cff/cffobjs.c (CFF_Size_Get_Globals_Funcs, CFF_Size_Init,
CFF_GlyphSlot_Init): Ditto.
* src/cid/cidobjs.c (CID_GlyphSlot_Init,
CID_Size_Get_Globals_Funcs): Ditto.
@@ -9247,7 +9246,7 @@
{
} PS_StructRec, *PS_Struct;
- typedef PS_StructRec T1_Struct; /* backwards-compatibility */
+ typedef PS_StructRec T1_Struct; /* backward compatibility */
Hence, we increase the coherency of the source code by effectively
using the `Rec' prefix for structure types.
@@ -9384,7 +9383,7 @@
* src/pcf/pcfread.c (pcf_seek_to_table_type): Ditto.
* src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto.
(pcf_get_bitmaps): The same for `sizebitmaps'.
- * src/psaux/t1decode.c (T1_Decode_Parse_Charstrings): The same for
+ * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): The same for
`orig_y'.
(t1operator_seac): Comment out more dead code.
* src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER'
@@ -9423,7 +9422,7 @@
----------------------------------------------------------------------------
-Copyright 2002-2016 by
+Copyright 2002-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/ChangeLog.22 b/modules/freetype2/ChangeLog.22
index ce08dc98d..4517c3224 100644
--- a/modules/freetype2/ChangeLog.22
+++ b/modules/freetype2/ChangeLog.22
@@ -189,7 +189,7 @@
* src/base/ftdbgmem.c (_ft_debug_file, _ft_debug_lineno)
[FT_DEBUG_MEMORY]: New global variables, replacing...
- (FT_MemTable_Rec) [FT_DEBUG_MEMORY]: Remove `filename' and
+ (FT_MemTableRec) [FT_DEBUG_MEMORY]: Remove `filename' and
`line_no'. Update all callers.
(ft_mem_debug_alloc) [FT_DEBUG_MEMORY]: Avoid possible integer
overflow.
@@ -494,7 +494,7 @@
FTC_MruList_Init, FTC_MruList_Reset, FTC_MruList_Done,
FTC_MruList_New, FTC_MruList_Remove, FTC_MruList_RemoveSelection):
Declare as FT_LOCAL_DEF.
- (FTC_MruListFind, FTC_MruList_Lookup) [!FTC_INLINE]: Compile
+ (FTC_MruList_Find, FTC_MruList_Lookup) [!FTC_INLINE]: Compile
conditionally.
Declare as FT_LOCAL_DEF.
@@ -605,14 +605,14 @@
* docs/release: Minor additions and clarifications.
- * docs/CHANGES: Updated to reflect many fixes for backwards
+ * docs/CHANGES: Updated to reflect many fixes for backward
compatibility. Still incomplete.
2006-02-26 David Turner <david@freetype.org>
* src/base/ftobjs.c (ft_recompute_scaled_metrics): Re-enable
conservative rounding of metrics to avoid breaking clients like
- Pango (see http://bugzilla.gnome.org/show_bug.cgi?id=327852).
+ Pango (see https://bugzilla.gnome.org/show_bug.cgi?id=327852).
2006-02-25 Werner Lemberg <wl@gnu.org>
@@ -814,7 +814,7 @@
* include/freetype/ftcache.h (FTC_IMAGE_TYPE_COMPARE,
FTC_IMAGE_TYPE_HASH), src/cache/ftcbasic.c (FTC_OldFontRec,
FTC_OldImageDescRec, FTC_ImageCache_Lookup, FTC_Image_Cache_New,
- FTC_OldImage_Desc, FTC_OLD_IMAGE_FORMAT, ftc_old_image_xxx,
+ FTC_OldImageDesc, FTC_OLD_IMAGE_FORMAT, ftc_old_image_xxx,
ftc_image_type_from_old_desc, FTC_Image_Cache_Lookup,
FTC_SBitCache_Lookup, FTC_SBit_Cache_New, FTC_SBit_Cache_Lookup)
[FT_CONFIG_OPTION_OLD_INTERNALS]: Try to revive old functions of the
@@ -2318,7 +2318,7 @@
Further information on the SING Glyphlet format can be found at:
- http://www.adobe.com/products/indesign/sing_gaiji.html
+ https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5148.SING_Tutorial.pdf
* include/freetype/tttags.h (TTAG_SING, TTAG_META): New macros for
the OpenType tables `SING' and `META'. These two tables are used in
@@ -2458,8 +2458,8 @@
* src/gxvalid/gxvbsln.c (GXV_BSLN_VALUE_EMPTY): Add `U'.
- * src/gxvalid/gxmort1.c (GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE),
- src/gxvalid/gxmort2.c (GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE): Fix
+ * src/gxvalid/gxvmort1.c (GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE),
+ src/gxvalid/gxvmort2.c (GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE): Fix
typo.
* src/gxvalid/gxvmorx0.c, src/gxvalid/gxvmorx1.c,
@@ -2787,7 +2787,7 @@
2005-06-15 Kirill Smelkov <kirr@mns.spb.ru>
The next release will be 2.2.0, so don't worry about source code
- backwards compatibility.
+ backward compatibility.
* include/freetype/ftimage.h (FT_Outline_MoveToFunc,
FT_Outline_LineToFunc, FT_Outline_ConicToFunc,
@@ -2821,7 +2821,7 @@
----------------------------------------------------------------------------
-Copyright 2005-2016 by
+Copyright 2005-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/ChangeLog.23 b/modules/freetype2/ChangeLog.23
index b8a914bac..85253f112 100644
--- a/modules/freetype2/ChangeLog.23
+++ b/modules/freetype2/ChangeLog.23
@@ -43,7 +43,7 @@
* src/base/ftoutln.c (FT_Outline_New_Internal): The length of
FT_Outline->points[] should be numPoints, not 2 * numPoints.
Found by Paul Messmer, see
- http://lists.gnu.org/archive/html/freetype-devel/2010-02/msg00003.html
+ https://lists.gnu.org/archive/html/freetype-devel/2010-02/msg00003.html
2010-02-10 Ken Sharp <ken.sharp@artifex.com>
@@ -108,7 +108,7 @@
Preferred family names should be used for legacy systems that
can hold only a few faces (<= 4) for a family name. Suggested by
Andreas Heinrich.
- http://lists.gnu.org/archive/html/freetype/2010-01/msg00001.html
+ https://lists.gnu.org/archive/html/freetype/2010-01/msg00001.html
* include/freetype/ftsnames.h (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Define.
@@ -607,7 +607,7 @@
(ft_black_render): Initialize `worker->gray_lines' (problem found by
valgrind).
- (FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Dont' #undef, just
+ (FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Don't #undef, just
comment out.
2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@@ -631,7 +631,7 @@
The issue of incompatible cast between unsigned long and void*
on LLP64 platform is reported by NightStrike from MinGW-Win64
project. See
- http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
+ https://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
* src/bdf/bdf.h: The type of hashnode->data is changed from
void* to size_t.
@@ -657,7 +657,7 @@
On LLP64 platform, the conversion from pointer to FT_Fixed need
to drop higher 32-bit. Explicit casts are required. Reported by
NightStrike from MinGW-w64 project. See
- http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
+ https://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
* src/cff/cffgload.c: Convert the pointers to FT_Fixed explicitly.
@@ -671,7 +671,7 @@
* src/raster/rules.mk: Don't handle ftmisc.h. It is needed for
stand-alone mode only.
- * src/raster/ftmisc.h (FT_MemoryRec , FT_Alloc_Func, FT_Free_Func,
+ * src/raster/ftmisc.h (FT_MemoryRec, FT_Alloc_Func, FT_Free_Func,
FT_Realloc_Func): Copy declarations from ftsystem.h.
2009-09-02 Bram Tassyns <bramt@enfocus.be>
@@ -864,7 +864,7 @@
LP64 systems: Higher bits are not used.
16-bit systems: Drop can occur.
See
- http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00065.html
+ https://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00065.html
These functions will be refined to take FT_ULong flags in
next bump with incompatible API change.
@@ -929,7 +929,7 @@
type1: Fix a data type mismatching with its source.
* include/freetype/internal/t1types.h: The type of
- T1_Face->buildchar is matched with T1_Decorder->top.
+ T1_Face->buildchar is matched with T1_Decoder->top.
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@@ -944,7 +944,7 @@
pfr: Fix a data type mismatching with its source.
- * src/pfr/pfrtypes.h: The type of PFR_PhysFont->chars_offset
+ * src/pfr/pfrtypes.h: The type of PFR_PhyFont->chars_offset
is extended from FT_UInt32 to FT_Offset, because it is
calculated with the pointer difference in pfr_phy_font_load().
@@ -975,8 +975,8 @@
psaux: Fix a data type mismatching with its source.
* include/freetype/internal/psaux.h: The type of
- T1_DecorderRec.buildchar is matched with
- T1_DecorderRec.top.
+ T1_DecoderRec.buildchar is matched with
+ T1_DecoderRec.top.
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@@ -1765,7 +1765,7 @@
ftgzip.c by FT2 are enabled by default. To use
zlib zcalloc() & zfree(), define USE_ZLIB_ZCALLOC.
See discussion:
- http://lists.gnu.org/archive/html/freetype-devel/2009-02/msg00000.html
+ https://lists.gnu.org/archive/html/freetype-devel/2009-02/msg00000.html
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@@ -1904,7 +1904,7 @@
2009-07-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Borland C++ compiler patch proposed by Mirco Babin.
- http://lists.gnu.org/archive/html/freetype/2009-07/msg00016.html.
+ https://lists.gnu.org/archive/html/freetype/2009-07/msg00016.html.
* builds/exports.mk: Delete unused flags, CCexe_{CFLAGS,LDFLAGS}.
Fix APINAMES_C and APINAMES_EXE pathnames to reflect the platform
@@ -1929,7 +1929,7 @@
* src/tools/chktrcmp.py: A script to check trace_XXXX macros
that are used in C source but undefined in fttrace.h, or
defined in fttrace.h but unused in C sources. See
- http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html.
+ https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html.
* docs/DEBUG: Mention on chktrcmp.py.
* docs/release: Ditto.
@@ -1961,7 +1961,7 @@
* include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( t1afm )
and FT_TRACE_DEF( ttbdf ). See
- http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html
+ https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html
2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@@ -1975,8 +1975,8 @@
Prevent the overflows by a glyph with too many points or contours.
The bug is reported by Boris Letocha <b.letocha@gmc.net>. See
- http://lists.gnu.org/archive/html/freetype-devel/2009-06/msg00031.html
- http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00002.html
+ https://lists.gnu.org/archive/html/freetype-devel/2009-06/msg00031.html
+ https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00002.html
* include/freetype/ftimage.h (FT_OUTLINE_CONTOURS_MAX,
FT_OUTLINE_POINTS_MAX): New macros to declare the maximum
@@ -2001,7 +2001,7 @@
2009-06-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
ftpatent: Fix a bug by wrong usage of service->table_info().
- http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00039.html
+ https://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00039.html
* include/freetype/internal/services/svsfnt.h: Extend
FT_SFNT_TableInfoFunc() to take new argument to obtain the offset
@@ -2069,7 +2069,7 @@
* builds/unix/configure.raw: Fix a bug in sed script to extract
native suffix for binary executables, patch by Peter Breitenlohner.
- http://lists.gnu.org/archive/html/freetype-devel/2009-04/msg00036.html
+ https://lists.gnu.org/archive/html/freetype-devel/2009-04/msg00036.html
2009-06-26 Werner Lemberg <wl@gnu.org>
@@ -2125,7 +2125,7 @@
code unconditionally.
Add support for random numbers and update remaining code
accordingly; this should work now.
- (t1_operator_seac): Updated.
+ (t1operator_seac): Updated.
* src/psaux/pshrec.c: Include FT_INTERNAL_CALC_H.
(ps_hints_t1stem3, t1_hints_stem): Updated.
@@ -2594,14 +2594,14 @@
Position Independent Code (PIC) support in smooth renderer.
* src/smooth/ftsmooth.h declare ft_smooth_renderer_class,
- ft_smooth_lcd_renderer_class and ft_smooth_lcd_v_renderer_class
+ ft_smooth_lcd_renderer_class and ft_smooth_lcdv_renderer_class
using macros from ftrender.h,
when FT_CONFIG_OPTION_PIC is defined create and destroy
functions will be declared.
* src/smooth/ftsmooth.c when FT_CONFIG_OPTION_PIC is defined
the following structs:
ft_smooth_renderer_class, ft_smooth_lcd_renderer_class
- and ft_smooth_lcd_v_renderer_class
+ and ft_smooth_lcdv_renderer_class
will have functions to init or create and destroy them
instead of being allocated in the global scope.
And macros will be used from ftspic.h in order to access
@@ -3469,8 +3469,8 @@
faces includes broken face which FT_Done_Face() cannot free,
FT_Done_Library() retries FT_Done_Face() and it can fall into
an endless loop. See the discussion:
- http://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html
- http://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html
+ https://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html
+ https://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html
2009-01-07 Werner Lemberg <wl@gnu.org>
@@ -3492,7 +3492,7 @@
* builds/unix/configure.raw: Don't call AC_CANONICAL_BUILD and
AC_CANONICAL_TARGET and use $host_os only. A nice explanation for
this change can be found at
- http://blog.flameeyes.eu/s/canonical-target.
+ https://blog.flameeyes.eu/s/canonical-target.
From Savannah patch #6712.
@@ -4156,7 +4156,7 @@
2008-09-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* builds/unix/configure.raw: Clear FT2_EXTRA_LIBS when Carbon or
- ApplicationService framework is missing. Although this value is not
+ ApplicationServices framework is missing. Although this value is not
used in building of FreeType2, it is written in `freetype2.pc' and
`freetype-config'.
@@ -4516,7 +4516,7 @@
recommends to add the option only to CFLAGS, LDFLAGS should include
it because libfreetype.la is built with -no-undefined. This fixes a
bug reported by Ryan Schmidt in MacPorts,
- http://trac.macports.org/ticket/15331.
+ https://trac.macports.org/ticket/15331.
2008-06-21 Werner Lemberg <wl@gnu.org>
@@ -4861,7 +4861,7 @@
2008-04-14 Werner Lemberg <wl@gnu.org>
* src/pcf/pcfdrivr.c (PCF_Face_Init): Protect call to
- `FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZ'. From Savannah
+ `FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZW'. From Savannah
bug #22909.
2008-04-13 Werner Lemberg <wl@gnu.org>
@@ -5243,7 +5243,7 @@
functions related to cmap type 14 support to the
`FT_Object_ActionName' scheme:
- FT_Get_Char_Variant_index -> FT_Face_GetCharVariantIndex
+ FT_Get_Char_Variant_Index -> FT_Face_GetCharVariantIndex
FT_Get_Char_Variant_IsDefault -> FT_Face_GetCharVariantIsDefault
FT_Get_Variant_Selectors -> FT_Face_GetVariantSelectors
FT_Get_Variants_Of_Char -> FT_Face_GetVariantsOfChar
@@ -5383,7 +5383,7 @@
* include/freetype/ftotval.h (FT_VALIDATE_MATH): New macro.
(FT_VALIDATE_OT): Updated.
- * src/otvalid/otmath.c: New file.
+ * src/otvalid/otvmath.c: New file.
* src/otvalid/otvalid.c: Include otvmath.c.
* src/otvalid/otvmod.c (otv_validate): Handle `MATH' table.
@@ -5530,7 +5530,7 @@
* src/truetype/ttinterp.c (Ins_IUP): Add missing variable
initialization.
- * src/autofit/aflatin.c (af_latin_metric_init_blues): Get rid of an
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Get rid of an
infinite loop in the case of degenerate fonts.
2007-06-26 Rahul Bhalerao <b.rahul.pm@gmail.com>
@@ -5965,7 +5965,7 @@
* include/freetype/config/ftstdlib.h,
include/freetype/internal/ftobjs.h: As suggested by Graham Asher,
ensure that ft_isalnum, ft_isdigit, etc., use hard-coded values
- instead on relying on the locale-dependent functions provided by
+ instead of relying on the locale-dependent functions provided by
<ctypes.h>.
2007-05-15 Graham Asher <graham.asher@btinternet.com>
@@ -6187,13 +6187,13 @@
* builds/unix/ftsystem.c (FT_Stream_Open): Temporary fix to prevent
32bit unsigned long overflow by 64bit filesize on LP64 platform, as
proposed by Sean McBride:
- http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
+ https://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
2007-03-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* builds/unix/ftconfig.in: Suppress SGI compiler's warning against
setjmp, proposed by Sean McBride:
- http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
+ https://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
2007-03-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@@ -6852,7 +6852,7 @@
* include/freetype/internal/services/svotval.h: Add `volatile' to
sync with the modification by Jens Claudius on 2006-08-22; cf.
- http://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/src/otvalid/otvmod.c?r1=1.4&r2=1.5
+ https://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/src/otvalid/otvmod.c?r1=1.4&r2=1.5
2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@@ -6876,7 +6876,7 @@
* src/base/ftobjs.c: Improvement of resource fork handler for
POSIX, cf.
- http://lists.gnu.org/archive/html/freetype-devel/2006-10/msg00025.html
+ https://lists.gnu.org/archive/html/freetype-devel/2006-10/msg00025.html
(Mac_Read_sfnt_Resource): Count only `sfnt' resource of suitcase font
format or .dfont, to simulate the face index number counted by ftmac.c.
(IsMacResource): Return the number of scalable faces correctly.
@@ -7023,7 +7023,7 @@
(_ft_lcd_filter_fir): This.
Update parameters.
(_ft_lcd_filter_legacy) [USE_LEGACY]: New filter function.
- (FT_Library_Set_LcdFilter): Update parameters.
+ (FT_Library_SetLcdFilter): Update parameters.
Handle new filter modes.
* include/internal/ftobjs.h: Include FT_LCD_FILTER_H.
@@ -7366,7 +7366,7 @@
to recognize a few fonts that require the automatic unpatented
loader.
- * src/smooth/ftgrays.c: Optmize the performance of the anti-aliased
+ * src/smooth/ftgrays.c: Optimize the performance of the anti-aliased
rasterizer. The speed improvement is between 15% and 25%, depending
on the font data.
@@ -7524,7 +7524,7 @@
`ft_validator_run' wrapping `setjmp' can cause a crash, as found by
Jens:
- http://lists.gnu.org/archive/html/freetype-devel/2006-08/msg00004.htm.
+ https://lists.gnu.org/archive/html/freetype-devel/2006-08/msg00004.htm.
* src/otvalid/otvmod.c: Replace `ft_validator_run' by `ft_setjmp'.
It reverts the change introduced on 2005-08-20.
@@ -7721,7 +7721,7 @@
2006-06-24 Eugeniy Meshcheryakov <eugen@univ.kiev.ua>
Fix two hinting bugs as reported in
- http://lists.gnu.org/archive/html/freetype-devel/2006-06/msg00057.html.
+ https://lists.gnu.org/archive/html/freetype-devel/2006-06/msg00057.html.
* include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add
`first_point' member.
@@ -7761,7 +7761,7 @@
should return `FT_Err_Unimplemented_Feature' if validation service
is unavailable (disabled in `modules.cfg'). It is originally
suggested by David Turner, cf.
- http://lists.gnu.org/archive/html/freetype-devel/2005-11/msg00078.html
+ https://lists.gnu.org/archive/html/freetype-devel/2005-11/msg00078.html
* src/base/ftgxval.c (FT_TrueTypeGX_Validate): Return
FT_Err_Unimplemented_Feature if TrueTypeGX validation service is
@@ -7857,7 +7857,7 @@
2006-05-18 Werner Lemberg <wl@gnu.org>
* src/truetype/ttgload.c (TT_Load_Composite_Glyph)
- [FT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again.
+ [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again.
2006-05-17 David Turner <david@freetype.org>
@@ -7932,7 +7932,7 @@
----------------------------------------------------------------------------
-Copyright 2006-2016 by
+Copyright 2006-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/ChangeLog.24 b/modules/freetype2/ChangeLog.24
index cbbfd8c6e..44abc4060 100644
--- a/modules/freetype2/ChangeLog.24
+++ b/modules/freetype2/ChangeLog.24
@@ -335,7 +335,7 @@
* include/freetype/ftmoderr.h: Fix commit from 2013-03-11.
- The previous version was not backwards compatible. Reported by
+ The previous version was not backward compatible. Reported by
Behdad.
2013-03-14 Werner Lemberg <wl@gnu.org>
@@ -744,7 +744,7 @@
2013-01-16 David 'Digit' Turner <digit@google.com>
- [truetype] Improve sub-pixel code.
+ [truetype] Improve subpixel code.
This patches fixes many issues with the ttsubpix implementation.
@@ -784,7 +784,7 @@
and `const' where appropriate.
(X_SCALING_Rules, X_SCALING_RULES_SIZE): Renamed to...
- (spu_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This.
+ (sph_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This.
Update all users.
2013-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
@@ -1860,10 +1860,10 @@
Fix `checking if gcc static flag -static works' test.
On my linux build tree, I receive yes answer in every package I
- build except freetype for this test checking if gcc static flag
+ build except FreeType for this test checking if gcc static flag
`-static' works
- On freetype, no is received, unless bzip2 and zlib are disabled using
+ In FreeType, no is received, unless bzip2 and zlib are disabled using
./configure --without-bzip2 --without-zlib
@@ -1977,7 +1977,7 @@
Most of the code is based on the ClearType whitepaper written by
Greg Hitchcock
- http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
+ https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
which gives a detailed overview of the necessary changes to the
Microsoft rasterizer so that older fonts are supported. However, a
@@ -2103,7 +2103,7 @@
NEC FA family dated in 1996 have different checksum.
Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>; see
- http://lists.gnu.org/archive/html/freetype-devel/2012-06/msg00023.html
+ https://lists.gnu.org/archive/html/freetype-devel/2012-06/msg00023.html
* src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): 4 sets
of fpgm & prep table checksums for FA-Gothic, FA-Minchou,
@@ -2117,7 +2117,7 @@
Problem reported by jola <hans-jochen.lau@lhsystems.com>; see
- http://lists.gnu.org/archive/html/freetype-devel/2012-05/msg00036.html
+ https://lists.gnu.org/archive/html/freetype-devel/2012-05/msg00036.html
* src/raster/ftraster.c (SMulDiv_No_Round): New macro.
(Line_Up): Use it.
@@ -2141,7 +2141,7 @@
* include/freetype/ftoutln.h (FT_Outline_EmboldenXY): Define it.
* src/base/ftoutln.c (FT_Outline_EmboldenXY): Implement it, using a
- simplified embolding algorithm.
+ simplified emboldening algorithm.
(FT_Outline_Embolden): Make it a special case of
`FT_Outline_EmboldenXY'
@@ -2603,7 +2603,7 @@
See discussion starting at
- http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html
+ https://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html
* src/smooth/ftgrays.c: s/TBand/gray_TBand/.
* src/raster/ftraster.c: s/TBand/black_TBand/.
@@ -2616,7 +2616,7 @@
`outline.flags' so that this information is preserved. See
discussion starting at
- http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html
+ https://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html
2012-02-11 Werner Lemberg <wl@gnu.org>
@@ -2677,7 +2677,7 @@
[raccess] Modify for PIC build.
Based on the patch provided by Erik Dahlstrom <ed@opera.com>,
- http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html
+ https://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html
Also `raccess_guess_table[]' and `raccess_rule_by_darwin_vfs()'
are renamed with `ft_' suffixes.
@@ -2941,10 +2941,10 @@
[type42] Remove casts.
- * src/type42/t42driver.c (t42_driver_class): Remove all casts and
+ * src/type42/t42drivr.c (t42_driver_class): Remove all casts and
update affected functions.
- * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42driver
+ * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42 driver
changes.
2011-11-30 Werner Lemberg <wl@gnu.org>
@@ -3127,7 +3127,7 @@
According to
- http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
+ https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
this should be mentioned explicitly.
@@ -3456,7 +3456,7 @@
See
- http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html
+ https://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html
for some comparison images.
@@ -3556,7 +3556,7 @@
See
- http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html
+ https://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html
for example documents. The FreeType stroker now produces results
very similar to that produced by GhostScript and Distiller for these
@@ -3776,7 +3776,7 @@
[gxvalid] Fix gcc4.6 compiler warnings in gxvtrak.c.
* src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate):
- Check different entries pointing same traking value.
+ Check different entries pointing same tracking value.
(gxv_trak_validate): Remove unused variable `table_size'.
2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@@ -3788,12 +3788,12 @@
(gxv_morx_chain_validate): Conditionalize unvalidated
variable `defaultFlags'.
- * src/gxvalid/gxmorx0.c
+ * src/gxvalid/gxvmorx0.c
(gxv_morx_subtable_type0_entry_validate):
Conditionalize unvalidated variables; `markFirst',
`dontAdvance', `markLast', `verb'.
- * src/gxvalid/gxmorx1.c
+ * src/gxvalid/gxvmorx1.c
(gxv_morx_subtable_type1_entry_validate): Conditionalize
unvalidated variables; `setMark', `dontAdvance'.
@@ -3826,11 +3826,11 @@
(gxv_mort_chain_validate): Conditionalize unvalidated
variable `defaultFlags'.
- * src/gxvalid/gxmort0.c
+ * src/gxvalid/gxvmort0.c
(gxv_mort_subtable_type0_entry_validate): Check the
conflict of the marks for the glyphs.
- * src/gxvalid/gxmort1.c
+ * src/gxvalid/gxvmort1.c
(gxv_mort_subtable_type1_offset_to_subst_validate):
Local variables `min_gid', `max_gid' are replaced by
variables in the validator.
@@ -4005,9 +4005,9 @@
aligned, bluezones for CJK Ideographs are calculated from
sample glyphs. At present, vertical bluezones (bluezones
to align vertical stems) are disabled by default. For detail, see
- http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html
- http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html
- http://lists.gnu.org/archive/html/freetype-devel/2011-05/msg00001.html
+ https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html
+ https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html
+ https://lists.gnu.org/archive/html/freetype-devel/2011-05/msg00001.html
* include/freetype/internal/fttrace.h: New trace component `afcjk'.
* src/autofit/afcjk.h (AF_CJK{Blue,Axis,Metric}Rec): Add CJK version
@@ -4029,7 +4029,7 @@
af_latin_hints_compute_blue_edges.
(af_cjk_metrics_init_blues): New function, CJK version of
af_latin_metrics_init_blues.
- (af_cjk_hints_edges): Add code to align the edge stems to blue zones.
+ (af_cjk_hint_edges): Add code to align the edge stems to blue zones.
* src/autofit/afindic.c (af_indic_metrics_init): Take AF_CJKMetric
instead of AF_LatinMetric, and initialize as af_cjk_metrics_init.
@@ -4075,8 +4075,8 @@
the TrueType font header. Some bad PDF generators write
wrong values. For details see examples and benchmark tests
of the latency by recalculation:
- http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html
- http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html
+ https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html
+ https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html
2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@@ -4109,7 +4109,7 @@
Because some PDF generators mangle the family name badly,
the trickyness check by the checksum should be invoked always.
For sample PDF, see
- http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html
+ https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html
* src/truetype/ttobjs.c (tt_check_trickyness): Even when
tt_check_trickyness_family() finds no trickyness,
@@ -4146,8 +4146,8 @@
When there are too many stems to preserve their gaps in the
rasterization of CJK Ideographs at a low resolution, blur the
stems instead of showing clumped stems. See
- http://lists.gnu.org/archive/html/freetype-devel/2011-02/msg00011.html
- http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00046.html
+ https://lists.gnu.org/archive/html/freetype-devel/2011-02/msg00011.html
+ https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00046.html
for details.
* src/autofit/afcjk.c (af_cjk_hint_edges): Store the position of
@@ -4343,7 +4343,7 @@
[cache] Fix an off-by-one bug in `FTC_Manager_RemoveFaceID'.
Found by <ychen1392001@yahoo.com.cn>, see detail in
- http://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html
+ https://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html
* src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Check the node
buckets[cache->p + cache->mask] too.
@@ -4464,7 +4464,7 @@
Johnson Y. Yan. The bug report by Qt developers is
considered too.
- http://bugreports.qt.nokia.com/browse/QTBUG-6521
+ https://bugreports.qt.io/browse/QTBUG-6521
2011-01-15 Werner Lemberg <wl@gnu.org>
@@ -4923,7 +4923,7 @@
Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has
been tested with demo images sent to the mailing list. See
- http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
+ https://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
and later mails in this thread.
@@ -4943,7 +4943,7 @@
Problem reported by Tom Bishop <wenlin@wenlin.com>; see
thread starting with
- http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
+ https://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
* src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv
since the involved multiplication exceeds 32 bits.
@@ -5007,7 +5007,7 @@
normal clients.
For the history of these macros, see the investigation:
- http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
+ https://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@@ -5054,7 +5054,7 @@
by Darwin VFS are skipped. It reduces the warnings of the
deprecated resource fork access method by recent Darwin kernel.
Fix MacPorts ticket #18859:
- http://trac.macports.org/ticket/18859
+ https://trac.macports.org/ticket/18859
* src/base/ftobjs.c (load_face_in_embedded_rfork):
When `FT_Stream_New' returns FT_Err_Cannot_Open_Stream, it
@@ -5182,7 +5182,7 @@
[smooth] Fix splitting of cubics for negative values.
Reported by Róbert Márki <gsmiko@gmail.com>; see
- http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
+ https://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
* src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
@@ -5349,7 +5349,7 @@
Ignore the environmental setting of LIBTOOL.
Patch is suggested by Adrian Bunk, to prevent unexpected
reflection of environmental LIBTOOL. See:
- http://savannah.nongnu.org/patch/?7290
+ https://savannah.nongnu.org/patch/?7290
* builds/unix/unix-cc.in: LIBTOOL is unconditionally set to
$(FT_LIBTOOL_DIR)/libtool. FT_LIBTOOL_DIR is set to $(BUILD_DIR)
@@ -5406,8 +5406,8 @@
for nameless fonts is safer for PDFs including embedded Chinese
fonts. Written by David Bevan, see:
- http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
- http://lists.freedesktop.org/archives/poppler/2010-August/006310.html
+ https://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
+ https://lists.freedesktop.org/archives/poppler/2010-August/006310.html
* src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by
nameless font is given, TRUE is returned to enable hinting.
@@ -5669,7 +5669,7 @@
Use defined macros to set {platform,encoding}_id.
* src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to
- set charmap.{platfom,encoding}_id.
+ set charmap.{platform,encoding}_id.
* src/pcf/pcfdrivr.c: Ditto.
* src/winfonts/winfnt.c: Ditto.
* src/type1/t1objs.c: Ditto.
@@ -5792,8 +5792,8 @@
* src/cff/cffobjs.c (cff_face_init): Check error value by
`FT_CMap_New'.
* src/pfr/pfrobjs.c (pfr_face_init): Ditto.
- * src/type1/t1jobjs.c (T1_Face_Init): Ditto.
- * src/type42/t42jobjs.c (T42_Face_Init): Ditto.
+ * src/type1/t1objs.c (T1_Face_Init): Ditto.
+ * src/type42/t42objs.c (T42_Face_Init): Ditto.
2010-07-03 Werner Lemberg <wl@gnu.org>
@@ -5968,7 +5968,7 @@
* src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm.
The previous version was too aggressive, as demonstrated in
- http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
+ https://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
2010-06-24 Werner Lemberg <wl@gnu.org>
@@ -6065,7 +6065,7 @@
simplified algorithm to find out whether the spline can be replaced
with two straight lines. See this thread for more:
- http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
+ https://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
2010-06-09 Werner Lemberg <wl@gnu.org>
@@ -6220,7 +6220,7 @@
Add new function `FT_Library_SetLcdFilterWeights'.
This is based on code written by Lifter
- <http://unixforum.org/index.php?showuser=11691>. It fixes
+ <https://unixforum.org/index.php?showuser=11691>. It fixes
FreeDesktop bug #27386.
* src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
@@ -6344,7 +6344,7 @@
----------------------------------------------------------------------------
-Copyright 2010-2016 by
+Copyright 2010-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/ChangeLog.25 b/modules/freetype2/ChangeLog.25
index e85be5d30..59cf2bfed 100644
--- a/modules/freetype2/ChangeLog.25
+++ b/modules/freetype2/ChangeLog.25
@@ -112,8 +112,8 @@
Original patch is designed by Werner Lemberg. Extra part
for otvalid and gxvalid are added by suzuki toshiya, see
discussion:
- http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
- http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
+ https://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
+ https://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
* include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
* src/gxvalid/gxvcommn.h: Ditto.
@@ -144,7 +144,7 @@
for Borland's bug tracker entry.
Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
- http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
+ https://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
* include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
(gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
@@ -244,7 +244,7 @@
All public FreeType enumeration and flag values are uppercase...
- * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards
+ * include/tttables.h (FT_Sfnt_Tag): Implement it. For backward
compatibility, retain the old values as macros.
* src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
@@ -1223,7 +1223,7 @@
2014-10-14 Werner Lemberg <wl@gnu.org>
- [autofit] Adjust Devenagari character range.
+ [autofit] Adjust Devanagari character range.
* src/autofit/afranges.c (af_deva_uniranges): Omit characters that
are common to all other Indic scripts.
@@ -2116,7 +2116,7 @@
builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
HarfBuzz.
- * docs/INSTALL.UNIX: Document interdependency of Freetype with
+ * docs/INSTALL.UNIX: Document interdependency of FreeType with
HarfBuzz.
2014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com>
@@ -2669,8 +2669,8 @@
with Carbon framework is incompatible with that by FreeType 2
without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
- http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
- http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
+ https://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
+ https://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
* src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
`sort_by_res_id' to control the fragmented resource ordering.
@@ -3181,7 +3181,7 @@
Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
- http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
+ https://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
for details.
@@ -3556,7 +3556,7 @@
Suggested by Akira Tagoh, see
- http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
+ https://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
* src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
error if the font could be opened but non-zero `face_index' is
@@ -4767,7 +4767,7 @@
* src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
* src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
- * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
+ * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use cast.
* src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
* src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
@@ -5145,7 +5145,7 @@
----------------------------------------------------------------------------
-Copyright 2013-2016 by
+Copyright 2013-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/ChangeLog.26 b/modules/freetype2/ChangeLog.26
index a3d78f6c7..ea89e91ab 100644
--- a/modules/freetype2/ChangeLog.26
+++ b/modules/freetype2/ChangeLog.26
@@ -324,7 +324,7 @@
2016-06-20 Alexei Podtelezhnikov <apodtele@gmail.com>
- [smooth] Sanitize memory managenent.
+ [smooth] Sanitize memory management.
* src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up.
@@ -434,7 +434,7 @@
* src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in
the twilight zone. Otherwise, treat SHPIX the same as DELTAP.
Unbreaks various fonts such as older versions of Rokkitt and DTL
- Argo T Light that would glitch severly after calling ALIGNRP after a
+ Argo T Light that would glitch severely after calling ALIGNRP after a
blocked SHPIX.
2016-05-30 Werner Lemberg <wl@gnu.org>
@@ -460,7 +460,7 @@
[smooth] Shrink bisection stack.
The convergence of Bézier flatteners is fast with the deviation
- from straight line being assymptotically cut 4-fold on each bisection.
+ from straight line being asymptotically cut 4-fold on each bisection.
This justifies smaller bisection stack size.
* src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'.
@@ -563,26 +563,26 @@
* src/truetype/ttinterp.c (SUBPIXEL_HINTING): Replaced by...
(NO_SUBPIXEL_HINTING, SUBPIXEL_HINTING_INFINALITY,
SUBPIXEL_HINTING_MINIMAL): ...new macros.
- (Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backwards
+ (Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backward
compatibility.
Updated.
(Ins_RS, Ins_FDEF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_MD):
Updated.
(Ins_INSTCTRL): Handle native ClearType mode flag.
Updated.
- (Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backwards
+ (Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backward
compatibility.
(Move_Zp2_Point): Ditto.
(Ins_SHP): Updated.
- (Ins_SHPIX): Handle backwards compatibility.
+ (Ins_SHPIX): Handle backward compatibility.
Updated.
(Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Updated.
(Ins_ALIGNRP): Updated.
- (Ins_IUP, Ins_DELTAP): Handle backwards compatibility.
+ (Ins_IUP, Ins_DELTAP): Handle backward compatibility.
Updated.
(Ins_GETINFO): Handle v38 flags.
Updated.
- (TT_RunIns): Handle backwards compatibility mode.
+ (TT_RunIns): Handle backward compatibility mode.
Updated.
2016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
@@ -606,16 +606,16 @@
* src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields
`subpixel_hinting_lean', `vertical_lcd_lean',
- `backwards_compatibility', `iupx_called', iupy_called', and
+ `backward_compatibility', `iupx_called', iupy_called', and
`grayscale_cleartype' for new hinting mode.
* src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40
interpreters conditionally.
* src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless
- in v38 backwards compatibility mode.
+ in v38 backward compatibility mode.
Updated.
- (compute_glyph_metrics): Add v38 backwards compatibility mode
+ (compute_glyph_metrics): Add v38 backward compatibility mode
constraint for adjusting advance widths.
Updated.
(tt_loader_init): Handle new flags `subpixel_hinting_lean',
@@ -663,7 +663,7 @@
The previous fix for #46372 misunderstood a composite glyph referring
same component twice as a recursive reference. See the discussion
- http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html
+ https://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html
Thanks to Khaled Hosny for finding this issue.
@@ -788,7 +788,7 @@
proper blue zones can't be defined. However, there is already a
proposal submitted to Unicode; see
- http://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf
+ https://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf
Additionally, due to historical reasons, Unicode treats Khutsuri as
the same script as Mkhedruli, and so does OpenType. However, since
@@ -979,7 +979,7 @@
* src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
band clipping from here.
(gray_conic_to, gray_cubic_to): ... to here.
- (gray_rander_line, gray_render_scanline): Initialize variables closer
+ (gray_render_line, gray_render_scanline): Initialize variables closer
to their use.
2016-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
@@ -1482,7 +1482,7 @@
Still handle `__FTERRORS_H__'.
- We need this for backwards compatibility.
+ We need this for backward compatibility.
Problem reported by John Emmas <johne53@tiscali.co.uk>.
@@ -2478,7 +2478,7 @@
Problem reported by David Capello <davidcapello@gmail.com>; see
- http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
+ https://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
for details.
@@ -3408,7 +3408,7 @@
[raster,smooth] Microoptimizations.
* src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
- Bezier_Up, ): Use do-while loops.
+ Bezier_Up): Use do-while loops.
* src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
gray_convert_glyph): Ditto.
@@ -3813,7 +3813,7 @@
See
- http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
+ https://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
for a rationale.
@@ -3932,7 +3932,7 @@
This change is a result of a discussion thread on freetype-devel
- http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
+ https://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
@@ -4114,7 +4114,7 @@
Problem reported by Grissiom <chaos.proton@gmail.com>; in
- http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
+ https://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
there is an example code to trigger the bug.
@@ -4222,7 +4222,7 @@
[truetype] Support selector index 3 of the INSTCTRL instruction.
- This flag activates `native ClearType hinting', disabling backwards
+ This flag activates `native ClearType hinting', disabling backward
compatibility mode as described in Greg Hitchcocks whitepaper. In
other words, it enables unrestricted functionality of all TrueType
instructions in ClearType.
@@ -4292,7 +4292,7 @@
This follows the OpenType 1.7 specification. See
- http://tug.org/pipermail/tex-live/2015-April/036634.html
+ https://tug.org/pipermail/tex-live/2015-April/036634.html
for a discussion.
@@ -5447,7 +5447,7 @@
[raster] Remove 5-level gray AA mode from monochrome rasterizer.
It was off by default and couldn't be turned on at runtime. And the
- smooth rasterizer superceded it over ten years ago. No point in
+ smooth rasterizer superseded it over ten years ago. No point in
keeping. Comments suggested that it was there for compatibility
with FreeType 1.
@@ -5695,7 +5695,7 @@
----------------------------------------------------------------------------
-Copyright 2015-2016 by
+Copyright 2015-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/ChangeLog.27 b/modules/freetype2/ChangeLog.27
new file mode 100644
index 000000000..0e82b2fb3
--- /dev/null
+++ b/modules/freetype2/ChangeLog.27
@@ -0,0 +1,2106 @@
+2016-12-30 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.7.1 released.
+ =========================
+
+
+ Tag sources with `VER-2-7-1'.
+
+ * docs/VERSION.TXT: Add entry for version 2.7.1.
+
+ * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2005/index.html,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2008/index.html,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/index.html,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/index.html,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/index.html,
+ builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2005-ce/index.html,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/index.html: s/2.7/2.7.1/, s/27/271/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
+
+ * builds/unix/configure.raw (version_info): Set to 19:0:13.
+ * CMakeLists.txt (VERSION_PATCH): Set to 1.
+
+2016-12-30 Werner Lemberg <wl@gnu.org>
+
+ [ftfuzzer] Replace `rand' with an xorshift algorithm.
+
+ * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'.
+ (Random): Implement and use a 32bit `xorshift' algorithm.
+
+2016-12-30 Werner Lemberg <wl@gnu.org>
+
+ [ftfuzzer] Restrict number of tested bitmap strikes.
+
+ Malformed fonts often have large values for the number of bitmap
+ strikes, and FreeType doesn't check the validity of all bitmap
+ strikes in advance.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353
+
+ * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'.
+ (Random): Small class to provide n randomly selected numbers
+ (without repetition) out of the value set [1,N].
+ (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap
+ strikes.
+
+2016-12-29 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Variation font API stability issues.
+
+ Make some functions work before a call to `TT_Set_MM_Blend'.
+
+ * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if
+ we don't blend.
+ (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we
+ don't blend.
+
+2016-12-29 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348
+
+2016-12-29 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Tracing fixes.
+
+ * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct
+ information.
+ (TT_Set_Var_Design): Fix typo.
+ (TT_Get_Var_Design): Fix typos.
+
+2016-12-29 Werner Lemberg <wl@gnu.org>
+
+ */*: Use `0.5f' for tracing 16.16 numbers.
+
+2016-12-29 Werner Lemberg <wl@gnu.org>
+
+ [pcf] Protect against gzip bombs.
+
+ Fix suggested by Kostya; reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345
+
+ * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to
+ 1024.
+
+2016-12-28 Werner Lemberg <wl@gnu.org>
+
+ [psnames] Only declare, not define, data in `pstables.h' (#49949).
+
+ Pdfium includes `pstables.h' a second time; moving the definition
+ from `pstables.h' to `psmodule.c' saves more than 60kByte data
+ segment space for this case.
+
+ * src/tools/glnames.py (StringTable::dump,
+ StringTable::dump_sublist, dump_encoding, dump_array): Emit
+ additional code to only define tables if `DEFINE_PS_TABLES' is set.
+
+ * src/psnames/pstables.h: Regenerated.
+ * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define.
+
+2016-12-28 Werner Lemberg <wl@gnu.org>
+
+ [cff] Catch `blend' op in non-variant fonts.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334
+
+ * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>: Don't
+ allow `blend' op for non-variant fonts.
+
+2016-12-28 Werner Lemberg <wl@gnu.org>
+
+ [cff] Better check of number of blends.
+
+ * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>,
+ src/cff/cffparse.c (cff_parse_blend): Compare number of blends with
+ stack size.
+
+2016-12-27 Werner Lemberg <wl@gnu.org>
+
+ Documentation updates.
+
+ * docs/CHANGES: Add missing information.
+
+ * docs/formats.txt: Rewritten and updated.
+
+2016-12-27 Werner Lemberg <wl@gnu.org>
+
+ [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'.
+
+ * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement.
+ (TT_Set_Var_Design): Fix tracing.
+
+ * src/type1/t1load.c (T1_Get_Var_Design): Implement.
+
+2016-12-24 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttpload.c (tt_face_load_hdmx): Ignore `version'.
+
+ Problem reported by å¼µä¿ŠèŠ <418092625@qq.com>.
+
+2016-12-24 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values.
+
+ Some fonts seem to have the `version' field in the wrong byte order.
+
+ Problem reported by å¼µä¿ŠèŠ <418092625@qq.com>.
+
+2016-12-24 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length.
+
+ This trivial fix allows us to accept more fonts.
+
+ Problem reported by å¼µä¿ŠèŠ <418092625@qq.com>.
+
+2016-12-24 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing.
+
+2016-12-22 Werner Lemberg <wl@gnu.org>
+
+ * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909).
+
+2016-12-22 Werner Lemberg <wl@gnu.org>
+
+ Ensure used preprocessor symbols are defined (#49790).
+
+ * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+ include/freetype/config/ftconfig.h: Check `__GNUC__', `__IBMC__',
+ and `__SUNPRO_C' correctly.
+
+2016-12-22 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=308
+
+2016-12-22 Werner Lemberg <wl@gnu.org>
+
+ [cff] Protect against invalid `vsindex' and `blend' values.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305
+
+ * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVSINDEX,
+ cf2_cmdBLEND>: Implement it.
+
+2016-12-22 Werner Lemberg <wl@gnu.org>
+
+ [ftfuzzer] Always use Adobe CFF engine.
+
+ * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement
+ it.
+
+2016-12-21 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
+
+ I should really stop coding late in the evening...
+
+ Thanks again to Ben for checking.
+
+2016-12-21 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Support variation fonts.
+
+ (This ChangeLog entry was added later on.)
+
+ * src/autofit/afglobal.c (af_face_globals_free): Remove useless
+ code.
+
+ * src/base/ftmm.c (FT_Set_MM_Design_Coordinates,
+ * FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
+ FT_Set_Var_Blend_Coordinates): Finalize
+ auto-hinter data to enforce recomputation. Note that this is a
+ brute-force method which should be improved.
+
+2016-12-21 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
+
+ Don't apply deltas twice for non-phantom points.
+
+ Spotted by Ben Wagner.
+
+2016-12-21 Werner Lemberg <wl@gnu.org>
+
+ [cff, truetype] Another try for #49829.
+
+ * src/cff/cffdrivr.c: Don't include
+ `FT_SERVICE_METRICS_VARIATIONS_H'.
+ (cff_get_advances): Use `ttface->variation_support'.
+
+ * src/truetype/ttdriver.c (tt_get_advances): Use
+ `ttface->variation_support'.
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+ load_truetype_glyph): Use `ttface->variation_support'.
+
+2016-12-21 Werner Lemberg <wl@gnu.org>
+
+ [truetype, sfnt] Introduce font variation flags to `TT_Face'.
+
+ * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX):
+ New macros describing available functionality of various OpenType
+ tables related to font variation.
+ (TT_Face): New fields `variation_support' and `mvar_support',
+ replacing and extending `use_fvar'.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use
+ `variation_support'.
+
+ * src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support'
+ field.
+ (TT_Vary_Apply_Glyph_Deltas): Updated.
+
+2016-12-21 Werner Lemberg <wl@gnu.org>
+
+ [base] Improve sanity check for Mac resources (#49888).
+
+ * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not
+ positive.
+
+2016-12-20 Werner Lemberg <wl@gnu.org>
+
+ [base] More sanity checks for Mac resources.
+
+ We use
+
+ https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format
+
+ and
+
+ https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151
+
+ as references.
+
+ * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short
+ for `res_id'.
+
+ * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Extract map length
+ and use it to improve sanity checks.
+ Follow the specification more closely;in particular, all data types
+ are signed, not unsigned.
+ (FT_Raccess_Get_DataOffsets): Follow the specification more closely;
+ in particular, all data types are signed, not unsigned.
+ Add some sanity checks.
+
+2016-12-20 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Improve logic for getting fast advance widths.
+
+ * src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c
+ (tt_get_advances): Use `is_default_instance' for test; this gets
+ recomputed after changing blend coordinates.
+
+2016-12-20 Ben Wagner <bungeman@google.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix linear metrics of GX variation fonts (#49829).
+
+ When asking for an unhinted non-default variations,
+ `linearVertAdvance' is currently the value from the `hmtx' table
+ instead of the actual value after applying the variation. `HVAR'
+ support fixes this, but fonts will exist without that table and will
+ need sane fallback.
+
+ Problem also reported as
+
+ https://bugs.chromium.org/p/skia/issues/detail?id=5917
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+ load_truetype_glyph): Implement linear advance adjustments if `HVAR'
+ or `VVAR' tables are missing.
+
+2016-12-20 Werner Lemberg <wl@gnu.org>
+
+ [cff, truetype] Fast advance width retrieval for fonts with HVAR.
+
+ Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+
+ * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+ (cff_get_advances): Test for HVAR and VVAR.
+
+ * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR.
+
+2016-12-18 Werner Lemberg <wl@gnu.org>
+
+ [base] Fix invalid mac font recursion.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304
+
+ * src/base/ftobjs.c (FT_Open_Face): Code moved to...
+ (ft_open_face_internal): ... this function.
+ Add a parameter to control whether we try special Mac font handling
+ in case of failure.
+ (FT_Open_Face, FT_New_Face, FT_New_Memory_Face,
+ open_face_from_buffer): Use `ft_open_face_internal'.
+
+2016-12-18 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Make named instances work.
+
+2016-12-18 Werner Lemberg <wl@gnu.org>
+
+ [truetype, cff] Extend `get_var_blend' function of MM service.
+
+ In particular, we need access to named instance data.
+
+ * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
+ Add argument for `FT_MM_Var'.
+
+ * src/cff/cffload.c (cff_get_var_blend): Updated.
+ * src/cff/cffload.h: Updated.
+
+ * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
+
+ * src/truetype/ttgxvar.c (tt_get_var_blend): Updated.
+ Accept value `NULL' for arguments.
+ * src/truetype/ttgxvar.h: Updated.
+
+2016-12-18 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Handle `fvar' with zero axes as a non-MM font.
+
+ This is better behaviour than exiting with an error.
+
+ * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar'
+ field.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also
+ updating the validation code.
+ Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS.
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation
+ code.
+
+2016-12-18 Werner Lemberg <wl@gnu.org>
+
+ Minor GX code shuffling.
+
+ * include/freetype/internal/tttypes.h (TT_Face): Move
+ `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT
+ block.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Updated.
+ * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro.
+ (TT_Load_Glyph): Use it.
+
+2016-12-18 Werner Lemberg <wl@gnu.org>
+
+ [cff] Better handling of non-CFF font formats.
+
+ * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a
+ signature, so return `FT_Err_Unknown_File_Format' more often.
+
+2016-12-17 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code.
+
+2016-12-17 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code.
+
+2016-12-17 Werner Lemberg <wl@gnu.org>
+
+ [sfnt, truetype] Various sanitizing fixes.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is
+ zero, set `num_instances' to zero.
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with
+ zero axes as invalid.
+
+ * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading
+ `loca', `cvt', `fpgm', and `prep' table.
+
+2016-12-17 Werner Lemberg <wl@gnu.org>
+
+ Improve tracing of `FT_Open_Face'.
+
+ * src/base/ftobjs.c (FT_Open_Face): Return info on number of
+ available faces and numbered instances, or the indices of the
+ requested face and numbered instance.
+
+ * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts.
+
+2016-12-17 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (cff_load_private_dict): Always init `blend'.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295
+
+2016-12-16 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix `cvar' sanity test.
+
+ Reported by Dave Arnold.
+
+ * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask.
+
+2016-12-16 Werner Lemberg <wl@gnu.org>
+
+ [cff, truetype] Remove compiler warnings; fix `make multi'.
+
+ * src/cff/cf2font.h: Include `cffload.h'.
+
+ * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and
+ FT_SERVICE_MULTIPLE_MASTERS_H.
+ (cff_vstore_load): Eliminate `vsSize'.
+ (cff_load_private_dict): Tag as `FT_LOCAL_DEF'.
+
+ * src/cff/cffload.h: Include `cffobjs.h'.
+ Provide declaration for `cff_load_private_dict'.
+
+ * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate
+ `minorVersion' and `map_offset'.
+
+2016-12-16 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix heap buffer overflow (#49858).
+
+ * src/cff/cffparse.c (cff_parser_run): Add one more stack size
+ check.
+
+2016-12-15 Werner Lemberg <wl@gnu.org>
+
+ Fix clang warnings.
+
+ * src/cff/cffload.c (cff_blend_doBlend): Add cast.
+ (cff_subfont_load): Set `error' correctly.
+
+ * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo.
+
+2016-12-15 Dave Arnold <darnold@adobe.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [cff] Implement CFF2 support (2/2).
+
+ The font variation code. All parts dependent on the GX code in the
+ `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+ In other words, you can still compile the `cff' module without
+ defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2
+ support without font variation).
+
+ * src/cff/cf2font.c (cf2_font_setup): Add support for font
+ variation.
+ * src/cff/cf2font.h (CF2_Font): Add fields for variation data.
+
+ * src/cff/cf2ft.c (cf2_free_instance): Free blend data.
+ (cf2_getVStore, cf2_getNormalizedVector): New functions.
+ * src/cff/cf2ft.h: Updated.
+
+ * src/cff/cf2intrp.c: Include `cffload.h'.
+ (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with...
+ (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values.
+ (cf2_doBlend): New function.
+ (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes.
+
+ * src/cff/cffload.c (FT_fdot14ToFixed): New macro.
+ (cff_vstore_done, cff_vstore_load): New functions.
+ (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector,
+ cff_blend_check_vector): New functions.
+ (cff_load_private_dict): Add arguments for blend vector.
+ Handle blend data.
+ (cff_subfont_load, cff_subfont_done): Updated.
+ (cff_font_load): Handle CFF2 variation store data.
+ (cff_font_done): Updated.
+ * src/cff/cffload.h: Include `cffparse.h'.
+ Updated.
+
+ * src/cff/cffobjs.c (cff_face_done): Updated.
+
+ * src/cff/cffparse.c: Include `cffload.h'.
+ (cff_parse_num): Handle internal value 255.
+ (cff_parse_vsindex, cff_parse_blend): New functions.
+ (CFF_FIELD_BLEND): New macro.
+ (cff_parser_run): Updated.
+ * src/cff/cffparse.h (cff_kind_blend): New enum value.
+
+ * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend'
+ dictionary values.
+
+ * src/cff/cfftypes.h (CFF_VarData, CFF_AxisCoords, CFF_VarRegion,
+ CFF_VStore, CFF_Blend): New structures.
+ (CFF_FontRecDict): Add `vstore_offset' field.
+ (CFF_Private): Add `vsindex' field.
+ (CFF_SubFont): Add fields for blend data.
+ (CFF_Font): Add `vstore' field.
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): `CFF2' is equal to `gvar',
+ since glyph variation data is directly embedded.
+ (TT_Set_MM_Blend): Don't load `gvar' table for CFF2 fonts.
+
+2016-12-15 Dave Arnold <darnold@adobe.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [cff] Implement CFF2 support (1/2).
+
+ This commit does not contain the blend code for font variation
+ support, which follows in another commit.
+
+ You should ignore whitespace while inspecting this commit.
+
+ * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2'
+ member.
+
+ * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member.
+
+ * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2'
+ flag.
+ (cf2_getMaxstack): New function.
+ * src/cff/cf2ft.h: Updated.
+
+ * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum.
+ (cf2_interpT2CharString): Handle CFF2 differences.
+ Add tracing message for errors.
+
+ * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index):
+ Update for CFF2.
+
+ * src/cff/cffload.c (FT_FIXED_ONE): New macro.
+ (cff_index_init, cff_index_load_offsets, cff_index_access_element,
+ cff_index_get_name, cff_ft_select_get, cff_load_private_dict,
+ cff_subfont_load, cff_font_load): Handle CFF2.
+ * src/cff/cffload.h: Updated.
+
+ * src/cff/cffobjs.c (cff_face_init): Handle CFF2.
+
+ * src/cff/cffparse.c (cff_parse_maxstack): New function.
+ (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed
+ * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New
+ macros.
+ (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New
+ macros.
+
+ * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend
+ stuff).
+
+ * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field.
+ (CFF_FontRecDict): Add `maxstack' field.
+ (CFF_Private): Add `subfont' field.
+ (CFF_Font): Add `top_dict_length' and `cff2' fields.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table.
+
+2016-12-15 Werner Lemberg <wl@gnu.org>
+ Dave Arnold <darnold@adobe.com>
+
+ [truetype] Provide HVAR advance width variation as a service.
+
+ Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+
+ * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated.
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Prevent
+ double adjustment of advance width.
+
+ * src/sfnt/ttmtx.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+ (tt_face_get_metrics): Apply metrics variations.
+
+2016-12-15 Dave Arnold <darnold@adobe.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [truetype] Provide function to apply `HVAR' advance width variation.
+
+ Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+
+ * src/truetype/ttgxvar.c (tt_hadvance_adjust): New function.
+ * src/truetype/ttgxvar.h: Updated.
+
+2016-12-15 Dave Arnold <darnold@adobe.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [truetype] Add `HVAR' table parsing.
+
+ Note that this is not complete yet; it only handles advance width
+ variation.
+
+ Activation of the code follows in another commit.
+
+ Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+
+ * include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member.
+
+ * src/truetype/ttgxvar.h (GX_HVarData, GX_AxisCoords, GX_HVarRegion,
+ GX_HVStore, GX_WidthMap): New auxiliary structures for...
+ (GX_HVarTable): ... HVAR main structure.
+ (GX_BlendRec): Add data for HVAR loading.
+
+ * src/truetype/ttgxvar.c (FT_FIXED_ONE, FT_fdot14ToFixed,
+ FT_intToFixed, FT_fixedToInt): New macros.
+ (ft_var_load_hvar): New function.
+ (TT_Get_MM_Var): Updated.
+ (tt_done_blend): Deallocate HVAR data.
+
+2016-12-15 Dave Arnold <darnold@adobe.com>
+
+ [cff] Extend number parsing.
+
+ The forthcoming CFF2 support needs a dynamic parsing limit.
+
+ * src/cff/cffparse.c (cff_parse_num, do_fixed, cff_parse_fixed,
+ cff_parse_fixed_scaled, cff_parse_fixed_dynamic): Add argument for
+ parser.
+ (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict,
+ cff_parse_multiple_master, cff_parse_cid_ros, cff_parser_run): Updated.
+
+ * src/cff/cffparse.h (cff_parse_num): Export locally.
+
+2016-12-15 Dave Arnold <darnold@adobe.com>
+
+ [cff] Implement dynamic stack size for Adobe engine.
+
+ This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for
+ the forthcoming CFF2 support.
+
+ * src/cff/cf2stack.c (cf2_stack_init): Add argument for stack size.
+ (cf2_stack_free): Deallocate stack.
+ (cf2_stack_count, cf2_stack_pushInt, cf2_stack_pushFixed,
+ cf2_stack_popInt, cf2_stack_popFixed, cf2_stack_getReal,
+ cf2_stack_clear): Updated.
+ (cf2_stack_setReal, cf2_stack_pop): New functions.
+
+ * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member.
+ Update function declarations.
+
+ * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated.
+
+ * src/cff/cffparse.c (cff_parser_init): Add parameter for stack
+ size; return error code.
+ (cff_parser_done): New function.
+ (cff_parser_run): Updated.
+
+ * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make
+ `stack' a pointer.
+ Update function declarations.
+
+ * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load):
+ Updated.
+
+2016-12-15 Dave Arnold <darnold@adobe.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [cff] Code shuffling.
+
+ * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset'
+ fields.
+
+ * src/cff/cffload.c (cff_subfont_load): Change last argument to
+ `CFF_Font'
+ Split off parsing of private dictionary into...
+ (cff_load_private_dict): ...this new function.
+ (cff_font_load): Updated.
+
+2016-12-14 Werner Lemberg <wl@gnu.org>
+
+ [sfnt, truetype] Add framework for Metrics Variations service.
+
+ No effect yet; service functions will be implemented later on.
+
+ Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+
+ * include/freetype/internal/services/svmetric.h: New file.
+
+ * include/freetype/internal/ftserv.h
+ (FT_SERVICE_METRICS_VARIATIONS_H): New macro.
+
+ * include/freetype/internal/tttypes.h (TT_Face): New field `var'.
+
+ * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+ (sfnt_init_face): Initialize `face->var'.
+
+ * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+ (tt_service_metrics_variations): New service.
+ (tt_services): Updated.
+
+ * src/truetype/ttpic.h: Updated.
+
+2016-12-14 Werner Lemberg <wl@gnu.org>
+
+ [cff] Add Multiple Masters service.
+
+ The code simply uses the MM functions from the `truetype' module.
+
+ Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+
+ * include/freetype/internal/tttypes.h (TT_Face): New field `mm'.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
+ (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var,
+ cff_set_var_design, cff_get_var_design): New functions.
+ (cff_service_multi_masters): New service.
+ (cff_services): Updated.
+
+ * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New
+ functions.
+ * src/cff/cffload.h: Updated.
+
+ * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro.
+
+ * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
+ (sfnt_init_face): Initialize `face->mm'.
+
+2016-12-14 Werner Lemberg <wl@gnu.org>
+
+ Extend functionality of `ft_module_get_service'.
+
+ It can now differentiate between local and global searches.
+
+ * src/base/ftobjs.c (ft_module_get_service): Add `global' argument.
+ (FT_Get_TrueType_Engine_Type): Updated.
+
+ * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated.
+
+ * include/freetype/internal/ftobjs.h: Updated.
+ * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE):
+ Updated.
+
+2016-12-14 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning.
+
+2016-12-14 Dave Arnold <darnold@adobe.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [sfnt, cff] Minor preparations.
+
+ * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR,
+ TTAG_VVAR): New SFNT table tags.
+
+ * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast.
+
+2016-12-10 Werner Lemberg <wl@gnu.org>
+
+ [truetype, type1] Add `get_var_blend' to MM service.
+
+ For internal use; we want to share code between the forthcoming CFF2
+ support and TrueType.
+
+ * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
+ New typedef.
+ (MultiMasters): Add `get_var_blend'.
+ (FT_Service_MultiMasters): Updated.
+
+ * src/truetype/ttgxvar.c (tt_get_var_blend): New function.
+ * src/truetype/ttgxvar.h: Updated.
+
+ * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
+ * src/type1/t1driver.c (t1_service_multi_masters): Updated.
+
+2016-12-10 Werner Lemberg <wl@gnu.org>
+
+ [truetype, type1] Add `done_blend' to MM service.
+
+ For internal use; we want to share code between the forthcoming CFF2
+ support and TrueType.
+
+ * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func):
+ New typedef.
+ (MultiMasters): Add `done_blend'.
+ (FT_Service_MultiMasters): Updated.
+
+ * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument.
+ * src/truetype/ttgxvar.h: Updated.
+
+ * src/truetype/ttobjs.c (TT_Face_Done): Updated.
+
+ * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
+ * src/type1/t1driver.c (t1_service_multi_masters): Updated.
+
+2016-12-09 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Revert change from 2016-12-08.
+
+ I missed the functionality of `ft_module_get_service', which makes
+ the change unnecessary.
+
+2016-12-08 Werner Lemberg <wl@gnu.org>
+
+ Add framework to support services with 8 functions.
+
+ We will need this for CFF variation font support.
+
+ * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8):
+ New macro.
+
+2016-12-08 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface.
+
+ CFF2 fonts will need access to those two functions.
+
+ * include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H.
+ (SFNT_Interface): Add `get_glyph_name' and `get_name_index' members.
+ (FT_DEFINE_SFNT_INTERFACE): Updated.
+
+ * src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index):
+ Fix signatures to exactly correspond to the glyph dict service
+ function typedefs.
+ (sfnt_interface): Updated.
+
+2016-12-06 Dave Arnold <darnold@adobe.com>
+
+ Add `FT_Get_Var_Design_Coordinates' function.
+
+ Note that the low-level functions aren't implemented yet.
+
+ * include/freetype/ftmm.h: Declare.
+
+ * include/freetype/internal/services/svmm.h
+ (FT_Get_Var_Design_Func): New typedef.
+ (MultiMasters): New MM service function `get_var_design'.
+ (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
+ Update all callers.
+
+ * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement.
+
+ * src/truetype/ttdriver.c: Updated.
+
+ * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to
+ handle `get_var_design' service.
+ * src/truetype/ttgxvar.h: Updated.
+
+ * src/type1/t1driver.c: Updated.
+
+ * src/type1/t1load.c (T1_Get_Var_Design): New dump function to
+ handle `get_var_design' service.
+ * src/type1/t1load.h: Updated.
+
+2016-12-06 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_subrs): Fix memory leak.
+
+ The `subrs' keyword might erroneously occur multiple times.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231
+
+2016-12-01 Werner Lemberg <wl@gnu.org>
+
+ [gzip] Improve building with external zlib (#49673).
+
+ Building FreeType with external zlib 1.2.8 makes msvc 14 stop with
+ the following error.
+
+ ftgzip.c
+ zlib-1.2.8\zlib.h(86): error C2061:
+ syntax error: identifier 'z_const'
+ zlib-1.2.8\zlib.h(94): error C2054:
+ expected '(' to follow 'z_const'
+ zlib-1.2.8\zlib.h(94): error C2085:
+ 'msg': not in formal parameter list
+ ...
+ zlib-1.2.8\zlib.h(877): fatal error C1003:
+ error count exceeds 100; stopping compilation
+
+ The error happens because FreeType keeps an own copy of zlib-1.1.4
+ under `src/gzip'. When building `src/gzip/ftgzip.c' with
+ FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses
+
+ #include <zlib.h>
+
+ which correctly finds an external `zlib.h', but `zlib.h' itself has
+ a line
+
+ #include "zconf.h"
+
+ which makes Visual Studio 2015 find `src/gzip/zconf.h' while
+ compiling the files in `src/gzip'.
+
+ * src/gzip/zconf.h: Rename to...
+ * src/gzip/ftzconf.h: ... this.
+ * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated.
+
+2016-12-01 Oleksandr Chekhovskyi <oleksandr.chekhovskyi@gmail.com>
+
+ [autofit] Fix Emscripten crash (patch #9180).
+
+ Function calls through pointers must use a matching signature to
+ work on Emscripten, since such calls are dispatched through lookup
+ tables grouped by signature.
+
+ * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix
+ typedef.
+
+2016-11-29 Werner Lemberg <wl@gnu.org>
+
+ [smooth] Revert previous commit. Already fixed with 6ca54c64.
+
+2016-11-29 Werner Lemberg <wl@gnu.org>
+
+ [smooth] Avoid conditional jump on uninitialized value (#49711).
+
+ * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'.
+
+2016-11-27 Nikolaus Waxweiler <madigens@gmail.com>
+
+ [autofit] Code shuffling.
+
+ Also improve some comments and remove unused code.
+
+ No functional change.
+
+ * src/autofit/afloader.c (af_loader_load_g): Merged with...
+ (af_loader_load_glyph): ...this function.
+ Split off emboldening code into...
+ (af_loader_embolden_glyph_in_slot): ... this function.
+
+2016-11-17 Werner Lemberg <wl@gnu.org>
+
+ Better support of LLP64 systems with gcc (and clang).
+
+ * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'.
+
+ * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and
+ suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'.
+
+2016-11-10 Werner Lemberg <wl@gnu.org>
+
+ Fix `lcd_weights' array size.
+
+ * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it.
+
+ Reported by Nikolaus.
+
+2016-11-06 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing.
+
+2016-11-06 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format.
+
+ It's unavoidable to call the PNG engine, but to get the metrics it
+ is sufficient to read the PNG image's header only.
+
+ * src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the
+ allocation of the glyph slot.
+ * src/sfnt/pngshim.h: Updated.
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_png,
+ tt_face_load_sbix_image, tt_face_load_sbit_image): Updated.
+
+2016-11-06 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Speed up `sbix' lookup.
+
+ This also fixes a bug introduced in 2016-10-01 which prevents
+ display of embedded bitmap fonts that use the `sbix' format.
+
+ * src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and
+ offset also in `ebdt_size' and `ebdt_start', respectively. This
+ makes the test for an embedded bitmap data table succeed for this
+ format.
+
+ (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Use
+ `ebdt_size' and `ebdt_start'
+ (tt_face_load_sbix_image): Ditto.
+
+2016-11-06 Seigo Nonaka <nona@google.com>
+ Werner Lemberg <wl@gnu.org>
+
+ Introduce a way of quickly retrieving (embedded) bitmap metrics.
+
+ `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph
+ until the user calls `FT_Render_Glyph'. However, it always
+ allocates memory for bitmaps and copies or decodes the contents of a
+ bitmap glyph, which can be quite slow for PNG data.
+
+ * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New
+ macro.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if
+ FT_LOAD_BITMAP_METRICS_ONLY is used.
+
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap,
+ tt_sbit_decoder_load_bitmap): Add argument to control allocation of
+ the glyph slot.
+ (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound,
+ tt_face_load_sbit_image): Updated.
+
+ * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if
+ `FT_LOAD_BITMAP_METRICS_ONLY' is set.
+
+ * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add
+ argument to control allocation of the glyph slot.
+ * src/pfr/pfrobjs (pfr_slot_load): Updated.
+
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
+
+ * docs/CHANGES: Updated.
+
+2016-11-06 Werner Lemberg <wl@gnu.org>
+
+ Synchronize with gnulib (#49448).
+
+ * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
+ builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in
+ current version of `intprops.h'.
+ Other minor synchronization to reduce code differences between the
+ three files.
+
+2016-11-03 Behdad Esfahbod <behdad@behdad.org>
+
+ [truetype] Clamp variation requests to valid range.
+
+ This is required by OpenType 1.8; it also avoids rounding surprises.
+
+ * src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates
+ outside of the allowed range to always stay within the range instead
+ of producing an error.
+
+2016-10-29 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Remove clang warnings.
+
+ * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for
+ loop counter handling.
+
+ * src/truetype/ttinterp.c: Updated.
+ (Ins_SCANTYPE): Use signed constant.
+ (TT_RunIns): Ensure `num_twilight_points' is 16bit.
+
+2016-10-27 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix commit from 2014-11-24.
+
+ Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
+
+ * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking
+ logic.
+
+2016-10-26 Werner Lemberg <wl@gnu.org>
+
+ Add `FT_Get_{MM,Var}_Blend_Coordinates' functions.
+
+ * include/freetype/ftmm.h: Declare.
+
+ * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func):
+ New typedef.
+ (MultiMasters): New MM service function `get_mm_blend'.
+ (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
+ Update all callers.
+
+ * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates,
+ FT_Get_Var_Blend_Coordinates): Implement.
+
+ * src/truetype/ttdriver.c: Updated.
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle
+ `get_mm_blend' service.
+ * src/truetype/ttgxvar.h: Updated.
+
+ * src/type1/t1driver.c: Updated.
+
+ * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle
+ `get_mm_blend' service.
+ * src/type1/t1load.h: Updated.
+
+ * docs/CHANGES: Document.
+
+2016-10-26 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_subrs): Fix limit check.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81
+
+2016-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [cff] Correct cmap format reporting (#24819).
+
+ * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic
+ charmap instead of guessing its format and language.
+
+2016-10-22 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix SCANTYPE instruction (#49394).
+
+ * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits.
+
+2016-10-22 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Improve handling of invalid post 2.5 tables [#49393].
+
+ * src/sfnt/ttpost.c (load_format_25): We need at least a single
+ table entry.
+
+2016-10-14 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix handling of `cvar' table data.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53
+
+ * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT
+ indices.
+
+2016-10-11 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Fix handling of invalid flex subrs.
+
+ Problem reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <op_callothersubr>: Set `flex_state' after error checking.
+
+2016-10-11 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation.
+
+2016-10-08 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidload.c (cid_face_open): Properly propagate `error'.
+
+2016-10-08 Werner Lemberg <wl@gnu.org>
+
+ [cid] Fix parsing of subr offsets.
+
+ Bug introduced 2016-05-16.
+
+ * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error.
+
+2016-10-01 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Disable bitmap strikes if we don't have a bitmap data table.
+
+ * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have
+ a bitmap data table.
+
+2016-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Remove impossibility.
+
+ * src/smooth/ftgrays.c (TWorker): Rearrange fields.
+ (gray_convert_glyph): Remove impossible condition and clean up.
+
+2016-09-29 Werner Lemberg <wl@gnu.org>
+
+ [pcf] Enrich family name with foundry name and glyph width info.
+
+ This is a very old patch from openSuSE (from 2006, submitted to
+ FreeType in 2011) that I forgot to apply.
+
+ https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch
+
+ Prepend the foundry name plus a space to the family name. There are
+ many fonts just called `Fixed' which look completely different, and
+ which have nothing to do with each other. When selecting `Fixed' in
+ KDE or Gnome one gets results that appear rather random, the style
+ changes often if one changes the size and one cannot select some
+ fonts at all.
+
+ We also check whether we have `wide' characters; all put together,
+ we get family names like `Sony Fixed' or `Misc Fixed Wide'.
+
+ * src/pcf/pcfread.c (pcf_load_font): Implement it.
+
+ * docs/CHANGES: Document it.
+
+2016-09-29 Werner Lemberg <wl@gnu.org>
+
+ [ftfuzzer] Speed up.
+
+ * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't
+ check for embedded bitmaps if we have a non-default instance.
+
+2016-09-29 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Disallow bitmap strikes for non-default instances.
+
+ Also speed up access of default instances if GX variations are
+ active.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Add
+ `is_default_instance' member.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Initialize
+ `is_default_instance'.
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+ load_truetype_glyph): Add test for default instance.
+ (TT_Load_Glyph): Load embedded bitmaps for default instance only.
+
+ * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute
+ `is_default_instance'.
+
+2016-09-29 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Clean up `TT_Face' structure.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused
+ fields `horz_metrics' and `vert_metrics'.
+ Update documentation.
+
+ * src/sfnt/sfobjs.c (sfnt_done_face): Updated.
+
+2016-09-28 Werner Lemberg <wl@gnu.org>
+
+ More FT_ZERO usage.
+
+ * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
+ s/ft_memset/FT_MEM_ZERO/.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
+ s/ft_memset/FT_ARRAY_ZERO/.
+
+ * src/raster/ftraster.c (FT_ZERO): Define.
+ (ft_black_new): Use it.
+ * src/raster/ftrend1.c (ft_raster1_get_cbox):
+ s/FT_MEM_ZERO/FT_ZERO/.
+
+ * src/smooth/ftgrays.c (FT_ZERO): Define.
+ (gray_raster_new): Use it.
+ * src/smooth/ftsmooth.c (ft_smooth_get_cbox):
+ s/FT_MEM_ZERO/FT_ZERO/.
+
+2016-09-28 Werner Lemberg <wl@gnu.org>
+
+ */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
+
+2016-09-27 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Trace number of executed opcodes.
+
+ * src/truetype/ttinterp.c (TT_RunIns): Implement it.
+
+2016-09-27 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Speed up `TT_Load_Glyph'.
+
+ This avoids additional calls to `tt_face_lookup_table' for the
+ `glyf' table, which can be expensive.
+
+ * include/freetype/internal/tttypes.h (TT_LoaderRec): Move
+ `glyf_offset' field to ...
+ (TT_FaceRec): ... this structure.
+ * src/truetype/ttgload.c (load_truetype_glyph): Updated.
+ (tt_loader_init): Move initialization of `glyf_offset' to ...
+ * src/truetype/ttpload.c (tt_face_load_loca): ... this function.
+
+2016-09-27 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Introduce dynamic limits for some bytecode opcodes.
+
+ This speeds up FreeType's handling of malformed fonts.
+
+ * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number
+ of twilight points, the total number of negative jumps, and the
+ total number of loops in LOOPCALL opcodes. The values are based on
+ the number of points and entries in the CVT table.
+ (Ins_JMPR): Test negative jump counter.
+ (Ins_LOOPCALL): Test loopcall counter.
+
+ * src/truetype/ttinterp.h (TT_ExecContext): Updated.
+
+ * docs/CHANGES: Updated.
+
+2016-09-25 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Sanitize only last entry of `loca' table.
+
+ Without this patch, a loca sequence like `0 100000 0 100000 ...',
+ where value 100000 is larger than the `glyf' table size, makes
+ FreeType handle the whole `glyf' table as a single glyph again and
+ again, which is certainly invalid (and can be very slow, too).
+
+ * src/truetype/ttpload.c (tt_face_get_location): Implement.
+ Improve tracing messages.
+
+2016-09-25 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo.
+
+2016-09-24 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Tracing fixes.
+
+ * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping
+ functions only if we actually do tracing.
+
+2016-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Reduce divisions in the line renderer.
+
+ We don't need some divisions if a line segments stays within a single
+ row or a single column of pixels.
+
+ * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions
+ conditional.
+
+2016-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table.
+
+2016-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Another tiny speed-up.
+
+ * src/smooth/ftgrays.c (gray_find_cell): Merge into...
+ (gray_record_cell): ... this function.
+
+2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code.
+
+2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Fix valgrind warning and reoptimize.
+
+ The algorithm calls `gray_set_cell' at the start of each new contour
+ or when the contours cross the cell boundaries. Double-checking for
+ that is wasteful.
+
+ * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell.
+ (gray_convert_glyph): Remove initialization introduced by 44b172e88.
+
+2016-09-10 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix previous commit.
+
+ Problems reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40
+
+ We now map the strike index right before accessing the physical
+ data, not earlier.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map'
+ after creating the map so that...
+
+ * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function
+ can be used before and after setting up `sbit_strike_map'.
+ (tt_face_set_sbit_strike): Revert change.
+ (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index.
+
+ * src/truetype/ttdriver.c (tt_size_select): Revert change.
+
+2016-09-09 Werner Lemberg <wl@gnu.org>
+
+ [ftfuzzer] Minor improvements.
+
+ * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore
+ invalid strikes.
+ Use better values for call to `FT_Set_Char_Size'.
+
+2016-09-09 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Don't provide (completely) broken strike data.
+
+ FreeType tries to sanitize strike header data; we now reject
+ completely broken ones.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): New
+ `sbit_strike_map' array pointer.
+
+ * src/base/ftobjs.c (FT_Match_Size): Reject matches where either
+ width or height would be zero.
+ Add tracing message in case of error.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map',
+ only using (more or less) valid strike header data for
+ FT_Face's `available_sizes' array.
+ (sfnt_done_face): Updated.
+
+ * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use
+ `sbit_strike_map'.
+ (tt_face_load_strike_metrics): Improve tracing.
+
+ * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'.
+
+2016-09-08 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.7 released.
+ =======================
+
+
+ Tag sources with `VER-2-7'.
+
+ * docs/VERSION.TXT: Add entry for version 2.7.
+
+ * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2005/index.html,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2008/index.html,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/index.html,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/index.html,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/index.html,
+ builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2005-ce/index.html,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/.
+
+ * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7.
+ (FREETYPE_PATCH): Set to 0.
+
+ * builds/unix/configure.raw (version_info): Set to 18:6:12.
+ * CMakeLists.txt (VERSION_MINOR): Set to 7.
+ (VERSION_PATCH): Set to 0.
+
+ * docs/CHANGES: Updated.
+
+2016-09-08 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttinterp.c: Include `ttgxvar.h'.
+
+ This fixes the `multi' build.
+
+2016-09-08 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Another improvement to Armenian support.
+
+ Suggested by Hrant H Papazian <hpapazian@gmail.com>.
+
+ * src/autofit/afscript.h: Use better suited characters to derive
+ default stem widths.
+
+2016-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/smooth/ftgrays.c (gray_hline): Micro-optimize.
+
+2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Operate in absolute bitmap coordinates.
+
+ Simpler bitmap addressing improves performance by 1.5%.
+
+ * src/smooth/ftgrays.c (gray_TWorker): Remove count fields.
+ (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline,
+ gray_sweep, gray_convert_glyph, gray_raster_render): Updated.
+
+2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Improve contour start (take 2).
+
+ * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
+ instead of...
+ (gray_start_cell): ... this function, which is removed.
+ (gray_convert_glyph): Make initial y-coordinate invalid.
+
+2016-09-06 Werner Lemberg <wl@gnu.org>
+
+ [type1] MM fonts support exactly zero named instances (#48748).
+
+ * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero.
+
+2016-09-06 Jonathan Kew <jfkthame@gmail.com>
+
+ [cff] Fix uninitialized memory.
+
+ Problem reported as
+
+ https://bugzilla.mozilla.org/show_bug.cgi?id=1270288
+
+ * src/cff/cf2intrp.c (cf2_interpT2CharString): Initialize `storage'
+ array to handle a `get' opcode without a previous `put'.
+
+2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert.
+
+2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Improve contour start.
+
+ * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
+ instead of...
+ (gray_start_cell): ... this function, which is removed.
+
+2016-09-05 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix memory initialization.
+
+ * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q'
+ variants of FreeType's memory allocation macros don't do zeroing.
+
+2016-09-05 Werner Lemberg <wl@gnu.org>
+
+ [ftrandom] Minor improvements.
+
+ * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
+ 500.
+
+ * src/tools/ftrandom/Makefile (CFLAGS): Split off include
+ directories to ...
+ (INCLUDES): ... this new variable.
+ (LDFLAGS): New variable.
+ (ftrandom.o, ftrandom): Updated.
+
+2016-09-05 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve Armenian support.
+
+ Thanks to Hrant H Papazian <hpapazian@gmail.com> for help.
+
+ * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve
+ selection of characters.
+
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+2016-09-04 Werner Lemberg <wl@gnu.org>
+
+ [ftrandom] Improve Makefile.
+
+ It now supports both a normal build (`./configure && make') and a
+ development build (`make devel').
+
+ * src/tools/ftrandom/Makefile (VPATH): Set it so that
+ `libfreetype.a' gets searched in both `objs' (for the development
+ build) and `objs/.libs' (for a normal build which uses libtool).
+ (LIBS): Add missing libraries.
+ (ftrandom.o): New rule.
+ (ftrandom): Use automatic variables.
+
+2016-09-03 Werner Lemberg <wl@gnu.org>
+
+ [truetype] More fixes for handling of GX deltas.
+
+ Problems reported by Bob Taylor <Bob.Taylor@monotype.com>.
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough
+ sanity test for glyph variation array header size.
+ Always set stream position before reading packed x and y deltas.
+ Fix thinko w.r.t. `localpoints' array.
+
+2016-09-03 Werner Lemberg <wl@gnu.org>
+
+ [ftrandom] Various fixes.
+
+ * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better
+ default.
+ (error_fraction): Make it of type `double' to work as advertized –
+ this was completely broken.
+ Update all related code.
+ (error_count, fcnt): Make it unsigned to fix compiler warnings.
+ Update all related code.
+ (fontlist): Change `len' member to `long' to fix compiler warnings.
+ (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag
+ unused variables.
+ (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings.
+ (ExecuteTest): Ditto.
+ Call `FT_Done_FreeType'.
+ (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned
+ int'.
+ (usage): Improve output.
+ (main): Fix compiler warnings.
+
+ * src/tools/ftrandom/README: Updated.
+
+2016-09-03 Werner Lemberg <wl@gnu.org>
+
+ [base] Avoid negative bitmap strike dimensions (#48985).
+
+ * src/base/ftobjs.c (FT_Open_Face): Check whether negation was
+ actually successful. For example, this can fail for value
+ -32768 if the type is `signed short'. If there are problems,
+ disable the strike.
+
+2016-09-03 Werner Lemberg <wl@gnu.org>
+
+ [cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
+
+ * src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
+
+2016-09-02 Werner Lemberg <wl@gnu.org>
+
+ [unix] Enable 64bit support in file system access (#48962).
+
+ * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'.
+
+2016-09-02 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Avoid left shift of negative value (#48980).
+
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned
+ constant.
+
+2016-09-02 Werner Lemberg <wl@gnu.org>
+
+ * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
+
+2016-09-02 Werner Lemberg <wl@gnu.org>
+
+ Some preparations for the next release.
+
+ * include/freetype/config/ftoption.h
+ (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable.
+
+ * docs/CHANGES: Updated.
+
+2016-09-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Simplify span rendering more.
+
+ It turns out that there is significant cost associated with `FT_Span'
+ creation and calls to `gray_render_span' because it happens so
+ frequently. This removes these steps from our internal use but leaves
+ it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain
+ is about 5%.
+
+ * src/smooth/ftgrays.c (gray_render_span): Removed. The code is
+ migrated to...
+ (gray_hline): ... here.
+
+2016-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Streamline pixmap drawing a bit more.
+
+ Zero coverage is unlikely (1 out of 256) to warrant checking. This
+ gives 0.5% speed improvement in rendering simple glyphs.
+
+ * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
+
+2016-08-29 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Streamline pixmap drawing.
+
+ This gives 2% speed improvement in rendering simple glyphs.
+
+ * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a
+ pointer to its bottom-left and pitch to be used in...
+ (gray_TWorker): ... here.
+ (gray_render_span): Move pixmap flow check from here...
+ (gray_raster_render): .. to here.
+
+2016-08-27 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Reduce stack of band boundaries.
+
+ * src/smooth/ftgrays.c (gray_TBand): Removed.
+ (gray_convert_glyph): Updated to stack band boundaries concisely.
+
+2016-08-26 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
+
+2016-08-26 Werner Lemberg <wl@gnu.org>
+
+ [cid] Fix commit from 2016-05-16.
+
+ * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
+
+2016-08-26 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Cache offset and size to bitmap data table.
+
+ This commit avoids `EBDT' and friends being looked up again and
+ again while loading a single embedded bitmap.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec)
+ [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and
+ `ebdt_size'.
+
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ...
+ (tt_face_load_sbit): ... this function; also store the table size
+ and offset.
+
+2016-08-26 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks.
+
+2016-08-26 Werner Lemberg <wl@gnu.org>
+
+ [type1] Fix heap buffer overflow.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
+
+ * src/type1/t1load.c (parse_charstrings): Reject fonts that don't
+ contain glyph names.
+
+2016-08-25 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix previous commit (#48901).
+
+ * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
+
+2016-08-25 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Speed up handling of invalid format 4 cmaps.
+
+ * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add
+ tests for `num_glyph' from `tt_cmap4_char_map_linear'.
+
+2016-08-25 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftdriver.h: Remove unused typedefs.
+
+2016-08-22 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Simplify span rendering.
+
+ This removes unnecessary complexity of span merging and buffering.
+ Instead, the spans are rendered as they come, speeding up the
+ rendering by about 5% as a result.
+
+ * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
+ (gray_TWorker): Remove span buffer and related fields.
+ (gray_sweep, gray_hline): Updated.
+
+ * include/freetype/ftimage.h: Remove documentation note about
+ `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
+
+2016-08-16 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix `MPS' instruction.
+
+ According to Greg Hitchcock, MPS in DWrite really returns the point
+ size.
+
+ * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member.
+
+ * src/truetype/ttdriver.c (tt_size_request): Set `point_size'.
+
+ * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize'
+ member.
+
+ * src/truetype/ttinterp.c (TT_Load_Context): Updated.
+ (Ins_MPS): Fix instruction.
+
+2016-08-16 Werner Lemberg <wl@gnu.org>
+
+ [lzw] Optimize last commit.
+
+ * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into
+ conditional clause.
+
+2016-08-16 Werner Lemberg <wl@gnu.org>
+
+ [lzw] Avoid invalid left shift.
+
+ Reported as
+
+ https://bugzilla.mozilla.org/show_bug.cgi?id=1295366
+
+ * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
+
+2016-08-16 Werner Lemberg <wl@gnu.org>
+
+ [lzw] Avoid buffer overrun.
+
+ Reported as
+
+ https://bugzilla.mozilla.org/show_bug.cgi?id=1273283
+
+ * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't
+ underflow.
+
+2016-08-16 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix compiler warning.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Add cast.
+
+2016-08-13 Werner Lemberg <wl@gnu.org>
+
+ [winfonts] Avoid zero bitmap width and height.
+
+ Reported as
+
+ https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
+
+ * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
+ (FNT_Load_Glyph): Check for zero pitch.
+
+2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
+
+2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
+
+2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
+
+2016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com>
+
+ * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
+
+2016-08-10 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Use correct type for `italicAngle' field (#48732).
+
+ * src/sfnt/ttload.c (tt_face_load_post): Fix types.
+
+2016-08-06 Jon Spencer <jon@jonspencer.ca>
+
+ [sfnt] Fix `FT_Get_Advance' for bitmap strikes.
+
+ `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the
+ advance value from the font table and then scales it by the
+ `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't
+ set that value for bitmap fonts and the advance gets scaled to zero.
+
+ Taken from
+
+ https://github.com/behdad/harfbuzz/issues/252
+
+ * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
+ <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
+
+2016-08-06 Behdad Esfahbod <behdad@behdad.org>
+
+ [truetype] Fix GX variation handling of composites.
+
+ * src/truetype/ttgload.c (load_truetype_glyph)
+ [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
+
+2016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Minor refactoring.
+
+ * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
+ Updated.
+
+2016-07-29 Werner Lemberg <wl@gnu.org>
+
+ [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
+
+ Since 2016-05-16 we detect infinite recursion directly.
+
+ * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
+ `maxComponentDepth'.
+ * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
+ `maxComponentDepth' is not valid. Instead, simply adjust its value
+ and emit a tracing message.
+
+2016-07-26 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
+
+ No functional change.
+
+2016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net>
+
+ [truetype] Record the end of IDEFs.
+
+ To match the logic in FDEF. The value of the end is only used for
+ bound-checking in `Ins_JMPR', so it may not have been obvious that
+ it was not recorded. Tested (as part of Font Validator 2.0) all the
+ fonts on Fedora and did not see any change.
+
+ * src/truetype/ttinterp.c (Ins_IDEF): Updated.
+
+2016-07-19 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Sanitizer fix, second try.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
+ tests and use only one slot more.
+
+2016-07-19 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Sanitizer fix.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
+ to fix nested loops.
+
+2016-07-18 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Make GETDATA work only for GX fonts.
+
+ * src/truetype/ttinterp.c (opcode_name): Updated.
+ (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
+ (TT_RunIns): Updated.
+
+2016-07-17 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Add support for Apple's
+
+ GETDATA[], opcode 0x92
+
+ bytecode instruction. It always returns 17, and we have absolutely
+ no idea what it is good for...
+
+ * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
+ (Ins_GETDATA): New function.
+ (TT_RunIns): Add it.
+
+2016-07-16 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Add bytecode support for GX variation fonts.
+
+ This commit implements undocumented (but confirmed) stuff from
+ Apple's old bytecode engine.
+
+ GETVARIATION[], opcode 0x91
+ This opcode pushes normalized variation coordinates for all axes
+ onto the stack (in 2.14 format). Coordinate of first axis gets
+ pushed first.
+
+ GETINFO[], selector bit 3
+ If GX variation support is enabled, bit 10 of the result is set
+ to 1.
+
+ * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
+ (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
+ (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
+ bit 3, checking support for variation glyph hinting.
+ (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
+ to implement opcode 0x91.
+ (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
+
+2016-07-16 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix GETINFO bytecode instruction.
+
+ * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
+ stretching information.
+
+2016-07-16 Behdad Esfahbod <behdad@behdad.org>
+
+ [truetype] Make all glyphs in `Zycon' GX font work.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
+ tests.
+
+2016-07-16 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix GX delta tracing.
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
+ relative point movements.
+
+2016-07-16 Behdad Esfahbod <behdad@behdad.org>
+
+ [truetype] More fixes for GX.
+
+ This finally fixes the rendering of the cyclist and the lizard in
+ the `Zycon' font.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
+ index is always cumulative.
+
+ (tt_handle_deltas): Rename to...
+ (tt_interpolate_deltas): ... This.
+ Add new parameter for output point array.
+ Update caller.
+
+ (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
+ the intermediate results of `tt_interpolate_deltas' that are to be
+ added to `outline->points'.
+
+2016-07-15 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
+
+ `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
+
+ Reported by Alexei.
+
+2016-07-16 Nikolaus Waxweiler <madigens@gmail.com>
+
+ * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
+
+ Problem reported by Hin-Tak Leung.
+
+2016-07-15 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Update and improve segment and edge tracing.
+
+ * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
+ `delta' also.
+ Don't show first point of segment as a replacement for `pos'; this
+ is (a) misleading, since the difference to `pos' can be almost
+ arbitrarily large in corner cases, and (b) it is better to have all
+ segment data in font units instead of a single value given in output
+ space coordinates.
+ Improve layout.
+ (af_glyph_hints_dump_edges): Show px->units and units->px conversion
+ values for convenience.
+ Improve layout.
+
+2016-07-15 Werner Lemberg <wl@gnu.org>
+
+ [autofit] For edges, reject segments wider than 1px (#41334).
+
+ * src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
+
+ * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
+ `delta'.
+ (af_latin_hints_compute_edges): Reject segments with a delta larger
+ than 0.5px.
+
+2016-07-14 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
+
+2016-07-14 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix `face_index' value in `FT_Face' for named instances.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Don't strip off higher 16bits.
+
+2016-07-14 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
+
+2016-07-14 Behdad Esfahbod <behdad@behdad.org>
+
+ [truetype] Fix gxvar delta interpolation.
+
+ The coordinates of the base font should be used for interpolation
+ purposes, NOT the current points (i.e., the result of accumulation
+ of previous deltas).
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
+ `points_org' before looping over all tuples.
+
+
+----------------------------------------------------------------------------
+
+Copyright 2016-2018 by
+David Turner, Robert Wilhelm, and Werner Lemberg.
+
+This file is part of the FreeType project, and may only be used, modified,
+and distributed under the terms of the FreeType project license,
+LICENSE.TXT. By continuing to use, modify, or distribute this file you
+indicate that you have read the license and understand and accept it
+fully.
+
+
+Local Variables:
+version-control: never
+coding: utf-8
+End:
diff --git a/modules/freetype2/ChangeLog.28 b/modules/freetype2/ChangeLog.28
new file mode 100644
index 000000000..ca1ff3850
--- /dev/null
+++ b/modules/freetype2/ChangeLog.28
@@ -0,0 +1,3136 @@
+2017-09-16 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.8.1 released.
+ =========================
+
+
+ Tag sources with `VER-2-8-1'.
+
+ * docs/VERSION.TXT: Add entry for version 2.8.1.
+ * docs/CHANGES: Updated.
+
+ * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2005/index.html,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2008/index.html,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/index.html,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/index.html,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/index.html,
+ builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2005-ce/index.html,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/index.html: s/2.8/2.8.1/, s/28/281/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
+
+ * builds/unix/configure.raw (version_info): Set to 21:0:15.
+ * CMakeLists.txt (VERSION_PATCH): Set to 1.
+
+2017-09-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [sfnt] lowest gcc for vectors (e1d0249e) is changed to 4.7.
+
+ __builtin_shuffle() was introduced in gcc-4.7. The lowest
+ gcc to enable vector operation is delayed from 4.6 to 4.7.
+
+ * src/sfnt/pngshim.c (premultiply_data): Fix cpp-macro to
+ enable the vector operation, to change the lowest gcc version
+ from 4.6 to 4.7.
+
+2017-09-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] Fix a possible overflow by signed integer comparison.
+
+ Improve the code by 5d3ff05615dda6d1325ed612381a17a0df04c975 ,
+ issues are found by Behdad Esfahbod and Werner Lemberg.
+
+ * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Replace
+ a subtraction to check higher bit by a bit operation,
+ and cpp-conditionalize for appropriate systems. Add better
+ documentation to the comment.
+ (FTC_ImageCache_LookupScaler): Ditto.
+ (FTC_SBitCache_Lookup): Ditto.
+ (FTC_SBitCache_LookupScaler): Ditto.
+
+2017-09-13 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Really fix #41334 (#52000).
+
+ * src/autofit/aflatin.c (af_latin_hints_compute_segments): Set
+ `segment->delta' everywhere.
+
+2017-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [autofit, sfnt] Fix for `make multi'.
+
+ * src/autofit/afshaper.c: Include FT_ADVANCE_H, to use
+ FT_Get_Advance() in it.
+ * src/sfnt/ttcmap.c: Include FT_SERVICE_POSTSCRIPT_CMAPS_H
+ to use PS_Unicodes in it, also include `ttpost.h' to use
+ tt_face_get_ps_name() in it.
+
+2017-09-11 Azzuro <azzuro@team-mediaportal.com>
+
+ [build] Improve builds with different MS Visual Studio versions.
+
+ * builds/windows/vc2010/freetype.vcxproj: Switch platform toolset
+ according to the Visual Studio version.
+
+2017-09-11 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttkern.c (tt_face_load_kern): Reject format 2 tables.
+
+ Reported by Behdad.
+
+2017-09-09 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve communication with ftgrid.
+
+ * src/autofit/afhints.c (af_glyph_hints_get_segment_offset):
+ Provide values in font units.
+
+2017-09-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [base] Remove a check for resource ID in the resource fork driver.
+
+ LastResort.dfont has a marginal resource ID 0xFFFF for sfnt
+ resource. Inside Macintosh: More Macintosh Toolbox, `Resource IDs'
+ (1-46), tells that some IDs are reserved and should not be used.
+ FreeType2 just uses resource ID to sort the fragmented resource.
+ To accept the marginal fonts, the checking is removed.
+
+ * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Remove res_id
+ validity check, fix a trace message format.
+
+2017-09-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [sfnt, truetype] Register the tags for marginal fonts.
+
+ The first 32bit of standard TrueType variants is 0x00010000,
+ `OTTO', `ttcf', `true' or `typ1'. 2 marginal dfonts on legacy Mac
+ OS X, Keyboard.dfont and LastResort.dfont, have the sfnt resources
+ starting 0xA5 followed by `kbd' or `lst'. Considering the following
+ data could be parsed as conventional TrueType fonts, the header
+ checking is updated to allow these tags. It seems that recent Mac
+ OS X has already switched to normal TTF for these fonts.
+
+ See the discussion at
+ http://u88.n24.queensu.ca/exiftool/forum/index.php?topic=3931.0
+
+ * include/freetype/tttags.h (TTAG_0xA5kbd, TTAG_0xA5lst): New header
+ tags for Keyboard.dfont and LastResort.dfont.
+ * src/sfnt/sfobjs.c (sfnt_open_font): Accept the sfnt resource
+ starts with TTAG_0xA5kbd or TTAG_0xA5lst.
+ * src/truetype/ttobjs.c (tt_face_init): Accept the face with the
+ format tag is TTAG_0xA5kbd or TTAG_0xA5lst.
+
+2017-09-05 Werner Lemberg <wl@gnu.org>
+
+ Fix multiple calls of `FT_Bitmap_Convert'.
+
+ The documentation of `FT_Bitmap_Convert' says that multiple calls do
+ proper reallocation of the target FT_Bitmap object. However, this
+ failed for the sequence
+
+ non-empty bitmap
+ empty bitmap
+ non-empty bitmap
+
+ Reason was that `FT_Bitmap_Convert' only reallocated the bitmap
+ buffer if it became too small; it didn't make the buffer smaller.
+ For an empty bitmap following a non-empty one, only the buffer
+ dimension got set to zero, without deallocation. If the next call
+ was a non-empty buffer again, an assertion in `ft_mem_qrealloc' was
+ triggered.
+
+ * src/base/ftbitmap.c (FT_Bitmap_Convert): Always reallocate target
+ buffer to the correct size.
+
+ * docs/CHANGES: Document it.
+
+2017-09-05 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix size and resolution handling.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Use `SIZE' values if
+ `POINT_SIZE', `RESOLUTION_X', or `RESOLUTION_Y' properties are
+ missing.
+
+ * docs/CHANGES: Document it.
+
+2017-08-25 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Swap `ALLOC_MULT' arguments (#51833).
+
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Updated.
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Updated.
+ * src/raster/ftrend1.c (ft_raster1_render): Updated.
+
+2017-08-23 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix clang compilation (#51788).
+
+ * src/sfnt/pngshim.c (premultiply_data): Use vectors instead of
+ scalars.
+ (vector_shuffle): New macro to take care of a different built-in
+ function name on clang.
+
+2017-08-22 Werner Lemberg <wl@gnu.org>
+
+ [base] Don't zero out allocated memory twice (#51816).
+
+ Patch applied from bug report.
+
+ * src/base/ftutil.c (ft_mem_qrealloc): Use low-level allocation to
+ avoid unnecessary overhead.
+
+2017-08-22 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Integer overflow.
+
+ Changes triggered by
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3107
+
+ * src/truetype/ttinterp.c (Ins_MDRP, Ins_MIRP, Ins_ALIGNPTS): Use
+ NEG_LONG.
+
+2017-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [sfnt] Avoid synthetic unicode for symbol fonts with PUA.
+
+ Reported as
+
+ https://bugs.chromium.org/p/chromium/issues/detail?id=754574
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Check for FT_ENCODING_MS_SYMBOL.
+
+2017-08-16 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings.
+
+2017-08-15 Behdad Esfahbod <behdad@behdad.org>
+
+ [sfnt] Speed up PNG image loading.
+
+ This reduces the overhead of `premultiply_data' by 60%.
+
+ * src/sfnt/pngshim.c (premultiply_data): Provide code which uses
+ gcc's (and clang's) `vector_byte' attribute to process 4 pixels at a
+ time.
+
+2017-08-11 Werner Lemberg <wl@gnu.org>
+
+ [sfnt, truetype] Improve handling of missing sbits.
+
+ Requested by Behdad.
+
+ Modern bitmap-only SFNTs like `NotoColorEmoji.ttf' don't contain
+ entries in the bitmap strike(s) for empty glyphs. Instead, they
+ rely that a space glyph gets created from the font's metrics data.
+ This commit makes FreeType behave accordingly.
+
+ * include/freetype/fterrdef.h (FT_Err_Missing_Bitmap): New error
+ code.
+
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image): Change error codes
+ to make a distinction between a missing bitmap in a composite and a
+ simple missing bitmap.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): For a missing bitmap (in a
+ bitmap-only font), synthesize an empty bitmap glyph if metrics are
+ available.
+
+2017-08-10 Werner Lemberg <wl@gnu.org>
+
+ [base] Minor API improvement for default variation axis setting.
+
+ * src/base/ftmm.c (FT_Set_MM_Design_Coordinates,
+ FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
+ FT_Set_Var_Blend_Coordinates): Allow coords==NULL if num_coords==0.
+
+ * docs/CHANGES: Updated.
+
+2017-08-08 Werner Lemberg <wl@gnu.org>
+
+ [psnames] Really fix issue #49949.
+
+ We now use a separate preprocessor macro to handle both definition
+ and declaration of the glyph name arrays.
+
+ * src/psnames/psmodule.c (DEFINE_PS_TABLE_DATA): New macro.
+
+ * src/tools/glnames.py (StringTable::dump,
+ StringTable::dump_sublist): Use `DEFINE_PS_TABLE_DATA'.
+ (dump_encoding): Ditto.
+ (main): Use `wb' mode for writing the output file, which works on
+ Windows also.
+
+ * src/psnames/pstables.h: Regenerated.
+
+2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Harmony LCD rendering.
+
+ This is a new technology for LCD-optimized rendering. It capitalizes
+ on the fact that each color channel grid is shifted by a third of a
+ pixel. Therefore it is logical to render 3 separate monochrome
+ bitmaps shifting the outline by 1/3 pixel, and then combine them.
+ Importantly, the resulting output does not require additional LCD
+ filtering.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic)
+ [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Implement new LCD-optimized
+ rendering.
+
+ * include/freetype/ftlcdfil.h, include/freetype/freetype.h,
+ include/freetype/config/ftoption.h, devel/ftoption.h: Updated
+ documentation.
+
+2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up.
+
+2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/sfnt/ttpost.c (format): Use otspec-compliant versions.
+
+2017-08-05 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Integer overflow.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2868
+
+ * src/truetype/ttinterp.c (Ins_ALIGNRP): Use NEG_LONG.
+
+2017-08-05 Werner Lemberg <wl@gnu.org>
+
+ [base, truetype] New function `FT_Get_Var_Axis_Flags'.
+
+ The reserved `flags' field got a value in OpenType version 1.8.2;
+ unfortunately, the public `FT_Var_Axis' structure misses the
+ corresponding element. Since we can't add a new field, we add an
+ access function.
+
+ * src/base/ftmm.c (FT_Get_Var_Axis_Flags): New function.
+
+ * include/freetype/ftmm.h (FT_VAR_AXIS_FLAG_HIDDEN): New macro.
+ Updated.
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Increase allocated memory
+ of `mmvar' to hold axis flags.
+ Fill the axis flags array.
+
+ * docs/CHANGES: Updated.
+
+2017-08-03 Nikolaus Waxweiler <madigens@gmail.com>
+
+ [truetype] Fix metrics of B/W hinting in v40 mode.
+
+ Phantom points are now saved outside v40 backwards compatibility
+ mode. This fixes the jumping glyphs when switching between v35 and
+ v40 monochrome mode.
+
+ * src/truetype/ttgload.c (TT_Hint_Glyph): Fix inversed bool logic.
+
+2017-08-03 Nikolaus Waxweiler <madigens@gmail.com>
+
+ [truetype] Do not set any ClearType flags in v40 monochrome mode.
+
+ This fixes weird behavior of instructions that resulted in rendering
+ differences between v35 and v40 in monochrome mode, e.g., in
+ `timesbi.ttf'.
+
+ * src/truetype/ttinterp.c (Ins_GETINFO)
+ [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Check
+ `subpixel_hinting_lean'.
+
+2017-08-01 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko.
+
+2017-08-01 Behdad Esfahbod <behdad@behdad.org>
+
+ [truetype] Fix loading of named instances.
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Preserve file position
+ while loading the `avar' table.
+
+2017-08-01 Werner Lemberg <wl@gnu.org>
+
+ [sfnt, truetype] Minor adjustments for OpenType 1.8.2.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): The units per EM value has now
+ (tighter) limits.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): The new OpenType
+ version explicitly allows all negative values for the number of
+ contours if we have a composite glyph (this is for better backwards
+ compatibility I guess), but it still recommends value -1.
+
+2017-07-26 Werner Lemberg <wl@gnu.org>
+
+ [cff] Integer overflow.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2738
+
+ * src/cff/cf2hints.c (cf2_glyphpath_computeOffset,
+ cf2_glyphpath_curveTo): Use ADD_INT32.
+
+2017-07-13 Werner Lemberg <wl@gnu.org>
+
+ [base] Fix memory leak.
+
+ Reported as
+
+ https://bugs.chromium.org/p/chromium/issues/detail?id=738362
+
+ * src/base/ftglyph.c (FT_Get_Glyph): Do proper deallocation in case
+ of error.
+
+2017-07-12 Werner Lemberg <wl@gnu.org>
+
+ [base] Integer overflow.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2573
+
+ * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use
+ FT_PIX_CEIL_LONG and FT_PIX_ROUND_LONG.
+
+2017-07-12 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttpload.c (tt_face_get_location): Off-by-one typo.
+
+ Also improve tracing message.
+
+ Problem reported as
+
+ https://bugs.chromium.org/p/chromium/issues/detail?id=738919
+
+2017-07-07 Werner Lemberg <wl@gnu.org>
+
+ [cff] Integer overflow.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2517
+
+ * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32.
+
+2017-07-05 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttcmap.c (tt_cmap_unicode_class_rec): Fix warning.
+
+2017-07-05 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Fix warning (#51395).
+
+2017-07-04 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Prevent address overflow (#51365).
+
+ * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Add guard.
+
+2017-07-03 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/base/ftlcdfil.c (ft_lcd_filter_fir): Improve code.
+
+2017-07-03 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Integer overflow.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2455
+
+ * src/truetype/ttinterp.c (Ins_SCFS): Use SUB_LONG.
+
+2017-07-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Ignore No_Unicode_Glyph_Name.
+
+2017-06-28 Ben Wagner <bungeman@google.com>
+
+ Avoid Microsoft compiler warnings (#51331).
+
+ While clang's sanitizer recommends a cast to unsigned for safe
+ negation (to handle -INT_MIN), both MSVC and Visualc emit warning
+ C4146 if an unsigned value gets negated.
+
+ * include/freetype/internal/ftcalc.h (NEG_LONG, NEG_INT32),
+ src/base/ftcalc.c (FT_MOVE_SIGN): Replace negation with a
+ subtraction.
+
+2017-06-27 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffparse.c (do_fixed): Fix typo.
+
+ Spotted by chris <chris@gcjd.org>.
+
+2017-06-27 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2384
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2391
+
+ * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix): Use
+ NEG_LONG.
+
+ * src/truetype/ttinterp.c (Ins_SxVTL): Use NEG_LONG.
+
+2017-06-24 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2364
+
+ * src/truetype/ttinterp.c (Ins_ISECT): Use NEG_LONG.
+
+2017-06-22 Werner Lemberg <wl@gnu.org>
+
+ [cff, truetype] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2323
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2328
+
+ * src/cff/cf2blues.c (cf2_blues_capture): Use ADD_INT32 and
+ SUB_INT32.
+
+ * src/truetype/ttinterp.c (Ins_SDPVTL): Use SUB_LONG and NEG_LONG.
+
+2017-06-21 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [sfnt] Synthesize a Unicode charmap if one is missing.
+
+ * src/sfnt/ttcmap.h (tt_cmap_unicode_class_rec): Declare it.
+ * src/sfnt/ttcmap.c (tt_get_glyph_name, tt_cmap_unicode_init,
+ tt_cmap_unicode_done, tt_cmap_unicode_char_index,
+ tt_cmap_unicode_char_next, tt_cmap_unicode_class_rec): Implement
+ synthetic Unicode charmap class.
+ (tt_get_cmap_info): Make sure the callback is available.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face)
+ [FT_CONFIG_OPTION_POSTSCRIPT_NAMES]: If Unicode charmap is missing,
+ synthesize one.
+
+ * include/freetype/config/ftoption.h: Document it.
+ * devel/ftoption.h: Ditto.
+
+2017-06-20 Tony Theodore <tonyt@logyst.com>
+
+ Fix pkg-config in freetype-config for cross-compiling (#51274).
+
+ * builds/unix/unix-def.in (PKG_CONFIG): New variable.
+ (freetype-config): Use it in sed expression.
+
+ * builds/unix/freetype-config.in: s/pkg-config/%PKG_CONFIG%/.
+
+2017-06-20 Werner Lemberg <wl@gnu.org>
+
+ [cff, truetype] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2300
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2313
+
+ * src/cff/cf2hints.c (cf2_hintmap_adjustHints): Use ADD_INT32.
+
+ * src/truetype/ttinterp.c (Ins_ABS): Avoid FT_ABS.
+
+2017-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base, smooth] LCD filtering cleanups.
+
+ * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
+ Clean up, start filtering from the bottom-left origin.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
+
+2017-06-16 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2270
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2276
+
+ * src/truetype/ttinterp.c (Ins_MDRP, _iup_worker_interpolate): Use
+ ADD_LONG and SUB_LONG.
+
+2017-06-15 Werner Lemberg <wl@gnu.org>
+
+ [bdf, cff] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2244
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2261
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Replace calls to FT_ABS with
+ direct code to avoid value negation.
+
+ * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32 and
+ ADD_INT32.
+
+2017-06-13 Werner Lemberg <wl@gnu.org>
+
+ * src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding.
+
+ FreeType only sets a default active encoding for Unicode.
+
+2017-06-13 Werner Lemberg <wl@gnu.org>
+
+ [cff, truetype] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2216
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2218
+
+ * src/cff/cf2fixed.h (cf2_fixedAbs): Use NEG_INT32.
+
+ * src/truetype/ttinterp.c (Ins_IP): Use SUB_LONG.
+
+2017-06-11 Werner Lemberg <wl@gnu.org>
+
+ [cff] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2200
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2210
+
+ * src/cff/cf2hints.c (cf2_hintmap_insertHint): Use SUB_INT32 and
+ ADD_INT32.
+
+ * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO>: Use
+ ADD_INT32.
+
+2017-06-10 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix TT_Set_Var_Design.
+
+ Reported by Nikolaus Waxweiler <madigens@gmail.com>.
+
+ * src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the
+ case where we have less input coordinates than axes.
+
+2017-06-10 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo.
+
+ Bug introduced 2017-05-28.
+
+2017-06-09 Werner Lemberg <wl@gnu.org>
+
+ [cff, truetype] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2144
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2151
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2153
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2173
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2186
+
+ * src/cff/cf2blues.c (cf2_blues_init): Use SUB_INT32.
+
+ * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
+ Round_To_Half_Grid, Round_Down_To_Grid, Round_Up_To_Grid,
+ Round_To_Double_Grid, Round_Super, Round_Super_45): Use ADD_LONG,
+ SUB_LONG, NEG_LONG, FT_PIX_ROUND_LONG, FT_PIX_CEIL_LONG,
+ FT_PAD_ROUND_LONG
+ (Ins_SxVTL, Ins_MIRP): Use SUB_LONG.
+ (_iup_worker_shift): Use SUB_LONG and ADD_LONG.
+
+2017-06-09 Werner Lemberg <wl@gnu.org>
+
+ Provide more macros for flooring, ceiling, and rounding.
+
+ These versions don't produce run-time errors due to integer
+ overflow.
+
+ * include/freetype/internal/ftobjs.h: Include FT_INTERNAL_CALC_H.
+ (FT_PAD_ROUND_LONG, FT_PAD_CEIL_LONG, FT_PIX_ROUND_LONG,
+ FT_PIX_CEIL_LONG): New macros.
+ (FT_PAD_ROUND_INT32, FT_PAD_CEIL_INT32, FT_PIX_ROUND_INT32,
+ FT_PIX_CEIL_INT32): New macros.
+
+2017-06-09 Werner Lemberg <wl@gnu.org>
+
+ Remove unused macros.
+
+ * include/freetype/internal/ftcalc.h (ADD_INT, SUB_INT, MUL_INT,
+ NEG_INT): Deleted.
+
+2017-06-09 Werner Lemberg <wl@gnu.org>
+
+ */*: Remove `OVERFLOW_' prefix.
+
+ This increases readability.
+
+2017-06-07 Werner Lemberg <wl@gnu.org>
+
+ [cff, truetype] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2133
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2137
+
+ * src/cff/cf2hints.c (cf2_hint_init): Use OVERFLOW_SUB_INT32.
+
+ * src/truetype/ttinterp.c (PROJECT, DUALPROJ): Use
+ OVERFLOW_SUB_LONG.
+
+2017-06-06 Werner Lemberg <wl@gnu.org>
+
+ [cff] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2109
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2110
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2122
+
+ * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32.
+
+ * src/cff/cf2hints.c (cf2_hintmap_map): Synchronize if-else
+ branches.
+
+2017-06-05 Werner Lemberg <wl@gnu.org>
+
+ [cff] Integer overflow.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2089
+
+ * src/cff/cffload.c (cff_blend_doBlend): User OVERFLOW_ADD_INT32.
+
+2017-06-04 Werner Lemberg <wl@gnu.org>
+
+ [cff, truetype] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2075
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2088
+
+ * src/cff/cf2font.c (cf2_font_setup): Use OVERFLOW_MUL_INT32.
+
+ * src/truetype/ttinterp.c (Ins_ISECT): Use OVERFLOW_MUL_LONG,
+ OVERFLOW_ADD_LONG, and OVERFLOW_SUB_LONG.
+
+2017-06-03 Werner Lemberg <wl@gnu.org>
+
+ [base, cff, truetype] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2060
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2062
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2063
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2068
+
+ * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use
+ OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG.
+
+ * src/cff/cf2blues.c (cf2_blues_capture), src/cff/cf2hints.c
+ (cf2_hintmap_adjustHints): Use OVERFLOW_SUB_INT32.
+
+ * src/truetype/ttgload.c (compute_glyph_metrics): User
+ OVERFLOW_SUB_LONG.
+
+ * src/truetype/ttinterp.c (Direct_Move, Direct_Move_Orig,
+ Direct_Move_X, Direct_Move_Y, Direct_Move_Orig_X,
+ Direct_Move_Orig_Y, Move_Zp2_Point, Ins_MSIRP): Use
+ OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG.
+
+2017-06-03 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/freetype-config.in: Fix pkg-config test (#51162).
+
+ Patch directly taken from bug report.
+
+2017-06-03 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Synchronize sanity checks with pcf driver.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2054
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2058
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Check font ascent and descent.
+ Check AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
+ RESOLUTION_Y properties.
+
+2017-06-03 Werner Lemberg <wl@gnu.org>
+
+ [cff, truetype] Integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2047
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2057
+
+ * src/cff/cf2hints.c (cf2_hintmap_map): Use OVERFLOW_SUB_INT32.
+
+ * src/truetype/ttinterp.c (Ins_ADD): Use OVERFLOW_ADD_LONG.
+ (Ins_SUB): Use OVERFLOW_SUB_LONG.
+ (Ins_NEG): Use NEG_LONG.
+
+2017-06-03 Werner Lemberg <wl@gnu.org>
+
+ ftcalc.h: Avoid left-shift of negative numbers.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2055
+
+ * include/freetype/internal/ftcalc.h (INT_TO_F26DOT6,
+ INT_TO_F2DOT14, INT_TO_FIXED, F2DOT14_TO_FIXED): Use multiplication.
+
+2017-06-02 Werner Lemberg <wl@gnu.org>
+
+ [cff] Even more integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2046
+
+ * src/cff/cf2intrp.c (cf2_doStems, cf2_interpT2CharString): Use
+ OVERFLOW_ADD_INT32.
+
+2017-06-02 Werner Lemberg <wl@gnu.org>
+
+ [cff] More integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2032
+
+ * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32.
+
+2017-06-02 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Don't left-shift negative numbers.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2031
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Use multiplication.
+
+2017-06-02 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix integer scanning routines.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2029
+
+ * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous, _bdf_atos):
+ Stop scanning if result would overflow.
+
+2017-06-02 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix integer overflows.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2027
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2028
+
+ * src/cff/cf2hints.c (cf2_hintmap_insertHint), src/cff/cf2intrp.c
+ (cf2_doFlex): Use OVERFLOW_ADD_INT32 and OVERFLOW_SUB_INT32.
+
+2017-06-01 Werner Lemberg <wl@gnu.org>
+
+ [smooth] Some 32bit integer overflow run-time errors.
+
+ * src/smooth/ftgrays.c [STANDALONE] (OVERFLOW_ADD_LONG,
+ OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG, NEG_LONG): New macros.
+ [!STANDALONE]: Include FT_INTERNAL_CALC_H.
+ (gray_render_cubic): Use those macros where appropriate.
+
+2017-06-01 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftglyph.c (FT_Get_Glyph): Check `slot->advance'.
+
+2017-06-01 Werner Lemberg <wl@gnu.org>
+
+ [psaux] 32bit integer overflow tun-time errors (#46149).
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Use
+ OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG where appropriate.
+
+2017-06-01 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter again.
+
+ Problem reported by Marek Kašík <mkasik@redhat.com>.
+
+ The problematic font that exceeds the old limit is Padauk-Bold,
+ version 3.002, containing bytecode generated by a buggy version of
+ ttfautohint.
+
+2017-05-31 Werner Lemberg <wl@gnu.org>
+
+ [cff] 32bit integer overflow run-time errors 2/2 (#46149).
+
+ This commit handles the new engine.
+
+ * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT32,
+ OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, NEG_INT, NEG_LONG,
+ NEG_INT32): New macros.
+
+ * src/cff/cf2ft.c (cf2_getScaleAndHintFlag): Use OVERFLOW_ADD_INT32.
+
+ * src/cff/cf2hints.c (cf2_getWindingMomentum, cf2_hint_init,
+ cf2_hintmap_map, cf2_glyphpath_hintPoint,
+ cf2_glyphpath_computeIntersection, cf2_glyphpath_computeOffset,
+ cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): Use
+ OVERFLOW_ADD_INT32, OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, and
+ NEG_INT32 where appropriate.
+
+ * src/cff/cf2intrp.c (cf2_doFlex, cf2_doBlend,
+ cf2_interpT2CharString): Ditto.
+ Also add some other code where needed to avoid overflow.
+
+2017-05-30 Werner Lemberg <wl@gnu.org>
+
+ [cff] 32bit integer overflow run-time errors 1/2 (#46149).
+
+ This commit handles the old engine.
+
+ * src/cff/cffgload.c: Include FT_INTERNAL_CALC_H.
+ (cff_decoder_parse_charstrings): Use OVERFLOW_ADD_LONG and
+ OVERFLOW_SUB_LONG where needed.
+
+ * src/cff/cffparse.c: Include FT_INTERNAL_CALC_H.
+ (power_ten_limits): New static array.
+ (do_fixed): Use it to prevent multiplication overflow.
+ (cff_parser_run): Use OVERFLOW_ADD_LONG.
+
+2017-05-30 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Correctly handle sequences of multiple number signs.
+
+ * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed): Return zero
+ if we encounter more than a single sign.
+
+2017-05-29 Werner Lemberg <wl@gnu.org>
+
+ [pcf] 32bit integer overflow run-time errors (#46149).
+
+ * src/pcf/pcfread.c (pcf_get_accel): Add sanity checks for
+ `fontAscent' and `fontDescent'.
+ (pcf_load_font): Add sanity checks for global height.
+ Add sanity checks for AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE,
+ RESOLUTION_X, and RESOLUTION_Y properties.
+
+2017-05-29 Werner Lemberg <wl@gnu.org>
+
+ Handle some integer overflow run-time errors (#46149, #48979).
+
+ This commit (mainly for 32bit CPUs) is the first of a series of
+ similar commits to handle known integer overflows. Basically, all
+ of them are harmless, since they affect rendering of glyphs only,
+ not posing security threats. It is expected that fuzzying will show
+ up more overflows, to be fixed in due course.
+
+ The idea is to mark places where overflows can occur, using macros
+ that simply cast to unsigned integers, because overflow arithmetic
+ is well defined in this case. Doing so suppresses run-time errors
+ of sanitizers without adding computational overhead.
+
+ * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT,
+ OVERFLOW_SUB_INT, OVERFLOW_MUL_INT, OVERFLOW_ADD_LONG,
+ OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG): New macros.
+
+ * src/base/ftcalc.c (FT_RoundFix, FT_CeilFix, FT_Matrix_Multiply,
+ FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled,
+ ft_corner_orientation): Use new macros.
+
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use new macros.
+
+2017-05-28 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftcalc.h (FLOAT_TO_FIXED): Remove.
+
+ This macro is not used.
+
+2017-05-28 Werner Lemberg <wl@gnu.org>
+
+ [cff] s/cf2_floatToFixed/cf2_doubleToFixed/.
+
+ The new name better describes what the macro actually does;
+ additionally, we don't need a trailing `f' for literals (there was
+ only a single such instance in the code, but this caused a clang
+ warning because the macro itself uses `double' literals).
+
+ * src/cff/cf2blues.c, src/cff/cf2blues.h, src/cff/cf2fixed.h,
+ src/cff/cf2font.c, src/cff/cf2hints.c: Updated.
+
+2017-05-28 Werner Lemberg <wl@gnu.org>
+
+ Fix negation of INT_MIN and LONG_MIN (#46149).
+
+ * src/base/ftcalc.c (FT_MOVE_SIGN): Add argument to pass unsigned
+ value, to be used as the result.
+ (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix, FT_MulFix,
+ FT_Vector_NormLen): Updated.
+
+2017-05-27 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix handling of design coordinates (#51127).
+
+ * src/truetype/ttgxvar.c (tt_set_mm_blend): Compute all design
+ coordinates if we have to create the `blends->coord' array.
+ (TT_Get_MM_Blend, TT_Get_Var_Design): Select default instance
+ coordinates if no instance is selected yet.
+
+2017-05-24 Werner Lemberg <wl@gnu.org>
+
+ [bdf, pcf] Support ISO646.1991-IRV character encoding (aka ASCII).
+
+ Problem reported by Marek Kašík <mkasik@redhat.com>, cf.
+
+ https://bugzilla.redhat.com/show_bug.cgi?id=1451795
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdrivr.c
+ (PCF_Face_Init): Implement it.
+
+2017-05-20 Nikolaus Waxweiler <madigens@gmail.com>
+
+ [truetype] Always use interpreter v35 for B/W rendering (#51051).
+
+ * src/truetype/ttgload.c (tt_loader_init)
+ [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Adjust
+ `subpixel_hinting_lean', `grayscale_cleartype', and
+ `vertical_lcd_lean' accordingly.
+
+ * src/truetype/ttinterp.c (Ins_GETINFO): Updated.
+ (TT_RunIns): Update `backward_compatibility' flag.
+
+2017-05-20 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Implement minimal dynamic padding for LCD filtering.
+
+ Extra bitmap padding for LCD filtering depends on the filter. The
+ default 5-tap filter needs 2 extra subpixels. The light 3-tap filter
+ needs only 1 extra subpixel. This space could be already available
+ due to rounding. In order to optimize the padding, we now expand
+ CBox for the given filter weights before rounding.
+
+ This change breaks current Skia (and Firefox).
+
+ * include/freetype/internal/ftobjs.h (FT_LibraryRec)
+ [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Remove `lcd_extra' field.
+
+ * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights,
+ FT_Library_SetLcdFilter): Remove `lcd_extra' initializations.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Implement dymanic
+ LCD padding.
+
+2017-05-15 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Return proper scaling values for SBIX bitmaps.
+
+ Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
+
+ * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Implement it.
+
+2017-05-15 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix error handling for embedded bitmaps.
+
+ Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph)
+ [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Handle error if font is not
+ scalable.
+
+2017-05-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [autofit] Make autohint warping NORMAL option.
+
+ This moves warping option from LIGHT to NORMAL mode. This makes LIGHT
+ truly void of hinting in x-direction, with left side bearing never
+ changed and right side bearing only altered by advance rounding.
+ Therefore, LIGHT is now ready to return fractional advance. As a
+ NORMAL option, warping substitutes normal hinting.
+
+ * src/autofit/afcjk.c (af_cjk_hints_apply): Updated.
+ * src/autofit/aflatin.c (af_latin_hints_apply): Updated.
+ * src/autofit/aflatin2.c (af_latin2_hints_apply): Updated.
+
+ * src/autofit/afloader.c (af_loader_load_glyph): Handle warping
+ phantom points as normal.
+
+2017-05-14 Werner Lemberg <wl@gnu.org>
+
+ Remove remnants of raster pool.
+
+ * include/freetype/internal/ftobjs.h (FT_LibraryRec): Remove
+ `raster_pool' and `raster_pool_size' fields.
+
+ * src/base/ftobjs.c (FT_New_Library), src/raster/ftrend1.c
+ (ft_raster1_init), src/smooth/ftsmooth.c (ft_smooth_init): Updated.
+
+2017-05-13 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.8 released.
+ =======================
+
+
+ Tag sources with `VER-2-8'.
+
+ * docs/VERSION.TXT: Add entry for version 2.8.
+ * docs/CHANGES: Updated.
+
+ * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2005/index.html,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2008/index.html,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/index.html,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/index.html,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/index.html,
+ builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2005-ce/index.html,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/index.html: s/2.7.1/2.8/, s/271/28/.
+
+ * include/freetype/freetype.h (FREETYPE_MINOR): Set to 8.
+ (FREETYPE_PATCH): Set to 0.
+
+ * builds/unix/configure.raw (version_info): Set to 20:0:14.
+ * CMakeLists.txt (VERSION_MINOR): Set to 8.
+ (VERSION_PATCH): Set to 0.
+
+2017-05-12 Hin-Tak Leung <htl10@users.sourceforge.net>
+
+ Fix `FT_UINT_TO_POINTER' macro for Windows.
+
+ * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+ include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER) [_WIN64]:
+ Fix definition.
+
+2017-05-11 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Chakma script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Chakma.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Chakma standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Chakma data.
+
+2017-05-10 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Kayah Li script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Kayah Li.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Kayah Li standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Kayah Li data.
+
+2017-05-10 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Bamum script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Bamum.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Bamum standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Bamum data.
+
+2017-05-10 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Saurashtra script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Saurashtra.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Saurashtra standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Saurashtra
+ data.
+
+2017-05-10 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Buhid script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Buhid.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Buhid standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Buhid data.
+
+2017-05-08 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Shavian script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Shavian.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Shavian standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Shavian data.
+
+2017-05-08 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Vai script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Vai.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Vai standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Vai data.
+
+2017-05-08 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Osmanya script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Osmanya.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Osmanya standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osmanya data.
+
+2017-05-08 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Coptic script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Coptic.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Coptic standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Coptic data.
+
+2017-05-08 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Carian script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Carian.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Carian standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Carian data.
+
+2017-05-07 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Add tricky font `DFGirl-W6-WIN-BF' (from Dynalab).
+
+ Reported by Roy Tam <roytam@gmail.com>.
+
+ * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it.
+
+2017-05-07 Roy Tam <roytam@gmail.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [truetype] More tricky fonts (mainly from Dynalab).
+
+ * src/truetype/ttobjs.c (tt_check_trickyness_family,
+ tt_check_trickyness_sfnt_ids): Add them.
+
+2017-05-07 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Add tricky font `DLCHayMedium' (from Dynalab).
+
+ Reported by Roy Tam <roytam@gmail.com>.
+
+ * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it.
+
+2017-05-03 Werner Lemberg <wl@gnu.org>
+
+ */*: s/backwards compatibility/backward compatibility/.
+
+2017-05-03 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Unified Canadian Syllabics script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Unified Canadian
+ Syllabics.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Unified Canadian Syllabics standard
+ character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Unified
+ Canadian Syllabics data.
+
+2017-05-03 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [autofit] Add blue-zone support for Sundanese script.
+
+ This essentially moves the Sundanese script from the `Indic' hinter
+ to the `Latin' hinter.
+
+ * src/autofit/afblue.dat: Add blue zone data for Sundanese.
+
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Sundanese standard character and move
+ data out of AF_CONFIG_OPTION_INDIC block.
+
+ * src/autofit/afranges.c: Move Sundanese data out of
+ AF_CONFIG_OPTION_INDIC block.
+
+ * src/autofit/afstyles.h: Update Sundanese data; in particular, use
+ AF_WRITING_SYSTEM_LATIN.
+
+2017-05-03 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Avestan script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Avestan.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Avestan standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Avestan data.
+
+2017-05-02 Behdad Esfahbod <behdad@behdad.org>
+
+ [truetype] Make `IUP' gvar deltas do the same as Apple (#50832).
+
+ When points are not touched by gvar interpolation deltas, FreeType
+ gave a slightly different result than Apple's CoreText.
+
+ The OpenType working group will update the specification to document
+ the following behaviour: If the two points with deltas to the `left'
+ and `right' of the untouched point have the same coordinate, then
+ the inferred delta for the untouched point should be zero.
+
+ * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new
+ behaviour.
+
+2017-05-02 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Remove `slight' auto-hint mode again.
+
+ A poll on freetype-devel favoured changes directly applied to
+ `light'.
+
+ * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT,
+ FT_RENDER_MODE_SLIGHT): Removed.
+
+ * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
+ (af_latin_hints_init), src/autofit/aflatin2.c
+ (af_latin2_hints_init): Revert change from 2017-04-22.
+
+ * src/autofit/afloader.c (af_loader_load_glyph) Remove references to
+ FT_RENDER_MODE_SLIGHT.
+ [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics
+ unconditionally.
+
+ * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from
+ 2017-04-22.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22.
+
+ * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from
+ 2017-04-22.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from
+ 2017-04-22.
+
+ * docs/CHANGES: Updated.
+
+2017-04-30 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Fix metrics computation.
+
+ Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and
+ Nikolaus Waxweiler <madigens@gmail.com>.
+
+ * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of
+ auto-hinter metrics. Without this change, multiple size changing
+ calls for a single face fail.
+
+2017-04-29 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttdriver.c (tt_size_request): Properly check `error'.
+
+ Reported by Earnestly <zibeon@googlemail.com> in
+
+ https://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html
+
+2017-04-27 Werner Lemberg <wl@gnu.org>
+
+ Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option.
+
+ * include/freetype/config/ftoption.h
+ (AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by
+ default.
+
+ * src/autofit/afloader.c (af_loader_load_glyph): Use
+ AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code.
+
+2017-04-26 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FT_Render_Mode): Fix order.
+
+ This retains backward compatibility.
+
+ Noted by Alexei.
+
+2017-04-22 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Do linear scaling for FT_LOAD_NO_HINTING (#50470).
+
+ * src/truetype/ttobjs.h (TT_SizeRec): Add field `hinted_metrics' to
+ hold hinted metrics.
+ Make `metrics' a pointer so that `tt_glyph_load' can easily switch
+ between metrics.
+
+ * src/truetype/ttdriver.c (tt_size_request): Updated.
+ (tt_glyph_load): Use top-level metrics if FT_LOAD_NO_HINTING is
+ used.
+
+ * src/truetype/ttgload.c (TT_Hint_Glyph, TT_Process_Simple_Glyph,
+ TT_Process_Composite_Component, load_truetype_glyph,
+ compute_glyph_metrics, TT_Load_Glyph): Updated.
+
+ * src/truetype/ttinterp.c (TT_Load_Context): Updated.
+
+ * src/truetype/ttobjs.c (tt_size_reset): Updated.
+
+ * src/truetype/ttsubpix.c (sph_set_tweaks): Updated.
+
+2017-04-22 Werner Lemberg <wl@gnu.org>
+
+ Add new `slight' auto-hinting mode.
+
+ This mode uses fractional advance widths and doesn't scale glyphs
+ horizontally, only applying vertical scaling and hinting.
+
+ At the same time, the behaviour of the `light' auto-hinter gets
+ restored for backward compatibility: Both vertical and horizontal
+ scaling is again based on rounded metrics values (this was changed
+ in a commit from 2017-03-30 as a side effect). To be more precise,
+ the behaviour is restored for TrueType fonts only; for other font
+ formats like Type 1, this is a new feature of the `light' hinting
+ mode.
+
+ * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro.
+ (FT_RENDER_MODE_SLIGHT): New render mode.
+
+ * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add
+ `autohint_mode' and `autohint_metrics' fields.
+
+ * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
+ (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init):
+ Updated.
+
+ * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use
+ `autohint_metrics'.
+ (af_loader_load_glyph): s/internal/slot_internal/.
+ Initialize `autohint_metrics' and `autohint_mode' depending on
+ current auto-hint mode.
+ Use `autohint_metrics'.
+ Updated.
+
+ * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Updated.
+ (FT_New_Size): Allocate `internal' object.
+
+ * src/pshinter/pshalgo.c (ps_hints_apply): Updated.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render): Updated.
+
+2017-04-22 Werner Lemberg <wl@gnu.org>
+
+ Introduce `FT_Size_InternalRec' structure.
+
+ We are going to extend this later on.
+
+ * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New
+ structure with a single field `module_data'.
+
+ * src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of
+ `FT_Size' structure.
+
+ * src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use
+ `size->internal->module_data' instead of `size->internal'.
+
+ * src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'.
+ (cff_size_init, cff_size_select, cff_size_request): Use
+ `size->internal->module_data' instead of `size->internal'.
+
+ * src/cif/cidobjs.c (cid_size_done, cid_size_init,
+ cid_size_request): Use `size->internal->module_data' instead of
+ `size->internal'.
+
+ * src/psaux/psobjs.c (t1_builder_ini): Use
+ `size->internal->module_data' instead of `size->internal'.
+
+ * src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request):
+ Use `size->internal->module_data' instead of `size->internal'.
+
+2017-04-21 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/smooth/ftsmooth.h: Remove unused guards and declaration.
+
+2017-04-16 Hin-Tak Leung <htl10@users.sourceforge.net>
+
+ Fix tracing messages.
+
+ * src/base/ftobjs.c (FT_Face_GetCharVariantIndex,
+ FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print
+ correct function name.
+
+2017-04-08 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Old Turkic script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Old Turkic.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Old Turkic standard characters.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Old Turkic data.
+
+2017-04-08 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Gothic script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Gothic.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Gothic standard characters.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Gothic data.
+
+2017-04-08 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Cypriot script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Cypriot.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Cypriot standard characters.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Cypriot data.
+
+2017-04-08 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Deseret script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Deseret.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Deseret standard characters.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Deseret data.
+
+2017-04-07 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Fix invalid character range description (#50745).
+
+ Also reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034
+
+ * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in
+ recent commit.
+
+2017-04-07 Werner Lemberg <wl@gnu.org>
+
+ [ftfuzzer] Fix clang warnings.
+
+ * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add
+ casts.
+
+2017-04-06 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Lisu script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Lisu.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Lisu standard characters.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Lisu data.
+
+2017-04-06 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Osage script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Osage.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Osage standard characters.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osage data.
+
+2017-04-06 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Glagolitic script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Glagolitic.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Glagolitic standard characters.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Glagolitic data.
+
+2017-04-06 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Tai Viet script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Tai Viet.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Tai Viet standard characters.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tai Viet data.
+
+2017-04-06 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for Tifinagh script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Tifinagh.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Tifinagh standard characters.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tifinagh data.
+
+2017-04-06 Sascha Brawer <sascha@google.com>
+ Werner Lemberg <wl@gnu.org
+
+ [autofit] Add support for N'Ko script.
+
+ * src/autofit/afblue.dat: Add blue zone data for N'Ko.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add N'Ko standard characters.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add N'Ko data.
+
+2017-04-06 Sascha Brawer <sascha@google.com>
+
+ [autofit] Add support for Adlam script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Adlam.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Adlam standard characters.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data.
+
+2017-04-06 Sascha Brawer <sascha@google.com>
+
+ [autofit] Add support for Ol Chiki script.
+
+ * src/autofit/afblue.dat: Add blue zone data for Ol Chiki.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Ol Chiki standard character.
+
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data.
+
+2017-04-03 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Avoid reexecution of `fpgm' and `prep' in case of error.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981
+
+ * include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New
+ error code.
+
+ * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution
+ of these two opcodes in `glyf' bytecode.
+ (TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode
+ in case of error since function tables can no longer be modified
+ (due to the changes in `Ins_FDEF' and `Ins_IDEF'). This change can
+ enormously speed up handling of broken fonts.
+
+2017-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'.
+
+ * src/autofit/aflatin.c (af_latin_hints_init): Updated.
+ * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto.
+
+2017-04-01 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H.
+
+ Otherwise FT_UINT_TO_POINTER might not be defined.
+
+ Problem reported by Alexei.
+
+2017-03-31 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'.
+
+ * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it.
+ * src/autofit/afcjk.c (af_cjk_hints_init): Updated.
+ * src/autofit/aflatin.c (af_latin_hints_init): Ditto.
+ * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto.
+
+2017-03-31 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04.
+
+ Allow CFFs containing a single font to have an empty font name.
+
+ Problem reported by å¼µä¿ŠèŠ <418092625@qq.com> in
+
+ https://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html
+
+2017-03-30 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also.
+
+ Requested by Dave Arnold.
+
+2017-03-30 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix HVAR and VVAR handling (#50678).
+
+ * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle
+ glyph indices larger than `mapCount' as described in the
+ specification.
+
+2017-03-30 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Allow linear scaling for unhinted rendering (#50470).
+
+ * src/truetype/ttdriver.c (tt_size_request): Revert change from
+ 2011-07-16; the intended metrics fix seems now to be implemented in
+ a different way, making the patch unnecessary. Note that this
+ change was usually patched out by all major GNU/Linux distributions
+ due to heavy side effects.
+
+ * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph):
+ Refer to the metrics of the `TT_Size' object.
+
+2017-03-29 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix thinko related to PS name of default named instance.
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are
+ name ID values, not indices into the array of name entries.
+
+2017-03-27 Werner Lemberg <wl@gnu.org>
+
+ [cid, truetype] Don't use `index' as a variable name.
+
+ At least on FreeBSD there is a global declaration of `index' in file
+ `/usr/include/strings.h'.
+
+ * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where
+ appropriate.
+
+2017-03-27 Wojciech Mamrak <wmamrak@gmail.com>
+
+ [sfnt] Minor improvement for handling kern tables.
+
+ * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for
+ cross-stream kerning tables since we reject format 2 tables later
+ on anyways.
+ Modify code for limit test...
+ (tt_face_get_kerning): ... to avoid a limit test here.
+
+2017-03-27 Werner Lemberg <wl@gnu.org>
+
+ [pcf] Fix compiler warnings.
+
+ Reported by Alexander Hedges <ahedges@student.ethz.ch>.
+
+ * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag
+ `property_name' with `FT_UNUSED' where necessary.
+
+2017-03-26 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941
+
+2017-03-23 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Better protect `flex' handling.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <callothersubr>: Since there is not a single flex operator but a
+ series of subroutine calls, malformed fonts can call arbitrary other
+ operators after the start of a flex, possibly adding points. For
+ this reason we have to check the available number of points before
+ inserting a point.
+
+2017-03-23 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix check for default named instance.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four
+ bytes, not two...
+
+2017-03-23 Werner Lemberg <wl@gnu.org>
+
+ Make MM fonts work (again).
+
+ * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
+ FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore
+ return value of `ft_face_get_mvar_service'; instead, check whether a
+ service is actually returned.
+
+2017-03-20 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Some variable renamings.
+
+ Too much local variables holding different structures were called
+ `metrics'.
+
+ * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/.
+
+ * src/truetype/ttgload.c (tt_get_metrics_incr_overrides,
+ compute_glyph_metrics): s/metrics/incr_metrics/.
+ (load_sbit_image): s/metrics/sbit_metrics/.
+
+ * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/.
+ (tt_size_init_bytecode): s/metrics/tt_metrics/.
+ (tt_size_reset): s/metrics/size_metrics/.
+
+2017-03-20 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Don't add instances to non-variation fonts.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Fix it.
+
+2017-03-20 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578).
+
+2017-03-18 Werner Lemberg <wl@gnu.org>
+
+ Introduce FT_UINT_TO_POINTER macro (#50560).
+
+ We have to make a separate case for Windows 64's LLP64 data model.
+
+ * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+ include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Use it.
+
+2017-03-18 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573).
+
+ The problematic font that exceeds the old limit is Lato-Regular,
+ version 2.007, containing bytecode generated by a buggy version of
+ ttfautohint.
+
+2017-03-18 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Another limitation for bytecode loop count maximum.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900
+
+ * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max'
+ by number of glyphs also.
+
+2017-03-18 Werner Lemberg <wl@gnu.org>
+
+ [ftfuzzer] Minor improvement.
+
+ * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if
+ bitmap strikes are active.
+
+2017-03-18 Werner Lemberg <wl@gnu.org>
+
+ Improve `make multi'.
+
+ * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2.
+
+ * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH.
+
+ * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
+
+ * src/sfnt/pngshim.c: Guard file with
+ TT_CONFIG_OPTION_EMBEDDED_BITMAPS also.
+
+ * src/sfnt/ttbdf.c: Avoid empty source file.
+ * src/sfnt/ttpost.c: Guard file with
+ TT_CONFIG_OPTION_POSTSCRIPT_NAMES.
+ * src/sfnt/ttsbit.c: Guard file with
+ TT_CONFIG_OPTION_EMBEDDED_BITMAPS.
+
+ * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty
+ source file.
+
+ * src/truetype/ttsubpix.c: Guard file with
+ TT_USE_BYTECODE_INTERPRETER also.
+
+ * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
+
+ * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c,
+ src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c,
+ src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c,
+ src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c,
+ src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c,
+ src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort
+ entries.
+
+2017-03-17 Werner Lemberg <wl@gnu.org>
+
+ Fixes for conditional compilation.
+
+ * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h'
+ earlier.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into
+ TT_CONFIG_OPTION_GX_VAR_SUPPORT block.
+ (sfnt_done_face): Protect some code with
+ TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+
+ * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler
+ warning.
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable
+ into TT_USE_BYTECODE_INTERPRETER block.
+
+ (tt_loader_init): Put `error' variable into
+ TT_USE_BYTECODE_INTERPRETER block.
+
+2017-03-17 Werner Lemberg <wl@gnu.org>
+
+ Fix preprocessor warning.
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether
+ TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its
+ value.
+
+2017-03-17 Werner Lemberg <wl@gnu.org>
+
+ `make multi' fixes; compiler warnings.
+
+ * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H.
+
+ * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
+ FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H.
+
+ * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
+ FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H.
+ (get_win_string, get_apple_string): Initialize `result'.
+
+2017-03-17 Dave Arnold <darnold@adobe.com>
+
+ [cff] Fix potential bugs in default NDV for CFF2.
+
+ * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend
+ vector when `lenNDV' is zero; don't rely on zero-init.
+ Save `lenNDV' as part of cache key even when `lenNDV' is zero.
+
+2017-03-17 Dave Arnold <darnold@adobe.com>
+
+ [cff] Fix CFF2 stack allocation.
+
+ * src/cff/cffparse.c (cff_parser_init) add 1 for operator.
+
+2017-03-16 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883
+
+2017-03-15 Werner Lemberg <wl@gnu.org>
+
+ Remove clang compiler warnings (#50548).
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Make
+ `var_postscript_prefix_len' unsigned.
+
+ * src/autofit/afwarp.c (af_warper_compute_line_best): Remove
+ redundant assignment.
+
+ * src/cff/cffload.c (cff_subfont_load): Add casts.
+
+ * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment.
+
+ * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static'
+ keyword.
+ Add casts.
+ (fixed2float): Add cast.
+ (sfnt_get_var_ps_name): Make `p' always initialized.
+ Add casts.
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts.
+
+2017-03-15 Werner Lemberg <wl@gnu.org>
+
+ [ftfuzzer] Limit number of tested faces and instances.
+
+ This is inspired by the discussion in and analysis of
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859
+
+ * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only
+ up to 20 face indices.
+ Use only up to 20 instance indices.
+
+2017-03-15 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting.
+
+2017-03-14 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Implement PS names for font instances [3/3].
+
+ Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): New fields
+ `var_postscript_prefix' and `var_postscript_prefix_len'.
+
+ * src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H.
+ (sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'.
+ (get_win_string, get_apple_string): Remove `const' from return
+ value.
+ (MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros.
+ (hexdigits): New array.
+ (sfnt_get_var_ps_name): New function, implementing Adobe TechNote
+ 5902 to construct a PS name for a variation font instance.
+ (sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances.
+
+ * src/sfnt/sfobjs.c (sfnt_done_face): Updated.
+
+ * src/truetype/ttgxvar.c (tt_set_mm_blend): Reset
+ `face->postscript_name' to trigger recalculation for new instance
+ parameters.
+
+2017-03-14 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Implement PS names for font instances [2/3].
+
+ * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
+ New function to find the shortest representation of a 16.16
+ fractional number.
+
+2017-03-14 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Implement PS names for font instances [1/3].
+
+ Add 128bit MurmurHash 3 function.
+
+ Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+
+ * src/sfnt/sfdriver.c (ROTL32): New macro.
+ (fmix32, murmur_hash_3_128): New functions.
+
+2017-03-13 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Ignore invalid MVAR tags.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838
+
+ * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit
+ warning for invalid tags.
+ (tt_apply_mvar): Ignore invalid tags.
+
+2017-03-12 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Store and use design coordinates also.
+
+ * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
+ Add `normalizedcoords' argument.
+
+ * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store
+ the design coordinates of the current instance.
+ Updated.
+
+ * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to...
+ (tt_set_mm_blend): ... New function.
+ Convert data in `normalizedcoords' array to `coords' array on
+ demand.
+ (TT_Set_Var_Design): Store argument data in `coords' array.
+ (TT_Get_Var_Design): Get data from `coords' array.
+ (tt_get_var_blend): Updated.
+ (tt_done_blend): Updated.
+
+ * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated.
+
+ * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
+
+ * src/cff/cffobjs.c (cff_face_init): Updated.
+
+2017-03-12 Werner Lemberg <wl@gnu.org>
+
+ src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/.
+
+2017-03-08 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Another fix for buggy variation fonts.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of
+ instances to zero for `CFF' fonts table, ensure that there is no
+ `CFF2' present also (which gets priority).
+
+2017-03-07 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Improve handling for buggy variation fonts.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of
+ instances to zero for `CFF' fonts table, ensure that there is no
+ `glyf' table present also (which gets priority).
+
+2017-03-06 Werner Lemberg <wl@gnu.org>
+
+ [sfnt, truetype] Always provide default instance.
+
+ As documented in the OpenType specification, an entry for the
+ default instance may be omitted in the named instance table. In
+ particular this means that even if there is no named instance table
+ in the font we actually do have a named instance, namely the default
+ instance.
+
+ For consistency, we always want the default instance in our list of
+ named instances. If it is missing, we try to synthesize it.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default
+ instance is in the table of named instances. Otherwise adjust
+ number of instances.
+
+ * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H.
+ (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named
+ instances.
+ Sythesize a named instance entry if necessary.
+ (tt_done_blend): Free `normalized_stylecoords'.
+
+2017-03-05 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Remove redundant code.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for
+ `num_instances', which will always succeed.
+
+2017-03-04 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Add `get_name_id' service.
+
+ * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New
+ typedef.
+ (SFNT_Interface): Add `get_name_id' field.
+ (FT_DEFINE_SFNT_INTERFACE): Updated.
+
+ * src/sfnt/sfdriver.c (search_name_id): Rename to...
+ (sfnt_get_name_id): ... this.
+ (sfnt_get_ps_name, sfnt_interface): Updated.
+
+2017-03-04 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Make `TT_Set_MM_Blend' set named instance index.
+
+ * src/truetype/ttgxvar.h (GX_Blend): New array
+ `normalized_stylecoords'.
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill
+ `normalized_stylecoords'.
+ (TT_Set_MM_Blend): Check instance tuple and adjust `face_index'
+ accordingly.
+
+2017-03-02 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Split off designer/normalized conversion routines.
+
+ * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion
+ code designer->normalized coordinates to...
+ (ft_var_to_normalized): ... New function.
+ (TT_Get_Var_Design): Split off conversion code normalized->designer
+ coordinates to...
+ (ft_var_to_design): ... New function.
+
+2017-02-28 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data.
+
+ * src/sfnt/sfdriver.c (sfnt_ps_map): New array.
+ (sfnt_is_postscript): New function.
+ (char_type_func): New typedef.
+ (get_win_string, get_apple_string): Add argument to specify
+ character checking function.
+ Add argument whether argument checking failures should be reported.
+ Update callers.
+ (search_name_id): Fix return value.
+
+2017-02-23 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Split off another bit of `sfnt_get_ps_name'.
+
+ * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some
+ functionality into...
+ (search_name_id): ... New function.
+
+2017-02-23 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Modularize `sfnt_get_ps_name'.
+
+ * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some
+ functionality into...
+ (IS_WIN, IS_APPLE): ... New macros.
+ (get_win_string, get_apple_string): ... New functions.
+
+2017-02-23 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Minor improvement.
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+ load_truetype_glyph): Remove unnecessary tests.
+
+2017-02-23 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/tttypes.h (TT_Face): s/isCFF2/is_cff2/.
+
+ For orthogonality with other structure field names.
+
+ Update all users.
+
+2017-02-22 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/smooth/ftgrays.c (gray_hline): Improve code.
+
+2017-02-20 Dominik Röttsches <drott@google.com>
+
+ Fix some `ttnameid.h' entries (#50313).
+
+ * include/freetype/ttnameid.h:
+ s/TT_MS_LANGID_SPANISH_INTERNATIONAL_SORT/TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT/,
+ s/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIA/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN/.
+
+2017-02-20 Werner Lemberg <wl@gnu.org>
+
+ [cff] Finish support for `random' operator.
+
+ * src/cff/cfftypes.h (CFF_SubFontRec): Add `random' field.
+
+ * src/cff/cffobjs.c: Updated.
+ (cff_driver_init): Initialize random seed value.
+
+ * src/cff/cffload.c (cff_random): New function.
+ (cff_subfont_load): Add `face' argument.
+ Update all callers.
+ Initialize random number generator with a proper seed value.
+ (cff_font_load): Add `face' argument.
+ Update all callers.
+
+ * src/cff/cffload.h: Updated.
+
+ * src/cff/cf2intrp.c (CF2_FIXME): Removed.
+ (cf2_interpT2CharString) <cf2_escRANDOM>: Implement opcode.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Don't
+ initialize random seed value.
+ <cff_op_random>: Use new random seed framework.
+
+2017-02-20 Werner Lemberg <wl@gnu.org>
+
+ [cff] Sanitize `initialRandomSeed'.
+
+ * src/cff/cffload.c (cff_load_private_dict): Make
+ `initial_random_seed' value always positive.
+
+2017-02-20 Werner Lemberg <wl@gnu.org>
+
+ [cff] Introduce `random-seed' property (2/2).
+
+ * src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'.
+ (open_face): Initialize `face->internal->random_seed'.
+ (FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'.
+
+ * src/cff/cffdrivr.c (cff_property_set): Handle `random-seed'
+ property.
+
+2017-02-20 Werner Lemberg <wl@gnu.org>
+
+ [cff] Introduce `random-seed' property (1/2).
+
+ We need this for support of the `random' operator.
+
+ * include/freetype/ftcffdrv.h (FT_PARAM_TAG_RANDOM_SEED): New macro.
+
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
+ field `random_seed'.
+
+ * src/cff/cffobjs.h (CFF_DriverRec): New field `random_seed'.
+
+2017-02-17 Werner Lemberg <wl@gnu.org>
+
+ Remove clang warnings.
+
+ * src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static'
+ keyword.
+
+ * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
+ FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates):
+ Initialize some variables.
+
+2017-02-16 Nikolaus Waxweiler <madigens@gmail.com>
+ Werner Lemberg <wl@gnu.org>
+
+ Add face property for stem darkening.
+
+ * include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New
+ macro.
+
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add
+ `no_stem_darkening' field.
+
+ * src/autofit/afloader.c (af_loader_load_glyph),
+ src/autofit/afmodule.c (af_property_set): Updated.
+
+ * src/base/ftobjs.c: Include FT_AUTOHINTER_H.
+ (ft_open_face_internal): Updated.
+ (FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING.
+
+ * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated.
+
+ * src/cff/cffdrivr.c (cff_property_set): Updated.
+
+2017-02-16 Nikolaus Waxweiler <madigens@gmail.com>
+ Werner Lemberg <wl@gnu.org>
+
+ Add face property for LCD filter weights.
+
+ * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS,
+ FT_LCD_FILTER_FIVE_TAPS): New macros.
+ (FT_LcdFiveTapFilter): New typedef.
+
+ * include/freetype/ftobjs.h (FT_Face_InternalRec)
+ [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field.
+ (FT_Bitmap_LcdFilterFunc): Change third argument to weights array.
+ (ft_lcd_filter_fir): New prototype.
+ (FT_LibraryRec): Updated.
+
+ * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to...
+ (ft_lcd_filter_fir): ... this base function.
+ Updated.
+ (_ft_lcd_filter_legacy): Updated.
+ (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated.
+
+ * src/base/ftobjs.c (ft_open_face_internal): Updated.
+ (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic)
+ [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Handle LCD weights from
+ `FT_Face_Internal'.
+
+2017-02-14 Nikolaus Waxweiler <madigens@gmail.com>
+ Werner Lemberg <wl@gnu.org>
+
+ Add new function `FT_Face_Properties'.
+
+ This commit provides the framework, to be filled with something
+ useful in the next commits.
+
+ * include/freetype/freetype.h (FT_Face_Properties): Declare.
+
+ * src/base/ftobjs.c (FT_Face_Properties): New function.
+
+2017-02-13 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Prevent overlapping blue zones.
+
+ Problem reported as
+
+ https://github.com/google/fonts/issues/632
+
+ The font in question (Nunito) has values 705 and 713 for the
+ reference and overshoot values, respectively, of the first blue
+ zone. Blue zone 2, however, has value 710 for both the reference
+ and overshoot. At 12ppem, reference and overshoot of blue zone 0
+ becomes 8px, while blue zone 2 becomes 9px.
+
+ A peculiarity of this font is that the tops of isolated vertical
+ stems like `N' have a slight overshoot also. The auto-hinter tries
+ to find the nearest blue zone using the *original* coordinates. For
+ vertical stems, this is value 713. For normal horizontal tops like
+ in character `E', this is value 710. Since value 713 is mapped to
+ 8px but value 710 to 9px, `N' and similar characters are one pixel
+ higher than `E', which looks very bad.
+
+ This commit sanitizes blue zones to avoid such a behaviour.
+
+ * src/autofit/aflatin.c (af_latin_sort_blue): New function.
+ (af_latin_metrics_init_blues): Sort blue values and remove overlaps.
+
+2017-02-12 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/smooth/ftgrays.c (gray_sweep): Improve code.
+
+2017-02-06 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Implement `VVAR' table support.
+
+ * src/truetype/ttgxvar.h (GX_HVarTable): Renamed to...
+ (GX_HVVarTable): ...This.
+ (GX_Blend): Add fields for `VVAR' table handling.
+ Other minor updates.
+
+ * src/truetype/ttgxvar.c (ft_var_load_hvar): Renamed to...
+ (ft_var_load_hvvar): ...This.
+ Handle VVAR loading also (controlled by an additional parameter).
+ (tt_hadvance_adjust): Renamed to...
+ (tt_hvadvance_adjust): ...This.
+ Handle application of advance height also (controlled by an
+ additional parameter).
+ (tt_hadvance_adjust, tt_vadvance_adjust): Wrappers for
+ `tt_hvadvance_adjust'.
+
+ * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated.
+
+2017-02-05 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Use better blue zone characters for lowercase latin.
+
+ The number of lowercase characters for computing the top flat blue
+ zone value was too small (in most cases only `x' and `z'). If one
+ of the two characters has a large serif, say, it can happen that
+ FreeType must select between two different values, having a 50%
+ chance to use the wrong one. As a result, rendering at larger PPEM
+ values could yield uneven lowercase glyph heights.
+
+ Problem reported by Christoph Koeberlin <christoph@koe.berlin>.
+
+ * src/autofit/afblue.dat (AF_BLUE_STRING_LATIN_SMALL): Replaced
+ with...
+ (AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_STRING_LATIN_SMALL_BOTTOM):
+ ... New, extended sets.
+ (AF_BLUE_STRINGSET_LATN): Updated.
+
+ * src/autofit/afblue.c, scr/autofit/afblue.h: Regenerated.
+
+2017-02-04 Werner Lemberg <wl@gnu.org>
+
+ Make `freetype-config' a wrapper of `pkg-config' if possible.
+
+ Based on ideas taken from
+
+ http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-multilib.patch
+ http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-2.5.3-freetype-config-prefix.patch
+
+ * builds/unix/freetype-config.in: Rewritten. Use `pkg-config' to
+ set output variables if program is available.
+
+ * docs/CHANGES, docs/freetype-config.1: Updated.
+
+2017-02-04 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/unix-def.in (freetype-config): Fix permissions.
+
+2017-02-03 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afglobal.c (af_face_globals_free): Erase useless code.
+
+2017-02-03 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value.
+
+ Reported by Behdad.
+
+2017-02-02 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix MVAR post-action handling.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=509
+
+ * src/truetype/ttobjs.c (tt_size_reset): Do nothing for CFF2. This
+ is important to make `tt_size_reset_iterator' (called in
+ `tt_apply_mvar') always work.
+
+2017-02-02 Werner Lemberg <wl@gnu.org>
+
+ Make compilation with FT_CONFIG_OPTION_PIC work again.
+
+ All code committed here is guarded with `FT_CONFIG_OPTION_PIC'.
+
+ * include/freetype/internal/services/svmetric.h
+ (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon.
+
+ * src/autofit/aflatin.c (af_latin_hints_compute_edges,
+ af_latin_hint_edges): Provide `globals' variable.
+
+ * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing
+ variable.
+
+ * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET,
+ AF_STYLE_CLASSES_GET): Redefine.
+
+ * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo.
+
+ * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it.
+
+ * src/cff/cffpic.h (CffModulePIC): Fix typo.
+
+2017-01-31 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/smooth/ftgrays.c (gray_render_scanline): Improve code.
+
+2017-01-31 Werner Lemberg <wl@gnu.org>
+
+ [cff] Provide metrics variation service interface (#50196).
+
+ Only now I've got an OTF with an HVAR table for testing...
+
+ The code in `ftmm.c' uses `FT_FACE_LOOKUP_SERVICE' to get the
+ metrics variations interface. However, this didn't work with
+ `FT_FACE_FIND_GLOBAL_SERVICE' used in `sfnt_init_face'.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+ (cff_hadvance_adjust, cff_metrics_adjust): Wrapper functions for
+ metric service functions from the `truetype' module.
+ (cff_service_metrics_variations): New service.
+ (cff_services): Updated.
+
+ * src/cff/cffpic.h (CFF_SERVICE_METRICS_VAR_GET): New macro.
+ [FT_CONFIG_OPTION_PIC]: Synchronize code.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Replace call to
+ FT_FACE_FIND_GLOBAL_SERVICE with `ft_module_get_service' to always
+ load the service from the `truetype' module.
+
+2017-01-31 Werner Lemberg <wl@gnu.org>
+
+ Add framework to support services with 9 functions.
+
+ * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC9):
+ New macro.
+
+2017-01-31 Werner Lemberg <wl@gnu.org>
+
+ [base] Fix error handing in MM functions.
+
+ * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
+ FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates):
+ Implement it.
+
+2017-01-31 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix sanity check for `gvar' table (#50184).
+
+ * src/truetype/ttgxvar.c (ft_var_load_gvar): There might be missing
+ variation data for some glyphs.
+
+2017-01-31 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Avoid uninitialized jumps (#50191).
+
+ * src/autofit/afcjk.c (af_cjk_metrics_check_digits),
+ src/autofit/aflatin.c (af_latin_metrics_check_digits): Initialize
+ `advance'.
+
+2017-01-27 Werner Lemberg <wl@gnu.org>
+
+ s/GB2312/PRC/.
+
+ * include/freetype/freetype.h (FT_ENCODING_PRC): New enum value.
+ (FT_ENCODING_GB2312): Deprecated.
+
+ * include/freetype/ttnameid.h (TT_MS_ID_PRC): New macro.
+ (TT_MS_ID_GB2312): Deprecated.
+
+ * src/sfnt/sfobjs.c (sfnt_find_encoding): Updated.
+
+ * docs/CHANGES: Updated.
+
+2017-01-26 Werner Lemberg <wl@gnu.org>
+
+ [base] Add `FT_Get_Sfnt_LangTag' function.
+
+ * include/freetype/ftsnames.h (FT_SfntLangTag): New structure.
+ (FT_Get_Sfnt_LangTag): New declaration.
+
+ * src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New function.
+
+ * docs/CHANGES: Updated.
+
+2017-01-26 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Support `name' table format 1.
+
+ * include/freetype/internal/tttypes.h (TT_LangTagRec): New
+ structure.
+ (TT_NameTableRec): Add fields `numLangTagRecords' and `langTags'.
+
+ * src/sfnt/ttload.c (tt_face_load_name): Add support for language
+ tags.
+ Reduce array size of name strings in case of invalid entries.
+ (tt_face_free_name): Updated.
+
+ * docs/CHANGES: Updated.
+
+2017-01-25 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] s/TT_NameEntry/TT_Name/.
+
+ * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed
+ to...
+ (TT_NameRec): This.
+ (TT_NameTableRec): Updated.
+
+ * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated.
+
+ * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated.
+
+ * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16,
+ tt_name_entry_ascii_from_other): Renamed to...
+ (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This,
+ respectively.
+ (TT_NameEntry_ConvertFunc): Renamed to...
+ (TT_Name_ConvertFunc): This.
+ (tt_face_get_name): Updated.
+
+ * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_name):
+ Updated.
+
+2017-01-24 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix Postscript name service for symbol fonts.
+
+ * src/sfnt/sfdriver.c (sfnt_get_ps_name): Accept PID/EID=3/0
+ entries also.
+
+2017-01-24 Werner Lemberg <wl@gnu.org>
+
+ [truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family.
+
+ * include/freetype/ftsnames.h
+ (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY,
+ FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros.
+ (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
+ FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated.
+
+ * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY,
+ TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros.
+ (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY):
+ Deprecated.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Updated.
+
+ * docs/CHANGES: Updated.
+
+2017-01-23 Werner Lemberg <wl@gnu.org>
+
+ [base] Add `FT_Set_Default_Properties' (#49187).
+
+ * include/freetype/ftmodapi.h: Add declaration.
+
+ * src/base/ftinit.c (ft_set_default_properties): Renamed to...
+ (FT_Set_Default_Properties): ... this.
+ (FT_Init_FreeType): Updated.
+
+ * docs/CHANGES: Updated.
+
+2017-01-23 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Minor updates for OpenType 1.8.1.
+
+ * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been
+ removed from the specification; it is now reserved.
+
+ * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated.
+ (GX_FVar_Head): Remove `countSizePairs'; the corresponding data
+ field in the `MVAR' table is now reserved.
+ (fvar_fields): Updated.
+
+2017-01-23 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Avoid segfault for invalid variation data.
+
+ * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure
+ `itemCount' is not zero.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=441
+
+2017-01-20 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttinterp.c (TT_RunIns): Adjust loop detector limits.
+
+2017-01-17 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ttnameid.h: Updated to OpenType 1.8.1.
+
+ (TT_APPLE_ID_FULL_UNICODE): New macro.
+
+ (TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC,
+ TT_MS_LANGID_UPPER_SORBIAN_GERMANY,
+ TT_MS_LANGID_LOWER_SORBIAN_GERMANY, TT_MS_LANGID_IRISH_IRELAND,
+ TT_MS_LANGID_INUKTITUT_CANADA_LATIN, TT_MS_LANGID_BASHKIR_RUSSIA,
+ TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG,
+ TT_MS_LANGID_GREENLANDIC_GREENLAND, TT_MS_LANGID_MAPUDUNGUN_CHILE,
+ TT_MS_LANGID_MOHAWK_MOHAWK, TT_MS_LANGID_BRETON_FRANCE,
+ TT_MS_LANGID_OCCITAN_FRANCE, TT_MS_LANGID_CORSICAN_FRANCE,
+ TT_MS_LANGID_ALSATIAN_FRANCE, TT_MS_LANGID_YAKUT_RUSSIA,
+ TT_MS_LANGID_KICHE_GUATEMALA, TT_MS_LANGID_KINYARWANDA_RWANDA,
+ TT_MS_LANGID_WOLOF_SENEGAL, TT_MS_LANGID_DARI_AFGHANISTAN): New
+ macros.
+
+ (TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC): Fix value.
+
+ (TT_MS_LANGID_GERMAN_LIECHTENSTEIN, TT_MS_LANGID_CATALAN_CATALAN,
+ TT_MS_LANGID_CHINESE_MACAO, TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT,
+ TT_MS_LANGID_KOREAN_KOREA, TT_MS_LANGID_ROMANSH_SWITZERLAND,
+ TT_MS_LANGID_SLOVENIAN_SLOVENIA, TT_MS_LANGID_BASQUE_BASQUE,
+ TT_MS_LANGID_SETSWANA_SOUTH_AFRICA,
+ TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA,
+ TT_MS_LANGID_ISIZULU_SOUTH_AFRICA, TT_MS_LANGID_KAZAKH_KAZAKHSTAN,
+ TT_MS_LANGID_KYRGYZ_KYRGYZSTAN, TT_MS_LANGID_KISWAHILI_KENYA,
+ TT_MS_LANGID_TATAR_RUSSIA, TT_MS_LANGID_ODIA_INDIA,
+ TT_MS_LANGID_MONGOLIAN_PRC, TT_MS_LANGID_TIBETAN_PRC,
+ TT_MS_LANGID_WELSH_UNITED_KINGDOM, TT_MS_LANGID_GALICIAN_GALICIAN,
+ TT_MS_LANGID_SINHALA_SRI_LANKA, TT_MS_LANGID_TAMAZIGHT_ALGERIA,
+ TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA, TT_MS_LANGID_YI_PRC,
+ TT_MS_LANGID_UIGHUR_PRC): New aliases.
+
+ Remove commented out code.
+
+ (TT_NAME_ID_LIGHT_BACKGROUND, TT_NAME_ID_DARK_BACKGROUND,
+ TT_NAME_ID_VARIATIONS_PREFIX): New macros.
+
+ (HAVE_LIMIT_ON_IDENTS): Remove macro (which was useless since many
+ years), use guarded long macros by default and define short versions
+ as aliases for the long ones.
+
+2017-01-15 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (tt_apply_var): Handle underline parameters
+ also.
+
+2017-01-11 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (ft_open_face_internal): Improve tracing.
+
+2017-01-11 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Actually use metrics variation service.
+
+ * src/base/ftmm.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+ (ft_face_get_mvar_service): New auxiliary function to look up
+ metrics variation service.
+ (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
+ FT_Set_Var_Blend_Coordinates): Call metrics variation service.
+
+ * src/truetype/ttobjs.c (tt_face_init): Use metrics variations for
+ named instances.
+
+2017-01-11 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Provide metrics variation service.
+
+ * include/freetype/internal/services/svmetric.h
+ (FT_Metrics_Adjust_Func): Reduce number of necessary parameters.
+
+ * src/truetype/ttgxvar.c: Include FT_LIST_H.
+ (tt_size_reset_iterator): New auxiliary function for...
+ (tt_apply_var): New function.
+
+ * src/truetype/ttgxvar.h: Updated.
+
+ * src/truetype/ttdriver.c (tt_service_metrics_variations): Add
+ `tt_apply_mvar'.
+
+ * include/freetype/internal/ftserv.h (FT_ServiceCache): Add metrics
+ variation service.
+
+2017-01-11 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Parse `MVAR' table.
+
+ * src/truetype/ttgxvar.h (MVAR_TAG_XXX): New macros for MVAR tags.
+ (GX_Value, GX_MVarTable): New structures.
+ (GX_Blend): Add it.
+
+ * src/truetype/ttgxvar.c (GX_VALUE_SIZE, GX_VALUE_CASE,
+ GX_GASP_CASE): New macros.
+ (ft_var_get_value_pointer): New auxiliary function to get a pointer
+ to a value from various SFNT tables already stored in `TT_Face'.
+ (ft_var_load_mvar): New function.
+ (TT_Get_MM_Var): Call it.
+ (tt_done_blend): Updated.
+
+2017-01-11 Werner Lemberg <wl@gnu.org>
+
+ [truetype] More preparations for MVAR support.
+
+ * src/truetype/ttobjs.c (tt_size_reset): Add argument to make
+ function only recompute ascender, descender, and height.
+
+ * src/truetype/ttobjs.h: Updated.
+
+ * src/truetype/ttdriver.c (tt_size_select, tt_size_request):
+ Updated.
+
+2017-01-09 Werner Lemberg <wl@gnu.org>
+
+ [pcf] Disable long family names by default.
+
+ * include/freetype/config/ftoption.h
+ (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out.
+
+2017-01-09 Werner Lemberg <wl@gnu.org>
+
+ [pcf] Make long family names configurable.
+
+ The change from 2016-09-29 was too radical (except for people using
+ the openSuSE GNU/Linux distribution). To ameliorate the situation,
+ PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls
+ the feature; if set, a new PCF property option
+ `no-long-family-names' can be used to switch this feature off.
+
+ * include/freetype/config/ftoption.h, devel/ftoption.h
+ (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option.
+
+ * include/freetype/ftpcfdrv.h: New header file (only containing
+ comments currently, used for building the documentation).
+
+ * include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro.
+
+ * src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field.
+
+ * src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and
+ FT_PCF_DRIVER_H.
+ (pcf_property_set, pcf_property_get): New functions.
+ (pcf_service_properties): New service.
+ (pcf_services): Updated.
+ (pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle
+ `no_long_family_names'.
+
+ * src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names'
+ and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
+
+ * docs/CHANGES: Updated.
+
+2017-01-09 Werner Lemberg <wl@gnu.org>
+
+ [pcf] Introduce a driver structure.
+
+ To be filled later on with something useful.
+
+ * src/pcf/pcf.h (PCF_Driver): New structure.
+
+ * src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy
+ functions.
+ (pcf_driver_class): Updated.
+
+2017-01-08 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Again some GX code shuffling.
+
+ We need this later on for MVAR also.
+
+ * src/truetype/ttgxvar.c (tt_hadvance_adjust): Split off computing
+ an item store variation delta into...
+ (ft_var_get_item_delta): ...new function.
+
+2017-01-08 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Adjust font variation flags for MVAR.
+
+ * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX):
+ Remove all flags related to MVAR; replace it with...
+ (TT_FACE_FLAG_VAR_MVAR): ...this new macro.
+ (TT_Face): Remove `mvar_support' field (which was still unused).
+
+2017-01-06 Werner Lemberg <wl@gnu.org>
+
+ [truetype] More GX code shuffling.
+
+ We need this later on for MVAR also.
+
+ * src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item
+ variation store into...
+ (ft_var_done_item_variation_store): ...new function.
+
+2017-01-06 Werner Lemberg <wl@gnu.org>
+
+ [truetype] More generalization of GX stuff.
+
+ We need this later on for MVAR also.
+
+ * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add
+ parameters for delta-set index mapping and item variation store.
+ (ft_var_load_item_variation_store): Add parameter for item variation
+ store.
+ s/hvarData/varData/.
+ Move allocation of `hvar_table' to...
+ (ft_var_load_hvar): ...this function.
+ Updated.
+
+2017-01-06 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Some GX structure renames for generalization.
+
+ We need this later on for MVAR also.
+
+ * src/truetype/ttgxvar.h (GX_HVarData): Renamed to...
+ (GX_ItemVarData): ...this.
+ (GX_HVarRegion): Renamed to...
+ (GX_VarRegion): ...this.
+ (GX_HVStore): Renamed to...
+ (GX_ItemVarStore): ...this.
+ (GX_WidthMap): Renamed to...
+ (GX_DeltaSetIdxMap): ...this.
+
+ (GX_HVarTable): Updated.
+
+ * src/truetype/ttgxvar.c: Updated.
+
+2017-01-06 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Code shuffling.
+
+ * src/truetype/ttgxvar.c (ft_var_load_hvar): Split off loading of
+ item variation store and delta set index mapping into...
+ (ft_var_load_item_variation_store,
+ ft_var_load_delta_set_index_mapping): ...new functions.
+
+2017-01-06 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Add HVAR access without advance width map.
+
+ * src/truetype/ttgxvar.c (ft_var_load_hvar): Handle case where
+ `offsetToAdvanceWidthMapping' is zero.
+ (tt_hadvance_adjust): Implement direct deltaSet access by glyph
+ index.
+
+2017-01-06 Werner Lemberg <wl@gnu.org>
+
+ [pcf] Revise driver.
+
+ This commit improves tracing and handling of malformed fonts. In
+ particular, the changes to `pcf_get_properties' fix
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=379
+
+ * src/pcf/pcfread.c (tableNames): Use long names for better
+ readability.
+ (pcf_read_TOC): Allow at most 9 tables.
+ (pcf_get_properties): Allow at most 256 properties.
+ Limit strings array length to 256 * (65536 + 1) bytes.
+ Better tracing.
+ (pcf_get_metric): Trace metric data.
+ (pcf_get_metrics): Allow at most 65536 metrics.
+ Fix comparison of `metrics->ascent' and `metrics->descent' to avoid
+ potential overflow.
+ Better tracing.
+ (pcf_get_bitmaps): Allow at most 65536 bitmaps.
+ Better tracing.
+ (pcf_get_encodings, pcf_get_accel): Better tracing.
+
+ * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Don't trace `format' details.
+ These are now shown by `pcf_get_bitmaps'.
+
+2017-01-04 Werner Lemberg <wl@gnu.org>
+
+ * src/pcf/pcfdrivr.c (PCF_Face_Init): Trace compression format.
+
+2017-01-04 Werner Lemberg <wl@gnu.org>
+
+ [cff] More consistency checks for pure CFFs.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=378
+
+ * src/cff/cffload.c (cff_font_load): Check element number and size
+ of Name and Top DICT indices.
+
+2017-01-04 Werner Lemberg <wl@gnu.org>
+
+ [cff, truetype] Minor tracing improvement.
+
+ * src/cff/cffobjs.c (cff_face_init), src/truetype/ttobjs.c
+ (tt_face_init): Indent first tracing message from SFNT driver.
+
+2017-01-03 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Various minor fixes.
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check instruction
+ size only if we do native hinting.
+ (TT_Load_Glyph): Trace returned error code.
+
+ * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Trace
+ returned error code.
+ (tt_size_ready_bytecode): Don't run `prep' table if `fpgm' table is
+ invalid.
+
+2017-01-03 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Don't fail if PCLT, EBLC (and similar tables) are invalid.
+
+ These tables are optional.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Implement it.
+
+2017-01-03 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffparse.c (cff_parse_num): Simplify.
+
+2017-01-03 Werner Lemberg <wl@gnu.org>
+
+ Various fixes for clang's undefined behaviour sanitizer.
+
+ * src/cff/cffload.c (FT_fdot14ToFixed): Fix casting.
+ (cff_blend_doBlend): Don't left-shift negative numbers.
+ Handle 5-byte numbers byte by byte to avoid alignment issues.
+
+ * src/cff/cffparse.c (cff_parse_num): Handle 5-byte numbers byte by
+ byte to avoid alignment issues.
+
+ * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any
+ subrs.
+
+ * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing.
+
+ * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around
+ definition of `ft_get_adobe_glyph_index'.
+
+ * src/psnames/pstables.h: Regenerated.
+
+ * src/psnames/psmodule.c: Include `pstables.h' twice to get both
+ declaration and definition.
+
+ * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix
+ casting.
+
+2017-01-01 Werner Lemberg <wl@gnu.org>
+
+ [cff] Handle multiple `blend' operators in a row correctly.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=368
+
+ * src/cff/cffload.c (cff_blend_doBlend): Adjust `parser->stack'
+ pointers into `subFont->blend_stack' after reallocation.
+
+2017-01-01 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Return correct number of named instances for TTCs.
+
+ Without this patch, requesting information for face index N returned
+ the data for face index N+1 (or index 0).
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index'
+ for negative `face_instance_index' values.
+
+2016-12-31 Werner Lemberg <wl@gnu.org>
+
+ */*: Use hex numbers for errors in tracing messages.
+
+2016-12-31 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Check axis count in HVAR table.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=362
+
+ * src/truetype/ttgxvar.c (ft_var_load_hvar): Check axis count.
+ (ft_var_load_avar): Fix tracing message.
+
+
+----------------------------------------------------------------------------
+
+Copyright 2016-2018 by
+David Turner, Robert Wilhelm, and Werner Lemberg.
+
+This file is part of the FreeType project, and may only be used, modified,
+and distributed under the terms of the FreeType project license,
+LICENSE.TXT. By continuing to use, modify, or distribute this file you
+indicate that you have read the license and understand and accept it
+fully.
+
+
+Local Variables:
+version-control: never
+coding: utf-8
+End:
diff --git a/modules/freetype2/Jamfile b/modules/freetype2/Jamfile
index 581241758..9078a5fe3 100644
--- a/modules/freetype2/Jamfile
+++ b/modules/freetype2/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 top Jamfile.
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -210,7 +210,7 @@ actions RefDoc
{
python $(FT2_SRC)/tools/docmaker/docmaker.py
--prefix=ft2
- --title=FreeType-2.7.1
+ --title=FreeType-2.9.1
--output=$(DOC_DIR)
$(FT2_INCLUDE)/freetype/*.h
$(FT2_INCLUDE)/freetype/config/*.h
diff --git a/modules/freetype2/Jamrules b/modules/freetype2/Jamrules
index 1e2d9b743..bdd04bcca 100644
--- a/modules/freetype2/Jamrules
+++ b/modules/freetype2/Jamrules
@@ -1,6 +1,6 @@
# FreeType 2 JamRules.
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/Makefile b/modules/freetype2/Makefile
index e370cae8f..0c7ee0eef 100644
--- a/modules/freetype2/Makefile
+++ b/modules/freetype2/Makefile
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/README b/modules/freetype2/README
index 097024c6e..c23b99e18 100644
--- a/modules/freetype2/README
+++ b/modules/freetype2/README
@@ -1,7 +1,7 @@
- FreeType 2.7.1
+ FreeType 2.9.1
==============
- Homepage: http://www.freetype.org
+ Homepage: https://www.freetype.org
FreeType is a freely available software library to render fonts.
@@ -20,17 +20,17 @@
documentation is available as a separate package from our sites. Go
to
- http://download.savannah.gnu.org/releases/freetype/
+ https://download.savannah.gnu.org/releases/freetype/
and download one of the following files.
- freetype-doc-2.7.1.tar.bz2
- freetype-doc-2.7.1.tar.gz
- ftdoc271.zip
+ freetype-doc-2.9.1.tar.bz2
+ freetype-doc-2.9.1.tar.gz
+ ftdoc291.zip
To view the documentation online, go to
- http://www.freetype.org/freetype2/documentation.html
+ https://www.freetype.org/freetype2/documentation.html
Mailing Lists
@@ -46,7 +46,7 @@
The lists are moderated; see
- http://www.freetype.org/contact.html
+ https://www.freetype.org/contact.html
how to subscribe.
@@ -71,7 +71,7 @@
----------------------------------------------------------------------
-Copyright 2006-2016 by
+Copyright 2006-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/README.git b/modules/freetype2/README.git
index 34ee82df8..a3d7fc0cd 100644
--- a/modules/freetype2/README.git
+++ b/modules/freetype2/README.git
@@ -37,7 +37,7 @@ repository.
----------------------------------------------------------------------
-Copyright 2005-2016 by
+Copyright 2005-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/README.moz-patches b/modules/freetype2/README.moz-patches
index 4162c767a..e67370b21 100644
--- a/modules/freetype2/README.moz-patches
+++ b/modules/freetype2/README.moz-patches
@@ -1,4 +1,4 @@
-This directory contains freetype2 v2.7 downloaded from
+This directory contains freetype2 v2.9.1 downloaded from
http://savannah.nongnu.org/download/freetype/
There are currently no local changes applied to the freetype tree,
diff --git a/modules/freetype2/autogen.sh b/modules/freetype2/autogen.sh
index 78053ccb6..ab90e6417 100755
--- a/modules/freetype2/autogen.sh
+++ b/modules/freetype2/autogen.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005-2016 by
+# Copyright 2005-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/amiga/README b/modules/freetype2/builds/amiga/README
index eae9e3396..29e97d667 100644
--- a/modules/freetype2/builds/amiga/README
+++ b/modules/freetype2/builds/amiga/README
@@ -1,7 +1,7 @@
README for the builds/amiga subdirectory.
-Copyright 2005-2016 by
+Copyright 2005-2018 by
Werner Lemberg and Detlef Würkner.
This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/amiga/include/config/ftconfig.h b/modules/freetype2/builds/amiga/include/config/ftconfig.h
index 0cb65b661..0217e0ed1 100644
--- a/modules/freetype2/builds/amiga/include/config/ftconfig.h
+++ b/modules/freetype2/builds/amiga/include/config/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* Amiga-specific configuration file (specification only). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/builds/amiga/include/config/ftmodule.h b/modules/freetype2/builds/amiga/include/config/ftmodule.h
index bbff9c522..f8baab566 100644
--- a/modules/freetype2/builds/amiga/include/config/ftmodule.h
+++ b/modules/freetype2/builds/amiga/include/config/ftmodule.h
@@ -4,7 +4,7 @@
/* */
/* Amiga-specific FreeType module selection. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/builds/amiga/makefile b/modules/freetype2/builds/amiga/makefile
index 34ba77d7e..6a7700af2 100644
--- a/modules/freetype2/builds/amiga/makefile
+++ b/modules/freetype2/builds/amiga/makefile
@@ -5,7 +5,7 @@
#
-# Copyright 2005-2016 by
+# Copyright 2005-2018 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -96,9 +96,6 @@ ftbitmap.ppc.o: $(FTSRC)/base/ftbitmap.c
ftcid.ppc.o: $(FTSRC)/base/ftcid.c
$(CC) -c $(CFLAGS) -o $@ $<
-ftfntfmt.ppc.o: $(FTSRC)/base/ftfntfmt.c
- $(CC) -c $(CFLAGS) -o $@ $<
-
ftfstype.ppc.o: $(FTSRC)/base/ftfstype.c
$(CC) -c $(CFLAGS) -o $@ $<
@@ -111,9 +108,6 @@ ftglyph.ppc.o: $(FTSRC)/base/ftglyph.c
ftgxval.ppc.o: $(FTSRC)/base/ftgxval.c
$(CC) -c $(CFLAGS) -o $@ $<
-ftlcdfil.ppc.o: $(FTSRC)/base/ftlcdfil.c
- $(CC) -c $(CFLAGS) -o $@ $<
-
ftmm.ppc.o: $(FTSRC)/base/ftmm.c
$(CC) -c $(CFLAGS) -o $@ $<
@@ -270,8 +264,8 @@ otvalid.ppc.o: $(FTSRC)/otvalid/otvalid.c
$(CC) -c $(CFLAGS) -o $@ $<
BASEPPC = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftcid.ppc.o \
- ftfntfmt.ppc.oftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
- ftgxval.ppc.o ftlcdfil.ppc.o ftmm.ppc.o ftotval.ppc.o \
+ oftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
+ ftgxval.ppc.o ftmm.ppc.o ftotval.ppc.o \
ftpatent.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
fttype1.ppc.o ftwinfnt.ppc.o
diff --git a/modules/freetype2/builds/amiga/makefile.os4 b/modules/freetype2/builds/amiga/makefile.os4
index a25dd3e69..0d340cf19 100644
--- a/modules/freetype2/builds/amiga/makefile.os4
+++ b/modules/freetype2/builds/amiga/makefile.os4
@@ -4,7 +4,7 @@
#
-# Copyright 2005-2016 by
+# Copyright 2005-2018 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -99,9 +99,6 @@ ftdebug.ppc.o: FT:src/base/ftdebug.c
ftdebugpure.ppc.o: src/base/ftdebug.c
$(CC) -c $(CFLAGS) -o $@ src/base/ftdebug.c
-ftfntfmt.ppc.o: FT:src/base/ftfntfmt.c
- $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftfntfmt.c
-
ftfstype.ppc.o: FT:src/base/ftfstype.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftfstype.c
@@ -114,9 +111,6 @@ ftglyph.ppc.o: FT:src/base/ftglyph.c
ftgxval.ppc.o: FT:src/base/ftgxval.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftgxval.c
-ftlcdfil.ppc.o: FT:src/base/ftlcdfil.c
- $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftlcdfil.c
-
ftmm.ppc.o: FT:src/base/ftmm.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftmm.c
@@ -274,8 +268,8 @@ otvalid.ppc.o: FT:src/otvalid/otvalid.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/otvalid/otvalid.c
BASE = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftcid.ppc.o \
- ftfntfmt.ppc.o ftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
- ftgxval.ppc.o ftlcdfil.ppc.o ftmm.ppc.o ftotval.ppc.o \
+ ftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
+ ftgxval.ppc.o ftmm.ppc.o ftotval.ppc.o \
ftpatent.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
fttype1.ppc.o ftwinfnt.ppc.o
diff --git a/modules/freetype2/builds/amiga/smakefile b/modules/freetype2/builds/amiga/smakefile
index 723a89027..f5de3089a 100644
--- a/modules/freetype2/builds/amiga/smakefile
+++ b/modules/freetype2/builds/amiga/smakefile
@@ -3,7 +3,7 @@
#
-# Copyright 2005-2016 by
+# Copyright 2005-2018 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -42,8 +42,8 @@
# (and either ftdebug.o or ftdebugpure.o if you enabled FT_DEBUG_LEVEL_ERROR or
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
-OBJBASE = ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftcid.o ftfntfmt.o ftfstype.o \
- ftgasp.o ftglyph.o ftgxval.o ftlcdfil.o ftmm.o ftotval.o \
+OBJBASE = ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftcid.o ftfstype.o \
+ ftgasp.o ftglyph.o ftgxval.o ftmm.o ftotval.o \
ftpatent.o ftpfr.o ftstroke.o ftsynth.o fttype1.o ftwinfnt.o
OBJSYSTEM = ftsystem.o ftsystempure.o
@@ -133,8 +133,6 @@ ftbitmap.o: $(CORE)base/ftbitmap.c
sc $(SCFLAGS) objname=$@ $<
ftcid.o: $(CORE)base/ftcid.c
sc $(SCFLAGS) objname=$@ $<
-ftfntfmt.o: $(CORE)base/ftfntfmt.c
- sc $(SCFLAGS) objname=$@ $<
ftfstype.o: $(CORE)base/ftfstype.c
sc $(SCFLAGS) objname=$@ $<
ftgasp.o: $(CORE)base/ftgasp.c
@@ -143,8 +141,6 @@ ftglyph.o: $(CORE)base/ftglyph.c
sc $(SCFLAGS) objname=$@ $<
ftgxval.o: $(CORE)base/ftgxval.c
sc $(SCFLAGS) objname=$@ $<
-ftlcdfil.o: $(CORE)base/ftlcdfil.c
- sc $(SCFLAGS) objname=$@ $<
ftmm.o: $(CORE)base/ftmm.c
sc $(SCFLAGS) objname=$@ $<
ftotval.o: $(CORE)base/ftotval.c
diff --git a/modules/freetype2/builds/amiga/src/base/ftdebug.c b/modules/freetype2/builds/amiga/src/base/ftdebug.c
index 4ac6eefd6..f3ba48c93 100644
--- a/modules/freetype2/builds/amiga/src/base/ftdebug.c
+++ b/modules/freetype2/builds/amiga/src/base/ftdebug.c
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component for amiga (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/builds/amiga/src/base/ftsystem.c b/modules/freetype2/builds/amiga/src/base/ftsystem.c
index 080eaef3e..babaeeb68 100644
--- a/modules/freetype2/builds/amiga/src/base/ftsystem.c
+++ b/modules/freetype2/builds/amiga/src/base/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* Amiga-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/builds/ansi/ansi-def.mk b/modules/freetype2/builds/ansi/ansi-def.mk
index 933232d58..1484f9629 100644
--- a/modules/freetype2/builds/ansi/ansi-def.mk
+++ b/modules/freetype2/builds/ansi/ansi-def.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/ansi/ansi.mk b/modules/freetype2/builds/ansi/ansi.mk
index 19a3e1f23..c06732c83 100644
--- a/modules/freetype2/builds/ansi/ansi.mk
+++ b/modules/freetype2/builds/ansi/ansi.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/beos/beos-def.mk b/modules/freetype2/builds/beos/beos-def.mk
index edd356ec2..89c54ddd5 100644
--- a/modules/freetype2/builds/beos/beos-def.mk
+++ b/modules/freetype2/builds/beos/beos-def.mk
@@ -5,7 +5,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/beos/beos.mk b/modules/freetype2/builds/beos/beos.mk
index 4b9e0971d..619ceaff4 100644
--- a/modules/freetype2/builds/beos/beos.mk
+++ b/modules/freetype2/builds/beos/beos.mk
@@ -2,7 +2,7 @@
# FreeType 2 configuration rules for a BeOS system
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/beos/detect.mk b/modules/freetype2/builds/beos/detect.mk
index e85bc4172..82f62059b 100644
--- a/modules/freetype2/builds/beos/detect.mk
+++ b/modules/freetype2/builds/beos/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/cmake/FindHarfBuzz.cmake b/modules/freetype2/builds/cmake/FindHarfBuzz.cmake
index f394b82bf..ee0d52e36 100644
--- a/modules/freetype2/builds/cmake/FindHarfBuzz.cmake
+++ b/modules/freetype2/builds/cmake/FindHarfBuzz.cmake
@@ -31,42 +31,51 @@
# HARFBUZZ_LIBRARIES - containg the HarfBuzz library
include(FindPkgConfig)
+pkg_check_modules(PC_HARFBUZZ QUIET harfbuzz)
-pkg_check_modules(PC_HARFBUZZ harfbuzz>=0.9.7)
-
-find_path(HARFBUZZ_INCLUDE_DIRS NAMES hb.h
- HINTS ${PC_HARFBUZZ_INCLUDE_DIRS} ${PC_HARFBUZZ_INCLUDEDIR}
+find_path(HARFBUZZ_INCLUDE_DIRS
+ NAMES hb.h
+ HINTS ${PC_HARFBUZZ_INCLUDEDIR}
+ ${PC_HARFBUZZ_INCLUDE_DIRS}
+ PATH_SUFFIXES harfbuzz
)
find_library(HARFBUZZ_LIBRARIES NAMES harfbuzz
- HINTS ${PC_HARFBUZZ_LIBRARY_DIRS} ${PC_HARFBUZZ_LIBDIR}
+ HINTS ${PC_HARFBUZZ_LIBDIR}
+ ${PC_HARFBUZZ_LIBRARY_DIRS}
)
-# HarfBuzz 0.9.18 split ICU support into a separate harfbuzz-icu library.
-if ("${PC_HARFBUZZ_VERSION}" VERSION_GREATER "0.9.17")
- if (HarfBuzz_FIND_REQUIRED)
- set(_HARFBUZZ_REQUIRED REQUIRED)
- else ()
- set(_HARFBUZZ_REQUIRED "")
- endif ()
- pkg_check_modules(PC_HARFBUZZ_ICU harfbuzz-icu>=0.9.18 ${_HARFBUZZ_REQUIRED})
- find_library(HARFBUZZ_ICU_LIBRARIES NAMES harfbuzz-icu
- HINTS ${PC_HARFBUZZ_ICU_LIBRARY_DIRS} ${PC_HARFBUZZ_ICU_LIBDIR}
- )
- if (HARFBUZZ_ICU_LIBRARIES)
- list(APPEND HARFBUZZ_LIBRARIES "${HARFBUZZ_ICU_LIBRARIES}")
+if (HARFBUZZ_INCLUDE_DIRS)
+ if (EXISTS "${HARFBUZZ_INCLUDE_DIRS}/hb-version.h")
+ file(READ "${HARFBUZZ_INCLUDE_DIRS}/hb-version.h" _harfbuzz_version_content)
+
+ string(REGEX MATCH "#define +HB_VERSION_STRING +\"([0-9]+\\.[0-9]+\\.[0-9]+)\"" _dummy "${_harfbuzz_version_content}")
+ set(HARFBUZZ_VERSION "${CMAKE_MATCH_1}")
endif ()
- set(_HARFBUZZ_EXTRA_REQUIRED_VAR "HARFBUZZ_ICU_LIBRARIES")
-else ()
- set(_HARFBUZZ_EXTRA_REQUIRED_VAR "")
+endif ()
+
+if ("${harfbuzz_FIND_VERSION}" VERSION_GREATER "${HARFBUZZ_VERSION}")
+ message(FATAL_ERROR "Required version (" ${harfbuzz_FIND_VERSION} ") is higher than found version (" ${HARFBUZZ_VERSION} ")")
endif ()
include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(HarfBuzz DEFAULT_MSG HARFBUZZ_INCLUDE_DIRS
- HARFBUZZ_LIBRARIES ${_HARFBUZZ_EXTRA_REQUIRED_VAR})
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+ harfbuzz
+ REQUIRED_VARS HARFBUZZ_INCLUDE_DIRS HARFBUZZ_LIBRARIES
+ VERSION_VAR HARFBUZZ_VERSION)
mark_as_advanced(
- HARFBUZZ_ICU_LIBRARIES
HARFBUZZ_INCLUDE_DIRS
HARFBUZZ_LIBRARIES
)
+
+# Allows easy linking as in
+# target_link_libraries(freetype PRIVATE Harfbuzz::Harfbuzz)
+if (NOT CMAKE_VERSION VERSION_LESS 3.1)
+ if (HARFBUZZ_FOUND AND NOT TARGET Harfbuzz::Harfbuzz)
+ add_library(Harfbuzz::Harfbuzz INTERFACE IMPORTED)
+ set_target_properties(
+ Harfbuzz::Harfbuzz PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${HARFBUZZ_INCLUDE_DIRS}")
+ endif ()
+endif ()
diff --git a/modules/freetype2/builds/cmake/iOS.cmake b/modules/freetype2/builds/cmake/iOS.cmake
index 378dbd895..c6da70c0c 100644
--- a/modules/freetype2/builds/cmake/iOS.cmake
+++ b/modules/freetype2/builds/cmake/iOS.cmake
@@ -1,6 +1,6 @@
# iOS.cmake
#
-# Copyright 2014-2016 by
+# Copyright 2014-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# Written by David Wimsey <david@wimsey.us>
diff --git a/modules/freetype2/builds/cmake/testbuild.sh b/modules/freetype2/builds/cmake/testbuild.sh
index e05dd29cf..1fa3a1869 100755
--- a/modules/freetype2/builds/cmake/testbuild.sh
+++ b/modules/freetype2/builds/cmake/testbuild.sh
@@ -1,6 +1,6 @@
#!/bin/sh -e
-# Copyright 2015-2016 by
+# Copyright 2015-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/ansi-cc.mk b/modules/freetype2/builds/compiler/ansi-cc.mk
index 688b0c735..99fe8cb58 100644
--- a/modules/freetype2/builds/compiler/ansi-cc.mk
+++ b/modules/freetype2/builds/compiler/ansi-cc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/bcc-dev.mk b/modules/freetype2/builds/compiler/bcc-dev.mk
index a53fcefa5..8d67fa1a5 100644
--- a/modules/freetype2/builds/compiler/bcc-dev.mk
+++ b/modules/freetype2/builds/compiler/bcc-dev.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/bcc.mk b/modules/freetype2/builds/compiler/bcc.mk
index 398b85303..02d483336 100644
--- a/modules/freetype2/builds/compiler/bcc.mk
+++ b/modules/freetype2/builds/compiler/bcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/emx.mk b/modules/freetype2/builds/compiler/emx.mk
index 2ce52be46..2926b1179 100644
--- a/modules/freetype2/builds/compiler/emx.mk
+++ b/modules/freetype2/builds/compiler/emx.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2003-2016 by
+# Copyright 2003-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/gcc-dev.mk b/modules/freetype2/builds/compiler/gcc-dev.mk
index f87f94d9d..48d284898 100644
--- a/modules/freetype2/builds/compiler/gcc-dev.mk
+++ b/modules/freetype2/builds/compiler/gcc-dev.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/gcc.mk b/modules/freetype2/builds/compiler/gcc.mk
index e102c6d34..9c772394a 100644
--- a/modules/freetype2/builds/compiler/gcc.mk
+++ b/modules/freetype2/builds/compiler/gcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/intelc.mk b/modules/freetype2/builds/compiler/intelc.mk
index b2e704707..e9236d34b 100644
--- a/modules/freetype2/builds/compiler/intelc.mk
+++ b/modules/freetype2/builds/compiler/intelc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/unix-lcc.mk b/modules/freetype2/builds/compiler/unix-lcc.mk
index 20011f884..09fffeb67 100644
--- a/modules/freetype2/builds/compiler/unix-lcc.mk
+++ b/modules/freetype2/builds/compiler/unix-lcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/visualage.mk b/modules/freetype2/builds/compiler/visualage.mk
index 14e6229f3..10299da62 100644
--- a/modules/freetype2/builds/compiler/visualage.mk
+++ b/modules/freetype2/builds/compiler/visualage.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/visualc.mk b/modules/freetype2/builds/compiler/visualc.mk
index 62dc9d217..74f498b61 100644
--- a/modules/freetype2/builds/compiler/visualc.mk
+++ b/modules/freetype2/builds/compiler/visualc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/watcom.mk b/modules/freetype2/builds/compiler/watcom.mk
index da3d19ded..e455922f0 100644
--- a/modules/freetype2/builds/compiler/watcom.mk
+++ b/modules/freetype2/builds/compiler/watcom.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/compiler/win-lcc.mk b/modules/freetype2/builds/compiler/win-lcc.mk
index bd0d4bee4..1356c1ca8 100644
--- a/modules/freetype2/builds/compiler/win-lcc.mk
+++ b/modules/freetype2/builds/compiler/win-lcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/detect.mk b/modules/freetype2/builds/detect.mk
index cea55a57e..eb7f79749 100644
--- a/modules/freetype2/builds/detect.mk
+++ b/modules/freetype2/builds/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -101,54 +101,28 @@ ifndef CONFIG_FILE
.PHONY: setup
endif
-# The following targets are equivalent, with the exception that they use
-# a slightly different syntax for the `echo' command.
+# Flash out and copy rules.
#
-# std_setup: defined for most (i.e. Unix-like) platforms
-# dos_setup: defined for Dos-ish platforms like Dos, Windows & OS/2
-#
-.PHONY: std_setup dos_setup
+.PHONY: std_setup
std_setup:
- @echo ""
- @echo "$(PROJECT_TITLE) build system -- automatic system detection"
- @echo ""
- @echo "The following settings are used:"
- @echo ""
- @echo " platform $(PLATFORM)"
- @echo " compiler $(CC)"
- @echo " configuration directory $(BUILD_DIR)"
- @echo " configuration rules $(CONFIG_RULES)"
- @echo ""
- @echo "If this does not correspond to your system or settings please remove the file"
- @echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help."
- @echo ""
- @echo "Otherwise, simply type \`$(MAKE)' again to build the library,"
- @echo "or \`$(MAKE) refdoc' to build the API reference (this needs python >= 2.6)."
- @echo ""
- @$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
-
-
-# Special case for Dos, Windows, OS/2, where echo "" doesn't work correctly!
-#
-dos_setup:
- @type builds$(SEP)newline
- @echo $(PROJECT_TITLE) build system -- automatic system detection
- @type builds$(SEP)newline
- @echo The following settings are used:
- @type builds$(SEP)newline
- @echo platformÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(PLATFORM)
- @echo compilerÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(CC)
- @echo configuration directoryÿÿÿÿÿÿ$(subst /,$(SEP),$(BUILD_DIR))
- @echo configuration rulesÿÿÿÿÿÿÿÿÿÿ$(subst /,$(SEP),$(CONFIG_RULES))
- @type builds$(SEP)newline
- @echo If this does not correspond to your system or settings please remove the file
- @echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help.
- @type builds$(SEP)newline
- @echo Otherwise, simply type 'make' again to build the library.
- @echo or 'make refdoc' to build the API reference (this needs python >= 2.6).
- @type builds$(SEP)newline
- @$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK)) > nul
+ $(info )
+ $(info $(PROJECT_TITLE) build system -- automatic system detection)
+ $(info )
+ $(info The following settings are used:)
+ $(info )
+ $(info $(empty) platform $(PLATFORM))
+ $(info $(empty) compiler $(CC))
+ $(info $(empty) configuration directory $(subst /,$(SEP),$(BUILD_DIR)))
+ $(info $(empty) configuration rules $(subst /,$(SEP),$(CONFIG_RULES)))
+ $(info )
+ $(info If this does not correspond to your system or settings please remove the file)
+ $(info `$(CONFIG_MK)' from this directory then read the INSTALL file for help.)
+ $(info )
+ $(info Otherwise, simply type `$(MAKE)' again to build the library,)
+ $(info or `$(MAKE) refdoc' to build the API reference (this needs python >= 2.6).)
+ $(info )
+ @$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK))
# EOF
diff --git a/modules/freetype2/builds/dos/detect.mk b/modules/freetype2/builds/dos/detect.mk
index b610e463d..0201f7b46 100644
--- a/modules/freetype2/builds/dos/detect.mk
+++ b/modules/freetype2/builds/dos/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -133,7 +133,7 @@ ifeq ($(PLATFORM),dos)
COPY := copy
endif # test NT
- setup: dos_setup
+ setup: std_setup
endif
endif # test PLATFORM dos
diff --git a/modules/freetype2/builds/dos/dos-def.mk b/modules/freetype2/builds/dos/dos-def.mk
index 9aa0ee648..cb1154dc8 100644
--- a/modules/freetype2/builds/dos/dos-def.mk
+++ b/modules/freetype2/builds/dos/dos-def.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/dos/dos-emx.mk b/modules/freetype2/builds/dos/dos-emx.mk
index 3933abac7..dedcc3fc1 100644
--- a/modules/freetype2/builds/dos/dos-emx.mk
+++ b/modules/freetype2/builds/dos/dos-emx.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2003-2016 by
+# Copyright 2003-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/dos/dos-gcc.mk b/modules/freetype2/builds/dos/dos-gcc.mk
index e191a8134..53099ab41 100644
--- a/modules/freetype2/builds/dos/dos-gcc.mk
+++ b/modules/freetype2/builds/dos/dos-gcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/dos/dos-wat.mk b/modules/freetype2/builds/dos/dos-wat.mk
index a0fe4c94b..1bd00e73e 100644
--- a/modules/freetype2/builds/dos/dos-wat.mk
+++ b/modules/freetype2/builds/dos/dos-wat.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2003-2016 by
+# Copyright 2003-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/exports.mk b/modules/freetype2/builds/exports.mk
index d5a508571..59fe31a4b 100644
--- a/modules/freetype2/builds/exports.mk
+++ b/modules/freetype2/builds/exports.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2005-2016 by
+# Copyright 2005-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/freetype.mk b/modules/freetype2/builds/freetype.mk
index 43766beac..6f68a0f65 100644
--- a/modules/freetype2/builds/freetype.mk
+++ b/modules/freetype2/builds/freetype.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -153,6 +153,9 @@ endif
ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),)
FTOPTION_H := $(OBJ_DIR)/ftoption.h
FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_H="<ftoption.h>"
+else ifneq ($(wildcard $(BUILD_DIR)/ftoption.h),)
+ FTOPTION_H := $(BUILD_DIR)/ftoption.h
+ FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_H="<ftoption.h>"
endif
# `CPPFLAGS' might be specified by the user in the environment.
@@ -245,6 +248,22 @@ $(FTINIT_OBJ): $(FTINIT_SRC) $(FREETYPE_H)
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+# ftver component
+#
+# The VERSIONINFO resource `ftver.rc' contains version and copyright
+# to be compiled by windres and tagged into DLL usually.
+#
+ifneq ($(RC),)
+ FTVER_SRC := $(BASE_DIR)/ftver.rc
+ FTVER_OBJ := $(OBJ_DIR)/ftver.$O
+
+ OBJECTS_LIST += $(FTVER_OBJ)
+
+ $(FTVER_OBJ): $(FTVER_SRC)
+ $(RC) -o $@ $<
+endif
+
+
# All FreeType library objects.
#
OBJ_M := $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M)
@@ -326,10 +345,9 @@ remove_ftmodule_h:
.PHONY: clean distclean
-# The `config.mk' file must define `clean_freetype' and
-# `distclean_freetype'. Implementations may use to relay these to either
-# the `std' or `dos' versions from above, or simply provide their own
-# implementation.
+# The `config.mk' file must define `clean_project' and `distclean_project'.
+# Implementations may use to relay these to either the `std' or `dos'
+# versions from above, or simply provide their own implementation.
#
clean: clean_project
distclean: distclean_project remove_config_mk remove_ftmodule_h
diff --git a/modules/freetype2/builds/link_dos.mk b/modules/freetype2/builds/link_dos.mk
index f04cc70c9..3b0e8da58 100644
--- a/modules/freetype2/builds/link_dos.mk
+++ b/modules/freetype2/builds/link_dos.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/link_std.mk b/modules/freetype2/builds/link_std.mk
index a5d192e88..8ba5e64db 100644
--- a/modules/freetype2/builds/link_std.mk
+++ b/modules/freetype2/builds/link_std.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/mac/FreeType.m68k_cfm.make.txt b/modules/freetype2/builds/mac/FreeType.m68k_cfm.make.txt
index c0a55f510..b74565f10 100644
--- a/modules/freetype2/builds/mac/FreeType.m68k_cfm.make.txt
+++ b/modules/freetype2/builds/mac/FreeType.m68k_cfm.make.txt
@@ -38,7 +38,6 @@ SrcFiles = \xB6
:src:base:ftbdf.c \xB6
:src:base:ftbitmap.c \xB6
:src:base:ftdebug.c \xB6
- :src:base:ftfntfmt.c \xB6
:src:base:ftfstype.c \xB6
:src:base:ftglyph.c \xB6
:src:base:ftgxval.c \xB6
@@ -83,7 +82,6 @@ ObjFiles-68K = \xB6
"{ObjDir}ftbdf.c.o" \xB6
"{ObjDir}ftbitmap.c.o" \xB6
"{ObjDir}ftdebug.c.o" \xB6
- "{ObjDir}ftfntfmt.c.o" \xB6
"{ObjDir}ftfstype.c.o" \xB6
"{ObjDir}ftglyph.c.o" \xB6
"{ObjDir}ftgxval.c.o" \xB6
@@ -161,7 +159,6 @@ FreeType.m68k_cfm.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5
"{ObjDir}ftbdf.c.o" \xC4 :src:base:ftbdf.c
"{ObjDir}ftbitmap.c.o" \xC4 :src:base:ftbitmap.c
"{ObjDir}ftdebug.c.o" \xC4 :src:base:ftdebug.c
-"{ObjDir}ftfntfmt.c.o" \xC4 :src:base:ftfntfmt.c
"{ObjDir}ftfstype.c.o" \xC4 :src:base:ftfstype.c
"{ObjDir}ftglyph.c.o" \xC4 :src:base:ftglyph.c
"{ObjDir}ftgxval.c.o" \xC4 :src:base:ftgxval.c
diff --git a/modules/freetype2/builds/mac/FreeType.m68k_far.make.txt b/modules/freetype2/builds/mac/FreeType.m68k_far.make.txt
index e9b7f6f5f..d880ddbb7 100644
--- a/modules/freetype2/builds/mac/FreeType.m68k_far.make.txt
+++ b/modules/freetype2/builds/mac/FreeType.m68k_far.make.txt
@@ -37,7 +37,6 @@ SrcFiles = \xB6
:src:base:ftbdf.c \xB6
:src:base:ftbitmap.c \xB6
:src:base:ftdebug.c \xB6
- :src:base:ftfntfmt.c \xB6
:src:base:ftfstype.c \xB6
:src:base:ftglyph.c \xB6
:src:base:ftgxval.c \xB6
@@ -82,7 +81,6 @@ ObjFiles-68K = \xB6
"{ObjDir}ftbdf.c.o" \xB6
"{ObjDir}ftbitmap.c.o" \xB6
"{ObjDir}ftdebug.c.o" \xB6
- "{ObjDir}ftfntfmt.c.o" \xB6
"{ObjDir}ftfstype.c.o" \xB6
"{ObjDir}ftglyph.c.o" \xB6
"{ObjDir}ftgxval.c.o" \xB6
@@ -160,7 +158,6 @@ FreeType.m68k_far.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5
"{ObjDir}ftbdf.c.o" \xC4 :src:base:ftbdf.c
"{ObjDir}ftbitmap.c.o" \xC4 :src:base:ftbitmap.c
"{ObjDir}ftdebug.c.o" \xC4 :src:base:ftdebug.c
-"{ObjDir}ftfntfmt.c.o" \xC4 :src:base:ftfntfmt.c
"{ObjDir}ftfstype.c.o" \xC4 :src:base:ftfstype.c
"{ObjDir}ftglyph.c.o" \xC4 :src:base:ftglyph.c
"{ObjDir}ftgxval.c.o" \xC4 :src:base:ftgxval.c
diff --git a/modules/freetype2/builds/mac/FreeType.ppc_carbon.make.txt b/modules/freetype2/builds/mac/FreeType.ppc_carbon.make.txt
index 9eb1dac4e..1fa8c3076 100644
--- a/modules/freetype2/builds/mac/FreeType.ppc_carbon.make.txt
+++ b/modules/freetype2/builds/mac/FreeType.ppc_carbon.make.txt
@@ -38,7 +38,6 @@ SrcFiles = \xB6
:src:base:ftbdf.c \xB6
:src:base:ftbitmap.c \xB6
:src:base:ftdebug.c \xB6
- :src:base:ftfntfmt.c \xB6
:src:base:ftfstype.c \xB6
:src:base:ftglyph.c \xB6
:src:base:ftgxval.c \xB6
@@ -83,7 +82,6 @@ ObjFiles-PPC = \xB6
"{ObjDir}ftbdf.c.x" \xB6
"{ObjDir}ftbitmap.c.x" \xB6
"{ObjDir}ftdebug.c.x" \xB6
- "{ObjDir}ftfntfmt.c.x" \xB6
"{ObjDir}ftfstype.c.x" \xB6
"{ObjDir}ftglyph.c.x" \xB6
"{ObjDir}ftgxval.c.x" \xB6
@@ -164,7 +162,6 @@ FreeType.ppc_carbon.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\x
"{ObjDir}ftbdf.c.x" \xC4 :src:base:ftbdf.c
"{ObjDir}ftbitmap.c.x" \xC4 :src:base:ftbitmap.c
"{ObjDir}ftdebug.c.x" \xC4 :src:base:ftdebug.c
-"{ObjDir}ftfntfmt.c.x" \xC4 :src:base:ftfntfmt.c
"{ObjDir}ftfstype.c.x" \xC4 :src:base:ftfstype.c
"{ObjDir}ftglyph.c.x" \xC4 :src:base:ftglyph.c
"{ObjDir}ftgxval.c.x" \xC4 :src:base:ftgxval.c
diff --git a/modules/freetype2/builds/mac/FreeType.ppc_classic.make.txt b/modules/freetype2/builds/mac/FreeType.ppc_classic.make.txt
index 0627eeaa9..2550190cb 100644
--- a/modules/freetype2/builds/mac/FreeType.ppc_classic.make.txt
+++ b/modules/freetype2/builds/mac/FreeType.ppc_classic.make.txt
@@ -38,7 +38,6 @@ SrcFiles = \xB6
:src:base:ftbdf.c \xB6
:src:base:ftbitmap.c \xB6
:src:base:ftdebug.c \xB6
- :src:base:ftfntfmt.c \xB6
:src:base:ftfstype.c \xB6
:src:base:ftglyph.c \xB6
:src:base:ftgxval.c \xB6
@@ -83,7 +82,6 @@ ObjFiles-PPC = \xB6
"{ObjDir}ftbdf.c.x" \xB6
"{ObjDir}ftbitmap.c.x" \xB6
"{ObjDir}ftdebug.c.x" \xB6
- "{ObjDir}ftfntfmt.c.x" \xB6
"{ObjDir}ftfstype.c.x" \xB6
"{ObjDir}ftglyph.c.x" \xB6
"{ObjDir}ftgxval.c.x" \xB6
@@ -164,7 +162,6 @@ FreeType.ppc_classic.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\
"{ObjDir}ftbdf.c.x" \xC4 :src:base:ftbdf.c
"{ObjDir}ftbitmap.c.x" \xC4 :src:base:ftbitmap.c
"{ObjDir}ftdebug.c.x" \xC4 :src:base:ftdebug.c
-"{ObjDir}ftfntfmt.c.x" \xC4 :src:base:ftfntfmt.c
"{ObjDir}ftfstype.c.x" \xC4 :src:base:ftfstype.c
"{ObjDir}ftglyph.c.x" \xC4 :src:base:ftglyph.c
"{ObjDir}ftgxval.c.x" \xC4 :src:base:ftgxval.c
diff --git a/modules/freetype2/builds/mac/ftmac.c b/modules/freetype2/builds/mac/ftmac.c
index cbb3cd731..c45546cee 100644
--- a/modules/freetype2/builds/mac/ftmac.c
+++ b/modules/freetype2/builds/mac/ftmac.c
@@ -5,7 +5,7 @@
/* Mac FOND support. Written by just@letterror.com. */
/* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -1423,7 +1423,7 @@ typedef short ResourceIndex;
/* accepts an FSRef instead of a path. */
/* */
/* This function is deprecated because Carbon data types (FSRef) */
- /* are not cross-platform, and thus not suitable for the freetype API. */
+ /* are not cross-platform, and thus not suitable for the FreeType API. */
FT_EXPORT_DEF( FT_Error )
FT_New_Face_From_FSRef( FT_Library library,
const FSRef* ref,
@@ -1481,7 +1481,7 @@ typedef short ResourceIndex;
/* accepts an FSSpec instead of a path. */
/* */
/* This function is deprecated because Carbon data types (FSSpec) */
- /* are not cross-platform, and thus not suitable for the freetype API. */
+ /* are not cross-platform, and thus not suitable for the FreeType API. */
FT_EXPORT_DEF( FT_Error )
FT_New_Face_From_FSSpec( FT_Library library,
const FSSpec* spec,
diff --git a/modules/freetype2/builds/modules.mk b/modules/freetype2/builds/modules.mk
index 787f86468..9a7a4a0aa 100644
--- a/modules/freetype2/builds/modules.mk
+++ b/modules/freetype2/builds/modules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -41,7 +41,7 @@ endif
define FTMODULE_H_INIT
$(REMOVE_MODULE)
-@-echo Generating modules list in $(FTMODULE_H)...
+$(info Generating modules list in $(FTMODULE_H)...)
$(OPEN_MODULE)/* This is a generated file. */$(CLOSE_MODULE)
endef
@@ -56,7 +56,7 @@ endef
define FTMODULE_H_DONE
$(OPEN_MODULE)/* EOF */$(CLOSE_MODULE)
-@echo done.
+$(info done.)
endef
diff --git a/modules/freetype2/builds/newline b/modules/freetype2/builds/newline
deleted file mode 100644
index 8b1378917..000000000
--- a/modules/freetype2/builds/newline
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/modules/freetype2/builds/os2/detect.mk b/modules/freetype2/builds/os2/detect.mk
index df0579230..aaf78488b 100644
--- a/modules/freetype2/builds/os2/detect.mk
+++ b/modules/freetype2/builds/os2/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -65,7 +65,7 @@ ifeq ($(PLATFORM),os2)
.PHONY: devel
endif
- setup: dos_setup
+ setup: std_setup
endif # test PLATFORM os2
diff --git a/modules/freetype2/builds/os2/os2-def.mk b/modules/freetype2/builds/os2/os2-def.mk
index b8d4d7be4..7ad1ffbad 100644
--- a/modules/freetype2/builds/os2/os2-def.mk
+++ b/modules/freetype2/builds/os2/os2-def.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/os2/os2-dev.mk b/modules/freetype2/builds/os2/os2-dev.mk
index 629d766e2..505a754f7 100644
--- a/modules/freetype2/builds/os2/os2-dev.mk
+++ b/modules/freetype2/builds/os2/os2-dev.mk
@@ -5,7 +5,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/os2/os2-gcc.mk b/modules/freetype2/builds/os2/os2-gcc.mk
index b3e590be7..65026b101 100644
--- a/modules/freetype2/builds/os2/os2-gcc.mk
+++ b/modules/freetype2/builds/os2/os2-gcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/symbian/bld.inf b/modules/freetype2/builds/symbian/bld.inf
index cbbdc3abb..9c6d8dca1 100644
--- a/modules/freetype2/builds/symbian/bld.inf
+++ b/modules/freetype2/builds/symbian/bld.inf
@@ -2,7 +2,7 @@
// FreeType 2 project for the symbian platform
//
-// Copyright 2008-2016 by
+// Copyright 2008-2018 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used, modified,
@@ -25,10 +25,14 @@ PRJ_EXPORTS
../../include/freetype/config/ftoption.h config/ftoption.h
../../include/freetype/config/ftstdlib.h config/ftstdlib.h
../../include/freetype/freetype.h freetype.h
+../../include/freetype/ftadvanc.h ftadvanc.h
+../../include/freetype/ftautoh.h ftautoh.h
../../include/freetype/ftbbox.h ftbbox.h
../../include/freetype/ftbdf.h ftbdf.h
../../include/freetype/ftbitmap.h ftbitmap.h
+../../include/freetype/ftbzip2.h ftbzip2.h
../../include/freetype/ftcache.h ftcache.h
+../../include/freetype/ftcffdrv.h ftcffdrv.h
../../include/freetype/ftcid.h ftcid.h
../../include/freetype/fterrdef.h fterrdef.h
../../include/freetype/fterrors.h fterrors.h
@@ -37,7 +41,6 @@ PRJ_EXPORTS
../../include/freetype/ftglyph.h ftglyph.h
../../include/freetype/ftgxval.h ftgxval.h
../../include/freetype/ftgzip.h ftgzip.h
-../../include/freetype/ftbzip2.h ftbzip2.h
../../include/freetype/ftimage.h ftimage.h
../../include/freetype/ftincrem.h ftincrem.h
../../include/freetype/ftlcdfil.h ftlcdfil.h
@@ -49,6 +52,8 @@ PRJ_EXPORTS
../../include/freetype/ftmoderr.h ftmoderr.h
../../include/freetype/ftotval.h ftotval.h
../../include/freetype/ftoutln.h ftoutln.h
+../../include/freetype/ftparams.h ftparams.h
+../../include/freetype/ftpcfdrv.h ftpcfdrv.h
../../include/freetype/ftpfr.h ftpfr.h
../../include/freetype/ftrender.h ftrender.h
../../include/freetype/ftsizes.h ftsizes.h
@@ -56,11 +61,12 @@ PRJ_EXPORTS
../../include/freetype/ftstroke.h ftstroke.h
../../include/freetype/ftsynth.h ftsynth.h
../../include/freetype/ftsystem.h ftsystem.h
+../../include/freetype/ftt1drv.h ftt1drv.h
../../include/freetype/fttrigon.h fttrigon.h
+../../include/freetype/ftttdrv.h ftttdrv.h
../../include/freetype/fttypes.h fttypes.h
../../include/freetype/ftwinfnt.h ftwinfnt.h
../../include/freetype/t1tables.h t1tables.h
../../include/freetype/ttnameid.h ttnameid.h
../../include/freetype/tttables.h tttables.h
../../include/freetype/tttags.h tttags.h
-../../include/freetype/ttunpat.h ttunpat.h
diff --git a/modules/freetype2/builds/symbian/freetype.mmp b/modules/freetype2/builds/symbian/freetype.mmp
index 19440541b..4e4a041eb 100644
--- a/modules/freetype2/builds/symbian/freetype.mmp
+++ b/modules/freetype2/builds/symbian/freetype.mmp
@@ -2,7 +2,7 @@
// FreeType 2 makefile for the symbian platform
//
-// Copyright 2008-2016 by
+// Copyright 2008-2018 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used, modified,
@@ -28,13 +28,11 @@ source ftbbox.c
source ftbdf.c
source ftbitmap.c
source ftcid.c
-source ftfntfmt.c
source ftfstype.c
source ftgasp.c
source ftglyph.c
source ftgxval.c
source ftinit.c
-source ftlcdfil.c
source ftmm.c
source ftotval.c
source ftpatent.c
@@ -49,6 +47,10 @@ sourcepath ..\..\src\bdf
source bdf.c
+sourcepath ..\..\src\bzip2
+
+source ftbzip2.c
+
sourcepath ..\..\src\cache
source ftcache.c
@@ -65,10 +67,6 @@ sourcepath ..\..\src\gzip
source ftgzip.c
-sourcepath ..\..\src\bzip2
-
-source ftbzip2.c
-
sourcepath ..\..\src\lzw
source ftlzw.c
@@ -126,12 +124,12 @@ systeminclude ..\..\include
systeminclude \epoc32\include\stdapis
userinclude ..\..\src\autofit
userinclude ..\..\src\bdf
+userinclude ..\..\src\bzip2
userinclude ..\..\src\cache
userinclude ..\..\src\cff
userinclude ..\..\src\cid
userinclude ..\..\src\gxvalid
userinclude ..\..\src\gzip
-userinclude ..\..\src\bzip2
userinclude ..\..\src\lzw
userinclude ..\..\src\otvalid
userinclude ..\..\src\pcf
diff --git a/modules/freetype2/builds/toplevel.mk b/modules/freetype2/builds/toplevel.mk
index 7cea85dca..7ce0ed8db 100644
--- a/modules/freetype2/builds/toplevel.mk
+++ b/modules/freetype2/builds/toplevel.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -172,7 +172,8 @@ include $(TOP_DIR)/builds/modules.mk
# get FreeType version string, using a
# poor man's `sed' emulation with make's built-in string functions
#
-work := $(strip $(shell $(CAT) $(TOP_DIR)/include/freetype/freetype.h))
+work := $(strip $(shell $(CAT) \
+ $(subst /,$(SEP),$(TOP_DIR)/include/freetype/freetype.h)))
work := $(subst |,x,$(work))
work := $(subst $(space),|,$(work))
work := $(subst \#define|FREETYPE_MAJOR|,$(space),$(work))
diff --git a/modules/freetype2/builds/unix/config.guess b/modules/freetype2/builds/unix/config.guess
index 2e9ad7fe8..256083a70 100755
--- a/modules/freetype2/builds/unix/config.guess
+++ b/modules/freetype2/builds/unix/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2016 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2016-10-02'
+timestamp='2018-03-08'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2016-10-02'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2016-10-02'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
+ ,,) echo "int x;" > "$dummy.c" ;
for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
@@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
- eval $set_cc_for_build
- cat <<-EOF > $dummy.c
+ eval "$set_cc_for_build"
+ cat <<-EOF > "$dummy.c"
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
@@ -149,13 +149,20 @@ Linux|GNU|GNU/*)
LIBC=gnu
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+ # If ldd exists, use it to detect musl libc.
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl
+ then
+ LIBC=musl
+ fi
;;
esac
# Note: order is significant - the case branches are not exclusive.
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -169,30 +176,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
- /sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || \
+ "/sbin/$sysctl" 2>/dev/null || \
+ "/usr/sbin/$sysctl" 2>/dev/null || \
echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
+ case "$UNAME_MACHINE_ARCH" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
earmv*)
- arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
- endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
- machine=${arch}${endian}-unknown
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine="${arch}${endian}"-unknown
;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently (or will in the future) and ABI.
- case "${UNAME_MACHINE_ARCH}" in
+ case "$UNAME_MACHINE_ARCH" in
earm*)
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
@@ -208,10 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# Determine ABI tags.
- case "${UNAME_MACHINE_ARCH}" in
+ case "$UNAME_MACHINE_ARCH" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
- abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
;;
esac
# The OS release
@@ -219,46 +226,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
+ case "$UNAME_VERSION" in
Debian*)
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}${abi}"
+ echo "$machine-${os}${release}${abi}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
exit ;;
*:LibertyBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+ exit ;;
+ *:MidnightBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
exit ;;
*:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
exit ;;
*:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
exit ;;
macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:Sortix:*:*)
- echo ${UNAME_MACHINE}-unknown-sortix
+ echo "$UNAME_MACHINE"-unknown-sortix
+ exit ;;
+ *:Redox:*:*)
+ echo "$UNAME_MACHINE"-unknown-redox
exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -310,28 +326,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
+ echo "$UNAME_MACHINE"-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
+ echo "$UNAME_MACHINE"-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
@@ -343,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
+ echo arm-acorn-riscix"$UNAME_RELEASE"
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
@@ -370,19 +377,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
+ echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
@@ -395,13 +402,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
SUN_ARCH=x86_64
fi
fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
@@ -410,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
exit ;;
sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
;;
sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
+ echo sparc-sun-sunos"$UNAME_RELEASE"
;;
esac
exit ;;
aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
+ echo sparc-auspex-sunos"$UNAME_RELEASE"
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
@@ -439,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
+ echo m68k-milan-mint"$UNAME_RELEASE"
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
+ echo m68k-hades-mint"$UNAME_RELEASE"
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
+ echo m68k-unknown-mint"$UNAME_RELEASE"
exit ;;
m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
+ echo m68k-apple-machten"$UNAME_RELEASE"
exit ;;
powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
+ echo powerpc-apple-machten"$UNAME_RELEASE"
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
+ echo mips-dec-ultrix"$UNAME_RELEASE"
exit ;;
VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
+ echo vax-dec-ultrix"$UNAME_RELEASE"
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
+ echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
@@ -485,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
{ echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
+ echo mips-mips-riscos"$UNAME_RELEASE"
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
@@ -527,17 +534,17 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
+ if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+ [ "$TARGET_BINARY_INTERFACE"x = x ]
then
- echo m88k-dg-dgux${UNAME_RELEASE}
+ echo m88k-dg-dgux"$UNAME_RELEASE"
else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ echo m88k-dg-dguxbcs"$UNAME_RELEASE"
fi
else
- echo i586-dg-dgux${UNAME_RELEASE}
+ echo i586-dg-dgux"$UNAME_RELEASE"
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
@@ -554,7 +561,7 @@ EOF
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
@@ -566,14 +573,14 @@ EOF
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
main()
@@ -584,7 +591,7 @@ EOF
exit(0);
}
EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
then
echo "$SYSTEM_NAME"
else
@@ -598,7 +605,7 @@ EOF
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
@@ -607,18 +614,18 @@ EOF
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
@@ -633,28 +640,28 @@ EOF
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ case "$UNAME_MACHINE" in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
+ case "$sc_cpu_version" in
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
+ case "$sc_kernel_bits" in
32) HP_ARCH=hppa2.0n ;;
64) HP_ARCH=hppa2.0w ;;
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ if [ "$HP_ARCH" = "" ]; then
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -687,13 +694,13 @@ EOF
exit (0);
}
EOF
- (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = hppa2.0w ]
+ if [ "$HP_ARCH" = hppa2.0w ]
then
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -712,15 +719,15 @@ EOF
HP_ARCH=hppa64
fi
fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
exit ;;
ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux"$HPUX_REV"
exit ;;
3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
int
main ()
@@ -745,11 +752,11 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
@@ -758,7 +765,7 @@ EOF
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
@@ -766,9 +773,9 @@ EOF
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
+ echo "$UNAME_MACHINE"-unknown-osf1mk
else
- echo ${UNAME_MACHINE}-unknown-osf1
+ echo "$UNAME_MACHINE"-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
@@ -793,127 +800,109 @@ EOF
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
exit ;;
sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
+ echo sparc-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
+ case "$UNAME_PROCESSOR" in
amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
esac
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
+ echo "$UNAME_MACHINE"-pc-cygwin
exit ;;
*:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
+ echo "$UNAME_MACHINE"-pc-mingw64
exit ;;
*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
+ echo "$UNAME_MACHINE"-pc-mingw32
exit ;;
*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ echo "$UNAME_MACHINE"-pc-msys
exit ;;
i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
+ echo "$UNAME_MACHINE"-pc-pw32
exit ;;
*:Interix*:*)
- case ${UNAME_MACHINE} in
+ case "$UNAME_MACHINE" in
x86)
- echo i586-pc-interix${UNAME_RELEASE}
+ echo i586-pc-interix"$UNAME_RELEASE"
exit ;;
authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
+ echo x86_64-unknown-interix"$UNAME_RELEASE"
exit ;;
IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
+ echo ia64-unknown-interix"$UNAME_RELEASE"
exit ;;
esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
+ echo "$UNAME_MACHINE"-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;;
i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
+ echo "$UNAME_MACHINE"-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -927,63 +916,63 @@ EOF
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arm*:Linux:*:*)
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
e2k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
k1om:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
@@ -997,70 +986,70 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
+ test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
;;
mips64el:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
openrisc*:Linux:*:*)
- echo or1k-unknown-linux-${LIBC}
+ echo or1k-unknown-linux-"$LIBC"
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-${LIBC}
+ echo sparc-unknown-linux-"$LIBC"
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-${LIBC}
+ echo hppa64-unknown-linux-"$LIBC"
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
- PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
- *) echo hppa-unknown-linux-${LIBC} ;;
+ PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+ PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+ *) echo hppa-unknown-linux-"$LIBC" ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-${LIBC}
+ echo powerpc64-unknown-linux-"$LIBC"
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-${LIBC}
+ echo powerpc-unknown-linux-"$LIBC"
exit ;;
ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-${LIBC}
+ echo powerpc64le-unknown-linux-"$LIBC"
exit ;;
ppcle:Linux:*:*)
- echo powerpcle-unknown-linux-${LIBC}
+ echo powerpcle-unknown-linux-"$LIBC"
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1074,34 +1063,34 @@ EOF
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
+ echo "$UNAME_MACHINE"-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
+ echo "$UNAME_MACHINE"-unknown-stop
exit ;;
i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
+ echo "$UNAME_MACHINE"-unknown-atheos
exit ;;
i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
+ echo "$UNAME_MACHINE"-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
+ echo i386-unknown-lynxos"$UNAME_RELEASE"
exit ;;
i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ echo "$UNAME_MACHINE"-pc-msdosdjgpp
exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
fi
exit ;;
i*86:*:5:[678]*)
@@ -1111,12 +1100,12 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1126,9 +1115,9 @@ EOF
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv32
+ echo "$UNAME_MACHINE"-pc-sysv32
fi
exit ;;
pc:*:*:*)
@@ -1148,9 +1137,9 @@ EOF
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
@@ -1170,9 +1159,9 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
@@ -1181,28 +1170,28 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
+ echo m68k-unknown-lynxos"$UNAME_RELEASE"
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
+ echo sparc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ echo rs6000-unknown-lynxos"$UNAME_RELEASE"
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ echo powerpc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
+ echo mips-dde-sysv"$UNAME_RELEASE"
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
@@ -1213,7 +1202,7 @@ EOF
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
+ echo "$UNAME_MACHINE"-sni-sysv4
else
echo ns32k-sni-sysv
fi
@@ -1233,23 +1222,23 @@ EOF
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
+ echo "$UNAME_MACHINE"-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
+ echo m68k-apple-aux"$UNAME_RELEASE"
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv"$UNAME_RELEASE"
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv"$UNAME_RELEASE"
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
@@ -1268,49 +1257,56 @@ EOF
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
+ echo sx4-nec-superux"$UNAME_RELEASE"
exit ;;
SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
+ echo sx5-nec-superux"$UNAME_RELEASE"
exit ;;
SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
+ echo sx6-nec-superux"$UNAME_RELEASE"
exit ;;
SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
+ echo sx7-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
+ echo sx8-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
+ echo sx8r-nec-superux"$UNAME_RELEASE"
exit ;;
SX-ACE:SUPER-UX:*:*)
- echo sxace-nec-superux${UNAME_RELEASE}
+ echo sxace-nec-superux"$UNAME_RELEASE"
exit ;;
Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ echo powerpc-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
- if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
@@ -1321,7 +1317,7 @@ EOF
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
@@ -1329,19 +1325,25 @@ EOF
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
+ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
+ echo nse-tandem-nsk"$UNAME_RELEASE"
exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
+ NSR-*:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ echo nsv-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk"$UNAME_RELEASE"
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
@@ -1350,7 +1352,7 @@ EOF
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
@@ -1361,7 +1363,7 @@ EOF
else
UNAME_MACHINE="$cputype"
fi
- echo ${UNAME_MACHINE}-unknown-plan9
+ echo "$UNAME_MACHINE"-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
@@ -1382,14 +1384,14 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ echo mips-sei-seiux"$UNAME_RELEASE"
exit ;;
*:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
+ case "$UNAME_MACHINE" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
@@ -1398,32 +1400,44 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+ echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
exit ;;
i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
+ echo "$UNAME_MACHINE"-pc-rdos
exit ;;
i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
+ echo "$UNAME_MACHINE"-pc-aros
exit ;;
x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
+ echo "$UNAME_MACHINE"-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
+
cat >&2 <<EOF
-$0: unable to guess system type
This script (version $timestamp), has failed to recognize the
-operating system you are using. If your script is old, overwrite
-config.guess and config.sub with the latest versions from:
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
@@ -1446,16 +1460,16 @@ hostinfo = `(hostinfo) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
EOF
exit 1
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/modules/freetype2/builds/unix/config.sub b/modules/freetype2/builds/unix/config.sub
index a2a01128b..ba37cf99e 100755
--- a/modules/freetype2/builds/unix/config.sub
+++ b/modules/freetype2/builds/unix/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2016 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2016-11-19'
+timestamp='2018-04-24'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2016-11-19'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -33,7 +33,7 @@ timestamp='2016-11-19'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -94,7 +94,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
- echo $1
+ echo "$1"
exit ;;
* )
@@ -112,7 +112,7 @@ esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
@@ -120,16 +120,16 @@ case $maybe_os in
kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
+ basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
+ if [ "$basic_machine" != "$1" ]
+ then os=`echo "$1" | sed 's/.*-/-/'`
else os=; fi
;;
esac
@@ -178,44 +178,44 @@ case $os in
;;
-sco6)
os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
@@ -227,10 +227,7 @@ case $os in
os=-lynxos
;;
-ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
;;
-psos*)
os=-psos
@@ -252,18 +249,18 @@ case $basic_machine in
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arceb \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
- | c4x | c8051 | clipper \
+ | c4x | c8051 | clipper | csky \
| d10v | d30v | dlx | dsp16xx \
| e2k | epiphany \
| fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
- | i370 | i860 | i960 | ia64 \
+ | i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
@@ -299,7 +296,7 @@ case $basic_machine in
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 | or1k | or1knd | or32 \
- | pdp10 | pdp11 | pj | pjl \
+ | pdp10 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pru \
| pyramid \
@@ -315,7 +312,7 @@ case $basic_machine in
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
- | we32k \
+ | wasm32 \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
@@ -336,7 +333,11 @@ case $basic_machine in
basic_machine=$basic_machine-unknown
os=-none
;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
+ ;;
+ m9s12z | m68hcs12z | hcs12z | s12z)
+ basic_machine=s12z-unknown
+ os=-none
;;
ms1)
basic_machine=mt-unknown
@@ -365,7 +366,7 @@ case $basic_machine in
;;
# Object if more than one company name word.
*-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
@@ -381,14 +382,14 @@ case $basic_machine in
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | c8051-* | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
+ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
@@ -446,6 +447,7 @@ case $basic_machine in
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
+ | wasm32-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -459,7 +461,7 @@ case $basic_machine in
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
- basic_machine=i386-unknown
+ basic_machine=i386-pc
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
@@ -493,7 +495,7 @@ case $basic_machine in
basic_machine=x86_64-pc
;;
amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
@@ -538,7 +540,7 @@ case $basic_machine in
os=-linux
;;
blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
@@ -546,13 +548,13 @@ case $basic_machine in
os=-cnk
;;
c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
@@ -641,7 +643,7 @@ case $basic_machine in
basic_machine=rs6000-bull
os=-bosx
;;
- dpx2* | dpx2*-bull)
+ dpx2*)
basic_machine=m68k-bull
os=-sysv3
;;
@@ -650,7 +652,7 @@ case $basic_machine in
os=$os"spe"
;;
e500v[12]-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=$os"spe"
;;
ebmon29k)
@@ -742,9 +744,6 @@ case $basic_machine in
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
- hppa-next)
- os=-nextstep3
- ;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
@@ -757,26 +756,26 @@ case $basic_machine in
basic_machine=i370-ibm
;;
i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
- i386-vsta | vsta)
+ vsta)
basic_machine=i386-unknown
os=-vsta
;;
@@ -795,19 +794,16 @@ case $basic_machine in
os=-sysv
;;
leon-*|leon[3-9]-*)
- basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux
;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
@@ -839,10 +835,10 @@ case $basic_machine in
os=-mint
;;
mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
;;
mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
@@ -861,7 +857,7 @@ case $basic_machine in
os=-msdos
;;
ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i686-pc
@@ -903,7 +899,7 @@ case $basic_machine in
basic_machine=v70-nec
os=-sysv
;;
- next | m*-next )
+ next | m*-next)
basic_machine=m68k-next
case $os in
-nextstep* )
@@ -948,6 +944,12 @@ case $basic_machine in
nsr-tandem)
basic_machine=nsr-tandem
;;
+ nsv-tandem)
+ basic_machine=nsv-tandem
+ ;;
+ nsx-tandem)
+ basic_machine=nsx-tandem
+ ;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
@@ -980,7 +982,7 @@ case $basic_machine in
os=-linux
;;
parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
@@ -996,7 +998,7 @@ case $basic_machine in
basic_machine=i386-pc
;;
pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
@@ -1011,16 +1013,16 @@ case $basic_machine in
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
@@ -1030,23 +1032,23 @@ case $basic_machine in
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
@@ -1100,17 +1102,10 @@ case $basic_machine in
sequent)
basic_machine=i386-sequent
;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
sh5el)
basic_machine=sh5le-unknown
;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
+ simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@@ -1129,7 +1124,7 @@ case $basic_machine in
os=-sysv4
;;
strongarm-* | thumb-*)
- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
@@ -1251,6 +1246,9 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
+ x64)
+ basic_machine=x86_64-pc
+ ;;
xbox)
basic_machine=i686-pc
os=-mingw32
@@ -1259,20 +1257,12 @@ case $basic_machine in
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
- basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
none)
basic_machine=none-none
os=-none
@@ -1301,10 +1291,6 @@ case $basic_machine in
vax)
basic_machine=vax-dec
;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
pdp11)
basic_machine=pdp11-dec
;;
@@ -1314,9 +1300,6 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
cydra)
basic_machine=cydra-cydrome
;;
@@ -1336,7 +1319,7 @@ case $basic_machine in
# Make sure to match an already-canonicalized machine name.
;;
*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1
;;
esac
@@ -1344,10 +1327,10 @@ esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
;;
*-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
;;
*)
;;
@@ -1358,8 +1341,8 @@ esac
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
+ # First match some system type aliases that might get confused
+ # with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
@@ -1370,18 +1353,19 @@ case $os in
-solaris)
os=-solaris2
;;
- -svr4*)
- os=-sysv4
- ;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
- # First accept the basic system types.
+ # es1800 is here to avoid being matched by es* (a different OS)
+ -es1800*)
+ os=-ose
+ ;;
+ # Now accept the basic system types.
# The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
+ # Each alternative MUST end in a * to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
@@ -1391,25 +1375,26 @@ case $os in
| -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \
| -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -morphos* | -superux* | -rtmk* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia*)
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
+ | -midnightbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1426,12 +1411,12 @@ case $os in
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ -sim | -xray | -os68k* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
+ os=`echo "$os" | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
@@ -1440,10 +1425,10 @@ case $os in
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
@@ -1454,12 +1439,6 @@ case $os in
-wince*)
os=-wince
;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
-utek*)
os=-bsd
;;
@@ -1484,7 +1463,7 @@ case $os in
-nova*)
os=-rtmk-nova
;;
- -ns2 )
+ -ns2)
os=-nextstep2
;;
-nsk*)
@@ -1506,7 +1485,7 @@ case $os in
-oss*)
os=-sysv3
;;
- -svr4)
+ -svr4*)
os=-sysv4
;;
-svr3)
@@ -1521,24 +1500,28 @@ case $os in
-ose*)
os=-ose
;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
- -aros*)
- os=-aros
- ;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
+ -pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $basic_machine in
+ arm*)
+ os=-eabi
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
-nacl*)
;;
-ios)
@@ -1548,7 +1531,7 @@ case $os in
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1
;;
esac
@@ -1644,9 +1627,6 @@ case $basic_machine in
*-be)
os=-beos
;;
- *-haiku)
- os=-haiku
- ;;
*-ibm)
os=-aix
;;
@@ -1686,7 +1666,7 @@ case $basic_machine in
m88k-omron*)
os=-luna
;;
- *-next )
+ *-next)
os=-nextstep
;;
*-sequent)
@@ -1701,9 +1681,6 @@ case $basic_machine in
i370-*)
os=-mvs
;;
- *-next)
- os=-nextstep3
- ;;
*-gould)
os=-sysv
;;
@@ -1813,15 +1790,15 @@ case $basic_machine in
vendor=stratus
;;
esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
;;
esac
-echo $basic_machine$os
+echo "$basic_machine$os"
exit
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/modules/freetype2/builds/unix/configure b/modules/freetype2/builds/unix/configure
index 831e33643..2d05de2aa 100755
--- a/modules/freetype2/builds/unix/configure
+++ b/modules/freetype2/builds/unix/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for FreeType 2.7.1.
+# Generated by GNU Autoconf 2.69 for FreeType 2.9.1.
#
# Report bugs to <freetype@nongnu.org>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='FreeType'
PACKAGE_TARNAME='freetype'
-PACKAGE_VERSION='2.7.1'
-PACKAGE_STRING='FreeType 2.7.1'
+PACKAGE_VERSION='2.9.1'
+PACKAGE_STRING='FreeType 2.9.1'
PACKAGE_BUGREPORT='freetype@nongnu.org'
PACKAGE_URL=''
@@ -642,6 +642,7 @@ LIBSSTATIC_CONFIG
LIBS_PRIVATE
REQUIRES_PRIVATE
ftmac_c
+LIB_CLOCK_GETTIME
HARFBUZZ_LIBS
HARFBUZZ_CFLAGS
LIBPNG_LIBS
@@ -653,12 +654,14 @@ ZLIB_CFLAGS
XX_ANSIFLAGS
XX_CFLAGS
FTSYS_SRC
+INSTALL_FT2_CONFIG
MKDIR_P
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
EXEEXT_BUILD
CC_BUILD
+RC
LT_SYS_LIBRARY_PATH
OTOOL64
OTOOL
@@ -755,6 +758,7 @@ with_gnu_ld
with_sysroot
enable_libtool_lock
enable_biarch_config
+enable_freetype_config
enable_largefile
enable_mmap
with_zlib
@@ -1329,7 +1333,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures FreeType 2.7.1 to adapt to many kinds of systems.
+\`configure' configures FreeType 2.9.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1394,7 +1398,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of FreeType 2.7.1:";;
+ short | recursive ) echo "Configuration of FreeType 2.9.1:";;
esac
cat <<\_ACEOF
@@ -1409,6 +1413,8 @@ Optional Features:
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-biarch-config install biarch ftconfig.h to support multiple
architectures by single file
+ --enable-freetype-config
+ install freetype-config
--disable-largefile omit support for large files
--disable-mmap do not check mmap() and do not use
@@ -1541,7 +1547,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-FreeType configure 2.7.1
+FreeType configure 2.9.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2139,7 +2145,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by FreeType $as_me 2.7.1, which was
+It was created by FreeType $as_me 2.9.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2495,7 +2501,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Don't forget to update `docs/VERSIONS.TXT'!
-version_info='19:0:13'
+version_info='22:1:16'
ft_version=`echo $version_info | tr : .`
@@ -11847,6 +11853,175 @@ CC=$lt_save_CC
# Only expand once:
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RC"; then
+ ac_cv_prog_RC="$RC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RC="${ac_tool_prefix}windres"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RC=$ac_cv_prog_RC
+if test -n "$RC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
+$as_echo "$RC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RC"; then
+ ac_ct_RC=$RC
+ # Extract the first word of "windres", so it can be a program name with args.
+set dummy windres; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RC"; then
+ ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RC="windres"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RC=$ac_cv_prog_ac_ct_RC
+if test -n "$ac_ct_RC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
+$as_echo "$ac_ct_RC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RC" = x; then
+ RC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RC=$ac_ct_RC
+ fi
+else
+ RC="$ac_cv_prog_RC"
+fi
+
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=$lt_simple_compile_test_code
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+compiler_RC=$CC
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
+
+lt_cv_prog_compiler_c_o_RC=yes
+
+if test -n "$compiler"; then
+ :
+
+
+
+fi
+
+GCC=$lt_save_GCC
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+
# checks for native programs to generate building tool
@@ -12566,15 +12741,13 @@ $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cpp computation of bit length in ftconfig.in works" >&5
$as_echo_n "checking whether cpp computation of bit length in ftconfig.in works... " >&6; }
orig_CPPFLAGS="${CPPFLAGS}"
-CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}"
+CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include/freetype/config ${CPPFLAGS}"
ac_clean_files=
-for f in ft2build.h ftoption.h ftstdlib.h; do
- if test ! -f $f; then
- ac_clean_files="$ac_clean_files $f"
- touch $f
- fi
-done
+if test ! -f ft2build.h; then
+ ac_clean_files=ft2build.h
+ touch ft2build.h
+fi
cat > conftest.c <<\_ACEOF
#include <limits.h>
@@ -12639,6 +12812,20 @@ fi
CPPFLAGS="${orig_CPPFLAGS}"
+# Check whether --enable-freetype-config was given.
+if test "${enable_freetype_config+set}" = set; then :
+ enableval=$enable_freetype_config; case "${enableval}" in
+ yes) enable_freetype_config="TRUE" ;;
+ no) enable_freetype_config="FALSE" ;;
+ *) as_fn_error $? "unknown value '${enableval}' passed with --enable-freetype-config" "$LINENO" 5 ;;
+ esac
+else
+ enable_freetype_config="FALSE"
+fi
+
+
+INSTALL_FT2_CONFIG=$enable_freetype_config
+
# checks for library functions
@@ -13193,8 +13380,8 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok, add it to XX_ANSIFLAGS" >&5
-$as_echo "ok, add it to XX_ANSIFLAGS" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok, adding to XX_ANSIFLAGS" >&5
+$as_echo "ok, adding to XX_ANSIFLAGS" >&6; }
XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}"
else
@@ -13223,6 +13410,35 @@ fi
+# It is recommended that shared libraries hide symbols except those with
+# explicit __attribute__((visibility("default"))).
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fvisibility=hidden compiler flag" >&5
+$as_echo_n "checking for -fvisibility=hidden compiler flag... " >&6; }
+orig_CFLAGS="${CFLAGS}"
+CFLAGS="${CFLAGS} -fvisibility=hidden"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ CFLAGS="${orig_CFLAGS}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
# All library tests below try `pkg-config' first. If that fails, a function
# from the library is tested in the traditional autoconf way (zlib, bzip2),
# or a config script is called (libpng).
@@ -13728,7 +13944,7 @@ fi
have_harfbuzz=no
if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then
- harfbuzz_pkg="harfbuzz >= 0.9.21"
+ harfbuzz_pkg="harfbuzz >= 1.3.0"
have_harfbuzz_pkg=no
if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then
@@ -13839,6 +14055,74 @@ if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then
fi
+# check for librt
+#
+# We need `clock_gettime' for the `ftbench' demo program.
+#
+# The code is modeled after gnulib's file `clock_time.m4', ignoring
+# very old Solaris systems.
+
+LIB_CLOCK_GETTIME=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_clock_gettime+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
+
+else
+ ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ test "$ac_cv_search_clock_gettime" = "none required" \
+ || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
+fi
+
+
+
+
# Some options handling SDKs/archs in CFLAGS should be copied
# to LDFLAGS. Apple TechNote 2137 recommends to include these
# options in CFLAGS but not in LDFLAGS.
@@ -14472,27 +14756,60 @@ LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \
# changing LDFLAGS value should only be done after
# lt_cv_prog_compiler_static_works test
+ftoption_set()
+{
+ regexp="-e \\\"s|.*#.*def.*$1.*|#define $1|\\\""
+ FTOPTION_H_SED="$FTOPTION_H_SED $regexp"
+}
+
+ftoption_unset()
+{
+ regexp="-e \\\"s|.*#.*def.*$1.*|/* #undef $1 */|\\\""
+ FTOPTION_H_SED="$FTOPTION_H_SED $regexp"
+}
+
if test "$have_zlib" != no; then
- CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
+ CFLAGS="$CFLAGS $ZLIB_CFLAGS"
LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ ftoption_set FT_CONFIG_OPTION_SYSTEM_ZLIB
+else
+ ftoption_unset FT_CONFIG_OPTION_SYSTEM_ZLIB
fi
-
if test "$have_bzip2" != no; then
- CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
+ CFLAGS="$CFLAGS $BZIP2_CFLAGS"
LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ ftoption_set FT_CONFIG_OPTION_USE_BZIP2
+else
+ ftoption_unset FT_CONFIG_OPTION_USE_BZIP2
fi
if test "$have_libpng" != no; then
- CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
+ CFLAGS="$CFLAGS $LIBPNG_CFLAGS"
LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
+ ftoption_set FT_CONFIG_OPTION_USE_PNG
+else
+ ftoption_unset FT_CONFIG_OPTION_USE_PNG
fi
if test "$have_harfbuzz" != no; then
- CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ"
+ CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS"
LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS"
+ ftoption_set FT_CONFIG_OPTION_USE_HARFBUZZ
+else
+ ftoption_unset FT_CONFIG_OPTION_USE_HARFBUZZ
fi
+# We don't want to use a template file for `ftoption.h', since compilation
+# should work without calling a configure script also. For this reason, we
+# copy the `include/freetype/config/ftoption.h' file to the `unix/builds'
+# directory (using a dummy `AC_CONFIG_FILES' call) and apply the just
+# constructed $FTOPTION_H_SED regexp (using the post-action of
+# `AC_CONFIG_FILES'); this is also the version that gets installed later on.
+#
+ac_config_files="$ac_config_files ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h"
+
+
# configuration file -- stay in 8.3 limit
#
# since #undef doesn't survive in configuration header files we replace
@@ -15017,7 +15334,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by FreeType $as_me 2.7.1, which was
+This file was extended by FreeType $as_me 2.9.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15083,7 +15400,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-FreeType config.status 2.7.1
+FreeType config.status 2.9.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -15347,6 +15664,48 @@ enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_sub
enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+LD_RC='`$ECHO "$LD_RC" | $SED "$delay_single_quote_subst"`'
+reload_flag_RC='`$ECHO "$reload_flag_RC" | $SED "$delay_single_quote_subst"`'
+reload_cmds_RC='`$ECHO "$reload_cmds_RC" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_RC='`$ECHO "$old_archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
+compiler_RC='`$ECHO "$compiler_RC" | $SED "$delay_single_quote_subst"`'
+GCC_RC='`$ECHO "$GCC_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_RC='`$ECHO "$lt_prog_compiler_no_builtin_flag_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_RC='`$ECHO "$lt_prog_compiler_pic_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_RC='`$ECHO "$lt_prog_compiler_wl_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_RC='`$ECHO "$lt_prog_compiler_static_RC" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_RC='`$ECHO "$lt_cv_prog_compiler_c_o_RC" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_RC='`$ECHO "$archive_cmds_need_lc_RC" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_RC='`$ECHO "$enable_shared_with_static_runtimes_RC" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_RC='`$ECHO "$export_dynamic_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_RC='`$ECHO "$whole_archive_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_RC='`$ECHO "$compiler_needs_object_RC" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_RC='`$ECHO "$old_archive_from_new_cmds_RC" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_RC='`$ECHO "$old_archive_from_expsyms_cmds_RC" | $SED "$delay_single_quote_subst"`'
+archive_cmds_RC='`$ECHO "$archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_RC='`$ECHO "$archive_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
+module_cmds_RC='`$ECHO "$module_cmds_RC" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_RC='`$ECHO "$module_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_RC='`$ECHO "$with_gnu_ld_RC" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_RC='`$ECHO "$allow_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_RC='`$ECHO "$no_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_RC='`$ECHO "$hardcode_libdir_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_RC='`$ECHO "$hardcode_libdir_separator_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_RC='`$ECHO "$hardcode_direct_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_RC='`$ECHO "$hardcode_direct_absolute_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_RC='`$ECHO "$hardcode_minus_L_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_RC='`$ECHO "$hardcode_shlibpath_var_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_RC='`$ECHO "$hardcode_automatic_RC" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_RC='`$ECHO "$inherit_rpath_RC" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_RC='`$ECHO "$link_all_deplibs_RC" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_RC='`$ECHO "$always_export_symbols_RC" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_RC='`$ECHO "$export_symbols_cmds_RC" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_RC='`$ECHO "$exclude_expsyms_RC" | $SED "$delay_single_quote_subst"`'
+include_expsyms_RC='`$ECHO "$include_expsyms_RC" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_RC='`$ECHO "$prelink_cmds_RC" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_RC='`$ECHO "$postlink_cmds_RC" | $SED "$delay_single_quote_subst"`'
+file_list_spec_RC='`$ECHO "$file_list_spec_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_action_RC='`$ECHO "$hardcode_action_RC" | $SED "$delay_single_quote_subst"`'
LTCC='$LTCC'
LTCFLAGS='$LTCFLAGS'
@@ -15429,7 +15788,26 @@ soname_spec \
install_override_mode \
finish_eval \
old_striplib \
-striplib; do
+striplib \
+LD_RC \
+reload_flag_RC \
+compiler_RC \
+lt_prog_compiler_no_builtin_flag_RC \
+lt_prog_compiler_pic_RC \
+lt_prog_compiler_wl_RC \
+lt_prog_compiler_static_RC \
+lt_cv_prog_compiler_c_o_RC \
+export_dynamic_flag_spec_RC \
+whole_archive_flag_spec_RC \
+compiler_needs_object_RC \
+with_gnu_ld_RC \
+allow_undefined_flag_RC \
+no_undefined_flag_RC \
+hardcode_libdir_flag_spec_RC \
+hardcode_libdir_separator_RC \
+exclude_expsyms_RC \
+include_expsyms_RC \
+file_list_spec_RC; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
@@ -15460,7 +15838,18 @@ postuninstall_cmds \
finish_cmds \
sys_lib_search_path_spec \
configure_time_dlsearch_path \
-configure_time_lt_sys_library_path; do
+configure_time_lt_sys_library_path \
+reload_cmds_RC \
+old_archive_cmds_RC \
+old_archive_from_new_cmds_RC \
+old_archive_from_expsyms_cmds_RC \
+archive_cmds_RC \
+archive_expsym_cmds_RC \
+module_cmds_RC \
+module_expsym_cmds_RC \
+export_symbols_cmds_RC \
+prelink_cmds_RC \
+postlink_cmds_RC; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
@@ -15488,6 +15877,9 @@ fi
+
+FTOPTION_H_SED="$FTOPTION_H_SED"
+
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -15497,6 +15889,7 @@ for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "ftoption.h") CONFIG_FILES="$CONFIG_FILES ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h" ;;
"ftconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS ftconfig.h:ftconfig.in" ;;
"unix-cc.mk") CONFIG_FILES="$CONFIG_FILES unix-cc.mk:unix-cc.in" ;;
"unix-def.mk") CONFIG_FILES="$CONFIG_FILES unix-def.mk:unix-def.in" ;;
@@ -16106,7 +16499,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
# The names of the tagged configurations supported by this script.
-available_tags=''
+available_tags='RC '
# Configured defaults for sys_lib_dlsearch_path munging.
: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
@@ -16606,7 +16999,149 @@ ltmain=$ac_aux_dir/ltmain.sh
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
+
+ cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: RC
+
+# The linker used to build libraries.
+LD=$lt_LD_RC
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_RC
+reload_cmds=$lt_reload_cmds_RC
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_RC
+
+# A language specific compiler.
+CC=$lt_compiler_RC
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_RC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_RC
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_RC
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_RC
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_RC
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_RC
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_RC
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_RC
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_RC
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_RC
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_RC
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_RC
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_RC
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_RC
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_RC
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_RC
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_RC
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_RC
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_RC
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_RC
+
+# ### END LIBTOOL TAG CONFIG: RC
+_LT_EOF
+
;;
+ "ftoption.h":F) mv ftoption.h ftoption.tmp
+ eval "sed $FTOPTION_H_SED < ftoption.tmp > ftoption.h"
+ rm ftoption.tmp ;;
"ftconfig.h":H) mv ftconfig.h ftconfig.tmp
sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
rm ftconfig.tmp ;;
diff --git a/modules/freetype2/builds/unix/configure.ac b/modules/freetype2/builds/unix/configure.ac
index 85701617d..b306821f4 100644
--- a/modules/freetype2/builds/unix/configure.ac
+++ b/modules/freetype2/builds/unix/configure.ac
@@ -2,7 +2,7 @@
#
# Process this file with autoconf to produce a configure script.
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -11,13 +11,13 @@
# indicate that you have read the license and understand and accept it
# fully.
-AC_INIT([FreeType], [2.7.1], [freetype@nongnu.org], [freetype])
+AC_INIT([FreeType], [2.9.1], [freetype@nongnu.org], [freetype])
AC_CONFIG_SRCDIR([ftconfig.in])
# Don't forget to update `docs/VERSIONS.TXT'!
-version_info='19:0:13'
+version_info='22:1:16'
AC_SUBST([version_info])
ft_version=`echo $version_info | tr : .`
AC_SUBST([ft_version])
@@ -37,6 +37,7 @@ AC_SUBST(EXEEXT)
PKG_PROG_PKG_CONFIG([0.24])
LT_INIT(win32-dll)
+LT_PROG_RC
# checks for native programs to generate building tool
@@ -112,15 +113,13 @@ AC_TYPE_LONG_LONG_INT
AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.in works])
orig_CPPFLAGS="${CPPFLAGS}"
-CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}"
+CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include/freetype/config ${CPPFLAGS}"
ac_clean_files=
-for f in ft2build.h ftoption.h ftstdlib.h; do
- if test ! -f $f; then
- ac_clean_files="$ac_clean_files $f"
- touch $f
- fi
-done
+if test ! -f ft2build.h; then
+ ac_clean_files=ft2build.h
+ touch ft2build.h
+fi
cat > conftest.c <<\_ACEOF
#include <limits.h>
@@ -178,6 +177,15 @@ fi
CPPFLAGS="${orig_CPPFLAGS}"
+AC_ARG_ENABLE([freetype-config],
+ AS_HELP_STRING([--enable-freetype-config], [install freetype-config]),
+ [case "${enableval}" in
+ yes) enable_freetype_config="TRUE" ;;
+ no) enable_freetype_config="FALSE" ;;
+ *) AC_MSG_ERROR([unknown value '${enableval}' passed with --enable-freetype-config]) ;;
+ esac], [enable_freetype_config="FALSE"])
+
+AC_SUBST(INSTALL_FT2_CONFIG, [$enable_freetype_config])
# checks for library functions
@@ -275,7 +283,7 @@ if test "x$GCC" = xyes; then
}
])],
- [AC_MSG_RESULT([ok, add it to XX_ANSIFLAGS])
+ [AC_MSG_RESULT([ok, adding to XX_ANSIFLAGS])
XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}"
],
[AC_MSG_RESULT([no])])
@@ -300,6 +308,18 @@ AC_SUBST([XX_CFLAGS])
AC_SUBST([XX_ANSIFLAGS])
+# It is recommended that shared libraries hide symbols except those with
+# explicit __attribute__((visibility("default"))).
+#
+AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
+orig_CFLAGS="${CFLAGS}"
+CFLAGS="${CFLAGS} -fvisibility=hidden"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ AC_MSG_RESULT(yes),
+ CFLAGS="${orig_CFLAGS}"
+ AC_MSG_RESULT(no))
+
+
# All library tests below try `pkg-config' first. If that fails, a function
# from the library is tested in the traditional autoconf way (zlib, bzip2),
# or a config script is called (libpng).
@@ -476,7 +496,7 @@ AC_ARG_WITH([harfbuzz],
have_harfbuzz=no
if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then
- harfbuzz_pkg="harfbuzz >= 0.9.21"
+ harfbuzz_pkg="harfbuzz >= 1.3.0"
have_harfbuzz_pkg=no
if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then
@@ -511,6 +531,21 @@ if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then
fi
+# check for librt
+#
+# We need `clock_gettime' for the `ftbench' demo program.
+#
+# The code is modeled after gnulib's file `clock_time.m4', ignoring
+# very old Solaris systems.
+
+LIB_CLOCK_GETTIME=
+AC_SEARCH_LIBS([clock_gettime],
+ [rt],
+ [test "$ac_cv_search_clock_gettime" = "none required" \
+ || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
+AC_SUBST([LIB_CLOCK_GETTIME])
+
+
# Some options handling SDKs/archs in CFLAGS should be copied
# to LDFLAGS. Apple TechNote 2137 recommends to include these
# options in CFLAGS but not in LDFLAGS.
@@ -977,27 +1012,63 @@ AC_SUBST([build_libtool_libs])
# changing LDFLAGS value should only be done after
# lt_cv_prog_compiler_static_works test
+ftoption_set()
+{
+ regexp="-e \\\"s|.*#.*def.*$1.*|#define $1|\\\""
+ FTOPTION_H_SED="$FTOPTION_H_SED $regexp"
+}
+
+ftoption_unset()
+{
+ regexp="-e \\\"s|.*#.*def.*$1.*|/* #undef $1 */|\\\""
+ FTOPTION_H_SED="$FTOPTION_H_SED $regexp"
+}
+
if test "$have_zlib" != no; then
- CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
+ CFLAGS="$CFLAGS $ZLIB_CFLAGS"
LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ ftoption_set FT_CONFIG_OPTION_SYSTEM_ZLIB
+else
+ ftoption_unset FT_CONFIG_OPTION_SYSTEM_ZLIB
fi
-
if test "$have_bzip2" != no; then
- CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
+ CFLAGS="$CFLAGS $BZIP2_CFLAGS"
LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ ftoption_set FT_CONFIG_OPTION_USE_BZIP2
+else
+ ftoption_unset FT_CONFIG_OPTION_USE_BZIP2
fi
if test "$have_libpng" != no; then
- CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
+ CFLAGS="$CFLAGS $LIBPNG_CFLAGS"
LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
+ ftoption_set FT_CONFIG_OPTION_USE_PNG
+else
+ ftoption_unset FT_CONFIG_OPTION_USE_PNG
fi
if test "$have_harfbuzz" != no; then
- CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ"
+ CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS"
LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS"
+ ftoption_set FT_CONFIG_OPTION_USE_HARFBUZZ
+else
+ ftoption_unset FT_CONFIG_OPTION_USE_HARFBUZZ
fi
AC_SUBST([CFLAGS])
AC_SUBST([LDFLAGS])
+# We don't want to use a template file for `ftoption.h', since compilation
+# should work without calling a configure script also. For this reason, we
+# copy the `include/freetype/config/ftoption.h' file to the `unix/builds'
+# directory (using a dummy `AC_CONFIG_FILES' call) and apply the just
+# constructed $FTOPTION_H_SED regexp (using the post-action of
+# `AC_CONFIG_FILES'); this is also the version that gets installed later on.
+#
+AC_CONFIG_FILES([ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h],
+ [mv ftoption.h ftoption.tmp
+ eval "sed $FTOPTION_H_SED < ftoption.tmp > ftoption.h"
+ rm ftoption.tmp],
+ [FTOPTION_H_SED="$FTOPTION_H_SED"])
+
# configuration file -- stay in 8.3 limit
#
# since #undef doesn't survive in configuration header files we replace
diff --git a/modules/freetype2/builds/unix/configure.raw b/modules/freetype2/builds/unix/configure.raw
index 33deed647..baab79dc5 100644
--- a/modules/freetype2/builds/unix/configure.raw
+++ b/modules/freetype2/builds/unix/configure.raw
@@ -2,7 +2,7 @@
#
# Process this file with autoconf to produce a configure script.
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.in])
# Don't forget to update `docs/VERSIONS.TXT'!
-version_info='19:0:13'
+version_info='22:1:16'
AC_SUBST([version_info])
ft_version=`echo $version_info | tr : .`
AC_SUBST([ft_version])
@@ -37,6 +37,7 @@ AC_SUBST(EXEEXT)
PKG_PROG_PKG_CONFIG([0.24])
LT_INIT(win32-dll)
+LT_PROG_RC
# checks for native programs to generate building tool
@@ -112,15 +113,13 @@ AC_TYPE_LONG_LONG_INT
AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.in works])
orig_CPPFLAGS="${CPPFLAGS}"
-CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}"
+CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include/freetype/config ${CPPFLAGS}"
ac_clean_files=
-for f in ft2build.h ftoption.h ftstdlib.h; do
- if test ! -f $f; then
- ac_clean_files="$ac_clean_files $f"
- touch $f
- fi
-done
+if test ! -f ft2build.h; then
+ ac_clean_files=ft2build.h
+ touch ft2build.h
+fi
cat > conftest.c <<\_ACEOF
#include <limits.h>
@@ -178,6 +177,15 @@ fi
CPPFLAGS="${orig_CPPFLAGS}"
+AC_ARG_ENABLE([freetype-config],
+ AS_HELP_STRING([--enable-freetype-config], [install freetype-config]),
+ [case "${enableval}" in
+ yes) enable_freetype_config="TRUE" ;;
+ no) enable_freetype_config="FALSE" ;;
+ *) AC_MSG_ERROR([unknown value '${enableval}' passed with --enable-freetype-config]) ;;
+ esac], [enable_freetype_config="FALSE"])
+
+AC_SUBST(INSTALL_FT2_CONFIG, [$enable_freetype_config])
# checks for library functions
@@ -275,7 +283,7 @@ if test "x$GCC" = xyes; then
}
])],
- [AC_MSG_RESULT([ok, add it to XX_ANSIFLAGS])
+ [AC_MSG_RESULT([ok, adding to XX_ANSIFLAGS])
XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}"
],
[AC_MSG_RESULT([no])])
@@ -300,6 +308,18 @@ AC_SUBST([XX_CFLAGS])
AC_SUBST([XX_ANSIFLAGS])
+# It is recommended that shared libraries hide symbols except those with
+# explicit __attribute__((visibility("default"))).
+#
+AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
+orig_CFLAGS="${CFLAGS}"
+CFLAGS="${CFLAGS} -fvisibility=hidden"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ AC_MSG_RESULT(yes),
+ CFLAGS="${orig_CFLAGS}"
+ AC_MSG_RESULT(no))
+
+
# All library tests below try `pkg-config' first. If that fails, a function
# from the library is tested in the traditional autoconf way (zlib, bzip2),
# or a config script is called (libpng).
@@ -476,7 +496,7 @@ AC_ARG_WITH([harfbuzz],
have_harfbuzz=no
if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then
- harfbuzz_pkg="harfbuzz >= 0.9.21"
+ harfbuzz_pkg="harfbuzz >= 1.3.0"
have_harfbuzz_pkg=no
if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then
@@ -511,6 +531,21 @@ if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then
fi
+# check for librt
+#
+# We need `clock_gettime' for the `ftbench' demo program.
+#
+# The code is modeled after gnulib's file `clock_time.m4', ignoring
+# very old Solaris systems.
+
+LIB_CLOCK_GETTIME=
+AC_SEARCH_LIBS([clock_gettime],
+ [rt],
+ [test "$ac_cv_search_clock_gettime" = "none required" \
+ || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
+AC_SUBST([LIB_CLOCK_GETTIME])
+
+
# Some options handling SDKs/archs in CFLAGS should be copied
# to LDFLAGS. Apple TechNote 2137 recommends to include these
# options in CFLAGS but not in LDFLAGS.
@@ -977,27 +1012,63 @@ AC_SUBST([build_libtool_libs])
# changing LDFLAGS value should only be done after
# lt_cv_prog_compiler_static_works test
+ftoption_set()
+{
+ regexp="-e \\\"s|.*#.*def.*$1.*|#define $1|\\\""
+ FTOPTION_H_SED="$FTOPTION_H_SED $regexp"
+}
+
+ftoption_unset()
+{
+ regexp="-e \\\"s|.*#.*def.*$1.*|/* #undef $1 */|\\\""
+ FTOPTION_H_SED="$FTOPTION_H_SED $regexp"
+}
+
if test "$have_zlib" != no; then
- CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
+ CFLAGS="$CFLAGS $ZLIB_CFLAGS"
LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ ftoption_set FT_CONFIG_OPTION_SYSTEM_ZLIB
+else
+ ftoption_unset FT_CONFIG_OPTION_SYSTEM_ZLIB
fi
-
if test "$have_bzip2" != no; then
- CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
+ CFLAGS="$CFLAGS $BZIP2_CFLAGS"
LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ ftoption_set FT_CONFIG_OPTION_USE_BZIP2
+else
+ ftoption_unset FT_CONFIG_OPTION_USE_BZIP2
fi
if test "$have_libpng" != no; then
- CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
+ CFLAGS="$CFLAGS $LIBPNG_CFLAGS"
LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
+ ftoption_set FT_CONFIG_OPTION_USE_PNG
+else
+ ftoption_unset FT_CONFIG_OPTION_USE_PNG
fi
if test "$have_harfbuzz" != no; then
- CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ"
+ CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS"
LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS"
+ ftoption_set FT_CONFIG_OPTION_USE_HARFBUZZ
+else
+ ftoption_unset FT_CONFIG_OPTION_USE_HARFBUZZ
fi
AC_SUBST([CFLAGS])
AC_SUBST([LDFLAGS])
+# We don't want to use a template file for `ftoption.h', since compilation
+# should work without calling a configure script also. For this reason, we
+# copy the `include/freetype/config/ftoption.h' file to the `unix/builds'
+# directory (using a dummy `AC_CONFIG_FILES' call) and apply the just
+# constructed $FTOPTION_H_SED regexp (using the post-action of
+# `AC_CONFIG_FILES'); this is also the version that gets installed later on.
+#
+AC_CONFIG_FILES([ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h],
+ [mv ftoption.h ftoption.tmp
+ eval "sed $FTOPTION_H_SED < ftoption.tmp > ftoption.h"
+ rm ftoption.tmp],
+ [FTOPTION_H_SED="$FTOPTION_H_SED"])
+
# configuration file -- stay in 8.3 limit
#
# since #undef doesn't survive in configuration header files we replace
diff --git a/modules/freetype2/builds/unix/detect.mk b/modules/freetype2/builds/unix/detect.mk
index 557dc92ac..54daa0786 100644
--- a/modules/freetype2/builds/unix/detect.mk
+++ b/modules/freetype2/builds/unix/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/unix/freetype-config.in b/modules/freetype2/builds/unix/freetype-config.in
index f74707d5a..2d5b90dc2 100644
--- a/modules/freetype2/builds/unix/freetype-config.in
+++ b/modules/freetype2/builds/unix/freetype-config.in
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright 2000-2016 by
+# Copyright 2000-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -12,11 +12,55 @@
LC_ALL=C
export LC_ALL
-prefix="%prefix%"
-exec_prefix="%exec_prefix%"
-exec_prefix_set="no"
-includedir="%includedir%"
-libdir="%libdir%"
+
+# if `pkg-config' is available, use values from `freetype2.pc'
+%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1
+if test $? -eq 0 ; then
+ # note that option `--variable' is not affected by the
+ # PKG_CONFIG_SYSROOT_DIR environment variable
+ if test "x$SYSROOT" != "x" ; then
+ PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
+ export PKG_CONFIG_SYSROOT_DIR
+ fi
+
+ prefix=`%PKG_CONFIG% --variable prefix freetype2`
+ exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2`
+
+ includedir=`%PKG_CONFIG% --variable includedir freetype2`
+ libdir=`%PKG_CONFIG% --variable libdir freetype2`
+
+ version=`%PKG_CONFIG% --modversion freetype2`
+
+ cflags=`%PKG_CONFIG% --cflags freetype2`
+ dynamic_libs=`%PKG_CONFIG% --libs freetype2`
+ static_libs=`%PKG_CONFIG% --static --libs freetype2`
+else
+ prefix="%prefix%"
+ exec_prefix="%exec_prefix%"
+
+ includedir="%includedir%"
+ libdir="%libdir%"
+
+ version=%ft_version%
+
+ cflags="-I${SYSROOT}$includedir/freetype2"
+ dynamic_libs="-lfreetype"
+ static_libs="%LIBSSTATIC_CONFIG%"
+ if test "${SYSROOT}$libdir" != "/usr/lib" &&
+ test "${SYSROOT}$libdir" != "/usr/lib64" ; then
+ libs_L="-L${SYSROOT}$libdir"
+ fi
+fi
+
+orig_prefix=$prefix
+orig_exec_prefix=$exec_prefix
+
+orig_includedir=$includedir
+orig_libdir=$libdir
+
+include_suffix=`echo $includedir | sed "s|$prefix||"`
+lib_suffix=`echo $libdir | sed "s|$exec_prefix||"`
+
usage()
{
@@ -39,14 +83,17 @@ Options:
library
--static make command line options display flags
for static linking
+ --help display this help and exit
EOF
exit $1
}
+
if test $# -eq 0 ; then
usage 1 1>&2
fi
+
while test $# -gt 0 ; do
case "$1" in
-*=*)
@@ -74,8 +121,8 @@ while test $# -gt 0 ; do
echo_exec_prefix=yes
;;
--version)
- echo %ft_version%
- exit 0
+ echo_version=yes
+ break
;;
--ftversion)
echo_ft_version=yes
@@ -92,6 +139,9 @@ while test $# -gt 0 ; do
--static)
show_static=yes
;;
+ --help)
+ usage 0
+ ;;
*)
usage 1 1>&2
;;
@@ -99,12 +149,27 @@ while test $# -gt 0 ; do
shift
done
+
if test "$local_prefix" = "yes" ; then
if test "$exec_prefix_set" != "yes" ; then
exec_prefix=$prefix
fi
fi
+if test "$local_prefix" = "yes" ; then
+ includedir=${prefix}${include_suffix}
+ if test "$exec_prefix_set" = "yes" ; then
+ libdir=${exec_prefix}${lib_suffix}
+ else
+ libdir=${prefix}${lib_suffix}
+ fi
+fi
+
+
+if test "$echo_version" = "yes" ; then
+ echo $version
+fi
+
if test "$echo_prefix" = "yes" ; then
echo ${SYSROOT}$prefix
fi
@@ -113,15 +178,6 @@ if test "$echo_exec_prefix" = "yes" ; then
echo ${SYSROOT}$exec_prefix
fi
-if test "$exec_prefix_set" = "yes" ; then
- libdir=$exec_prefix/lib
-else
- if test "$local_prefix" = "yes" ; then
- includedir=$prefix/include
- libdir=$prefix/lib
- fi
-fi
-
if test "$echo_ft_version" = "yes" ; then
major=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
| grep FREETYPE_MAJOR \
@@ -136,26 +192,20 @@ if test "$echo_ft_version" = "yes" ; then
fi
if test "$echo_cflags" = "yes" ; then
- echo -I${SYSROOT}$includedir/freetype2
+ echo $cflags | sed "s|$orig_includedir/freetype2|$includedir/freetype2|"
fi
if test "$echo_libs" = "yes" ; then
- libs="-lfreetype"
- staticlibs="%LIBSSTATIC_CONFIG%"
if test "$show_static" = "yes" ; then
- libs="$staticlibs"
- fi
- if test "${SYSROOT}$libdir" != "/usr/lib" &&
- test "${SYSROOT}$libdir" != "/usr/lib64"; then
- echo -L${SYSROOT}$libdir $libs
+ libs="$libs_L $static_libs"
else
- echo $libs
+ libs="$libs_L $dynamic_libs"
fi
+ echo $libs | sed "s|$orig_libdir|$libdir|"
fi
if test "$echo_libtool" = "yes" ; then
- convlib="libfreetype.la"
- echo ${SYSROOT}$libdir/$convlib
+ echo ${SYSROOT}$libdir/libfreetype.la
fi
# EOF
diff --git a/modules/freetype2/builds/unix/freetype2.in b/modules/freetype2/builds/unix/freetype2.in
index c4dfda4ab..2d759ecf8 100644
--- a/modules/freetype2/builds/unix/freetype2.in
+++ b/modules/freetype2/builds/unix/freetype2.in
@@ -4,7 +4,7 @@ libdir=%libdir%
includedir=%includedir%
Name: FreeType 2
-URL: http://freetype.org
+URL: https://freetype.org
Description: A free, high-quality, and portable font engine.
Version: %ft_version%
Requires:
diff --git a/modules/freetype2/builds/unix/freetype2.m4 b/modules/freetype2/builds/unix/freetype2.m4
index 1462fc791..af2e6590e 100644
--- a/modules/freetype2/builds/unix/freetype2.m4
+++ b/modules/freetype2/builds/unix/freetype2.m4
@@ -1,7 +1,7 @@
# Configure paths for FreeType2
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/unix/ft-munmap.m4 b/modules/freetype2/builds/unix/ft-munmap.m4
index db798d8d9..00eda4925 100644
--- a/modules/freetype2/builds/unix/ft-munmap.m4
+++ b/modules/freetype2/builds/unix/ft-munmap.m4
@@ -1,6 +1,6 @@
## FreeType specific autoconf tests
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/unix/ftconfig.in b/modules/freetype2/builds/unix/ftconfig.in
index 6401f657c..b9c21da2c 100644
--- a/modules/freetype2/builds/unix/ftconfig.in
+++ b/modules/freetype2/builds/unix/ftconfig.in
@@ -4,7 +4,7 @@
/* */
/* UNIX-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -365,6 +365,15 @@ FT_BEGIN_HEADER
#endif
+#ifdef _WIN64
+ /* only 64bit Windows uses the LLP64 data model, i.e., */
+ /* 32bit integers, 64bit pointers */
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
+#else
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
+#endif
+
+
/*************************************************************************/
/* */
/* miscellaneous */
@@ -388,6 +397,14 @@ FT_BEGIN_HEADER
#endif
+ /* Use FT_LOCAL and FT_LOCAL_DEF to declare and define, respectively, */
+ /* a function that gets used only within the scope of a module. */
+ /* Normally, both the header and source code files for such a */
+ /* function are within a single module directory. */
+ /* */
+ /* Intra-module arrays should be tagged with FT_LOCAL_ARRAY and */
+ /* FT_LOCAL_ARRAY_DEF. */
+ /* */
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
#define FT_LOCAL( x ) static x
@@ -409,6 +426,12 @@ FT_BEGIN_HEADER
#define FT_LOCAL_ARRAY_DEF( x ) const x
+ /* Use FT_BASE and FT_BASE_DEF to declare and define, respectively, */
+ /* functions that are used in more than a single module. In the */
+ /* current setup this implies that the declaration is in a header */
+ /* file in the `include/freetype/internal' directory, and the */
+ /* function body is in a file in `src/base'. */
+ /* */
#ifndef FT_BASE
#ifdef __cplusplus
@@ -431,14 +454,63 @@ FT_BEGIN_HEADER
#endif /* !FT_BASE_DEF */
+ /* When compiling FreeType as a DLL or DSO with hidden visibility */
+ /* some systems/compilers need a special attribute in front OR after */
+ /* the return type of function declarations. */
+ /* */
+ /* Two macros are used within the FreeType source code to define */
+ /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
+ /* */
+ /* FT_EXPORT( return_type ) */
+ /* */
+ /* is used in a function declaration, as in */
+ /* */
+ /* FT_EXPORT( FT_Error ) */
+ /* FT_Init_FreeType( FT_Library* alibrary ); */
+ /* */
+ /* */
+ /* FT_EXPORT_DEF( return_type ) */
+ /* */
+ /* is used in a function definition, as in */
+ /* */
+ /* FT_EXPORT_DEF( FT_Error ) */
+ /* FT_Init_FreeType( FT_Library* alibrary ) */
+ /* { */
+ /* ... some code ... */
+ /* return FT_Err_Ok; */
+ /* } */
+ /* */
+ /* You can provide your own implementation of FT_EXPORT and */
+ /* FT_EXPORT_DEF here if you want. */
+ /* */
+ /* To export a variable, use FT_EXPORT_VAR. */
+ /* */
#ifndef FT_EXPORT
-#ifdef __cplusplus
+#ifdef FT2_BUILD_LIBRARY
+
+#if defined( _WIN32 ) && ( defined( _DLL ) || defined( DLL_EXPORT ) )
+#define FT_EXPORT( x ) __declspec( dllexport ) x
+#elif defined( __GNUC__ ) && __GNUC__ >= 4
+#define FT_EXPORT( x ) __attribute__(( visibility( "default" ) )) x
+#elif defined( __cplusplus )
+#define FT_EXPORT( x ) extern "C" x
+#else
+#define FT_EXPORT( x ) extern x
+#endif
+
+#else
+
+#if defined( FT2_DLLIMPORT )
+#define FT_EXPORT( x ) __declspec( dllimport ) x
+#elif defined( __cplusplus )
#define FT_EXPORT( x ) extern "C" x
#else
#define FT_EXPORT( x ) extern x
#endif
+#endif
+
#endif /* !FT_EXPORT */
@@ -474,7 +546,13 @@ FT_BEGIN_HEADER
/* functions which are accessed by (global) function pointers. */
/* */
/* */
- /* FT_CALLBACK_DEF is used to _define_ a callback function. */
+ /* FT_CALLBACK_DEF is used to _define_ a callback function, */
+ /* located in the same source code file as the structure that uses */
+ /* it. */
+ /* */
+ /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare */
+ /* and define a callback function, respectively, in a similar way */
+ /* as FT_BASE and FT_BASE_DEF work. */
/* */
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
/* contains pointers to callback functions. */
@@ -494,6 +572,16 @@ FT_BEGIN_HEADER
#endif
#endif /* FT_CALLBACK_DEF */
+#ifndef FT_BASE_CALLBACK
+#ifdef __cplusplus
+#define FT_BASE_CALLBACK( x ) extern "C" x
+#define FT_BASE_CALLBACK_DEF( x ) extern "C" x
+#else
+#define FT_BASE_CALLBACK( x ) extern x
+#define FT_BASE_CALLBACK_DEF( x ) x
+#endif
+#endif /* FT_BASE_CALLBACK */
+
#ifndef FT_CALLBACK_TABLE
#ifdef __cplusplus
#define FT_CALLBACK_TABLE extern "C"
diff --git a/modules/freetype2/builds/unix/ftsystem.c b/modules/freetype2/builds/unix/ftsystem.c
index a5e44591c..8fdbeb0f6 100644
--- a/modules/freetype2/builds/unix/ftsystem.c
+++ b/modules/freetype2/builds/unix/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* Unix-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/builds/unix/install.mk b/modules/freetype2/builds/unix/install.mk
index f944c5c23..c08c3b756 100644
--- a/modules/freetype2/builds/unix/install.mk
+++ b/modules/freetype2/builds/unix/install.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -30,15 +30,20 @@
#
# We also remove `$(includedir)/ft2build.h' for the same reason.
#
+# Note that some header files get handled twice for simplicity; a special,
+# configured version overwrites the generic one.
+#
install: $(PROJECT_LIBRARY)
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2
-$(DELETE) $(DESTDIR)$(includedir)/ft2build.h
$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
$(DESTDIR)$(libdir)/pkgconfig \
$(DESTDIR)$(includedir)/freetype2/freetype/config \
- $(DESTDIR)$(bindir) \
- $(DESTDIR)$(datadir)/aclocal \
+ $(DESTDIR)$(datadir)/aclocal
+ifeq ($(INSTALL_FT2_CONFIG),TRUE)
+ $(MKINSTALLDIRS) $(DESTDIR)$(bindir) \
$(DESTDIR)$(mandir)/man1
+endif
$(LIBTOOL) --mode=install $(INSTALL) \
$(PROJECT_LIBRARY) $(DESTDIR)$(libdir)
-for P in $(PUBLIC_H) ; do \
@@ -49,20 +54,24 @@ install: $(PROJECT_LIBRARY)
$(INSTALL_DATA) \
$$P $(DESTDIR)$(includedir)/freetype2/freetype/config ; \
done
- $(INSTALL_DATA) $(TOP_DIR)/include/ft2build.h \
+ $(INSTALL_DATA) $(TOP_DIR)/include/ft2build.h \
$(DESTDIR)$(includedir)/freetype2/ft2build.h
$(INSTALL_DATA) $(OBJ_BUILD)/ftconfig.h \
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftconfig.h
$(INSTALL_DATA) $(OBJ_DIR)/ftmodule.h \
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftmodule.h
- $(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
- $(DESTDIR)$(bindir)/freetype-config
- $(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \
+ $(INSTALL_DATA) $(OBJ_BUILD)/ftoption.h \
+ $(DESTDIR)$(includedir)/freetype2/freetype/config/ftoption.h
+ $(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \
$(DESTDIR)$(datadir)/aclocal/freetype2.m4
- $(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \
+ $(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \
$(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
- $(INSTALL_DATA) $(TOP_DIR)/docs/freetype-config.1 \
+ifeq ($(INSTALL_FT2_CONFIG),TRUE)
+ $(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
+ $(DESTDIR)$(bindir)/freetype-config
+ $(INSTALL_DATA) $(TOP_DIR)/docs/freetype-config.1 \
$(DESTDIR)$(mandir)/man1/freetype-config.1
+endif
uninstall:
@@ -75,7 +84,7 @@ uninstall:
check:
- @echo There is no validation suite for this package.
+ $(info There is no validation suite for this package.)
.PHONY: clean_project_unix distclean_project_unix
@@ -83,13 +92,11 @@ check:
# Unix cleaning and distclean rules.
#
clean_project_unix:
- -$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)
- -$(DELETE) $(patsubst %.$O,%.$(SO),$(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)) \
- $(CLEAN)
+ -$(LIBTOOL) --mode=clean $(RM) $(OBJECTS_LIST)
+ -$(DELETE) $(CLEAN)
distclean_project_unix: clean_project_unix
- -$(DELETE) $(PROJECT_LIBRARY)
- -$(DELDIR) $(OBJ_DIR)/.libs
+ -$(LIBTOOL) --mode=clean $(RM) $(PROJECT_LIBRARY)
-$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
# EOF
diff --git a/modules/freetype2/builds/unix/pkg.m4 b/modules/freetype2/builds/unix/pkg.m4
index f26f84c9a..260e1fb92 100644
--- a/modules/freetype2/builds/unix/pkg.m4
+++ b/modules/freetype2/builds/unix/pkg.m4
@@ -53,7 +53,7 @@ fi[]dnl
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
+# only at the first occurrence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
diff --git a/modules/freetype2/builds/unix/unix-cc.in b/modules/freetype2/builds/unix/unix-cc.in
index df09e7eca..5675866ea 100644
--- a/modules/freetype2/builds/unix/unix-cc.in
+++ b/modules/freetype2/builds/unix/unix-cc.in
@@ -2,7 +2,7 @@
# FreeType 2 template for Unix-specific compiler definitions
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -87,19 +87,26 @@ ANSIFLAGS := @XX_ANSIFLAGS@
# C compiler to use -- we use libtool!
#
-#
CCraw := $(CC)
CC := $(LIBTOOL) --mode=compile $(CCraw)
+# Resource compiler to use on Cygwin/MinGW, usually windres.
+#
+RCraw := @RC@
+ifneq ($(RCraw),)
+ RC := $(LIBTOOL) --tag=RC --mode=compile $(RCraw)
+endif
+
# Linker flags.
#
-LDFLAGS := @LDFLAGS@
+LDFLAGS := @LDFLAGS@
+LIB_CLOCK_GETTIME := @LIB_CLOCK_GETTIME@ # for ftbench
# export symbols
#
CCraw_build := @CC_BUILD@ # native CC of building system
-E_BUILD := @EXEEXT_BUILD@ # extension for exexutable on building system
+E_BUILD := @EXEEXT_BUILD@ # extension for executable on building system
EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym
CCexe := $(CCraw_build) # used to compile `apinames' only
diff --git a/modules/freetype2/builds/unix/unix-def.in b/modules/freetype2/builds/unix/unix-def.in
index f7b557fb4..6957053ab 100644
--- a/modules/freetype2/builds/unix/unix-def.in
+++ b/modules/freetype2/builds/unix/unix-def.in
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -43,6 +43,7 @@ DISTCLEAN += $(OBJ_BUILD)/config.cache \
$(OBJ_BUILD)/unix-def.mk \
$(OBJ_BUILD)/unix-cc.mk \
$(OBJ_BUILD)/ftconfig.h \
+ $(OBJ_BUILD)/ftoption.h \
$(LIBTOOL) \
$(OBJ_BUILD)/Makefile
@@ -62,6 +63,7 @@ version_info := @version_info@
# Variables needed for `freetype-config' and `freetype.pc'.
#
+PKG_CONFIG := @PKG_CONFIG@
REQUIRES_PRIVATE := @REQUIRES_PRIVATE@
LIBS_PRIVATE := @LIBS_PRIVATE@
LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@
@@ -102,6 +104,7 @@ NO_OUTPUT := 2> /dev/null
$(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
rm -f $@ $@.tmp
sed -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \
+ -e 's|%PKG_CONFIG%|$(PKG_CONFIG)|' \
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
-e 's|%exec_prefix%|$(exec_prefix)|' \
-e 's|%ft_version%|$(ft_version)|' \
@@ -111,7 +114,7 @@ $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
$< \
> $@.tmp
chmod +x $@.tmp
- chmod a-w $@.tmp
+ chmod go-w $@.tmp
mv $@.tmp $@
# To support directory names with spaces (as might easily happen on Windows
@@ -142,6 +145,9 @@ $(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
chmod a-w $@.tmp
mv $@.tmp $@
+# defines whether we should install `freetype-config' or not
+INSTALL_FT2_CONFIG = @INSTALL_FT2_CONFIG@
+
all install: $(OBJ_BUILD)/freetype-config \
$(OBJ_BUILD)/freetype2.pc
diff --git a/modules/freetype2/builds/unix/unix-dev.mk b/modules/freetype2/builds/unix/unix-dev.mk
index 3c72e577f..5a516ad28 100644
--- a/modules/freetype2/builds/unix/unix-dev.mk
+++ b/modules/freetype2/builds/unix/unix-dev.mk
@@ -6,7 +6,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/unix/unix-lcc.mk b/modules/freetype2/builds/unix/unix-lcc.mk
index 1c254d13a..73a02d430 100644
--- a/modules/freetype2/builds/unix/unix-lcc.mk
+++ b/modules/freetype2/builds/unix/unix-lcc.mk
@@ -6,7 +6,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/unix/unix.mk b/modules/freetype2/builds/unix/unix.mk
index fba1e1d87..acd54d3dd 100644
--- a/modules/freetype2/builds/unix/unix.mk
+++ b/modules/freetype2/builds/unix/unix.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/unix/unixddef.mk b/modules/freetype2/builds/unix/unixddef.mk
index adba517d1..a8da63a0a 100644
--- a/modules/freetype2/builds/unix/unixddef.mk
+++ b/modules/freetype2/builds/unix/unixddef.mk
@@ -4,7 +4,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/vms/ftconfig.h b/modules/freetype2/builds/vms/ftconfig.h
index eb7fced3a..021e2c651 100644
--- a/modules/freetype2/builds/vms/ftconfig.h
+++ b/modules/freetype2/builds/vms/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* VMS-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -33,6 +33,7 @@
/* */
/*************************************************************************/
+
#ifndef FTCONFIG_H_
#define FTCONFIG_H_
@@ -209,12 +210,12 @@ FT_BEGIN_HEADER
#endif
-#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)
+#if FT_SIZEOF_INT == 4
typedef signed int FT_Int32;
typedef unsigned int FT_UInt32;
-#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)
+#elif FT_SIZEOF_LONG == 4
typedef signed long FT_Int32;
typedef unsigned long FT_UInt32;
@@ -225,12 +226,12 @@ FT_BEGIN_HEADER
/* look up an integer type that is at least 32 bits */
-#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT)
+#if FT_SIZEOF_INT >= 4
typedef int FT_Fast;
typedef unsigned int FT_UFast;
-#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT)
+#elif FT_SIZEOF_LONG >= 4
typedef long FT_Fast;
typedef unsigned long FT_UFast;
@@ -238,15 +239,25 @@ FT_BEGIN_HEADER
#endif
- /* determine whether we have a 64-bit int type for platforms without */
- /* Autoconf */
-#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT)
+ /* determine whether we have a 64-bit int type */
+ /* (mostly for environments without `autoconf') */
+#if FT_SIZEOF_LONG == 8
/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
#define FT_INT64 long
#define FT_UINT64 unsigned long
+ /* we handle the LLP64 scheme separately for GCC and clang, */
+ /* suppressing the `long long' warning */
+#elif ( FT_SIZEOF_LONG == 4 ) && \
+ defined( HAVE_LONG_LONG_INT ) && \
+ defined( __GNUC__ )
+#pragma GCC diagnostic ignored "-Wlong-long"
+#define FT_LONG64
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
+
/*************************************************************************/
/* */
/* A 64-bit data type may create compilation problems if you compile */
@@ -298,7 +309,7 @@ FT_BEGIN_HEADER
#endif /* __STDC_VERSION__ >= 199901L */
-#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
+#endif /* FT_SIZEOF_LONG == 8 */
#ifdef FT_LONG64
typedef FT_INT64 FT_Int64;
@@ -306,6 +317,15 @@ FT_BEGIN_HEADER
#endif
+#ifdef _WIN64
+ /* only 64bit Windows uses the LLP64 data model, i.e., */
+ /* 32bit integers, 64bit pointers */
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
+#else
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
+#endif
+
+
/*************************************************************************/
/* */
/* miscellaneous */
@@ -329,6 +349,14 @@ FT_BEGIN_HEADER
#endif
+ /* Use FT_LOCAL and FT_LOCAL_DEF to declare and define, respectively, */
+ /* a function that gets used only within the scope of a module. */
+ /* Normally, both the header and source code files for such a */
+ /* function are within a single module directory. */
+ /* */
+ /* Intra-module arrays should be tagged with FT_LOCAL_ARRAY and */
+ /* FT_LOCAL_ARRAY_DEF. */
+ /* */
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
#define FT_LOCAL( x ) static x
@@ -350,6 +378,12 @@ FT_BEGIN_HEADER
#define FT_LOCAL_ARRAY_DEF( x ) const x
+ /* Use FT_BASE and FT_BASE_DEF to declare and define, respectively, */
+ /* functions that are used in more than a single module. In the */
+ /* current setup this implies that the declaration is in a header */
+ /* file in the `include/freetype/internal' directory, and the */
+ /* function body is in a file in `src/base'. */
+ /* */
#ifndef FT_BASE
#ifdef __cplusplus
@@ -372,14 +406,63 @@ FT_BEGIN_HEADER
#endif /* !FT_BASE_DEF */
+ /* When compiling FreeType as a DLL or DSO with hidden visibility */
+ /* some systems/compilers need a special attribute in front OR after */
+ /* the return type of function declarations. */
+ /* */
+ /* Two macros are used within the FreeType source code to define */
+ /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
+ /* */
+ /* FT_EXPORT( return_type ) */
+ /* */
+ /* is used in a function declaration, as in */
+ /* */
+ /* FT_EXPORT( FT_Error ) */
+ /* FT_Init_FreeType( FT_Library* alibrary ); */
+ /* */
+ /* */
+ /* FT_EXPORT_DEF( return_type ) */
+ /* */
+ /* is used in a function definition, as in */
+ /* */
+ /* FT_EXPORT_DEF( FT_Error ) */
+ /* FT_Init_FreeType( FT_Library* alibrary ) */
+ /* { */
+ /* ... some code ... */
+ /* return FT_Err_Ok; */
+ /* } */
+ /* */
+ /* You can provide your own implementation of FT_EXPORT and */
+ /* FT_EXPORT_DEF here if you want. */
+ /* */
+ /* To export a variable, use FT_EXPORT_VAR. */
+ /* */
#ifndef FT_EXPORT
-#ifdef __cplusplus
+#ifdef FT2_BUILD_LIBRARY
+
+#if defined( _WIN32 ) && ( defined( _DLL ) || defined( DLL_EXPORT ) )
+#define FT_EXPORT( x ) __declspec( dllexport ) x
+#elif defined( __GNUC__ ) && __GNUC__ >= 4
+#define FT_EXPORT( x ) __attribute__(( visibility( "default" ) )) x
+#elif defined( __cplusplus )
+#define FT_EXPORT( x ) extern "C" x
+#else
+#define FT_EXPORT( x ) extern x
+#endif
+
+#else
+
+#if defined( FT2_DLLIMPORT )
+#define FT_EXPORT( x ) __declspec( dllimport ) x
+#elif defined( __cplusplus )
#define FT_EXPORT( x ) extern "C" x
#else
#define FT_EXPORT( x ) extern x
#endif
+#endif
+
#endif /* !FT_EXPORT */
@@ -415,7 +498,13 @@ FT_BEGIN_HEADER
/* functions which are accessed by (global) function pointers. */
/* */
/* */
- /* FT_CALLBACK_DEF is used to _define_ a callback function. */
+ /* FT_CALLBACK_DEF is used to _define_ a callback function, */
+ /* located in the same source code file as the structure that uses */
+ /* it. */
+ /* */
+ /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare */
+ /* and define a callback function, respectively, in a similar way */
+ /* as FT_BASE and FT_BASE_DEF work. */
/* */
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
/* contains pointers to callback functions. */
@@ -435,6 +524,16 @@ FT_BEGIN_HEADER
#endif
#endif /* FT_CALLBACK_DEF */
+#ifndef FT_BASE_CALLBACK
+#ifdef __cplusplus
+#define FT_BASE_CALLBACK( x ) extern "C" x
+#define FT_BASE_CALLBACK_DEF( x ) extern "C" x
+#else
+#define FT_BASE_CALLBACK( x ) extern x
+#define FT_BASE_CALLBACK_DEF( x ) x
+#endif
+#endif /* FT_BASE_CALLBACK */
+
#ifndef FT_CALLBACK_TABLE
#ifdef __cplusplus
#define FT_CALLBACK_TABLE extern "C"
diff --git a/modules/freetype2/builds/vms/ftsystem.c b/modules/freetype2/builds/vms/ftsystem.c
index a13cb220e..7d79f9a31 100644
--- a/modules/freetype2/builds/vms/ftsystem.c
+++ b/modules/freetype2/builds/vms/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* VMS-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/builds/wince/ftdebug.c b/modules/freetype2/builds/wince/ftdebug.c
index 6e35e170c..83c5f4479 100644
--- a/modules/freetype2/builds/wince/ftdebug.c
+++ b/modules/freetype2/builds/wince/ftdebug.c
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component for WinCE (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -79,7 +79,7 @@
va_start( ap, fmt );
- vprintf( fmt, ap );
+ vfprintf( stderr, fmt, ap );
/* send the string to the debugger as well */
vsprintf( buf, fmt, ap );
OutputDebugStringEx( buf );
diff --git a/modules/freetype2/builds/wince/vc2005-ce/freetype.vcproj b/modules/freetype2/builds/wince/vc2005-ce/freetype.vcproj
index 279abeefa..1ca45a80f 100644
--- a/modules/freetype2/builds/wince/vc2005-ce/freetype.vcproj
+++ b/modules/freetype2/builds/wince/vc2005-ce/freetype.vcproj
@@ -21,7 +21,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -41,7 +41,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -61,7 +61,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -81,7 +81,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -101,7 +101,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -121,7 +121,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -141,7 +141,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -161,7 +161,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -181,7 +181,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -201,7 +201,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -221,7 +221,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -241,7 +241,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -261,7 +261,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -281,7 +281,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -301,7 +301,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -321,7 +321,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -341,7 +341,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -361,7 +361,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -381,7 +381,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -401,7 +401,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -421,7 +421,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -441,7 +441,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -461,7 +461,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -481,7 +481,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -501,7 +501,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -521,7 +521,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -541,7 +541,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -561,7 +561,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -581,7 +581,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -601,7 +601,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -621,7 +621,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -641,7 +641,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -661,7 +661,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -681,7 +681,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -701,7 +701,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -721,7 +721,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -741,7 +741,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -758,7 +758,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype271MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype291MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -773,585 +773,18 @@
<File RelativePath="..\..\..\src\autofit\autofit.c">
</File>
<File RelativePath="..\..\..\src\bdf\bdf.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\cff\cff.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftbase.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftbitmap.c">
</File>
<File RelativePath="..\..\..\src\cache\ftcache.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\ftdebug.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" DisableLanguageExtensions="false" />
+ <FileConfiguration>
+ <Tool Name="VCCLCompilerTool" DisableLanguageExtensions="false" />
</FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftfstype.c">
@@ -1359,774 +792,18 @@
<File RelativePath="..\..\..\src\base\ftgasp.c">
</File>
<File RelativePath="..\..\..\src\base\ftglyph.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\gzip\ftgzip.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftinit.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\lzw\ftlzw.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftstroke.c">
</File>
<File RelativePath="..\..\..\src\base\ftsystem.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\smooth\smooth.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<Filter Name="FT_MODULES">
<File RelativePath="..\..\..\src\base\ftbbox.c">
@@ -2135,139 +812,9 @@
</File>
<File RelativePath="..\..\..\src\base\ftcid.c">
</File>
- <File RelativePath="..\..\..\src\base\ftfntfmt.c">
- </File>
<File RelativePath="..\..\..\src\base\ftgxval.c">
</File>
- <File RelativePath="..\..\..\src\base\ftlcdfil.c">
- </File>
<File RelativePath="..\..\..\src\base\ftmm.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftotval.c">
</File>
@@ -2282,1540 +829,28 @@
<File RelativePath="..\..\..\src\base\ftwinfnt.c">
</File>
<File RelativePath="..\..\..\src\pcf\pcf.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\pfr\pfr.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\psaux\psaux.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\pshinter\pshinter.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\psnames\psmodule.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\raster\raster.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\sfnt\sfnt.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\truetype\truetype.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\type1\type1.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\cid\type1cid.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\type42\type42.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\winfonts\winfnt.c">
- <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Smartphone 2003 (ARMV4)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
</Filter>
</Filter>
@@ -3836,4 +871,4 @@
</Files>
<Globals>
</Globals>
-</VisualStudioProject> \ No newline at end of file
+</VisualStudioProject>
diff --git a/modules/freetype2/builds/wince/vc2005-ce/index.html b/modules/freetype2/builds/wince/vc2005-ce/index.html
index 58d6093bc..02a1caf8b 100644
--- a/modules/freetype2/builds/wince/vc2005-ce/index.html
+++ b/modules/freetype2/builds/wince/vc2005-ce/index.html
@@ -21,14 +21,14 @@ the following targets:
<li>PPC/SP WM6 (Windows Mobile 6)</li>
</ul>
-It compiles the following libraries from the FreeType 2.7.1 sources:</p>
+It compiles the following libraries from the FreeType 2.9.1 sources:</p>
<ul>
<pre>
- freetype271.lib - release build; single threaded
- freetype271_D.lib - debug build; single threaded
- freetype271MT.lib - release build; multi-threaded
- freetype271MT_D.lib - debug build; multi-threaded</pre>
+ freetype291.lib - release build; single threaded
+ freetype291_D.lib - debug build; single threaded
+ freetype291MT.lib - release build; multi-threaded
+ freetype291MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/modules/freetype2/builds/wince/vc2008-ce/freetype.vcproj b/modules/freetype2/builds/wince/vc2008-ce/freetype.vcproj
index ca306ceff..7a5445e9c 100644
--- a/modules/freetype2/builds/wince/vc2008-ce/freetype.vcproj
+++ b/modules/freetype2/builds/wince/vc2008-ce/freetype.vcproj
@@ -88,7 +88,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -177,7 +177,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -266,7 +266,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -355,7 +355,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -444,7 +444,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -533,7 +533,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -621,7 +621,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -709,7 +709,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -797,7 +797,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -885,7 +885,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -973,7 +973,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1061,7 +1061,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1149,7 +1149,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1236,7 +1236,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1323,7 +1323,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1410,7 +1410,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1497,7 +1497,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1584,7 +1584,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1668,7 +1668,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1753,7 +1753,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1838,7 +1838,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1923,7 +1923,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2008,7 +2008,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2093,7 +2093,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2178,7 +2178,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2263,7 +2263,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2348,7 +2348,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2433,7 +2433,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2518,7 +2518,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2603,7 +2603,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2689,7 +2689,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2775,7 +2775,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2861,7 +2861,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2947,7 +2947,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3033,7 +3033,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3119,7 +3119,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3205,7 +3205,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3279,7 +3279,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3313,1115 +3313,14 @@
<File
RelativePath="..\..\..\src\bdf\bdf.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\cff\cff.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftbase.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftbitmap.c"
@@ -4430,854 +3329,13 @@
<File
RelativePath="..\..\..\src\cache\ftcache.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\ftdebug.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
+ <FileConfiguration>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
DisableLanguageExtensions="false"
/>
</FileConfiguration>
@@ -5293,1710 +3351,18 @@
<File
RelativePath="..\..\..\src\base\ftglyph.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\gzip\ftgzip.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftinit.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\lzw\ftlzw.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftstroke.c"
@@ -7005,856 +3371,10 @@
<File
RelativePath="..\..\..\src\base\ftsystem.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\smooth\smooth.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<Filter
Name="FT_MODULES"
@@ -7872,443 +3392,12 @@
>
</File>
<File
- RelativePath="..\..\..\src\base\ftfntfmt.c"
- >
- </File>
- <File
RelativePath="..\..\..\src\base\ftgxval.c"
>
</File>
<File
- RelativePath="..\..\..\src\base\ftlcdfil.c"
- >
- </File>
- <File
RelativePath="..\..\..\src\base\ftmm.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftotval.c"
@@ -8337,5126 +3426,50 @@
<File
RelativePath="..\..\..\src\pcf\pcf.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\pfr\pfr.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\psaux\psaux.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\pshinter\pshinter.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\psnames\psmodule.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\raster\raster.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\sfnt\sfnt.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\truetype\truetype.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\type1\type1.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\cid\type1cid.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\type42\type42.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\winfonts\winfnt.c"
>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
</Filter>
</Filter>
diff --git a/modules/freetype2/builds/wince/vc2008-ce/index.html b/modules/freetype2/builds/wince/vc2008-ce/index.html
index 37de05c52..f7a358378 100644
--- a/modules/freetype2/builds/wince/vc2008-ce/index.html
+++ b/modules/freetype2/builds/wince/vc2008-ce/index.html
@@ -21,14 +21,14 @@ the following targets:
<li>PPC/SP WM6 (Windows Mobile 6)</li>
</ul>
-It compiles the following libraries from the FreeType 2.7.1 sources:</p>
+It compiles the following libraries from the FreeType 2.9.1 sources:</p>
<ul>
<pre>
- freetype271.lib - release build; single threaded
- freetype271_D.lib - debug build; single threaded
- freetype271MT.lib - release build; multi-threaded
- freetype271MT_D.lib - debug build; multi-threaded</pre>
+ freetype291.lib - release build; single threaded
+ freetype291_D.lib - debug build; single threaded
+ freetype291MT.lib - release build; multi-threaded
+ freetype291MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/modules/freetype2/builds/windows/detect.mk b/modules/freetype2/builds/windows/detect.mk
index 087230310..dd5669ca5 100644
--- a/modules/freetype2/builds/windows/detect.mk
+++ b/modules/freetype2/builds/windows/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -77,7 +77,7 @@ ifeq ($(PLATFORM),windows)
# So we need to hack.
#
# Kudos to Eli Zaretskii (DJGPP guru) that helped debug it.
- # Details are available in threads of the freetype mailing list
+ # Details are available in threads of the FreeType mailing list
# (2004-11-11), and then in the devel mailing list (2004-11-20 to -23).
#
ifeq ($(OS),Windows_NT)
@@ -95,22 +95,22 @@ ifeq ($(PLATFORM),windows)
ifneq ($(findstring list,$(MAKECMDGOALS)),) # test for the "list" target
dump_target_list:
- @echo ÿ
- @echo $(PROJECT_TITLE) build system -- supported compilers
- @echo ÿ
- @echo Several command-line compilers are supported on Win32:
- @echo ÿ
- @echo ÿÿmake setupÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿgcc (with Mingw)
- @echo ÿÿmake setup visualcÿÿÿÿÿÿÿÿÿÿÿÿÿMicrosoft Visual C++
- @echo ÿÿmake setup bcc32ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBorland C/C++
- @echo ÿÿmake setup lccÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWin32-LCC
- @echo ÿÿmake setup intelcÿÿÿÿÿÿÿÿÿÿÿÿÿÿIntel C/C++
- @echo ÿ
+ $(info )
+ $(info $(PROJECT_TITLE) build system -- supported compilers)
+ $(info )
+ $(info Several command-line compilers are supported on Win32:)
+ $(info )
+ $(info $(empty) make setup gcc (with Mingw))
+ $(info $(empty) make setup visualc Microsoft Visual C++)
+ $(info $(empty) make setup bcc32 Borland C/C++)
+ $(info $(empty) make setup lcc Win32-LCC)
+ $(info $(empty) make setup intelc Intel C/C++)
+ $(info )
setup: dump_target_list
.PHONY: dump_target_list list
else
- setup: dos_setup
+ setup: std_setup
endif
# additionally, we provide hooks for various other compilers
diff --git a/modules/freetype2/builds/windows/ftdebug.c b/modules/freetype2/builds/windows/ftdebug.c
index f29cca08b..ec70a0e80 100644
--- a/modules/freetype2/builds/windows/ftdebug.c
+++ b/modules/freetype2/builds/windows/ftdebug.c
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component for Win32 (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -65,7 +65,7 @@
va_start( ap, fmt );
- vprintf( fmt, ap );
+ vfprintf( stderr, fmt, ap );
/* send the string to the debugger as well */
vsprintf( buf, fmt, ap );
OutputDebugStringA( buf );
diff --git a/modules/freetype2/builds/windows/vc2005/freetype.vcproj b/modules/freetype2/builds/windows/vc2005/freetype.vcproj
index b643840c2..b1e2ae681 100644
--- a/modules/freetype2/builds/windows/vc2005/freetype.vcproj
+++ b/modules/freetype2/builds/windows/vc2005/freetype.vcproj
@@ -16,7 +16,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype271.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype291.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -33,7 +33,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype271MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype291MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -50,7 +50,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype271ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype291ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -67,7 +67,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype271_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype291_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -84,7 +84,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype271ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype291ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -101,7 +101,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype271MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype291MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -116,105 +116,18 @@
<File RelativePath="..\..\..\src\autofit\autofit.c">
</File>
<File RelativePath="..\..\..\src\bdf\bdf.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\cff\cff.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftbase.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftbitmap.c">
</File>
<File RelativePath="..\..\..\src\cache\ftcache.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\ftdebug.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" DisableLanguageExtensions="false" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" DisableLanguageExtensions="false" />
+ <FileConfiguration>
+ <Tool Name="VCCLCompilerTool" DisableLanguageExtensions="false" />
</FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftfstype.c">
@@ -222,151 +135,27 @@
<File RelativePath="..\..\..\src\base\ftgasp.c">
</File>
<File RelativePath="..\..\..\src\base\ftglyph.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\gzip\ftgzip.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftinit.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\lzw\ftlzw.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftstroke.c">
</File>
<File RelativePath="..\..\..\src\base\ftsystem.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\smooth\smooth.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<Filter Name="FT_MODULES">
+ <File RelativePath="..\..\..\src\base\ftbdf.c">
+ </File>
<File RelativePath="..\..\..\src\base\ftbbox.c">
</File>
- <File RelativePath="..\..\..\src\base\ftfntfmt.c">
+ <File RelativePath="..\..\..\src\base\ftcid.c">
</File>
<File RelativePath="..\..\..\src\base\ftmm.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\base\ftpfr.c">
</File>
@@ -376,8 +165,6 @@
</File>
<File RelativePath="..\..\..\src\base\ftwinfnt.c">
</File>
- <File RelativePath="..\..\..\src\base\ftlcdfil.c">
- </File>
<File RelativePath="..\..\..\src\base\ftgxval.c">
</File>
<File RelativePath="..\..\..\src\base\ftotval.c">
@@ -385,244 +172,28 @@
<File RelativePath="..\..\..\src\base\ftpatent.c">
</File>
<File RelativePath="..\..\..\src\pcf\pcf.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\pfr\pfr.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\psaux\psaux.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\pshinter\pshinter.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\psnames\psmodule.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\raster\raster.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\sfnt\sfnt.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\truetype\truetype.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\type1\type1.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\cid\type1cid.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\type42\type42.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
<File RelativePath="..\..\..\src\winfonts\winfnt.c">
- <FileConfiguration Name="Release|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Release Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="2" AdditionalIncludeDirectories="" PreprocessorDefinitions="" />
- </FileConfiguration>
- <FileConfiguration Name="Debug|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Singlethreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
- <FileConfiguration Name="Debug Multithreaded|Win32">
- <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" BasicRuntimeChecks="3" />
- </FileConfiguration>
</File>
</Filter>
</Filter>
@@ -643,4 +214,4 @@
</Files>
<Globals>
</Globals>
-</VisualStudioProject> \ No newline at end of file
+</VisualStudioProject>
diff --git a/modules/freetype2/builds/windows/vc2005/index.html b/modules/freetype2/builds/windows/vc2005/index.html
index c3a5ab7d5..c5e182ef0 100644
--- a/modules/freetype2/builds/windows/vc2005/index.html
+++ b/modules/freetype2/builds/windows/vc2005/index.html
@@ -11,14 +11,14 @@
<p>This directory contains project files for Visual C++, named
<tt>freetype.vcproj</tt>, and Visual Studio, called <tt>freetype.sln</tt>. It
-compiles the following libraries from the FreeType 2.7.1 sources:</p>
+compiles the following libraries from the FreeType 2.9.1 sources:</p>
<ul>
<pre>
- freetype271.lib - release build; single threaded
- freetype271_D.lib - debug build; single threaded
- freetype271MT.lib - release build; multi-threaded
- freetype271MT_D.lib - debug build; multi-threaded</pre>
+ freetype291.lib - release build; single threaded
+ freetype291_D.lib - debug build; single threaded
+ freetype291MT.lib - release build; multi-threaded
+ freetype291MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/modules/freetype2/builds/windows/vc2008/freetype.vcproj b/modules/freetype2/builds/windows/vc2008/freetype.vcproj
index 20d82c4bf..f526cd2f6 100644
--- a/modules/freetype2/builds/windows/vc2008/freetype.vcproj
+++ b/modules/freetype2/builds/windows/vc2008/freetype.vcproj
@@ -70,7 +70,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype271.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -145,7 +145,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype271MT.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -220,7 +220,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype271ST.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -292,7 +292,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype271_D.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -365,7 +365,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -439,7 +439,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -473,203 +473,14 @@
<File
RelativePath="..\..\..\src\bdf\bdf.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\cff\cff.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftbase.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftbitmap.c"
@@ -678,139 +489,13 @@
<File
RelativePath="..\..\..\src\cache\ftcache.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\ftdebug.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
+ <FileConfiguration>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
DisableLanguageExtensions="false"
/>
</FileConfiguration>
@@ -826,270 +511,18 @@
<File
RelativePath="..\..\..\src\base\ftglyph.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\gzip\ftgzip.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftinit.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\lzw\ftlzw.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftstroke.c"
@@ -1098,136 +531,10 @@
<File
RelativePath="..\..\..\src\base\ftsystem.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\smooth\smooth.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<Filter
Name="FT_MODULES"
@@ -1237,75 +544,16 @@
>
</File>
<File
- RelativePath="..\..\..\src\base\ftfntfmt.c"
+ RelativePath="..\..\..\src\base\ftbdf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\base\ftcid.c"
>
</File>
<File
RelativePath="..\..\..\src\base\ftmm.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftpfr.c"
@@ -1324,10 +572,6 @@
>
</File>
<File
- RelativePath="..\..\..\src\base\ftlcdfil.c"
- >
- </File>
- <File
RelativePath="..\..\..\src\base\ftgxval.c"
>
</File>
@@ -1342,806 +586,50 @@
<File
RelativePath="..\..\..\src\pcf\pcf.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\pfr\pfr.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\psaux\psaux.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\pshinter\pshinter.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\psnames\psmodule.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\raster\raster.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\sfnt\sfnt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\truetype\truetype.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\type1\type1.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\cid\type1cid.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\type42\type42.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\winfonts\winfnt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
</Filter>
</Filter>
diff --git a/modules/freetype2/builds/windows/vc2008/index.html b/modules/freetype2/builds/windows/vc2008/index.html
index bf9282f48..25c6f9b13 100644
--- a/modules/freetype2/builds/windows/vc2008/index.html
+++ b/modules/freetype2/builds/windows/vc2008/index.html
@@ -11,14 +11,14 @@
<p>This directory contains project files for Visual C++, named
<tt>freetype.vcproj</tt>, and Visual Studio, called <tt>freetype.sln</tt>. It
-compiles the following libraries from the FreeType 2.7.1 sources:</p>
+compiles the following libraries from the FreeType 2.9.1 sources:</p>
<ul>
<pre>
- freetype271.lib - release build; single threaded
- freetype271_D.lib - debug build; single threaded
- freetype271MT.lib - release build; multi-threaded
- freetype271MT_D.lib - debug build; multi-threaded</pre>
+ freetype291.lib - release build; single threaded
+ freetype291_D.lib - debug build; single threaded
+ freetype291MT.lib - release build; multi-threaded
+ freetype291MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/modules/freetype2/builds/windows/vc2010/freetype.sln b/modules/freetype2/builds/windows/vc2010/freetype.sln
index b209eddd2..8698207a9 100644
--- a/modules/freetype2/builds/windows/vc2010/freetype.sln
+++ b/modules/freetype2/builds/windows/vc2010/freetype.sln
@@ -6,42 +6,30 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
- Debug Multithreaded|Win32 = Debug Multithreaded|Win32
- Debug Multithreaded|x64 = Debug Multithreaded|x64
- Debug Singlethreaded|Win32 = Debug Singlethreaded|Win32
- Debug Singlethreaded|x64 = Debug Singlethreaded|x64
+ Debug Static|Win32 = Debug Static|Win32
+ Debug Static|x64 = Debug Static|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
- Release Multithreaded|Win32 = Release Multithreaded|Win32
- Release Multithreaded|x64 = Release Multithreaded|x64
- Release Singlethreaded|Win32 = Release Singlethreaded|Win32
- Release Singlethreaded|x64 = Release Singlethreaded|x64
+ Release Static|Win32 = Release Static|Win32
+ Release Static|x64 = Release Static|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|Win32.ActiveCfg = Debug Multithreaded|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|Win32.Build.0 = Debug Multithreaded|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|x64.ActiveCfg = Debug Multithreaded|x64
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|x64.Build.0 = Debug Multithreaded|x64
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|Win32.ActiveCfg = Debug Singlethreaded|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|Win32.Build.0 = Debug Singlethreaded|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|x64.ActiveCfg = Debug Singlethreaded|x64
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|x64.Build.0 = Debug Singlethreaded|x64
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|Win32.ActiveCfg = Debug Static|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|Win32.Build.0 = Debug Static|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|x64.ActiveCfg = Debug Static|x64
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|x64.Build.0 = Debug Static|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|Win32.ActiveCfg = Release Multithreaded|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|Win32.Build.0 = Release Multithreaded|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|x64.ActiveCfg = Release Multithreaded|x64
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|x64.Build.0 = Release Multithreaded|x64
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|Win32.ActiveCfg = Release Singlethreaded|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|Win32.Build.0 = Release Singlethreaded|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|x64.ActiveCfg = Release Singlethreaded|x64
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|x64.Build.0 = Release Singlethreaded|x64
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|Win32.ActiveCfg = Release Static|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|Win32.Build.0 = Release Static|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|x64.ActiveCfg = Release Static|x64
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|x64.Build.0 = Release Static|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/modules/freetype2/builds/windows/vc2010/freetype.vcxproj b/modules/freetype2/builds/windows/vc2010/freetype.vcxproj
index 64a71f8bc..521e84722 100644
--- a/modules/freetype2/builds/windows/vc2010/freetype.vcxproj
+++ b/modules/freetype2/builds/windows/vc2010/freetype.vcxproj
@@ -9,20 +9,12 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Debug Multithreaded|Win32">
- <Configuration>Debug Multithreaded</Configuration>
+ <ProjectConfiguration Include="Debug Static|Win32">
+ <Configuration>Debug Static</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Debug Multithreaded|x64">
- <Configuration>Debug Multithreaded</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug Singlethreaded|Win32">
- <Configuration>Debug Singlethreaded</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug Singlethreaded|x64">
- <Configuration>Debug Singlethreaded</Configuration>
+ <ProjectConfiguration Include="Debug Static|x64">
+ <Configuration>Debug Static</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
@@ -33,183 +25,103 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Release Multithreaded|Win32">
- <Configuration>Release Multithreaded</Configuration>
+ <ProjectConfiguration Include="Release Static|Win32">
+ <Configuration>Release Static</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Release Multithreaded|x64">
- <Configuration>Release Multithreaded</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Singlethreaded|Win32">
- <Configuration>Release Singlethreaded</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Singlethreaded|x64">
- <Configuration>Release Singlethreaded</Configuration>
+ <ProjectConfiguration Include="Release Static|x64">
+ <Configuration>Release Static</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
+ <!--
+ Switch the PlatformToolset based on the Visual Studio Version
+-->
+<PropertyGroup>
+ <!-- Assume Visual Studio 2010 / 4.0 as the default -->
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">4.0</VisualStudioVersion>
+</PropertyGroup>
+<!-- Visual Studio 2010 (4.0) -->
+<PropertyGroup Condition="'$(VisualStudioVersion)' == '4.0'">
+ <PlatformToolset>v100</PlatformToolset>
+</PropertyGroup>
+<!-- Visual Studio 2013 (12.0) -->
+<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'">
+ <PlatformToolset>v120</PlatformToolset>
+</PropertyGroup>
+<!-- Visual Studio 2015 (14.0) -->
+<PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'">
+ <PlatformToolset>v140</PlatformToolset>
+</PropertyGroup>
+<!-- Visual Studio 2017 (15.0) -->
+<PropertyGroup Condition="'$(VisualStudioVersion)' == '15.0'">
+ <PlatformToolset>v141</PlatformToolset>
+</PropertyGroup>
+<!--
+ End of: Switch the PlatformToolset based on the Visual Studio Version
+-->
<PropertyGroup Label="Globals">
- <ProjectGuid>{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}</ProjectGuid>
+ <ProjectGuid>{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}</ProjectGuid>
+ <RootNamespace>FreeType</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Static|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Static|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v100</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'" />
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'" />
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'" />
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'" />
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'" />
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">freetype271d</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">freetype271d</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">freetype271MTd</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">freetype271MTd</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">freetype271STd</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">freetype271STd</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">freetype271</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">freetype271</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">freetype271MT</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">freetype271MT</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">freetype271ST</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">freetype271ST</TargetName>
+ <OutDir>..\..\..\objs\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>..\..\..\objs\$(Platform)\$(Configuration)\</IntDir>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules />
+ <CodeAnalysisRuleAssemblies />
+ <TargetName>freetype</TargetName>
</PropertyGroup>
<Import Project="$(SolutionDir)\freetype.user.props" Condition="exists('$(SolutionDir)\freetype.user.props')" Label="UserProperties" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<DisableLanguageExtensions>true</DisableLanguageExtensions>
@@ -223,7 +135,7 @@
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
</ClCompile>
<ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
@@ -237,7 +149,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<DisableLanguageExtensions>true</DisableLanguageExtensions>
@@ -251,7 +163,7 @@
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
</ClCompile>
<ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
@@ -261,13 +173,11 @@
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Static|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;_CRT_SECURE_NO_DEPRECATE;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessToFile>false</PreprocessToFile>
- <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DisableLanguageExtensions>true</DisableLanguageExtensions>
@@ -291,69 +201,11 @@
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Static|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;_CRT_SECURE_NO_DEPRECATE;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessToFile>false</PreprocessToFile>
- <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <DisableLanguageExtensions>true</DisableLanguageExtensions>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4001</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <CompileAsManaged>false</CompileAsManaged>
- <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
- <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Lib>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetMachine>MachineX64</TargetMachine>
- <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <DisableLanguageExtensions>true</DisableLanguageExtensions>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4001</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <CompileAsManaged>false</CompileAsManaged>
- <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
- <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Lib>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetMachine>MachineX86</TargetMachine>
- <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DisableLanguageExtensions>true</DisableLanguageExtensions>
@@ -379,10 +231,10 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <Optimization>Full</Optimization>
+ <Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -406,7 +258,7 @@
<OmitFramePointers>true</OmitFramePointers>
</ClCompile>
<ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
@@ -419,10 +271,10 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <Optimization>Full</Optimization>
+ <Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -446,7 +298,7 @@
<OmitFramePointers>true</OmitFramePointers>
</ClCompile>
<ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
@@ -457,12 +309,12 @@
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'">
<ClCompile>
- <Optimization>Full</Optimization>
+ <Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -498,12 +350,12 @@
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'">
<ClCompile>
- <Optimization>Full</Optimization>
+ <Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -539,1180 +391,54 @@
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <DisableLanguageExtensions>true</DisableLanguageExtensions>
- <WarningLevel>Level4</WarningLevel>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4001</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
- <FloatingPointExceptions>false</FloatingPointExceptions>
- <CreateHotpatchableImage>false</CreateHotpatchableImage>
- <CompileAsManaged>false</CompileAsManaged>
- <ProgramDataBaseFileName>
- </ProgramDataBaseFileName>
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
- <DebugInformationFormat>
- </DebugInformationFormat>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Lib />
- <Lib>
- <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
- <TargetMachine>MachineX86</TargetMachine>
- <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <DisableLanguageExtensions>true</DisableLanguageExtensions>
- <WarningLevel>Level4</WarningLevel>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4001</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
- <FloatingPointExceptions>false</FloatingPointExceptions>
- <CreateHotpatchableImage>false</CreateHotpatchableImage>
- <CompileAsManaged>false</CompileAsManaged>
- <ProgramDataBaseFileName>
- </ProgramDataBaseFileName>
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
- <DebugInformationFormat>
- </DebugInformationFormat>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Lib />
- <Lib>
- <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
- <TargetMachine>MachineX64</TargetMachine>
- <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\autofit\autofit.c" />
- <ClCompile Include="..\..\..\src\bdf\bdf.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\cff\cff.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\base\ftbase.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
+ <ClCompile Include="..\..\..\src\base\ftbase.c" />
+ <ClCompile Include="..\..\..\src\base\ftbbox.c" />
+ <ClCompile Include="..\..\..\src\base\ftbdf.c" />
<ClCompile Include="..\..\..\src\base\ftbitmap.c" />
- <ClCompile Include="..\..\..\src\cache\ftcache.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\ftdebug.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">false</DisableLanguageExtensions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">false</DisableLanguageExtensions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">false</DisableLanguageExtensions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">false</DisableLanguageExtensions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DisableLanguageExtensions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">false</DisableLanguageExtensions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">false</DisableLanguageExtensions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">false</DisableLanguageExtensions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">false</DisableLanguageExtensions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DisableLanguageExtensions>
- </ClCompile>
+ <ClCompile Include="..\..\..\src\base\ftcid.c" />
<ClCompile Include="..\..\..\src\base\ftfstype.c" />
<ClCompile Include="..\..\..\src\base\ftgasp.c" />
- <ClCompile Include="..\..\..\src\base\ftglyph.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\gzip\ftgzip.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\base\ftinit.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\lzw\ftlzw.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\base\ftstroke.c" />
- <ClCompile Include="..\..\..\src\base\ftsystem.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\smooth\smooth.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\base\ftbbox.c" />
- <ClCompile Include="..\..\..\src\base\ftfntfmt.c" />
- <ClCompile Include="..\..\..\src\base\ftmm.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
+ <ClCompile Include="..\..\..\src\base\ftglyph.c" />
+ <ClCompile Include="..\..\..\src\base\ftgxval.c" />
+ <ClCompile Include="..\..\..\src\base\ftinit.c" />
+ <ClCompile Include="..\..\..\src\base\ftmm.c" />
+ <ClCompile Include="..\..\..\src\base\ftotval.c" />
+ <ClCompile Include="..\..\..\src\base\ftpatent.c" />
<ClCompile Include="..\..\..\src\base\ftpfr.c" />
+ <ClCompile Include="..\..\..\src\base\ftstroke.c" />
<ClCompile Include="..\..\..\src\base\ftsynth.c" />
+ <ClCompile Include="..\..\..\src\base\ftsystem.c" />
<ClCompile Include="..\..\..\src\base\fttype1.c" />
<ClCompile Include="..\..\..\src\base\ftwinfnt.c" />
- <ClCompile Include="..\..\..\src\base\ftlcdfil.c" />
- <ClCompile Include="..\..\..\src\base\ftgxval.c" />
- <ClCompile Include="..\..\..\src\base\ftotval.c" />
- <ClCompile Include="..\..\..\src\base\ftpatent.c" />
- <ClCompile Include="..\..\..\src\pcf\pcf.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\pfr\pfr.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\psaux\psaux.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\pshinter\pshinter.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\psnames\psmodule.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\raster\raster.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\sfnt\sfnt.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\truetype\truetype.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\type1\type1.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\cid\type1cid.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\type42\type42.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\winfonts\winfnt.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ClCompile Include="..\..\..\src\bdf\bdf.c" />
+ <ClCompile Include="..\..\..\src\cache\ftcache.c" />
+ <ClCompile Include="..\..\..\src\cff\cff.c" />
+ <ClCompile Include="..\..\..\src\cid\type1cid.c" />
+ <ClCompile Include="..\..\..\src\gzip\ftgzip.c" />
+ <ClCompile Include="..\..\..\src\lzw\ftlzw.c" />
+ <ClCompile Include="..\..\..\src\pcf\pcf.c" />
+ <ClCompile Include="..\..\..\src\pfr\pfr.c" />
+ <ClCompile Include="..\..\..\src\psaux\psaux.c" />
+ <ClCompile Include="..\..\..\src\pshinter\pshinter.c" />
+ <ClCompile Include="..\..\..\src\psnames\psmodule.c" />
+ <ClCompile Include="..\..\..\src\raster\raster.c" />
+ <ClCompile Include="..\..\..\src\sfnt\sfnt.c" />
+ <ClCompile Include="..\..\..\src\smooth\smooth.c" />
+ <ClCompile Include="..\..\..\src\truetype\truetype.c" />
+ <ClCompile Include="..\..\..\src\type1\type1.c" />
+ <ClCompile Include="..\..\..\src\type42\type42.c" />
+ <ClCompile Include="..\..\..\src\winfonts\winfnt.c" />
+ <ClCompile Include="..\ftdebug.c">
+ <DisableLanguageExtensions>false</DisableLanguageExtensions>
</ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\..\include\ft2build.h" />
- <ClInclude Include="..\..\..\include\freetype\config\ftconfig.h" />
- <ClInclude Include="..\..\..\include\freetype\config\ftheader.h" />
- <ClInclude Include="..\..\..\include\freetype\config\ftmodule.h" />
- <ClInclude Include="..\..\..\include\freetype\config\ftoption.h" />
- <ClInclude Include="..\..\..\include\freetype\config\ftstdlib.h" />
+ <ResourceCompile Include="..\..\..\src\base\ftver.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+ <Target Name="AfterBuild">
+ <Copy SourceFiles="$(TargetPath)" DestinationFolder="..\..\..\objs" />
+ </Target>
+</Project>
diff --git a/modules/freetype2/builds/windows/vc2010/freetype.vcxproj.filters b/modules/freetype2/builds/windows/vc2010/freetype.vcxproj.filters
index 0e947f4ba..8ba3673e6 100644
--- a/modules/freetype2/builds/windows/vc2010/freetype.vcxproj.filters
+++ b/modules/freetype2/builds/windows/vc2010/freetype.vcxproj.filters
@@ -17,118 +17,118 @@
<ClCompile Include="..\..\..\src\autofit\autofit.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\bdf\bdf.c">
+ <ClCompile Include="..\..\..\src\base\ftbase.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\cff\cff.c">
+ <ClCompile Include="..\..\..\src\base\ftinit.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftbase.c">
+ <ClCompile Include="..\..\..\src\base\ftsystem.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftbitmap.c">
+ <ClCompile Include="..\..\..\src\bdf\bdf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\cache\ftcache.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\ftdebug.c">
+ <ClCompile Include="..\..\..\src\cff\cff.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftfstype.c">
+ <ClCompile Include="..\..\..\src\cid\type1cid.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftgasp.c">
+ <ClCompile Include="..\..\..\src\gzip\ftgzip.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftglyph.c">
+ <ClCompile Include="..\..\..\src\lzw\ftlzw.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\gzip\ftgzip.c">
+ <ClCompile Include="..\..\..\src\pfr\pfr.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftinit.c">
+ <ClCompile Include="..\..\..\src\pcf\pcf.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\lzw\ftlzw.c">
+ <ClCompile Include="..\..\..\src\psaux\psaux.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftstroke.c">
+ <ClCompile Include="..\..\..\src\pshinter\pshinter.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftsystem.c">
+ <ClCompile Include="..\..\..\src\psnames\psmodule.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\smooth\smooth.c">
+ <ClCompile Include="..\..\..\src\raster\raster.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftbbox.c">
- <Filter>Source Files\FT_MODULES</Filter>
+ <ClCompile Include="..\..\..\src\sfnt\sfnt.c">
+ <Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftfntfmt.c">
- <Filter>Source Files\FT_MODULES</Filter>
+ <ClCompile Include="..\..\..\src\smooth\smooth.c">
+ <Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftmm.c">
- <Filter>Source Files\FT_MODULES</Filter>
+ <ClCompile Include="..\..\..\src\truetype\truetype.c">
+ <Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftpfr.c">
- <Filter>Source Files\FT_MODULES</Filter>
+ <ClCompile Include="..\..\..\src\type1\type1.c">
+ <Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftsynth.c">
- <Filter>Source Files\FT_MODULES</Filter>
+ <ClCompile Include="..\..\..\src\type42\type42.c">
+ <Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\fttype1.c">
- <Filter>Source Files\FT_MODULES</Filter>
+ <ClCompile Include="..\..\..\src\winfonts\winfnt.c">
+ <Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftwinfnt.c">
- <Filter>Source Files\FT_MODULES</Filter>
+ <ClCompile Include="..\ftdebug.c">
+ <Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftlcdfil.c">
+ <ClCompile Include="..\..\..\src\base\ftbbox.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftgxval.c">
+ <ClCompile Include="..\..\..\src\base\ftbdf.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftotval.c">
+ <ClCompile Include="..\..\..\src\base\ftbitmap.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\base\ftpatent.c">
+ <ClCompile Include="..\..\..\src\base\ftcid.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\pcf\pcf.c">
+ <ClCompile Include="..\..\..\src\base\ftfstype.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\pfr\pfr.c">
+ <ClCompile Include="..\..\..\src\base\ftgasp.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\psaux\psaux.c">
+ <ClCompile Include="..\..\..\src\base\ftglyph.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\pshinter\pshinter.c">
+ <ClCompile Include="..\..\..\src\base\ftgxval.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\psnames\psmodule.c">
+ <ClCompile Include="..\..\..\src\base\ftmm.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\raster\raster.c">
+ <ClCompile Include="..\..\..\src\base\ftotval.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\sfnt\sfnt.c">
+ <ClCompile Include="..\..\..\src\base\ftpatent.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\truetype\truetype.c">
+ <ClCompile Include="..\..\..\src\base\ftpfr.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\type1\type1.c">
+ <ClCompile Include="..\..\..\src\base\ftstroke.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\cid\type1cid.c">
+ <ClCompile Include="..\..\..\src\base\ftsynth.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\type42\type42.c">
+ <ClCompile Include="..\..\..\src\base\fttype1.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\winfonts\winfnt.c">
+ <ClCompile Include="..\..\..\src\base\ftwinfnt.c">
<Filter>Source Files\FT_MODULES</Filter>
</ClCompile>
</ItemGroup>
diff --git a/modules/freetype2/builds/windows/vc2010/index.html b/modules/freetype2/builds/windows/vc2010/index.html
index 2b47a0092..c3e604034 100644
--- a/modules/freetype2/builds/windows/vc2010/index.html
+++ b/modules/freetype2/builds/windows/vc2010/index.html
@@ -1,45 +1,29 @@
<html>
<header>
<title>
- FreeType&nbsp;2 Project Files for VS.NET&nbsp;2010 or newer
+ FreeType&nbsp;2 Project Files for Visual&nbsp;C++&nbsp;2010 or newer
</title>
<body>
<h1>
- FreeType&nbsp;2 Project Files for VS.NET&nbsp;2010 or newer
+ FreeType&nbsp;2 Project Files for Visual&nbsp;C++&nbsp;2010 or newer
</h1>
-<p>This directory contains a project file for Visual C++ (VS.NET&nbsp;2010
-or newer), named <tt>freetype.vcxproj</tt>, and Visual Studio, called
-<tt>freetype.sln</tt>. It compiles the following libraries from the
-FreeType 2.7.1 sources:</p>
+<p>This directory contains solution and project files for
+Visual&nbsp;C++&nbsp;2010 or newer, named <tt>freetype.sln</tt>,
+and <tt>freetype.vcxproj</tt>. It compiles the following libraries
+from the FreeType 2.9.1 sources:</p>
<ul>
- <pre>
- freetype271.lib - release build
- freetype271d.lib - debug build
- freetype271ST.lib - release build; single threaded
- freetype271STd.lib - debug build; single threaded
- freetype271MT.lib - release build; multi-threaded
- freetype271MTd.lib - debug build; multi-threaded</pre>
+ <li>freetype.dll using 'Release' or 'Debug' configurations</li>
+ <li>freetype.lib using 'Release Static' or 'Debug Static' configurations</li>
</ul>
-<p>Both Win32 and x64 builds are supported.</p>
-
-<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
-archives are already stored this way, so no further action is required. If
-you use some <tt>.tar.*z</tt> archives, be sure to configure your extracting
-tool to convert the line endings. For example, with <a
-href="http://www.winzip.com">WinZip</a>, you should activate the <em>TAR
-file smart CR/LF Conversion</em> option. Alternatively, you may consider
-using the <tt>unix2dos</tt> or <tt>u2d</tt> utilities that are floating
-around, which specifically deal with this particular problem.
-
-<p>Build directories are placed in the top-level <tt>objs\vc2010</tt>
-directory.</p>
+<p>Both Win32 and x64 builds are supported. Build directories and target
+files are placed in the top-level <tt>objs</tt> directory.</p>
<p>Customization of the FreeType library is done by editing the
-<tt>ftoptions.h</tt> header file in the top-level <tt>devel</tt> path.
+<tt>ftoption.h</tt> header file in the top-level <tt>devel</tt> path.
Alternatively, you may copy the file to another directory and change the
include directory in <tt>freetype.users.props</tt>.</p>
@@ -48,5 +32,9 @@ edit the <tt>freetype.users.props</tt> file in this directory. It also
simplifies automated (command-line) builds using <a
href="http://msdn.microsoft.com/library/dd393574%28v=vs.100%29.aspx">msbuild</a>.</p>
+<p>To link your executable with FreeType DLL, you may want to define
+FT2_DLLIMPORT so that the imported functions are appropriately
+attributed with <tt>dllimport<tt>.</p>
+
</body>
</html>
diff --git a/modules/freetype2/builds/windows/visualc/freetype.dsp b/modules/freetype2/builds/windows/visualc/freetype.dsp
index f6eeeb368..dac3d25c4 100644
--- a/modules/freetype2/builds/windows/visualc/freetype.dsp
+++ b/modules/freetype2/builds/windows/visualc/freetype.dsp
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype271.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype291.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
@@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype271_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype291_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
@@ -102,8 +102,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"lib\freetype271_D.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype271MT_D.lib"
+# ADD BASE LIB32 /nologo /out:"lib\freetype291_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype291MT_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
@@ -126,8 +126,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"lib\freetype271.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype271MT.lib"
+# ADD BASE LIB32 /nologo /out:"lib\freetype291.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype291MT.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
@@ -151,8 +151,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype271.lib"
-# ADD LIB32 /out:"..\..\..\objs\freetype271ST.lib"
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype291.lib"
+# ADD LIB32 /out:"..\..\..\objs\freetype291ST.lib"
# SUBTRACT LIB32 /nologo
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
@@ -177,8 +177,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype271_D.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype271ST_D.lib"
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype291_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype291ST_D.lib"
!ENDIF
@@ -200,17 +200,14 @@ SOURCE=..\..\..\src\autofit\autofit.c
# Begin Source File
SOURCE=..\..\..\src\bdf\bdf.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\cff\cff.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftbase.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -226,7 +223,11 @@ SOURCE=..\..\..\src\base\ftbitmap.c
# End Source File
# Begin Source File
-SOURCE=..\..\..\src\base\ftfntfmt.c
+SOURCE=..\..\..\src\base\ftcid.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftpatent.c
# End Source File
# Begin Source File
@@ -239,18 +240,15 @@ SOURCE=..\..\..\src\base\ftgasp.c
# Begin Source File
SOURCE=..\..\..\src\cache\ftcache.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\ftdebug.c
# ADD CPP /Ze
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftglyph.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -263,7 +261,6 @@ SOURCE=..\..\..\src\gzip\ftgzip.c
# Begin Source File
SOURCE=..\..\..\src\base\ftinit.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -272,7 +269,6 @@ SOURCE=..\..\..\src\lzw\ftlzw.c
# Begin Source File
SOURCE=..\..\..\src\base\ftmm.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -293,7 +289,6 @@ SOURCE=..\..\..\src\base\ftsynth.c
# Begin Source File
SOURCE=..\..\..\src\base\ftsystem.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -306,7 +301,6 @@ SOURCE=..\..\..\src\base\ftwinfnt.c
# Begin Source File
SOURCE=..\..\..\src\pcf\pcf.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -315,57 +309,46 @@ SOURCE=..\..\..\src\pfr\pfr.c
# Begin Source File
SOURCE=..\..\..\src\psaux\psaux.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\pshinter\pshinter.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\psnames\psmodule.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\raster\raster.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\sfnt\sfnt.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\smooth\smooth.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\truetype\truetype.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\type1\type1.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\cid\type1cid.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\type42\type42.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\winfonts\winfnt.c
-# SUBTRACT CPP /Fr
# End Source File
# End Group
# Begin Group "Header Files"
diff --git a/modules/freetype2/builds/windows/visualc/freetype.vcproj b/modules/freetype2/builds/windows/visualc/freetype.vcproj
index 69c084cce..dd0c41801 100644
--- a/modules/freetype2/builds/windows/visualc/freetype.vcproj
+++ b/modules/freetype2/builds/windows/visualc/freetype.vcproj
@@ -69,7 +69,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271.lib"
+ OutputFile="..\..\..\objs\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -144,7 +144,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT.lib"
+ OutputFile="..\..\..\objs\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -219,7 +219,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST.lib"
+ OutputFile="..\..\..\objs\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -291,7 +291,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271_D.lib"
+ OutputFile="..\..\..\objs\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -364,7 +364,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -438,7 +438,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -472,203 +472,14 @@
<File
RelativePath="..\..\..\src\bdf\bdf.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\cff\cff.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftbase.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftbitmap.c"
@@ -685,139 +496,13 @@
<File
RelativePath="..\..\..\src\cache\ftcache.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\ftdebug.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
+ <FileConfiguration>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
DisableLanguageExtensions="false"
/>
</FileConfiguration>
@@ -825,270 +510,18 @@
<File
RelativePath="..\..\..\src\base\ftglyph.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\gzip\ftgzip.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftinit.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\lzw\ftlzw.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftstroke.c"
@@ -1097,136 +530,10 @@
<File
RelativePath="..\..\..\src\base\ftsystem.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\smooth\smooth.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<Filter
Name="FT_MODULES"
@@ -1236,75 +543,16 @@
>
</File>
<File
- RelativePath="..\..\..\src\base\ftfntfmt.c"
+ RelativePath="..\..\..\src\base\ftbdf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\base\ftcid.c"
>
</File>
<File
RelativePath="..\..\..\src\base\ftmm.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftpfr.c"
@@ -1323,10 +571,6 @@
>
</File>
<File
- RelativePath="..\..\..\src\base\ftlcdfil.c"
- >
- </File>
- <File
RelativePath="..\..\..\src\base\ftgxval.c"
>
</File>
@@ -1341,806 +585,50 @@
<File
RelativePath="..\..\..\src\pcf\pcf.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\pfr\pfr.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\psaux\psaux.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\pshinter\pshinter.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\psnames\psmodule.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\raster\raster.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\sfnt\sfnt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\truetype\truetype.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\type1\type1.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\cid\type1cid.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\type42\type42.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\winfonts\winfnt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
</Filter>
</Filter>
diff --git a/modules/freetype2/builds/windows/visualc/index.html b/modules/freetype2/builds/windows/visualc/index.html
index a2be3af69..c0611d2f8 100644
--- a/modules/freetype2/builds/windows/visualc/index.html
+++ b/modules/freetype2/builds/windows/visualc/index.html
@@ -11,14 +11,14 @@
<p>This directory contains project files for Visual C++, named
<tt>freetype.dsp</tt>, and Visual Studio, called <tt>freetype.sln</tt>. It
-compiles the following libraries from the FreeType 2.7.1 sources:</p>
+compiles the following libraries from the FreeType 2.9.1 sources:</p>
<ul>
<pre>
- freetype271.lib - release build; single threaded
- freetype271_D.lib - debug build; single threaded
- freetype271MT.lib - release build; multi-threaded
- freetype271MT_D.lib - debug build; multi-threaded</pre>
+ freetype291.lib - release build; single threaded
+ freetype291_D.lib - debug build; single threaded
+ freetype291MT.lib - release build; multi-threaded
+ freetype291MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/modules/freetype2/builds/windows/visualce/freetype.dsp b/modules/freetype2/builds/windows/visualce/freetype.dsp
index f6eeeb368..5fe2b5a97 100644
--- a/modules/freetype2/builds/windows/visualce/freetype.dsp
+++ b/modules/freetype2/builds/windows/visualce/freetype.dsp
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype271.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype291.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
@@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype271_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype291_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
@@ -102,8 +102,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"lib\freetype271_D.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype271MT_D.lib"
+# ADD BASE LIB32 /nologo /out:"lib\freetype291_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype291MT_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
@@ -126,8 +126,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"lib\freetype271.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype271MT.lib"
+# ADD BASE LIB32 /nologo /out:"lib\freetype291.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype291MT.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
@@ -151,8 +151,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype271.lib"
-# ADD LIB32 /out:"..\..\..\objs\freetype271ST.lib"
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype291.lib"
+# ADD LIB32 /out:"..\..\..\objs\freetype291ST.lib"
# SUBTRACT LIB32 /nologo
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
@@ -177,8 +177,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype271_D.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype271ST_D.lib"
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype291_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype291ST_D.lib"
!ENDIF
@@ -200,17 +200,14 @@ SOURCE=..\..\..\src\autofit\autofit.c
# Begin Source File
SOURCE=..\..\..\src\bdf\bdf.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\cff\cff.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftbase.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -226,7 +223,7 @@ SOURCE=..\..\..\src\base\ftbitmap.c
# End Source File
# Begin Source File
-SOURCE=..\..\..\src\base\ftfntfmt.c
+SOURCE=..\..\..\src\base\ftcid.c
# End Source File
# Begin Source File
@@ -239,18 +236,15 @@ SOURCE=..\..\..\src\base\ftgasp.c
# Begin Source File
SOURCE=..\..\..\src\cache\ftcache.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\ftdebug.c
# ADD CPP /Ze
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftglyph.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -263,7 +257,6 @@ SOURCE=..\..\..\src\gzip\ftgzip.c
# Begin Source File
SOURCE=..\..\..\src\base\ftinit.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -272,7 +265,6 @@ SOURCE=..\..\..\src\lzw\ftlzw.c
# Begin Source File
SOURCE=..\..\..\src\base\ftmm.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -280,6 +272,10 @@ SOURCE=..\..\..\src\base\ftotval.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\src\base\ftpatent.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\src\base\ftpfr.c
# End Source File
# Begin Source File
@@ -293,7 +289,6 @@ SOURCE=..\..\..\src\base\ftsynth.c
# Begin Source File
SOURCE=..\..\..\src\base\ftsystem.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -306,7 +301,6 @@ SOURCE=..\..\..\src\base\ftwinfnt.c
# Begin Source File
SOURCE=..\..\..\src\pcf\pcf.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
@@ -315,57 +309,46 @@ SOURCE=..\..\..\src\pfr\pfr.c
# Begin Source File
SOURCE=..\..\..\src\psaux\psaux.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\pshinter\pshinter.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\psnames\psmodule.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\raster\raster.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\sfnt\sfnt.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\smooth\smooth.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\truetype\truetype.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\type1\type1.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\cid\type1cid.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\type42\type42.c
-# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\winfonts\winfnt.c
-# SUBTRACT CPP /Fr
# End Source File
# End Group
# Begin Group "Header Files"
diff --git a/modules/freetype2/builds/windows/visualce/freetype.vcproj b/modules/freetype2/builds/windows/visualce/freetype.vcproj
index 55c874df8..b79731175 100644
--- a/modules/freetype2/builds/windows/visualce/freetype.vcproj
+++ b/modules/freetype2/builds/windows/visualce/freetype.vcproj
@@ -87,7 +87,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271.lib"
+ OutputFile="..\..\..\objs\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -162,7 +162,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT.lib"
+ OutputFile="..\..\..\objs\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -237,7 +237,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST.lib"
+ OutputFile="..\..\..\objs\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -309,7 +309,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271_D.lib"
+ OutputFile="..\..\..\objs\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -382,7 +382,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -456,7 +456,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -534,7 +534,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271.lib"
+ OutputFile="..\..\..\objs\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -619,7 +619,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT.lib"
+ OutputFile="..\..\..\objs\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -704,7 +704,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST.lib"
+ OutputFile="..\..\..\objs\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -785,7 +785,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271_D.lib"
+ OutputFile="..\..\..\objs\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -867,7 +867,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -950,7 +950,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1036,7 +1036,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271.lib"
+ OutputFile="..\..\..\objs\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1121,7 +1121,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT.lib"
+ OutputFile="..\..\..\objs\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1206,7 +1206,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST.lib"
+ OutputFile="..\..\..\objs\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1287,7 +1287,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271_D.lib"
+ OutputFile="..\..\..\objs\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1369,7 +1369,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1452,7 +1452,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1538,7 +1538,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271.lib"
+ OutputFile="..\..\..\objs\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1623,7 +1623,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT.lib"
+ OutputFile="..\..\..\objs\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1708,7 +1708,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST.lib"
+ OutputFile="..\..\..\objs\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1789,7 +1789,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271_D.lib"
+ OutputFile="..\..\..\objs\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1871,7 +1871,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1954,7 +1954,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2040,7 +2040,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271.lib"
+ OutputFile="..\..\..\objs\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2125,7 +2125,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT.lib"
+ OutputFile="..\..\..\objs\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2210,7 +2210,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST.lib"
+ OutputFile="..\..\..\objs\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -2291,7 +2291,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271_D.lib"
+ OutputFile="..\..\..\objs\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2373,7 +2373,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2456,7 +2456,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2542,7 +2542,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271.lib"
+ OutputFile="..\..\..\objs\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2627,7 +2627,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT.lib"
+ OutputFile="..\..\..\objs\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2712,7 +2712,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST.lib"
+ OutputFile="..\..\..\objs\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -2793,7 +2793,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271_D.lib"
+ OutputFile="..\..\..\objs\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2875,7 +2875,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2958,7 +2958,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3044,7 +3044,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271.lib"
+ OutputFile="..\..\..\objs\freetype291.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3129,7 +3129,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT.lib"
+ OutputFile="..\..\..\objs\freetype291MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3214,7 +3214,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST.lib"
+ OutputFile="..\..\..\objs\freetype291ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -3295,7 +3295,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271_D.lib"
+ OutputFile="..\..\..\objs\freetype291_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3377,7 +3377,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271ST_D.lib"
+ OutputFile="..\..\..\objs\freetype291ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3460,7 +3460,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype271MT_D.lib"
+ OutputFile="..\..\..\objs\freetype291MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3502,1283 +3502,14 @@
<File
RelativePath="..\..\..\src\bdf\bdf.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\cff\cff.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftbase.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftbitmap.c"
@@ -4791,895 +3522,13 @@
<File
RelativePath="..\..\..\src\cache\ftcache.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\ftdebug.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
+ <FileConfiguration>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- DisableLanguageExtensions="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
DisableLanguageExtensions="false"
/>
</FileConfiguration>
@@ -5691,1710 +3540,18 @@
<File
RelativePath="..\..\..\src\base\ftglyph.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\gzip\ftgzip.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftinit.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\lzw\ftlzw.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftstroke.c"
@@ -7403,856 +3560,10 @@
<File
RelativePath="..\..\..\src\base\ftsystem.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\smooth\smooth.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<Filter
Name="FT_MODULES"
@@ -8262,435 +3573,16 @@
>
</File>
<File
- RelativePath="..\..\..\src\base\ftfntfmt.c"
+ RelativePath="..\..\..\src\base\ftbdf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\base\ftcid.c"
>
</File>
<File
RelativePath="..\..\..\src\base\ftmm.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\base\ftpfr.c"
@@ -8709,10 +3601,6 @@
>
</File>
<File
- RelativePath="..\..\..\src\base\ftlcdfil.c"
- >
- </File>
- <File
RelativePath="..\..\..\src\base\ftgxval.c"
>
</File>
@@ -8727,5126 +3615,50 @@
<File
RelativePath="..\..\..\src\pcf\pcf.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\pfr\pfr.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\psaux\psaux.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\pshinter\pshinter.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\psnames\psmodule.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\raster\raster.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\sfnt\sfnt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\truetype\truetype.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\type1\type1.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\cid\type1cid.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\type42\type42.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\src\winfonts\winfnt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Pocket PC 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Smartphone 2003 (ARMV4)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Professional SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Singlethreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Multithreaded|Windows Mobile 6 Standard SDK (ARMV4I)"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
</Filter>
</Filter>
diff --git a/modules/freetype2/builds/windows/visualce/index.html b/modules/freetype2/builds/windows/visualce/index.html
index 80c15bf77..d5a3ca3e3 100644
--- a/modules/freetype2/builds/windows/visualce/index.html
+++ b/modules/freetype2/builds/windows/visualce/index.html
@@ -21,14 +21,14 @@ the following targets:
<li>PPC/SP WM6 (Windows Mobile 6)</li>
</ul>
-It compiles the following libraries from the FreeType 2.7.1 sources:</p>
+It compiles the following libraries from the FreeType 2.9.1 sources:</p>
<ul>
<pre>
- freetype271.lib - release build; single threaded
- freetype271_D.lib - debug build; single threaded
- freetype271MT.lib - release build; multi-threaded
- freetype271MT_D.lib - debug build; multi-threaded</pre>
+ freetype291.lib - release build; single threaded
+ freetype291_D.lib - debug build; single threaded
+ freetype291MT.lib - release build; multi-threaded
+ freetype291MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/modules/freetype2/builds/windows/w32-bcc.mk b/modules/freetype2/builds/windows/w32-bcc.mk
index 269262227..01aab1ce0 100644
--- a/modules/freetype2/builds/windows/w32-bcc.mk
+++ b/modules/freetype2/builds/windows/w32-bcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/windows/w32-bccd.mk b/modules/freetype2/builds/windows/w32-bccd.mk
index 2e52672a6..2c14d6c8c 100644
--- a/modules/freetype2/builds/windows/w32-bccd.mk
+++ b/modules/freetype2/builds/windows/w32-bccd.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/windows/w32-dev.mk b/modules/freetype2/builds/windows/w32-dev.mk
index 8ddbfb0ed..279d5f9a0 100644
--- a/modules/freetype2/builds/windows/w32-dev.mk
+++ b/modules/freetype2/builds/windows/w32-dev.mk
@@ -5,7 +5,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/windows/w32-gcc.mk b/modules/freetype2/builds/windows/w32-gcc.mk
index 04097d286..9e3476b94 100644
--- a/modules/freetype2/builds/windows/w32-gcc.mk
+++ b/modules/freetype2/builds/windows/w32-gcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/windows/w32-icc.mk b/modules/freetype2/builds/windows/w32-icc.mk
index 66a4dcbc6..e695c1214 100644
--- a/modules/freetype2/builds/windows/w32-icc.mk
+++ b/modules/freetype2/builds/windows/w32-icc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/windows/w32-intl.mk b/modules/freetype2/builds/windows/w32-intl.mk
index 14ee7edf9..1e36662d6 100644
--- a/modules/freetype2/builds/windows/w32-intl.mk
+++ b/modules/freetype2/builds/windows/w32-intl.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/windows/w32-lcc.mk b/modules/freetype2/builds/windows/w32-lcc.mk
index 687c87fef..5729d36c1 100644
--- a/modules/freetype2/builds/windows/w32-lcc.mk
+++ b/modules/freetype2/builds/windows/w32-lcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/windows/w32-mingw32.mk b/modules/freetype2/builds/windows/w32-mingw32.mk
index 03963b326..b3a210df2 100644
--- a/modules/freetype2/builds/windows/w32-mingw32.mk
+++ b/modules/freetype2/builds/windows/w32-mingw32.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/windows/w32-vcc.mk b/modules/freetype2/builds/windows/w32-vcc.mk
index 68370e6a7..342c8aa6d 100644
--- a/modules/freetype2/builds/windows/w32-vcc.mk
+++ b/modules/freetype2/builds/windows/w32-vcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/windows/w32-wat.mk b/modules/freetype2/builds/windows/w32-wat.mk
index 01d6a9bcc..37ecc8880 100644
--- a/modules/freetype2/builds/windows/w32-wat.mk
+++ b/modules/freetype2/builds/windows/w32-wat.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/builds/windows/win32-def.mk b/modules/freetype2/builds/windows/win32-def.mk
index 6fd972fe1..f83d444ff 100644
--- a/modules/freetype2/builds/windows/win32-def.mk
+++ b/modules/freetype2/builds/windows/win32-def.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/configure b/modules/freetype2/configure
index 9a09a4271..f9d218667 100755
--- a/modules/freetype2/configure
+++ b/modules/freetype2/configure
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,7 @@
rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk
-# respect GNUMAKE environment variable for backwards compatibility
+# respect GNUMAKE environment variable for backward compatibility
if test "x$GNUMAKE" = x; then
if test "x$MAKE" = x; then
if test "x`make -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then
@@ -29,7 +29,7 @@ else
fi
if test "x`$MAKE -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then
- echo "GNU make (>= 3.80) or makepp (>= 1.19) is required to build FreeType2." >&2
+ echo "GNU make (>= 3.81) or makepp (>= 2.0) is required to build FreeType2." >&2
echo "Please try" >&2
echo >&2
echo " MAKE=<GNU make command name> $0" >&2
diff --git a/modules/freetype2/devel/ft2build.h b/modules/freetype2/devel/ft2build.h
index d055f51a2..1d17141b2 100644
--- a/modules/freetype2/devel/ft2build.h
+++ b/modules/freetype2/devel/ft2build.h
@@ -4,7 +4,7 @@
/* */
/* FreeType 2 build and setup macros (development version). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/devel/ftoption.h b/modules/freetype2/devel/ftoption.h
index b742ed88f..1b4619eb0 100644
--- a/modules/freetype2/devel/ftoption.h
+++ b/modules/freetype2/devel/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -82,8 +82,8 @@ FT_BEGIN_HEADER
/* to control the various font drivers and modules. The controllable */
/* properties are listed in the section `Controlling FreeType Modules' */
/* in the reference's table of contents; currently there are properties */
- /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */
- /* TrueType (file `ftttdrv.h'). */
+ /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */
+ /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */
/* */
/* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
/* multiple lines for better readability). */
@@ -107,22 +107,19 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* Uncomment the line below if you want to activate sub-pixel rendering */
- /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */
+ /* Uncomment the line below if you want to activate LCD rendering */
+ /* technology similar to ClearType in this build of the library. This */
+ /* technology triples the resolution in the direction color subpixels. */
+ /* To mitigate color fringes inherent to this technology, you also need */
+ /* to explicitly set up LCD filtering. */
/* */
/* Note that this feature is covered by several Microsoft patents */
/* and should not be activated in any default build of the library. */
+ /* When this macro is not defined, FreeType offers alternative LCD */
+ /* rendering technology that produces excellent output without LCD */
+ /* filtering. */
/* */
- /* This macro has no impact on the FreeType API, only on its */
- /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
- /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */
- /* the original size in case this macro isn't defined; however, each */
- /* triplet of subpixels has R=G=B. */
- /* */
- /* This is done to allow FreeType clients to run unmodified, forcing */
- /* them to display normal gray-level anti-aliased glyphs. */
- /* */
-#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
/*************************************************************************/
@@ -273,48 +270,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* DLL export compilation */
- /* */
- /* When compiling FreeType as a DLL, some systems/compilers need a */
- /* special keyword in front OR after the return type of function */
- /* declarations. */
- /* */
- /* Two macros are used within the FreeType source code to define */
- /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
- /* */
- /* FT_EXPORT( return_type ) */
- /* */
- /* is used in a function declaration, as in */
- /* */
- /* FT_EXPORT( FT_Error ) */
- /* FT_Init_FreeType( FT_Library* alibrary ); */
- /* */
- /* */
- /* FT_EXPORT_DEF( return_type ) */
- /* */
- /* is used in a function definition, as in */
- /* */
- /* FT_EXPORT_DEF( FT_Error ) */
- /* FT_Init_FreeType( FT_Library* alibrary ) */
- /* { */
- /* ... some code ... */
- /* return FT_Err_Ok; */
- /* } */
- /* */
- /* You can provide your own implementation of FT_EXPORT and */
- /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */
- /* will be later automatically defined as `extern return_type' to */
- /* allow normal compilation. */
- /* */
- /* Do not #undef these macros here since the build system might define */
- /* them for certain configurations only. */
- /* */
-/* #define FT_EXPORT(x) extern x */
-/* #define FT_EXPORT_DEF(x) x */
-
-
- /*************************************************************************/
- /* */
/* Glyph Postscript Names handling */
/* */
/* By default, FreeType 2 is compiled with the `psnames' module. This */
@@ -327,7 +282,7 @@ FT_BEGIN_HEADER
/* */
/* - The TrueType driver will provide its own set of glyph names, */
/* if you build it to support postscript names in the TrueType */
- /* `post' table. */
+ /* `post' table, but will not synthesize a missing Unicode charmap. */
/* */
/* - The Type 1 driver will not be able to synthesize a Unicode */
/* charmap out of the glyphs found in the fonts. */
@@ -672,7 +627,7 @@ FT_BEGIN_HEADER
/* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
/* defined. */
/* */
- /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
+ /* [1] https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
/* */
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */
@@ -692,7 +647,7 @@ FT_BEGIN_HEADER
/* composite flags array which can be used to disambiguate, but old */
/* fonts will not have them. */
/* */
- /* http://www.microsoft.com/typography/otspec/glyf.htm */
+ /* https://www.microsoft.com/typography/otspec/glyf.htm */
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */
/* */
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
@@ -790,6 +745,16 @@ FT_BEGIN_HEADER
/*************************************************************************/
+ /* */
+ /* T1_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe Type 1 */
+ /* engine gets compiled into FreeType. If defined, it is possible to */
+ /* switch between the two engines using the `hinting-engine' property of */
+ /* the type1 driver module. */
+ /* */
+#define T1_CONFIG_OPTION_OLD_ENGINE
+
+
+ /*************************************************************************/
/*************************************************************************/
/**** ****/
/**** C F F D R I V E R C O N F I G U R A T I O N ****/
@@ -835,6 +800,33 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
/**** ****/
+ /**** P C F D R I V E R C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* There are many PCF fonts just called `Fixed' which look completely */
+ /* different, and which have nothing to do with each other. When */
+ /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
+ /* random, the style changes often if one changes the size and one */
+ /* cannot select some fonts at all. This option makes the PCF module */
+ /* prepend the foundry name (plus a space) to the family name. */
+ /* */
+ /* We also check whether we have `wide' characters; all put together, we */
+ /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */
+ /* */
+ /* If this option is activated, it can be controlled with the */
+ /* `no-long-family-names' property of the pcf driver module. */
+ /* */
+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
/**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/
/**** ****/
/*************************************************************************/
@@ -886,6 +878,7 @@ FT_BEGIN_HEADER
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#define TT_USE_BYTECODE_INTERPRETER
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1
#define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
#endif
@@ -894,6 +887,7 @@ FT_BEGIN_HEADER
#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
#endif
#endif
+#endif
/*
diff --git a/modules/freetype2/docs/CHANGES b/modules/freetype2/docs/CHANGES
index dccdb6e28..a6d088af4 100644
--- a/modules/freetype2/docs/CHANGES
+++ b/modules/freetype2/docs/CHANGES
@@ -1,3 +1,344 @@
+CHANGES BETWEEN 2.9 and 2.9.1
+
+ I. IMPORTANT BUG FIXES
+
+ - Type 1 fonts containing flex features were not rendered
+ correctly (bug introduced in version 2.9).
+
+ - CVE-2018-6942: Older FreeType versions can crash with certain
+ malformed variation fonts.
+
+ http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-6942
+
+
+ II. MISCELLANEOUS
+
+ - Bug fix: Multiple calls to `FT_Get_MM_Var' returned garbage.
+
+ - The base extensions `ftlcdfil' and `ftfntfmt' are now part of
+ the base module (and thus no longer configurable in file
+ `modules.cfg').
+
+ - Emboldening of bitmaps didn't work correctly sometimes, showing
+ various artifacts (bug introduced in version 2.8.1).
+
+ - Use of the `freetype-config' script to get compilation and
+ linking options is deprecated since it doesn't support
+ cross-compiling, among other deficiencies. Instead, you should
+ use the `pkg-config' interface.
+
+ The `configure' script no longer installs `freetype-config' by
+ default. For backwards compatibility, a new configure option
+ `--enable-freetype-config' is provided that reverts this
+ decision.
+
+ - The auto-hinter script ranges have been updated for Unicode 11.
+ No support for new scripts have been added, however, with the
+ exception of Georgian Mtavruli.
+
+ - Support for cmake has been improved.
+
+ - The next release will remove support for Position Independent
+ Code as needed by systems that prohibit automatic address
+ fixups, such as BREW. [Compilation with modern compilers that
+ use flags like `-fPIC' or `-fPIE' is not affected.]
+
+
+======================================================================
+
+CHANGES BETWEEN 2.8.1 and 2.9
+
+ I. IMPORTANT BUG FIXES
+
+ - Advance width values of variation fonts were often wrong.
+
+ - More fixes for variation font support; you should update to this
+ version if you want to support them.
+
+
+ II. IMPORTANT CHANGES
+
+ - As a GSoC project, Ewald Hew extended the new (Adobe) CFF engine
+ to handle Type 1 fonts also, thus greatly improving the
+ rendering of this format. This is the new default. The old
+ engine is still available if the configuration macro
+ `T1_CONFIG_OPTION_OLD_ENGINE' gets defined; using the
+ `hinting-engine' property of the `type1' driver module you can
+ then switch between the two engines.
+
+ - A new function, `FT_Set_Named_Instance', can be used to set or
+ change the current named instance.
+
+ - Starting with this FreeType version, resetting variation
+ coordinates will return to the currently selected named
+ instance. Previously, FreeType returned to the base font (i.e.,
+ no instance set).
+
+
+ III. MISCELLANEOUS
+
+ - The `face_flags' field of the `FT_Face' structure has a new bit,
+ `FT_FACE_FLAG_VARIATION', which is set if a variation font has
+ been altered with `FT_Set_MM_Design_Coordinates',
+ `FT_Set_Var_Design_Coordinates', or
+ `FT_Set_Var_Blend_Coordinates'.
+
+ - If the current face is a named instance, the new macro
+ `FT_IS_NAMED_INSTANCE' returns true.
+
+ - `FT_IS_VARIATION' is a new macro that returns true whenever a
+ face object has been altered by `FT_Set_MM_Design_Coordinates',
+ `FT_Set_Var_Design_Coordinates', or
+ `FT_Set_Var_Blend_Coordinates'.
+
+ - Changing the design coordinates of a variation font with
+ `FT_Set_Var_Design_Coordinates' or
+ `FT_Set_Var_Blend_Coordinates' does not influence the named
+ instance index value (only `FT_Set_Named_Instance' does that).
+
+ - Special PostScript names for named instances are only returned
+ if the named instance is set with `FT_Set_Named_Instance' (and
+ the font has corresponding entries in its `fvar' table). If
+ `FT_IS_VARIATION' returns true, the algorithmically derived
+ PostScript name is provided, not looking up special entries for
+ named instances.
+
+ - A new function `FT_Done_MM_Var' is provided to free the memory
+ returned in a call to `FT_Get_MM_Var'.
+
+ - On platforms using the `configure' script, the installed
+ `ftoption.h' file now correctly reflects configuration options
+ like `--with-harfbuzz'.
+
+ - Better support to build FreeType as a DLL on Windows using
+ Visual C.
+
+ - All data specific to driver modules is now collected in a single
+ file, `FT_DRIVER_H'. Consequently, the macros
+ `FT_AUTOHINTER_H', `FT_CFF_DRIVER_H', `FT_TRUETYPE_DRIVER_H',
+ and `FT_PCF_DRIVER_H' still work but are deprecated.
+
+ - Some fuzzer fixes to better reject malformed fonts.
+
+ - The `ftbench' demo program has a new test for opening a new face
+ and loading some glyphs.
+
+ - The `ftbench' demo program has a new option `-j' to specify the
+ last glyph index to be used in the tests.
+
+ - The `ftgrid' demo program has a new option `-n' to suppress
+ display of named instances of variation fonts.
+
+ - The `ttdebug' demo program can now show a stack trace (key `K')
+ and switch between hexadecimal and decimal display of integers
+ (key `I').
+
+
+======================================================================
+
+CHANGES BETWEEN 2.8 and 2.8.1
+
+ I. IMPORTANT BUG FIXES
+
+ - B/W hinting of TrueType fonts didn't work properly if
+ interpreter version 38 or 40 was selected.
+
+ - Some severe problems within the handling of TrueType Variation
+ Fonts were found and fixed.
+
+ - Function `FT_Set_Var_Design_Coordinates' didn't correctly handle
+ the case with less input coordinates than axes.
+
+
+ II. IMPORTANT CHANGES
+
+ - By default, FreeType now offers high quality LCD-optimized
+ output without resorting to ClearType techniques of resolution
+ tripling and filtering. In this method, called Harmony, each
+ color channel is generated separately after shifting the glyph
+ outline, capitalizing on the fact that the color grids on LCD
+ panels are shifted by a third of a pixel. This output is
+ indistinguishable from ClearType with a light 3-tap filter.
+
+
+ III. MISCELLANEOUS
+
+ - Using the new function `FT_Get_Var_Axis_Flags', an application
+ can access the `flags' field of a variation axis (introduced in
+ OpenType version 1.8.2)
+
+ - More sanity checks.
+
+ - The internal representation of buffers for LCD rendering has
+ changed (to be more precise, the amount of padding gets computed
+ differently). Applications that use the FreeType API are not
+ affected.
+
+ - To reset all design axis values of a variation font to its
+ default values you can now say
+
+ error = FT_Set_Var_Design_Coordinates( face, 0, NULL );
+
+ This also works with functions `FT_Set_MM_Design_Coordinates'
+ and `FT_Set_MM_Blend_Coordinates'.
+
+ - FreeType now synthesizes a missing Unicode cmap for (older)
+ TrueType fonts also if glyph names are available.
+
+ - FreeType has improved handling of BDF fonts without the
+ `POINT_SIZE', `RESOLUTION_X', or `RESOLUTION_Y' properties; the
+ library now uses the values of the `SIZE' keyword if they are
+ missing. Previously, `SIZE' was completely ignored, and
+ FreeType used heuristic values instead.
+
+ - Multiple calls to `FT_Bitmap_Convert' do work now as advertised.
+ Previously, they failed with an assertion error if there was an
+ empty bitmap between non-empty ones.
+
+ - The warping option has moved from `light' to `normal' hinting
+ where it replaces the original hinting algorithm. The `light'
+ mode is now always void of any hinting in x-direction.
+
+ - 16bit compiler support is now officially ended. We didn't
+ provide any maintenance since many years, and given that there
+ were no error or problem reports either it seems that it is no
+ longer needed.
+
+ - The `ftgrid' demo program can now toggle the display of grid
+ lines with the `G' key.
+
+ - The `ftgrid' demo program can toggle a different set of colors
+ (suitable to color-blind people) with the `C' key.
+
+ - The `ftgrid' demo program now supports the `-e' command line
+ option to select a cmap.
+
+ - The `ftdump' demo program has a new command line option `-t' to
+ output the SFNT table list.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.7.1 and 2.8
+
+ I. IMPORTANT CHANGES
+
+ - Support for OpenType Variation Fonts is now complete. The last
+ missing part was handling the `VVAR' and `MVAR' tables, which is
+ available with this release.
+
+ - A new function `FT_Face_Properties' allows the control of some
+ module and library properties per font. Currently, the
+ following properties can be handled: stem darkening, LCD filter
+ weights, and the random seed for the `random' CFF operator.
+
+ - The PCF change to show more `colourful' family names (introduced
+ in version 2.7.1) was too radical; it can now be configured with
+ PCF_CONFIG_OPTION_LONG_FAMILY_NAMES at compile time. If
+ activated, it can be switched off at run time with the new pcf
+ property `no-long-family-names'. If the `FREETYPE_PROPERTIES'
+ environment variable is available, you can say
+
+ FREETYPE_PROPERTIES=pcf:no-long-family-names=1
+
+ - Support for the following scripts has been added to the
+ auto-hinter.
+
+ Adlam, Avestan, Bamum, Buhid, Carian, Chakma, Coptic, Cypriot,
+ Deseret, Glagolitic, Gothic, Kayah, Lisu, N'Ko, Ol Chiki, Old
+ Turkic, Osage, Osmanya, Saurashtra, Shavian, Sundanese, Tai
+ Viet, Tifinagh, Unified Canadian Syllabics, Vai
+
+
+ II. IMPORTANT BUG FIXES
+
+ - `Light' auto-hinting mode no longer uses TrueType metrics for
+ TrueType fonts. This bug was introduced in version 2.4.6,
+ causing horizontal scaling also. Almost all GNU/Linux
+ distributions (with Fedora as a notable exception) disabled the
+ corresponding patch for good reasons; chances are thus high that
+ you won't notice a difference.
+
+ If optical backward compatibility for legacy applications is
+ necessary, you might enable the AF_CONFIG_OPTION_TT_SIZE_METRICS
+ configuration option. However, it is strongly recommended to
+ avoid that, adjusting font sizes instead.
+
+ - Global size metrics values in the `FT_Size_Metrics' structure
+ can be different for TrueType fonts. Reason is that in older
+ FreeType versions the metrics were rounded differently to
+ integer pixels compared to all other font formats, yielding an
+ inconsistent behaviour if you used non-native hinting. Starting
+ with this version, global size metrics for TrueType fonts are
+ handled the same as other font formats: `ascender' gets rounded
+ up, `descender' gets rounded down, `height' gets normally
+ rounded, and `max_advance' gets normally rounded, too.
+
+ If you need more precise values of (global) ascender, descender,
+ height, or `max_advance', please take the corresponding values
+ from the `FT_Face' structure and scale them manually.
+
+ - If a TrueType font gets loaded with FT_LOAD_NO_HINTING, FreeType
+ now scales the font linearly again (bug introduced in version
+ 2.4.6).
+
+ - CVE-2017-8105, CVE-2017-8287: Older FreeType versions have
+ out-of-bounds writes caused by heap-based buffer overflows
+ related to Type 1 fonts.
+
+ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8105
+ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8287
+
+
+ III. MISCELLANEOUS
+
+ - A new function `FT_Set_Default_Properties' has been added to
+ parse the `FREETYPE_PROPERTIES' environment variable
+ (previously, it was internal only). `FT_Init_FreeType' always
+ call this function, but `FT_New_Library' does not (similar to
+ `FT_Add_Default_Modules').
+
+ - To be in sync with OpenType version 1.7 and newer, macros
+
+ FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
+ FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY,
+ TT_NAME_ID_PREFERRED_FAMILY
+ TT_NAME_ID_PREFERRED_SUBFAMILY
+
+ are renamed to
+
+ FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY,
+ FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY,
+ TT_NAME_ID_TYPOGRAPHIC_FAMILY
+ TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
+
+ The old macro names are deprecated (but still available).
+
+ - Support for SFNT `name' tables has been improved.
+
+ . Format 1 `name' tables are now supported. Use new function
+ `FT_Get_Sfnt_LangTag' to access associated language tags.
+
+ . Language, encoding, and name IDs have been updated to OpenType
+ version 1.8.1.
+
+ - The new CFF engine now handles the `random' operator. All CFF
+ opcodes are now supported.
+
+ - The CFF module has a new property `random-seed' to control the
+ pseudo-random number generation for the `random' operator.
+
+ - The `freetype-config' script is now a wrapper of `pkg-config' if
+ this program is available in the path.
+
+ - FT_LOAD_TARGET_LCD is now a variant of FT_LOAD_TARGET_LIGHT;
+ this should provide better rendering results.
+
+ - A mode to display light auto-hinting with subpixel positioning
+ has been added to `ftdiff'.
+
+
+======================================================================
CHANGES BETWEEN 2.7 and 2.7.1
@@ -18,6 +359,12 @@ CHANGES BETWEEN 2.7 and 2.7.1
- Handling of raw CID fonts was partially broken (bug introduced
in 2.6.4).
+ - CVE-2016-10328: Older FreeType versions had an out-of-bounds
+ write caused by a heap-based buffer overflow related to the CFF
+ fonts.
+
+ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10328
+
III. MISCELLANEOUS
@@ -195,7 +542,7 @@ CHANGES BETWEEN 2.6.3 and 2.6.4
- Type 42 fonts as created by LilyPond are now supported.
- - Minor rendering improvments in the auto-hinter.
+ - Minor rendering improvements in the auto-hinter.
- For experimental reasons, the old CFF engine now supports all
CFF operators except `random', including the deprecated Multiple
@@ -240,7 +587,7 @@ CHANGES BETWEEN 2.6.2 and 2.6.3
to the user. The exception to this is `__FTERRORS_H__', which
must be sometimes undefined by the user to get FreeType error
strings: Both this form and the new `FTERRORS_H_' macro are
- accepted for backwards compatibility.
+ accepted for backward compatibility.
- Minor improvements mainly to the Type 1 driver.
@@ -317,8 +664,8 @@ CHANGES BETWEEN 2.6.1 and 2.6.2
- The smooth renderer has been made faster.
- - The `ftstring' demo program now supports sub-pixel rendering;
- use key `l' to cycle through the LCD modes.
+ - The `ftstring' demo program now supports subpixel rendering; use
+ key `l' to cycle through the LCD modes.
- The `ftstring' demo program now supports colour rendering; use
the `space' key to cycle through various colour combinations.
@@ -481,17 +828,17 @@ CHANGES BETWEEN 2.5.5 and 2.6
compiler warnings.
- Function `FT_Bitmap_New' has been renamed to `FT_Bitmap_Init',
- since this name better reflects its function. For backwards
+ since this name better reflects its function. For backward
compatibility, the old function name is still available.
- Function `FT_Get_X11_Font_Format' has been renamed to
`FT_Get_Font_Format', since this name better reflects its
- function. For backwards compatibility, the old function name is
+ function. For backward compatibility, the old function name is
still available.
Additionally, the header file macro for this function has been
renamed to `FT_FONT_FORMATS_H' (the old name `FT_XFREE86_H' is
- retained for backwards compatibility).
+ retained for backward compatibility).
- Various improvements to the `ftgrid' demo program.
@@ -531,7 +878,7 @@ CHANGES BETWEEN 2.5.3 and 2.5.4
I. IMPORTANT BUG FIXES
- A variant of vulnerability CVE-2014-2240 was identified
- (cf. http://savannah.nongnu.org/bugs/?43661) and fixed in the
+ (cf. https://savannah.nongnu.org/bugs/?43661) and fixed in the
new CFF driver. All users should upgrade.
- The new auto-hinter code using HarfBuzz crashed for some invalid
@@ -602,7 +949,7 @@ CHANGES BETWEEN 2.5.2 and 2.5.3
I. IMPORTANT BUG FIXES
- A vulnerability (CVE-2014-2240) was identified and fixed in the
- new CFF driver (cf. http://savannah.nongnu.org/bugs/?41697).
+ new CFF driver (cf. https://savannah.nongnu.org/bugs/?41697).
All users should upgrade.
- More bug fixes related to correct positioning of composite
@@ -635,7 +982,7 @@ CHANGES BETWEEN 2.5.2 and 2.5.3
and install FreeType again.
With FreeType's `configure' script the procedure boils down to
- configure, build, and install Freetype, then configure, compile,
+ configure, build, and install FreeType, then configure, compile,
and install HarfBuzz, then configure, compile, and install
FreeType again (after executing `make distclean').
@@ -925,7 +1272,7 @@ index ebcf189..3f2ce6b 100644
II. MISCELLANEOUS
- The (top-level) `configure' script now respects the MAKE
- environment variable to specify a `make' binary. For backwards
+ environment variable to specify a `make' binary. For backward
compatibility, GNUMAKE still overrides MAKE, though.
- The `ftview' and `ftdiff' demo programs have been redesigned,
@@ -974,7 +1321,7 @@ CHANGES BETWEEN 2.4.10 and 2.4.11
- Subpixel hinting support has been contributed by Infinality,
based on Greg Hitchcock's whitepaper at
- http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
+ https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
Originally, it was a separate patch available from
@@ -1844,7 +2191,7 @@ CHANGES BETWEEN 2.3.0 and 2.2.1
of the library, mainly due to patent issues. For more
information see:
- http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
+ https://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
A new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING
has been introduced in `ftoption.h'; manually define it in this
@@ -1947,7 +2294,7 @@ CHANGES BETWEEN 2.2 and 2.1.10
We provide patches for most of those rogue clients. See the
following page for more information:
- http://www.freetype.org/freetype2/patches/rogue-patches.html
+ https://www.freetype.org/freetype2/patches/rogue-patches.html
Note that, as a convenience to our Unix desktop users, version
2.2 is *binary* compatible with FreeType 2.1.7, which means that
@@ -2059,7 +2406,7 @@ CHANGES BETWEEN 2.2 and 2.1.10
- Rudimentary support for Adobe's new `SING Glyphlet' format. See
- http://www.adobe.com/products/indesign/sing_gaiji.html
+ https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5148.SING_Tutorial.pdf
for more information.
@@ -2144,7 +2491,7 @@ CHANGES BETWEEN 2.1.10 and 2.1.9
probably using a different pitch, and to further manipulate it.
- A new API `FT_Outline_Embolden' (in FT_OUTLINE_H) gives finer
- control how outlines are embolded.
+ control how outlines are emboldened.
- `FT_GlyphSlot_Embolden' (in FT_SYNTHESIS_H) now handles bitmaps
also (code contributed by Chia I Wu). Note that this function
@@ -2263,7 +2610,7 @@ CHANGES BETWEEN 2.1.8 and 2.1.7
correctly treated as a CID, similar to FreeType's CID driver
module. Note that CID CMap support is still missing.
- - The FT_FACE_FLAGS_GLYPH_NAMES flag is now set correctly for all
+ - The FT_FACE_FLAG_GLYPH_NAMES flag is now set correctly for all
font formats.
- Some subsetted Type 1 fonts weren't parsed correctly. This bug
@@ -2554,7 +2901,7 @@ CHANGES BETWEEN 2.1.5 and 2.1.4
- FT_ENCODING_MS_{SJIS,GB2312,BIG5,WANSUNG,JOHAB} are now
deprecated in favour of
- FT_ENCODING_{SJIS,GB2312,GIB5,WANSONG,JOHAB} -- those encodings
+ FT_ENCODING_{SJIS,GB2312,BIG5,WANSUNG,JOHAB} -- those encodings
are not specific to Microsoft.
@@ -2736,7 +3083,7 @@ CHANGES BETWEEN 2.1.3 and 2.1.2
quality since many nasty defaults have been suppressed. Please
visit the web page:
- http://www.freetype.org/hinting/smooth-hinting.html
+ https://www.freetype.org/hinting/smooth-hinting.html
for additional details on this topic.
@@ -2756,12 +3103,12 @@ CHANGES BETWEEN 2.1.3 and 2.1.2
FT_LOAD_TARGET_MONO :: Hint and render for 1-bit displays.
FT_LOAD_TARGET_LCD :: Hint and render for horizontal RGB or
- BGR sub-pixel displays (like LCD
+ BGR subpixel displays (like LCD
screens). THIS IS STILL
EXPERIMENTAL!
FT_LOAD_TARGET_LCD_V :: Same as FT_LOAD_TARGET_LCD, for
- vertical sub-pixel displays (like
+ vertical subpixel displays (like
rotated LCD screens). THIS IS STILL
EXPERIMENTAL!
@@ -2995,7 +3342,7 @@ CHANGES BETWEEN 2.1.0 and 2.0.9
- The FreeType 2 redesign has begun. More information can be
found at this URL:
- http://www.freetype.org/freetype2/redesign.html
+ https://www.freetype.org/freetype2/redesign.html
The following internal changes have been performed within the
sources of this release:
@@ -3586,13 +3933,7 @@ CHANGES BETWEEN 2.0.2 and 2.0.1
For more information, see section I of the following document:
- http://www.freetype.org/
- freetype2/docs/tutorial/step1.html
-
- or
-
- http://freetype.sourceforge.net/
- freetype2/docs/tutorial/step1.html
+ https://www.freetype.org/freetype2/docs/tutorial/step1.html
- Many, many comments have been added to the public source file in
order to automatically generate the API Reference through the
@@ -3601,7 +3942,7 @@ CHANGES BETWEEN 2.0.2 and 2.0.1
The latter has been updated to support the grouping of sections
in chapters and better index sort. See:
- http://www.freetype.org/freetype2/docs/reference/ft2-toc.html
+ https://www.freetype.org/freetype2/docs/reference/ft2-toc.html
III. CHANGES TO THE BUILD PROCESS
@@ -4676,7 +5017,7 @@ Extensions support:
------------------------------------------------------------------------
-Copyright 2000-2016 by
+Copyright 2000-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/docs/CUSTOMIZE b/modules/freetype2/docs/CUSTOMIZE
index e8817b72b..916be3275 100644
--- a/modules/freetype2/docs/CUSTOMIZE
+++ b/modules/freetype2/docs/CUSTOMIZE
@@ -139,7 +139,7 @@ IV. Overriding default configuration and module headers
----------------------------------------------------------------------
-Copyright 2003-2016 by
+Copyright 2003-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/docs/DEBUG b/modules/freetype2/docs/DEBUG
index 29e10721c..751eaf028 100644
--- a/modules/freetype2/docs/DEBUG
+++ b/modules/freetype2/docs/DEBUG
@@ -6,7 +6,7 @@ I. Configuration macros
There are several ways to enable debugging features in a FreeType 2
builds. This is controlled through the definition of special macros
-located in the file `ftoptions.h'. The macros are:
+located in the file `ftoption.h'. The macros are:
FT_DEBUG_LEVEL_ERROR
@@ -191,7 +191,7 @@ behaviour of FreeType at runtime.
------------------------------------------------------------------------
-Copyright 2002-2016 by
+Copyright 2002-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/docs/FTL.TXT b/modules/freetype2/docs/FTL.TXT
index 433ab060e..c406d150f 100644
--- a/modules/freetype2/docs/FTL.TXT
+++ b/modules/freetype2/docs/FTL.TXT
@@ -163,7 +163,7 @@ Legal Terms
Our home page can be found at
- http://www.freetype.org
+ https://www.freetype.org
--- end of FTL.TXT ---
diff --git a/modules/freetype2/docs/INSTALL b/modules/freetype2/docs/INSTALL
index 5155a4b2e..71d4a0553 100644
--- a/modules/freetype2/docs/INSTALL
+++ b/modules/freetype2/docs/INSTALL
@@ -14,7 +14,9 @@ I. Normal installation and upgrades
compilation, since other make tools won't work (this includes BSD
Make).
- GNU Make VERSION 3.80 OR NEWER IS NEEDED!
+ GNU Make VERSION 3.81 OR NEWER IS NEEDED!
+
+ [For `cmake' see below.]
2. On VMS with the `mms' build tool
@@ -70,12 +72,12 @@ II. Custom builds of the library
http://makepp.sourceforge.net
- for more information; you need version 1.19 or newer, and you must
+ for more information; you need version 2.0 or newer, and you must
pass option `--norc-substitution'.
----------------------------------------------------------------------
-Copyright 2000-2016 by
+Copyright 2000-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/docs/INSTALL.ANY b/modules/freetype2/docs/INSTALL.ANY
index aae277308..fddac9ad2 100644
--- a/modules/freetype2/docs/INSTALL.ANY
+++ b/modules/freetype2/docs/INSTALL.ANY
@@ -39,11 +39,9 @@ I. Standard procedure
src/base/ftbdf.c -- optional, see <ftbdf.h>
src/base/ftbitmap.c -- optional, see <ftbitmap.h>
src/base/ftcid.c -- optional, see <ftcid.h>
- src/base/ftfntfmt.c -- optional, see <ftfntfmt.h>
src/base/ftfstype.c -- optional
src/base/ftgasp.c -- optional, see <ftgasp.h>
src/base/ftgxval.c -- optional, see <ftgxval.h>
- src/base/ftlcdfil.c -- optional, see <ftlcdfil.h>
src/base/ftmm.c -- optional, see <ftmm.h>
src/base/ftotval.c -- optional, see <ftotval.h>
src/base/ftpatent.c -- optional
@@ -143,7 +141,7 @@ II. Support for flat-directory compilation
----------------------------------------------------------------------
-Copyright 2003-2016 by
+Copyright 2003-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/docs/INSTALL.CROSS b/modules/freetype2/docs/INSTALL.CROSS
index 428580416..239e1a9b6 100644
--- a/modules/freetype2/docs/INSTALL.CROSS
+++ b/modules/freetype2/docs/INSTALL.CROSS
@@ -9,7 +9,7 @@ procedure.
-----------------
For self-building the FreeType library on a Unix system, GNU Make
- 3.80 or newer is required. `INSTALL.UNIX' contains hints how to
+ 3.81 or newer is required. `INSTALL.UNIX' contains hints how to
check the installed `make'.
The GNU C compiler to cross-build the target system is required.
@@ -163,7 +163,7 @@ procedure.
----------------------------------------------------------------------
-Copyright 2006-2016 by
+Copyright 2006-2018 by
suzuki toshiya, David Turner, Robert Wilhelm, and Werner Lemberg.
diff --git a/modules/freetype2/docs/INSTALL.GNU b/modules/freetype2/docs/INSTALL.GNU
index f1eb0819f..e314ecfdd 100644
--- a/modules/freetype2/docs/INSTALL.GNU
+++ b/modules/freetype2/docs/INSTALL.GNU
@@ -25,7 +25,7 @@ instructions in the file `INSTALL.UNIX' instead.
http://makepp.sourceforge.net
- for more information; you need version 1.19 or newer, and you must
+ for more information; you need version 2.0 or newer, and you must
pass option `--norc-substitution'.
Make sure that you are invoking GNU Make from the command line, by
@@ -35,7 +35,7 @@ instructions in the file `INSTALL.UNIX' instead.
to display its version number.
- VERSION 3.80 OR NEWER IS NEEDED!
+ VERSION 3.81 OR NEWER IS NEEDED!
2. Invoke `make'
@@ -148,7 +148,7 @@ instructions in the file `INSTALL.UNIX' instead.
----------------------------------------------------------------------
-Copyright 2003-2016 by
+Copyright 2003-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/docs/INSTALL.MAC b/modules/freetype2/docs/INSTALL.MAC
index 42bb0d863..2587e24a6 100644
--- a/modules/freetype2/docs/INSTALL.MAC
+++ b/modules/freetype2/docs/INSTALL.MAC
@@ -1,32 +1,32 @@
-Please follow the instructions in INSTALL.UNIX to install FreeType on
+Please follow the instructions in INSTALL.UNIX to install FreeType on
Mac OS X.
-Currently FreeType2 functions based on some deprecated Carbon APIs
-return FT_Err_Unimplemented_Feature always, even if FreeType2 is
-configured and built on the system that deprecated Carbon APIs are
-available. To enable deprecated FreeType2 functions as far as possible,
-replace src/base/ftmac.c by builds/mac/ftmac.c.
+Currently FreeType2 functions based on some deprecated Carbon APIs
+return `FT_Err_Unimplemented_Feature' always, even if FreeType2 is
+configured and built on the system that deprecated Carbon APIs are
+available. To enable deprecated FreeType2 functions as far as
+possible, replace `src/base/ftmac.c' by `builds/mac/ftmac.c'.
-Starting with Mac OS X 10.5, gcc defaults the deployment target
-to 10.5. In previous versions of Mac OS X, this defaulted to 10.1.
-If you want your built binaries to run only on 10.5, this change
-does not concern you. If you want them to also run on older versions
-of Mac OS X, then you must either set the MACOSX_DEPLOYMENT_TARGET
-environment variable or pass -mmacosx-version-min to gcc. You should
-specify the oldest version of Mac OS you want the code to run on.
-For example, if you use Bourne shell:
+Starting with Mac OS X 10.5, gcc defaults the deployment target to
+10.5. In previous versions of Mac OS X, this defaulted to 10.1. If
+you want your built binaries to run only on 10.5, this change does not
+concern you. If you want them to also run on older versions of Mac
+OS X, then you must either set the MACOSX_DEPLOYMENT_TARGET
+environment variable or pass `-mmacosx-version-min' to gcc. You
+should specify the oldest version of Mac OS you want the code to run
+on. For example, if you use Bourne shell:
- export MACOSX_DEPLOYMENT_TARGET=10.2
+ export MACOSX_DEPLOYMENT_TARGET=10.2
or, if you use C shell:
- setenv MACOSX_DEPLOYMENT_TARGET 10.2
+ setenv MACOSX_DEPLOYMENT_TARGET 10.2
-Alternatively, you could pass "-mmacosx-version-min=10.2" to gcc.
+Alternatively, you could pass `-mmacosx-version-min=10.2' to gcc.
-Here the number 10.2 is the lowest version that the built binaries
-can run on. In the cases in above, the built binaries will run on
-Mac OS X 10.2 and later, but _not_ earlier. If you want to run on
-earlier, you have to set lower version, e.g. 10.0.
+Here the number 10.2 is the lowest version that the built binaries can
+run on. In the above cases, the built binaries will run on Mac OS X
+10.2 and later, but _not_ earlier. If you want to run on earlier, you
+have to set lower version, e.g., 10.0.
For classic Mac OS (Mac OS 7, 8, 9) please refer to builds/mac/README.
diff --git a/modules/freetype2/docs/INSTALL.UNIX b/modules/freetype2/docs/INSTALL.UNIX
index b043883a1..f92d828e6 100644
--- a/modules/freetype2/docs/INSTALL.UNIX
+++ b/modules/freetype2/docs/INSTALL.UNIX
@@ -19,7 +19,7 @@ or MSys on Win32:
GNU Make <version number>
Copyright (C) <year> Free Software Foundation Inc.
- Note that version 3.80 or higher is *required* or the build will
+ Note that version 3.81 or higher is *required* or the build will
fail.
It is also fine to have GNU Make under another name (e.g. 'gmake')
@@ -28,6 +28,9 @@ or MSys on Win32:
As a special exception, 'makepp' can also be used to build
FreeType 2. See the file docs/MAKEPP for details.
+ For builds with `cmake' please check file `CMakeLists.txt'; this
+ is a contributed file not directly supported by the FreeType team.
+
2. Regenerate the configure script if needed
--------------------------------------------
@@ -102,7 +105,7 @@ or MSys on Win32:
----------------------------------------------------------------------
-Copyright 2003-2016 by
+Copyright 2003-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/docs/INSTALL.VMS b/modules/freetype2/docs/INSTALL.VMS
index ef371d70b..c1d30e06e 100644
--- a/modules/freetype2/docs/INSTALL.VMS
+++ b/modules/freetype2/docs/INSTALL.VMS
@@ -1,7 +1,7 @@
-How to build the freetype2 library on VMS
+How to build the FreeType 2 library on VMS
-----------------------------------------
-It is actually very straightforward to install the Freetype2 library.
+It is actually very straightforward to install the FreeType 2 library.
Just execute vms_make.com from the toplevel directory to build the
library. This procedure currently accepts the following options:
@@ -15,10 +15,10 @@ ccopt=<value>
Options to pass to the C compiler e.g. ccopt=/float=ieee
In case you did download the demos, place them in a separate directory
-sharing the same toplevel as the directory of Freetype2 and follow the
-same instructions as above for the demos from there. The build
-process relies on this to figure the location of the Freetype2 include
-files.
+sharing the same top level as the directory of FreeType 2 and follow
+the same instructions as above for the demos from there. The build
+process relies on this to figure out the location of the FreeType 2
+include files.
To rebuild the sources it is necessary to have MMS/MMK installed on
@@ -49,7 +49,7 @@ V7.2-1.
------------------------------------------------------------------------
-Copyright 2000-2016 by
+Copyright 2000-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/docs/MAKEPP b/modules/freetype2/docs/MAKEPP
index 58eaf551d..a4d44b78e 100644
--- a/modules/freetype2/docs/MAKEPP
+++ b/modules/freetype2/docs/MAKEPP
@@ -1,5 +1,5 @@
As a special exception, FreeType can also be built with the 'makepp'
build tool, available from http://makepp.sourceforge.net.
-Note, however. that you will need at least version 1.19 and pass the
+Note, however, that you will need at least version 2.0 and pass the
option --norc-substitution to have it work correctly.
diff --git a/modules/freetype2/docs/TODO b/modules/freetype2/docs/TODO
index 4aa3f0904..1a443a2ed 100644
--- a/modules/freetype2/docs/TODO
+++ b/modules/freetype2/docs/TODO
@@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType.
------------------------------------------------------------------------
-Copyright 2001-2016 by
+Copyright 2001-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/docs/VERSIONS.TXT b/modules/freetype2/docs/VERSIONS.TXT
index 82f63a3a6..377415702 100644
--- a/modules/freetype2/docs/VERSIONS.TXT
+++ b/modules/freetype2/docs/VERSIONS.TXT
@@ -52,6 +52,10 @@ on _most_ systems, but not all of them:
release libtool so
-------------------------------
+ 2.9.1 22.1.16 6.16.1
+ 2.9.0 22.0.16 6.16.0
+ 2.8.1 21.0.15 6.15.0
+ 2.8.0 20.0.14 6.14.0
2.7.1 19.0.13 6.13.0
2.7.0 18.6.12 6.12.6
2.6.5 18.5.12 6.12.5
@@ -98,7 +102,7 @@ other release numbers.
#include <ft2build.h>
#include FT_FREETYPE_H
#if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009
-#error Freetype version too low.
+#error FreeType version too low.
#endif
],
[AC_MSG_RESULT(yes)
@@ -110,7 +114,7 @@ other release numbers.
------------------------------------------------------------------------
-Copyright 2002-2016 by
+Copyright 2002-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/docs/formats.txt b/modules/freetype2/docs/formats.txt
index 2181352bd..75aba92e3 100644
--- a/modules/freetype2/docs/formats.txt
+++ b/modules/freetype2/docs/formats.txt
@@ -7,9 +7,12 @@ Table fields
wrapper format
The format used to represent the font data. In the table below it
is used only if the font format differs. Possible values are
- `SFNT' (binary), `PS' (a text header, followed by binary or text
- data), `LZW' (compressed with either `gzip' or `compress'), and
- `BZ2' (compressed with `bzip2`).
+
+ SFNT binary
+ PFB binary
+ PS a text header, followed by binary or text data
+ LZW compressed with either `gzip' or `compress'
+ BZ2 compressed with `bzip2'.
font format
How the font is to be accessed, possibly after converting the file
@@ -95,6 +98,9 @@ which isn't supported yet please send a mail too.
--- PS TYPE_1 --- type1 T1_SPEC.pdf
+ (PFA, Type 1 font resource)
+ PFB PS TYPE_1 --- type1 T1_SPEC.pdf,
+ 5040.Download_Fonts.pdf
(`normal' Type 1 font)
--- PS TYPE_1 CID cid PLRM.pdf (CID Font Type 0;
Type 9 font)
@@ -149,10 +155,11 @@ which isn't supported yet please send a mail too.
[1] Support should be rather simple since this is identical to `CFF'
but in a PS wrapper.
-[2] Official PFR specification:
+[2] The official PFR specification is no longer available, but
+ archive.org has archived it:
- http://www.bitstream.com/categories/developer/truedoc/pfrspec.html
- http://www.bitstream.com/categories/developer/truedoc/pfrspec1.2.pdf
+ https://web.archive.org/web/20091014062300/http://www.bitstream.com/font_rendering/products/truedoc/pfrspec.html
+ https://web.archive.org/web/20081115152605/http://www.bitstream.com/font_rendering/pdfs/pfrspec1.3.pdf
The syntax of the auxiliary data is not defined there, but is
partially defined in MHP 1.0.3 (also called ETSI TS 101812 V1.3.1)
@@ -161,8 +168,6 @@ which isn't supported yet please send a mail too.
http://www.etsi.org/
http://webapp.etsi.org/workprogram/Report_WorkItem.asp?WKI_ID=18799
- (free registration required).
-
[3] Support is rudimentary currently; some tables or data are not
loaded yet.
@@ -178,15 +183,15 @@ which isn't supported yet please send a mail too.
George Williams deduced the font format from the X11 sources and
documented it for his FontForge font editor:
- http://fontforge.github.io/pcf-format.html
+ https://fontforge.github.io/pcf-format.html
[5] This is from MS Windows 3; see Microsoft's Knowledge Base article at
- http://support.microsoft.com/kb/65123
+ https://support.microsoft.com/kb/65123
------------------------------------------------------------------------
-Copyright 2004-2016 by
+Copyright 2004-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
@@ -197,3 +202,7 @@ accept it fully.
--- end of formats.txt ---
+
+Local Variables:
+coding: utf-8
+End:
diff --git a/modules/freetype2/docs/freetype-config.1 b/modules/freetype2/docs/freetype-config.1
index 76082ec11..164b8ffa0 100644
--- a/modules/freetype2/docs/freetype-config.1
+++ b/modules/freetype2/docs/freetype-config.1
@@ -1,4 +1,4 @@
-.TH FREETYPE-CONFIG 1 "December 2016" "FreeType 2.7.1"
+.TH FREETYPE-CONFIG 1 "May 2018" "FreeType 2.9.1"
.
.
.SH NAME
@@ -23,6 +23,14 @@ FreeType library version installed on the system, such as the
installation (directory path) prefix or the FreeType version number.
.
.PP
+If
+.BR pkg-config (1)
+is found in the path,
+.B freetype-config
+acts as a wrapper for
+.BR pkg-config .
+.
+.PP
This program is part of the FreeType package.
.
.
@@ -50,7 +58,8 @@ Return the executable prefix value of the installed FreeType library
.
.TP
.B \-\-ftversion
-Return the FreeType version number.
+Return the FreeType version number, directly derived from file
+`freetype.h'.
.
.TP
.B \-\-version
@@ -72,32 +81,61 @@ Return compiler flags for compiling against the installed FreeType library.
.B \-\-static
Make command line options display flags for static linking.
.
+.TP
+.B \-\-help
+Show help and exit.
+.
.
.SS Path override options
.
These affect any selected output option, except the libtool version
-returned by `--version'.
+returned by
+.BR \-\-version .
.
.TP
.BI \-\-prefix= PREFIX
-Override `--prefix' value with
+Override
+.B \-\-prefix
+value with
.IR PREFIX .
.
+This also sets
+.BI \-\-exec-prefix= PREFIX
+if option
+.B \-\-exec-prefix
+is not explicitly given.
+.
.TP
.BI \-\-exec-prefix= EPREFIX
-Override `--exec-prefix' value with
+Override
+.B \-\-exec-prefix
+value with
.IR EPREFIX .
.
.
.SH BUGS
In case the libraries FreeType links to are located in non-standard
-directories, the output from option
+directories, and
+.BR pkg-config (1)
+is not available, the output from option
.B \-\-libs
might be incomplete.
+.
It is thus recommended to use the
.BR pkg-config (1)
interface instead, which is able to correctly resolve all dependencies.
.
+.PP
+Setting
+.B \-\-exec-prefix
+(either explicitly or implicitly) might return incorrect results if
+combined with option
+.BR \-\-static .
+.
+The same problem can occur if you set the
+.B SYSROOT
+environment variable.
+.
.
.SH AUTHOR
.
diff --git a/modules/freetype2/docs/raster.txt b/modules/freetype2/docs/raster.txt
index 5e8df51e3..8ef466ef9 100644
--- a/modules/freetype2/docs/raster.txt
+++ b/modules/freetype2/docs/raster.txt
@@ -618,7 +618,7 @@ II. Rendering Technology
------------------------------------------------------------------------
-Copyright 2003-2016 by
+Copyright 2003-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/docs/reference/ft2-auto_hinter.html b/modules/freetype2/docs/reference/ft2-auto_hinter.html
index 79d1fe0e4..884d87ad6 100644
--- a/modules/freetype2/docs/reference/ft2-auto_hinter.html
+++ b/modules/freetype2/docs/reference/ft2-auto_hinter.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,321 +100,13 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="auto_hinter">The auto-hinter</h1>
-<h2>Synopsis</h2>
-<table class="synopsis">
-<tr><td><a href="#glyph-to-script-map">glyph-to-script-map</a></td><td><a href="#increase-x-height">increase-x-height</a></td></tr>
-<tr><td><a href="#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td><td><a href="#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td></tr>
-<tr><td><a href="#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td><td><a href="#warping">warping</a></td></tr>
-<tr><td><a href="#fallback-script">fallback-script</a></td><td><a href="#no-stem-darkening(autofit)">no-stem-darkening</a></td></tr>
-<tr><td><a href="#default-script">default-script</a></td><td><a href="#darkening-parameters(autofit)">darkening-parameters</a></td></tr>
-</table>
-
<p>While FreeType's auto-hinter doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. The following lists the available properties together with the necessary macros and structures.</p>
<p>Note that the auto-hinter's module name is &lsquo;autofitter&rsquo; for historical reasons.</p>
-
-<div class="section">
-<h3 id="glyph-to-script-map">glyph-to-script-map</h3>
-
-<p><b>Experimental</b> <b>only</b></p>
-<p>The auto-hinter provides various script modules to hint glyphs. Examples of supported scripts are Latin or CJK. Before a glyph is auto-hinted, the Unicode character map of the font gets examined, and the script is then determined based on Unicode character ranges, see below.</p>
-<p>OpenType fonts, however, often provide much more glyphs than character codes (small caps, superscripts, ligatures, swashes, etc.), to be controlled by so-called &lsquo;features&rsquo;. Handling OpenType features can be quite complicated and thus needs a separate library on top of FreeType.</p>
-<p>The mapping between glyph indices and scripts (in the auto-hinter sense, see the <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a> values) is stored as an array with &lsquo;num_glyphs&rsquo; elements, as found in the font's <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure. The &lsquo;glyph-to-script-map&rsquo; property returns a pointer to this array, which can be modified as needed. Note that the modification should happen before the first glyph gets processed by the auto-hinter so that the global analysis of the font shapes actually uses the modified mapping.</p>
-<p>The following example code demonstrates how to access it (omitting the error handling).</p>
-<pre class="colored">
- FT_Library library;
- FT_Face face;
- FT_Prop_GlyphToScriptMap prop;
-
-
- FT_Init_FreeType( &amp;library );
- FT_New_Face( library, "foo.ttf", 0, &amp;face );
-
- prop.face = face;
-
- FT_Property_Get( library, "autofitter",
- "glyph-to-script-map", &amp;prop );
-
- // adjust `prop.map' as needed right here
-
- FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
-</pre>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</h3>
-<p>Defined in FT_AUTOHINTER_H (freetype/ftautoh.h).</p>
-<pre>
-#define <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_NONE">FT_AUTOHINTER_SCRIPT_NONE</a> 0
-#define <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_LATIN">FT_AUTOHINTER_SCRIPT_LATIN</a> 1
-#define <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_CJK">FT_AUTOHINTER_SCRIPT_CJK</a> 2
-#define <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_INDIC">FT_AUTOHINTER_SCRIPT_INDIC</a> 3
-</pre>
-
-<p><b>Experimental</b> <b>only</b></p>
-<p>A list of constants used for the <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a> property to specify the script submodule the auto-hinter should use for hinting a particular glyph.</p>
-
-<h4>values</h4>
-<table class="fields">
-<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_NONE">FT_AUTOHINTER_SCRIPT_NONE</td><td class="desc">
-<p>Don't auto-hint this glyph.</p>
-</td></tr>
-<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_LATIN">FT_AUTOHINTER_SCRIPT_LATIN</td><td class="desc">
-<p>Apply the latin auto-hinter. For the auto-hinter, &lsquo;latin&rsquo; is a very broad term, including Cyrillic and Greek also since characters from those scripts share the same design constraints.</p>
-<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
-<pre class="colored">
- U+0020 - U+007F // Basic Latin (no control characters)
- U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
- U+0100 - U+017F // Latin Extended-A
- U+0180 - U+024F // Latin Extended-B
- U+0250 - U+02AF // IPA Extensions
- U+02B0 - U+02FF // Spacing Modifier Letters
- U+0300 - U+036F // Combining Diacritical Marks
- U+0370 - U+03FF // Greek and Coptic
- U+0400 - U+04FF // Cyrillic
- U+0500 - U+052F // Cyrillic Supplement
- U+1D00 - U+1D7F // Phonetic Extensions
- U+1D80 - U+1DBF // Phonetic Extensions Supplement
- U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
- U+1E00 - U+1EFF // Latin Extended Additional
- U+1F00 - U+1FFF // Greek Extended
- U+2000 - U+206F // General Punctuation
- U+2070 - U+209F // Superscripts and Subscripts
- U+20A0 - U+20CF // Currency Symbols
- U+2150 - U+218F // Number Forms
- U+2460 - U+24FF // Enclosed Alphanumerics
- U+2C60 - U+2C7F // Latin Extended-C
- U+2DE0 - U+2DFF // Cyrillic Extended-A
- U+2E00 - U+2E7F // Supplemental Punctuation
- U+A640 - U+A69F // Cyrillic Extended-B
- U+A720 - U+A7FF // Latin Extended-D
- U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
- U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
- U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
-</pre>
-<p></p>
-</td></tr>
-<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_CJK">FT_AUTOHINTER_SCRIPT_CJK</td><td class="desc">
-<p>Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old Vietnamese, and some other scripts.</p>
-<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
-<pre class="colored">
- U+1100 - U+11FF // Hangul Jamo
- U+2E80 - U+2EFF // CJK Radicals Supplement
- U+2F00 - U+2FDF // Kangxi Radicals
- U+2FF0 - U+2FFF // Ideographic Description Characters
- U+3000 - U+303F // CJK Symbols and Punctuation
- U+3040 - U+309F // Hiragana
- U+30A0 - U+30FF // Katakana
- U+3100 - U+312F // Bopomofo
- U+3130 - U+318F // Hangul Compatibility Jamo
- U+3190 - U+319F // Kanbun
- U+31A0 - U+31BF // Bopomofo Extended
- U+31C0 - U+31EF // CJK Strokes
- U+31F0 - U+31FF // Katakana Phonetic Extensions
- U+3200 - U+32FF // Enclosed CJK Letters and Months
- U+3300 - U+33FF // CJK Compatibility
- U+3400 - U+4DBF // CJK Unified Ideographs Extension A
- U+4DC0 - U+4DFF // Yijing Hexagram Symbols
- U+4E00 - U+9FFF // CJK Unified Ideographs
- U+A960 - U+A97F // Hangul Jamo Extended-A
- U+AC00 - U+D7AF // Hangul Syllables
- U+D7B0 - U+D7FF // Hangul Jamo Extended-B
- U+F900 - U+FAFF // CJK Compatibility Ideographs
- U+FE10 - U+FE1F // Vertical forms
- U+FE30 - U+FE4F // CJK Compatibility Forms
- U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
- U+1B000 - U+1B0FF // Kana Supplement
- U+1D300 - U+1D35F // Tai Xuan Hing Symbols
- U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
- U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
- U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
- U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
- U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
-</pre>
-<p></p>
-</td></tr>
-<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_INDIC">FT_AUTOHINTER_SCRIPT_INDIC</td><td class="desc">
-<p>Apply the indic auto-hinter, covering all major scripts from the Indian sub-continent and some other related scripts like Thai, Lao, or Tibetan.</p>
-<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
-<pre class="colored">
- U+0900 - U+0DFF // Indic Range
- U+0F00 - U+0FFF // Tibetan
- U+1900 - U+194F // Limbu
- U+1B80 - U+1BBF // Sundanese
- U+A800 - U+A82F // Syloti Nagri
- U+ABC0 - U+ABFF // Meetei Mayek
- U+11800 - U+118DF // Sharada
-</pre>
-<p>Note that currently Indic support is rudimentary only, missing blue zone support.</p>
-</td></tr>
-</table>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</h3>
-<p>Defined in FT_AUTOHINTER_H (freetype/ftautoh.h).</p>
-<pre>
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_GlyphToScriptMap_
- {
- <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face;
- <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>* map;
-
- } <b>FT_Prop_GlyphToScriptMap</b>;
-</pre>
-
-<p><b>Experimental</b> <b>only</b></p>
-<p>The data exchange structure for the <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a> property.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="fallback-script">fallback-script</h3>
-
-<p><b>Experimental</b> <b>only</b></p>
-<p>If no auto-hinter script module can be assigned to a glyph, a fallback script gets assigned to it (see also the <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a> property). By default, this is <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_CJK</a>. Using the &lsquo;fallback-script&rsquo; property, this fallback value can be changed.</p>
-<pre class="colored">
- FT_Library library;
- FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
-
-
- FT_Init_FreeType( &amp;library );
-
- FT_Property_Set( library, "autofitter",
- "fallback-script", &amp;fallback_script );
-</pre>
-
-<h4>note</h4>
-<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
-<p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the fallback script value gets triggered either by setting or reading a face-specific property like <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a>, or by auto-hinting any glyph from that face. In particular, if you have already created an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure but not loaded any glyph (using the auto-hinter), a change of the fallback script will affect this face.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="default-script">default-script</h3>
-
-<p><b>Experimental</b> <b>only</b></p>
-<p>If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make the HarfBuzz library access OpenType features for getting better glyph coverages, this property sets the (auto-fitter) script to be used for the default (OpenType) script data of a font's GSUB table. Features for the default script are intended for all scripts not explicitly handled in GSUB; an example is a &lsquo;dlig&rsquo; feature, containing the combination of the characters &lsquo;T&rsquo;, &lsquo;E&rsquo;, and &lsquo;L&rsquo; to form a &lsquo;TEL&rsquo; ligature.</p>
-<p>By default, this is <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_LATIN</a>. Using the &lsquo;default-script&rsquo; property, this default value can be changed.</p>
-<pre class="colored">
- FT_Library library;
- FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE;
-
-
- FT_Init_FreeType( &amp;library );
-
- FT_Property_Set( library, "autofitter",
- "default-script", &amp;default_script );
-</pre>
-
-<h4>note</h4>
-<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
-<p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the default script value gets triggered either by setting or reading a face-specific property like <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a>, or by auto-hinting any glyph from that face. In particular, if you have already created an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure but not loaded any glyph (using the auto-hinter), a change of the default script will affect this face.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="increase-x-height">increase-x-height</h3>
-
-<p>For ppem values in the range 6&nbsp;&lt;= ppem &lt;= &lsquo;increase-x-height&rsquo;, round up the font's x&nbsp;height much more often than normally. If the value is set to&nbsp;0, which is the default, this feature is switched off. Use this property to improve the legibility of small font sizes if necessary.</p>
-<pre class="colored">
- FT_Library library;
- FT_Face face;
- FT_Prop_IncreaseXHeight prop;
-
-
- FT_Init_FreeType( &amp;library );
- FT_New_Face( library, "foo.ttf", 0, &amp;face );
- FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
-
- prop.face = face;
- prop.limit = 14;
-
- FT_Property_Set( library, "autofitter",
- "increase-x-height", &amp;prop );
-</pre>
-
-<h4>note</h4>
-<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
-<p>Set this value right after calling <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, but before loading any glyph (using the auto-hinter).</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</h3>
-<p>Defined in FT_AUTOHINTER_H (freetype/ftautoh.h).</p>
-<pre>
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_IncreaseXHeight_
- {
- <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face;
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> limit;
-
- } <b>FT_Prop_IncreaseXHeight</b>;
-</pre>
-
-<p>The data exchange structure for the <a href="ft2-auto_hinter.html#increase-x-height">increase-x-height</a> property.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="warping">warping</h3>
-
-<p><b>Experimental</b> <b>only</b></p>
-<p>If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to activate the warp hinting code in the auto-hinter, this property switches warping on and off.</p>
-<p>Warping only works in &lsquo;light&rsquo; auto-hinting mode. The idea of the code is to slightly scale and shift a glyph along the non-hinted dimension (which is usually the horizontal axis) so that as much of its segments are aligned (more or less) to the grid. To find out a glyph's optimal scaling and shifting value, various parameter combinations are tried and scored.</p>
-<p>By default, warping is off. The example below shows how to switch on warping (omitting the error handling).</p>
-<pre class="colored">
- FT_Library library;
- FT_Bool warping = 1;
-
-
- FT_Init_FreeType( &amp;library );
-
- FT_Property_Set( library, "autofitter",
- "warping", &amp;warping );
-</pre>
-
-<h4>note</h4>
-<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
-<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively).</p>
-<p>The warping code can also change advance widths. Have a look at the &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; fields in the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure for details on improving inter-glyph distances while rendering.</p>
-<p>Since warping is a global property of the auto-hinter it is best to change its value before rendering any face. Otherwise, you should reload all faces that get auto-hinted in &lsquo;light&rsquo; hinting mode.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="no-stem-darkening(autofit)">no-stem-darkening</h3>
-
-<p><b>Experimental</b> *only,* <b>requires</b> <b>linear</b> <b>alpha</b> <b>blending</b> <b>and</b> <b>gamma</b> <b>correction</b></p>
-<p>Stem darkening emboldens glyphs at smaller sizes to make them more readable on common low-DPI screens when using linear alpha blending and gamma correction, see <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. When not using linear alpha blending and gamma correction, glyphs will appear heavy and fuzzy!</p>
-<p>Gamma correction essentially lightens fonts since shades of grey are shifted to higher pixel values (=&nbsp;higher brightness) to match the original intention to the reality of our screens. The side-effect is that glyphs &lsquo;thin out&rsquo;. Mac OS&nbsp;X and Adobe's proprietary font rendering library implement a counter-measure: stem darkening at smaller sizes where shades of gray dominate. By emboldening a glyph slightly in relation to its pixel size, individual pixels get higher coverage of filled-in outlines and are therefore &lsquo;blacker&rsquo;. This counteracts the &lsquo;thinning out&rsquo; of glyphs, making text remain readable at smaller sizes. All glyphs that pass through the auto-hinter will be emboldened unless this property is set to TRUE.</p>
-<p>See the description of the CFF driver for algorithmic details. Total consistency with the CFF driver is currently not achieved because the emboldening method differs and glyphs must be scaled down on the Y-axis to keep outline points inside their precomputed blue zones. The smaller the size (especially 9ppem and down), the higher the loss of emboldening versus the CFF driver.</p>
-<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable similar to the CFF driver.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="darkening-parameters(autofit)">darkening-parameters</h3>
-
-<p><b>Experimental</b> <b>only</b></p>
-<p>See the description of the CFF driver for details. This implementation appropriates the CFF_CONFIG_OPTION_DARKENING_PARAMETER_* #defines for consistency. Note the differences described in <a href="ft2-auto_hinter.html#no-stem-darkening(autofit)">no-stem-darkening</a>.</p>
-<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable similar to the CFF driver.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<p>Available properties are <a href="ft2-properties.html#increase-x-height">increase-x-height</a>, <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a> (experimental), <a href="ft2-properties.html#darkening-parameters">darkening-parameters</a> (experimental), <a href="ft2-properties.html#warping">warping</a> (experimental), <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a> (experimental), <a href="ft2-properties.html#fallback-script">fallback-script</a> (experimental), and <a href="ft2-properties.html#default-script">default-script</a> (experimental), as documented in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p>
</body>
</html>
diff --git a/modules/freetype2/docs/reference/ft2-base_interface.html b/modules/freetype2/docs/reference/ft2-base_interface.html
index e4d876cbc..3cedbcc94 100644
--- a/modules/freetype2/docs/reference/ft2-base_interface.html
+++ b/modules/freetype2/docs/reference/ft2-base_interface.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,58 +100,59 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="base_interface">Base Interface</h1>
<h2>Synopsis</h2>
<table class="synopsis">
-<tr><td><a href="#FT_Library">FT_Library</a></td><td><a href="#FT_SubGlyph">FT_SubGlyph</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_Face">FT_Face</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_VERTICAL_LAYOUT">FT_LOAD_VERTICAL_LAYOUT</a></td></tr>
-<tr><td><a href="#FT_Size">FT_Size</a></td><td><a href="#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="#FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</a></td></tr>
-<tr><td><a href="#FT_GlyphSlot">FT_GlyphSlot</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</a></td></tr>
-<tr><td><a href="#FT_CharMap">FT_CharMap</a></td><td><a href="#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="#FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</a></td></tr>
-<tr><td><a href="#FT_Encoding">FT_Encoding</a></td><td><a href="#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="#FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</a></td></tr>
-<tr><td><a href="#FT_ENC_TAG">FT_ENC_TAG</a></td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Library">FT_Library</a></td><td><a href="#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="#FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</a></td></tr>
+<tr><td><a href="#FT_Face">FT_Face</a></td><td><a href="#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="#FT_LOAD_COLOR">FT_LOAD_COLOR</a></td></tr>
+<tr><td><a href="#FT_Size">FT_Size</a></td><td><a href="#FT_SubGlyph">FT_SubGlyph</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_GlyphSlot">FT_GlyphSlot</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_VERTICAL_LAYOUT">FT_LOAD_VERTICAL_LAYOUT</a></td></tr>
+<tr><td><a href="#FT_CharMap">FT_CharMap</a></td><td><a href="#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="#FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</a></td></tr>
+<tr><td><a href="#FT_Encoding">FT_Encoding</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</a></td></tr>
+<tr><td><a href="#FT_ENC_TAG">FT_ENC_TAG</a></td><td><a href="#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="#FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="#FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</a></td></tr>
+<tr><td><a href="#FT_FaceRec">FT_FaceRec</a></td><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_New_Face">FT_New_Face</a></td><td><a href="#FT_LOAD_TARGET_NORMAL">FT_LOAD_TARGET_NORMAL</a></td></tr>
-<tr><td><a href="#FT_FaceRec">FT_FaceRec</a></td><td><a href="#FT_Done_Face">FT_Done_Face</a></td><td><a href="#FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="#FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a></td><td><a href="#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="#FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="#FT_Open_Face">FT_Open_Face</a></td><td><a href="#FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="#FT_Open_Args">FT_Open_Args</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="#FT_Parameter">FT_Parameter</a></td><td><a href="#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</a></td><td><a href="#FT_Attach_File">FT_Attach_File</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a></td><td><a href="#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="#FT_Render_Glyph">FT_Render_Glyph</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</a></td><td>&nbsp;</td><td><a href="#FT_Render_Mode">FT_Render_Mode</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</a></td><td><a href="#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="#FT_Get_Kerning">FT_Get_Kerning</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a></td><td><a href="#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="#FT_Kerning_Mode">FT_Kerning_Mode</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</a></td><td><a href="#FT_Request_Size">FT_Request_Size</a></td><td><a href="#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="#FT_Select_Size">FT_Select_Size</a></td><td><a href="#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td><a href="#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</a></td><td><a href="#FT_Size_Request">FT_Size_Request</a></td><td><a href="#FT_CharMapRec">FT_CharMapRec</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="#FT_Select_Charmap">FT_Select_Charmap</a></td></tr>
-<tr><td><a href="#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="#FT_Set_Charmap">FT_Set_Charmap</a></td></tr>
-<tr><td><a href="#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td><a href="#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td></tr>
-<tr><td><a href="#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="#FT_Get_First_Char">FT_Get_First_Char</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td></tr>
-<tr><td><a href="#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td><a href="#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td></tr>
-<tr><td><a href="#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="#FT_Load_Char">FT_Load_Char</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td>&nbsp;</td><td><a href="#FT_Face_Internal">FT_Face_Internal</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_OPEN_MEMORY">FT_OPEN_MEMORY</a></td><td><a href="#FT_Size_Internal">FT_Size_Internal</a></td></tr>
-<tr><td><a href="#FT_IS_SFNT">FT_IS_SFNT</a></td><td><a href="#FT_OPEN_STREAM">FT_OPEN_STREAM</a></td><td><a href="#FT_Slot_Internal">FT_Slot_Internal</a></td></tr>
-<tr><td><a href="#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="#FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="#FT_OPEN_DRIVER">FT_OPEN_DRIVER</a></td><td><a href="#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td></tr>
-<tr><td><a href="#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="#FT_OPEN_PARAMS">FT_OPEN_PARAMS</a></td><td><a href="#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td></tr>
-<tr><td><a href="#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td>&nbsp;</td><td><a href="#FT_OPEN_XXX">FT_OPEN_XXX</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</a></td><td><a href="#FT_LOAD_XXX">FT_LOAD_XXX</a></td></tr>
-<tr><td><a href="#FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</a></td><td><a href="#FT_LOAD_RENDER">FT_LOAD_RENDER</a></td><td><a href="#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td></tr>
-<tr><td><a href="#FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</a></td><td><a href="#FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</a></td><td><a href="#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</a></td><td><a href="#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td></tr>
-<tr><td><a href="#FT_SizeRec">FT_SizeRec</a></td><td><a href="#FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="#FT_LOAD_NO_HINTING">FT_LOAD_NO_HINTING</a></td><td><a href="#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_LOAD_NO_BITMAP">FT_LOAD_NO_BITMAP</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="#FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</a></td><td><a href="#FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</a></td></tr>
-<tr><td><a href="#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="#FT_LOAD_COLOR">FT_LOAD_COLOR</a></td><td></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a></td><td><a href="#FT_Done_Face">FT_Done_Face</a></td><td><a href="#FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="#FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="#FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="#FT_Face_Properties">FT_Face_Properties</a></td><td><a href="#FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</a></td><td><a href="#FT_Open_Face">FT_Open_Face</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a></td><td><a href="#FT_Open_Args">FT_Open_Args</a></td><td><a href="#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</a></td><td><a href="#FT_Parameter">FT_Parameter</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</a></td><td><a href="#FT_Attach_File">FT_Attach_File</a></td><td><a href="#FT_Render_Glyph">FT_Render_Glyph</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a></td><td><a href="#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="#FT_Render_Mode">FT_Render_Mode</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</a></td><td>&nbsp;</td><td><a href="#FT_Get_Kerning">FT_Get_Kerning</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="#FT_Kerning_Mode">FT_Kerning_Mode</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_VARIATION">FT_FACE_FLAG_VARIATION</a></td><td><a href="#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="#FT_Request_Size">FT_Request_Size</a></td><td><a href="#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="#FT_Select_Size">FT_Select_Size</a></td><td><a href="#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</a></td><td><a href="#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td>&nbsp;</td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td><a href="#FT_CharMapRec">FT_CharMapRec</a></td></tr>
+<tr><td><a href="#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="#FT_Size_Request">FT_Size_Request</a></td><td><a href="#FT_Select_Charmap">FT_Select_Charmap</a></td></tr>
+<tr><td><a href="#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="#FT_Set_Charmap">FT_Set_Charmap</a></td></tr>
+<tr><td><a href="#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td></tr>
+<tr><td><a href="#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="#FT_Get_First_Char">FT_Get_First_Char</a></td><td><a href="#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td></tr>
+<tr><td><a href="#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td><a href="#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td></tr>
+<tr><td><a href="#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td>&nbsp;</td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Load_Char">FT_Load_Char</a></td><td><a href="#FT_Face_Internal">FT_Face_Internal</a></td></tr>
+<tr><td><a href="#FT_IS_SFNT">FT_IS_SFNT</a></td><td>&nbsp;</td><td><a href="#FT_Size_Internal">FT_Size_Internal</a></td></tr>
+<tr><td><a href="#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="#FT_OPEN_MEMORY">FT_OPEN_MEMORY</a></td><td><a href="#FT_Slot_Internal">FT_Slot_Internal</a></td></tr>
+<tr><td><a href="#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="#FT_OPEN_STREAM">FT_OPEN_STREAM</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="#FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</a></td><td><a href="#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td></tr>
+<tr><td><a href="#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td><a href="#FT_OPEN_DRIVER">FT_OPEN_DRIVER</a></td><td><a href="#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td></tr>
+<tr><td><a href="#FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</a></td><td><a href="#FT_OPEN_PARAMS">FT_OPEN_PARAMS</a></td><td><a href="#FT_OPEN_XXX">FT_OPEN_XXX</a></td></tr>
+<tr><td><a href="#FT_IS_VARIATION">FT_IS_VARIATION</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_XXX">FT_LOAD_XXX</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</a></td><td><a href="#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td></tr>
+<tr><td><a href="#FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</a></td><td><a href="#FT_LOAD_RENDER">FT_LOAD_RENDER</a></td><td><a href="#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td></tr>
+<tr><td><a href="#FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</a></td><td><a href="#FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</a></td><td><a href="#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_SizeRec">FT_SizeRec</a></td><td><a href="#FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</a></td><td><a href="#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td></tr>
+<tr><td><a href="#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="#FT_LOAD_NO_HINTING">FT_LOAD_NO_HINTING</a></td><td></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_LOAD_NO_BITMAP">FT_LOAD_NO_BITMAP</a></td><td></td></tr>
</table>
@@ -181,11 +182,11 @@
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_FaceRec_* <b>FT_Face</b>;
</pre>
-<p>A handle to a given typographic face object. A face object models a given typeface, in a given style.</p>
+<p>A handle to a typographic face object. A face object models a given typeface, in a given style.</p>
<h4>note</h4>
-<p>Each face object also owns a single <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> object, as well as one or more <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects.</p>
-<p>Use <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to create a new face object from a given filepathname or a custom input stream.</p>
+<p>A face object also owns a single <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> object, as well as one or more <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects.</p>
+<p>Use <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to create a new face object from a given filepath or a custom input stream.</p>
<p>Use <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> to destroy it (along with its slot and sizes).</p>
<p>An &lsquo;FT_Face&rsquo; object can only be safely used from one thread at a time. Similarly, creation and destruction of &lsquo;FT_Face&rsquo; with the same <a href="ft2-base_interface.html#FT_Library">FT_Library</a> object can only be done from one thread at a time. On the other hand, functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> and its siblings are thread-safe and do not need the lock to be held as long as the same &lsquo;FT_Face&rsquo; object is not used from multiple threads at the same time.</p>
@@ -202,10 +203,10 @@
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SizeRec_* <b>FT_Size</b>;
</pre>
-<p>A handle to an object used to model a face scaled to a given character size.</p>
+<p>A handle to an object that models a face scaled to a given character size.</p>
<h4>note</h4>
-<p>Each <a href="ft2-base_interface.html#FT_Face">FT_Face</a> has an <i>active</i> <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object that is used by functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to determine the scaling transformation that in turn is used to load and hint glyphs and metrics.</p>
+<p>An <a href="ft2-base_interface.html#FT_Face">FT_Face</a> has one <i>active</i> <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object that is used by functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to determine the scaling transformation that in turn is used to load and hint glyphs and metrics.</p>
<p>You can use <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a>, <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> or even <a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a> to change the content (i.e., the scaling values) of the active <a href="ft2-base_interface.html#FT_Size">FT_Size</a>.</p>
<p>You can use <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a> to create additional size objects for a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a>, but they won't be used by other functions until you activate it through <a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a>. Only one size can be activated at any given time per face.</p>
@@ -222,7 +223,7 @@
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphSlotRec_* <b>FT_GlyphSlot</b>;
</pre>
-<p>A handle to a given &lsquo;glyph slot&rsquo;. A slot is a container where it is possible to load any of the glyphs contained in its parent face.</p>
+<p>A handle to a given &lsquo;glyph slot&rsquo;. A slot is a container that can hold any of the glyphs contained in its parent face.</p>
<p>In other words, each time you call <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>, the slot's content is erased by the new glyph data, i.e., the glyph's metrics, its image (bitmap or outline), and other control information.</p>
<h4>also</h4>
@@ -238,13 +239,13 @@
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_CharMapRec_* <b>FT_CharMap</b>;
</pre>
-<p>A handle to a given character map. A charmap is used to translate character codes in a given encoding into glyph indexes for its parent's face. Some font formats may provide several charmaps per font.</p>
-<p>Each face object owns zero or more charmaps, but only one of them can be &lsquo;active&rsquo; and used by <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>.</p>
+<p>A handle to a character map (usually abbreviated to &lsquo;charmap&rsquo;). A charmap is used to translate character codes in a given encoding into glyph indexes for its parent's face. Some font formats may provide several charmaps per font.</p>
+<p>Each face object owns zero or more charmaps, but only one of them can be &lsquo;active&rsquo;, providing the data used by <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>.</p>
<p>The list of available charmaps in a face is available through the &lsquo;face-&gt;num_charmaps&rsquo; and &lsquo;face-&gt;charmaps&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
<p>The currently active charmap is available as &lsquo;face-&gt;charmap&rsquo;. You should call <a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a> to change it.</p>
<h4>note</h4>
-<p>When a new face is created (either through <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>), the library looks for a Unicode charmap within the list and automatically activates it.</p>
+<p>When a new face is created (either through <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>), the library looks for a Unicode charmap within the list and automatically activates it. If there is no Unicode charmap, FreeType doesn't set an &lsquo;active&rsquo; charmap.</p>
<h4>also</h4>
<p>See <a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a> for the publicly accessible fields of a given character map.</p>
@@ -264,14 +265,15 @@
<a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_UNICODE">FT_ENCODING_UNICODE</a>, 'u', 'n', 'i', 'c' ),
<a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>, 's', 'j', 'i', 's' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_GB2312">FT_ENCODING_GB2312</a>, 'g', 'b', ' ', ' ' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>, 'g', 'b', ' ', ' ' ),
<a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>, 'b', 'i', 'g', '5' ),
<a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>, 'w', 'a', 'n', 's' ),
<a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>, 'j', 'o', 'h', 'a' ),
- /* for backwards compatibility */
+ /* for backward compatibility */
+ FT_ENCODING_GB2312 = <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>,
<a href="ft2-base_interface.html#FT_ENCODING_MS_SJIS">FT_ENCODING_MS_SJIS</a> = <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>,
- <a href="ft2-base_interface.html#FT_ENCODING_MS_GB2312">FT_ENCODING_MS_GB2312</a> = <a href="ft2-base_interface.html#FT_ENCODING_GB2312">FT_ENCODING_GB2312</a>,
+ <a href="ft2-base_interface.html#FT_ENCODING_MS_GB2312">FT_ENCODING_MS_GB2312</a> = <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>,
<a href="ft2-base_interface.html#FT_ENCODING_MS_BIG5">FT_ENCODING_MS_BIG5</a> = <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>,
<a href="ft2-base_interface.html#FT_ENCODING_MS_WANSUNG">FT_ENCODING_MS_WANSUNG</a> = <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>,
<a href="ft2-base_interface.html#FT_ENCODING_MS_JOHAB">FT_ENCODING_MS_JOHAB</a> = <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>,
@@ -296,7 +298,7 @@
#define ft_encoding_latin_1 <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_LATIN_1">FT_ENCODING_ADOBE_LATIN_1</a>
#define ft_encoding_latin_2 <a href="ft2-base_interface.html#FT_ENCODING_OLD_LATIN_2">FT_ENCODING_OLD_LATIN_2</a>
#define ft_encoding_sjis <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>
-#define ft_encoding_gb2312 <a href="ft2-base_interface.html#FT_ENCODING_GB2312">FT_ENCODING_GB2312</a>
+#define ft_encoding_gb2312 <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>
#define ft_encoding_big5 <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>
#define ft_encoding_wansung <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>
#define ft_encoding_johab <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>
@@ -307,7 +309,7 @@
#define ft_encoding_apple_roman <a href="ft2-base_interface.html#FT_ENCODING_APPLE_ROMAN">FT_ENCODING_APPLE_ROMAN</a>
</pre>
-<p>An enumeration used to specify character sets supported by charmaps. Used in the <a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a> API function.</p>
+<p>An enumeration to specify character sets supported by charmaps. Used in the <a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a> API function.</p>
<h4>note</h4>
<p>Despite the name, this enumeration lists specific character repertories (i.e., charsets), and not text encoding methods (e.g., UTF-8, UTF-16, etc.).</p>
@@ -319,51 +321,51 @@
<p>The encoding value&nbsp;0 is reserved.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_UNICODE">FT_ENCODING_UNICODE</td><td class="desc">
-<p>Corresponds to the Unicode character set. This value covers all versions of the Unicode repertoire, including ASCII and Latin-1. Most fonts include a Unicode charmap, but not all of them.</p>
+<p>The Unicode character set. This value covers all versions of the Unicode repertoire, including ASCII and Latin-1. Most fonts include a Unicode charmap, but not all of them.</p>
<p>For example, if you want to access Unicode value U+1F028 (and the font contains it), use value 0x1F028 as the input value for <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a>.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_MS_SYMBOL">FT_ENCODING_MS_SYMBOL</td><td class="desc">
-<p>Corresponds to the Microsoft Symbol encoding, used to encode mathematical symbols and wingdings. For more information, see &lsquo;<a href="http://www.microsoft.com/typography/otspec/recom.htm">http://www.microsoft.com/typography/otspec/recom.htm</a>&rsquo;, &lsquo;<a href="http://www.kostis.net/charsets/symbol.htm">http://www.kostis.net/charsets/symbol.htm</a>&rsquo;, and &lsquo;<a href="http://www.kostis.net/charsets/wingding.htm">http://www.kostis.net/charsets/wingding.htm</a>&rsquo;.</p>
+<p>Microsoft Symbol encoding, used to encode mathematical symbols and wingdings. For more information, see &lsquo;<a href="https://www.microsoft.com/typography/otspec/recom.htm">https://www.microsoft.com/typography/otspec/recom.htm</a>&rsquo;, &lsquo;<a href="http://www.kostis.net/charsets/symbol.htm">http://www.kostis.net/charsets/symbol.htm</a>&rsquo;, and &lsquo;<a href="http://www.kostis.net/charsets/wingding.htm">http://www.kostis.net/charsets/wingding.htm</a>&rsquo;.</p>
<p>This encoding uses character codes from the PUA (Private Unicode Area) in the range U+F020-U+F0FF.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_SJIS">FT_ENCODING_SJIS</td><td class="desc">
-<p>Corresponds to Japanese SJIS encoding. More info at &lsquo;<a href="http://en.wikipedia.org/wiki/Shift_JIS">http://en.wikipedia.org/wiki/Shift_JIS</a>&rsquo;. See note on multi-byte encodings below.</p>
+<p>Shift JIS encoding for Japanese. More info at &lsquo;<a href="https://en.wikipedia.org/wiki/Shift_JIS">https://en.wikipedia.org/wiki/Shift_JIS</a>&rsquo;. See note on multi-byte encodings below.</p>
</td></tr>
-<tr><td class="val" id="FT_ENCODING_GB2312">FT_ENCODING_GB2312</td><td class="desc">
-<p>Corresponds to an encoding system for Simplified Chinese as used in mainland China.</p>
+<tr><td class="val" id="FT_ENCODING_PRC">FT_ENCODING_PRC</td><td class="desc">
+<p>Corresponds to encoding systems mainly for Simplified Chinese as used in People's Republic of China (PRC). The encoding layout is based on GB&nbsp;2312 and its supersets GBK and GB&nbsp;18030.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_BIG5">FT_ENCODING_BIG5</td><td class="desc">
<p>Corresponds to an encoding system for Traditional Chinese as used in Taiwan and Hong Kong.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</td><td class="desc">
-<p>Corresponds to the Korean encoding system known as Wansung. For more information see &lsquo;<a href="https://msdn.microsoft.com/en-US/goglobal/cc305154">https://msdn.microsoft.com/en-US/goglobal/cc305154</a>&rsquo;.</p>
+<p>Corresponds to the Korean encoding system known as Extended Wansung (MS Windows code page 949). For more information see &lsquo;<a href="https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt">https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt</a>&rsquo;.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</td><td class="desc">
-<p>The Korean standard character set (KS&nbsp;C 5601-1992), which corresponds to MS Windows code page 1361. This character set includes all possible Hangeul character combinations.</p>
+<p>The Korean standard character set (KS&nbsp;C 5601-1992), which corresponds to MS Windows code page 1361. This character set includes all possible Hangul character combinations.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_ADOBE_LATIN_1">FT_ENCODING_ADOBE_LATIN_1</td><td class="desc">
<p>Corresponds to a Latin-1 encoding as defined in a Type&nbsp;1 PostScript font. It is limited to 256 character codes.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_ADOBE_STANDARD">FT_ENCODING_ADOBE_STANDARD</td><td class="desc">
-<p>Corresponds to the Adobe Standard encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
+<p>Adobe Standard encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_ADOBE_EXPERT">FT_ENCODING_ADOBE_EXPERT</td><td class="desc">
-<p>Corresponds to the Adobe Expert encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
+<p>Adobe Expert encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_ADOBE_CUSTOM">FT_ENCODING_ADOBE_CUSTOM</td><td class="desc">
<p>Corresponds to a custom encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_APPLE_ROMAN">FT_ENCODING_APPLE_ROMAN</td><td class="desc">
-<p>Corresponds to the 8-bit Apple roman encoding. Many TrueType and OpenType fonts contain a charmap for this encoding, since older versions of Mac OS are able to use it.</p>
+<p>Apple roman encoding. Many TrueType and OpenType fonts contain a charmap for this 8-bit encoding, since older versions of Mac OS are able to use it.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_OLD_LATIN_2">FT_ENCODING_OLD_LATIN_2</td><td class="desc">
-<p>This value is deprecated and was never used nor reported by FreeType. Don't use or test for it.</p>
+<p>This value is deprecated and was neither used nor reported by FreeType. Don't use or test for it.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_MS_SJIS">FT_ENCODING_MS_SJIS</td><td class="desc">
<p>Same as FT_ENCODING_SJIS. Deprecated.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_MS_GB2312">FT_ENCODING_MS_GB2312</td><td class="desc">
-<p>Same as FT_ENCODING_GB2312. Deprecated.</p>
+<p>Same as FT_ENCODING_PRC. Deprecated.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_MS_BIG5">FT_ENCODING_MS_BIG5</td><td class="desc">
<p>Same as FT_ENCODING_BIG5. Deprecated.</p>
@@ -377,13 +379,13 @@
</table>
<h4>note</h4>
-<p>By default, FreeType automatically synthesizes a Unicode charmap for PostScript fonts, using their glyph names dictionaries. However, it also reports the encodings defined explicitly in the font file, for the cases when they are needed, with the Adobe values as well.</p>
+<p>By default, FreeType enables a Unicode charmap and tags it with FT_ENCODING_UNICODE when it is either provided or can be generated from PostScript glyph name dictionaries in the font file. All other encodings are considered legacy and tagged only if explicitly defined in the font file. Otherwise, FT_ENCODING_NONE is used.</p>
<p>FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap is neither Unicode nor ISO-8859-1 (otherwise it is set to FT_ENCODING_UNICODE). Use <a href="ft2-bdf_fonts.html#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a> to find out which encoding is really present. If, for example, the &lsquo;cs_registry&rsquo; field is &lsquo;KOI8&rsquo; and the &lsquo;cs_encoding&rsquo; field is &lsquo;R&rsquo;, the font is encoded in KOI8-R.</p>
<p>FT_ENCODING_NONE is always set (with a single exception) by the winfonts driver. Use <a href="ft2-winfnt_fonts.html#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a> and examine the &lsquo;charset&rsquo; field of the <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a> structure to find out which encoding is really present. For example, <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a> (204) means Windows code page 1251 (for Russian).</p>
-<p>FT_ENCODING_NONE is set if &lsquo;platform_id&rsquo; is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> and &lsquo;encoding_id&rsquo; is not <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ROMAN</a> (otherwise it is set to FT_ENCODING_APPLE_ROMAN).</p>
+<p>FT_ENCODING_NONE is set if &lsquo;platform_id&rsquo; is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> and &lsquo;encoding_id&rsquo; is not &lsquo;TT_MAC_ID_ROMAN&rsquo; (otherwise it is set to FT_ENCODING_APPLE_ROMAN).</p>
<p>If &lsquo;platform_id&rsquo; is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a>, use the function <a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a> to query the Mac language ID that may be needed to be able to distinguish Apple encoding variants. See</p>
-<p><a href="http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt">http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt</a></p>
-<p>to get an idea how to do that. Basically, if the language ID is&nbsp;0, don't use it, otherwise subtract 1 from the language ID. Then examine &lsquo;encoding_id&rsquo;. If, for example, &lsquo;encoding_id&rsquo; is <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ROMAN</a> and the language ID (minus&nbsp;1) is &lsquo;TT_MAC_LANGID_GREEK&rsquo;, it is the Greek encoding, not Roman. <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARABIC</a> with &lsquo;TT_MAC_LANGID_FARSI&rsquo; means the Farsi variant the Arabic encoding.</p>
+<p><a href="https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt">https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt</a></p>
+<p>to get an idea how to do that. Basically, if the language ID is&nbsp;0, don't use it, otherwise subtract 1 from the language ID. Then examine &lsquo;encoding_id&rsquo;. If, for example, &lsquo;encoding_id&rsquo; is &lsquo;TT_MAC_ID_ROMAN&rsquo; and the language ID (minus&nbsp;1) is &lsquo;TT_MAC_LANGID_GREEK&rsquo;, it is the Greek encoding, not Roman. &lsquo;TT_MAC_ID_ARABIC&rsquo; with &lsquo;TT_MAC_LANGID_FARSI&rsquo; means the Farsi variant the Arabic encoding.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -482,22 +484,24 @@
<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="num_faces">num_faces</td><td class="desc">
-<p>The number of faces in the font file. Some font formats can have multiple faces in a font file.</p>
+<p>The number of faces in the font file. Some font formats can have multiple faces in a single font file.</p>
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>This field holds two different values. Bits 0-15 are the index of the face in the font file (starting with value&nbsp;0). They are set to&nbsp;0 if there is only one face in the font file.</p>
-<p>Bits 16-30 are relevant to GX variation fonts only, holding the named instance index for the current face index (starting with value&nbsp;1; value&nbsp;0 indicates font access without GX variation data). For non-GX fonts, bits 16-30 are ignored. If we have the third named instance of face&nbsp;4, say, &lsquo;face_index&rsquo; is set to 0x00030004.</p>
+<p>[Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation fonts only, holding the named instance index for the current face index (starting with value&nbsp;1; value&nbsp;0 indicates font access without a named instance). For non-variation fonts, bits 16-30 are ignored. If we have the third named instance of face&nbsp;4, say, &lsquo;face_index&rsquo; is set to 0x00030004.</p>
<p>Bit 31 is always zero (this is, &lsquo;face_index&rsquo; is always a positive value).</p>
+<p>[Since 2.9] Changing the design coordinates with <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> or <a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a> does not influence the named instance index value (only <a href="ft2-multiple_masters.html#FT_Set_Named_Instance">FT_Set_Named_Instance</a> does that).</p>
</td></tr>
<tr><td class="val" id="face_flags">face_flags</td><td class="desc">
<p>A set of bit flags that give important information about the face; see <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a> for the details.</p>
</td></tr>
<tr><td class="val" id="style_flags">style_flags</td><td class="desc">
-<p>The lower 16&nbsp;bits contain a set of bit flags indicating the style of the face; see <a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a> for the details. Bits 16-30 hold the number of named instances available for the current face if we have a GX variation (sub)font. Bit 31 is always zero (this is, &lsquo;style_flags&rsquo; is always a positive value).</p>
+<p>The lower 16&nbsp;bits contain a set of bit flags indicating the style of the face; see <a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a> for the details.</p>
+<p>[Since 2.6.1] Bits 16-30 hold the number of named instances available for the current face if we have a GX or OpenType variation (sub)font. Bit 31 is always zero (this is, &lsquo;style_flags&rsquo; is always a positive value). Note that a variation font has always at least one named instance, namely the default instance.</p>
</td></tr>
<tr><td class="val" id="num_glyphs">num_glyphs</td><td class="desc">
<p>The number of glyphs in the face. If the face is scalable and has sbits (see &lsquo;num_fixed_sizes&rsquo;), it is set to the number of outline glyphs.</p>
-<p>For CID-keyed fonts, this value gives the highest CID used in the font.</p>
+<p>For CID-keyed fonts (not in an SFNT wrapper) this value gives the highest CID used in the font.</p>
</td></tr>
<tr><td class="val" id="family_name">family_name</td><td class="desc">
<p>The face's family name. This is an ASCII string, usually in English, that describes the typeface's family (like &lsquo;Times New Roman&rsquo;, &lsquo;Bodoni&rsquo;, &lsquo;Garamond&rsquo;, etc). This is a least common denominator used to list fonts. Some formats (TrueType &amp; OpenType) provide localized and Unicode versions of this string. Applications should use the format specific interface to access them. Can be NULL (e.g., in fonts embedded in a PDF file).</p>
@@ -533,7 +537,7 @@
<p>The typographic ascender of the face, expressed in font units. For font formats not having this information, it is set to &lsquo;bbox.yMax&rsquo;. Only relevant for scalable formats.</p>
</td></tr>
<tr><td class="val" id="descender">descender</td><td class="desc">
-<p>The typographic descender of the face, expressed in font units. For font formats not having this information, it is set to &lsquo;bbox.yMin&rsquo;. Note that this field is usually negative. Only relevant for scalable formats.</p>
+<p>The typographic descender of the face, expressed in font units. For font formats not having this information, it is set to &lsquo;bbox.yMin&rsquo;. Note that this field is negative for values below the baseline. Only relevant for scalable formats.</p>
</td></tr>
<tr><td class="val" id="height">height</td><td class="desc">
<p>This value is the vertical distance between two consecutive baselines, expressed in font units. It is always positive. Only relevant for scalable formats.</p>
@@ -564,6 +568,8 @@
<h4>note</h4>
<p>Fields may be changed after a call to <a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a> or <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>.</p>
+<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;ascender&rsquo;, &lsquo;descender&rsquo;, &lsquo;height&rsquo;, &lsquo;underline_position&rsquo;, and &lsquo;underline_thickness&rsquo;.</p>
+<p>Especially for TrueType fonts see also the documentation for <a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a>.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -637,27 +643,30 @@
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
-<h3 id="FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</h3>
+<h3 id="FT_HAS_COLOR">FT_HAS_COLOR</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
-#define <b>FT_HAS_MULTIPLE_MASTERS</b>( face ) \
- ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a> )
+#define <b>FT_HAS_COLOR</b>( face ) \
+ ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a> )
</pre>
-<p>A macro that returns true whenever a face object contains some multiple masters. The functions provided by <a href="ft2-header_file_macros.html#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a> are then available to choose the exact design you want.</p>
+<p>A macro that returns true whenever a face object contains tables for color glyphs.</p>
+
+<h4>since</h4>
+<p>2.5.1</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
-<h3 id="FT_HAS_COLOR">FT_HAS_COLOR</h3>
+<h3 id="FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
-#define <b>FT_HAS_COLOR</b>( face ) \
- ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a> )
+#define <b>FT_HAS_MULTIPLE_MASTERS</b>( face ) \
+ ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a> )
</pre>
-<p>A macro that returns true whenever a face object contains tables for color glyphs.</p>
+<p>A macro that returns true whenever a face object contains some multiple masters. The functions provided by <a href="ft2-header_file_macros.html#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a> are then available to choose the exact design you want.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -684,7 +693,7 @@
( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a> )
</pre>
-<p>A macro that returns true whenever a face object contains a scalable font face (true for TrueType, Type&nbsp;1, Type&nbsp;42, CID, OpenType/CFF, and PFR font formats.</p>
+<p>A macro that returns true whenever a face object contains a scalable font face (true for TrueType, Type&nbsp;1, Type&nbsp;42, CID, OpenType/CFF, and PFR font formats).</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -730,6 +739,39 @@
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
+<h3 id="FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</h3>
+<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
+<pre>
+#define <b>FT_IS_NAMED_INSTANCE</b>( face ) \
+ ( (face)-&gt;face_index &amp; 0x7FFF0000L )
+</pre>
+
+<p>A macro that returns true whenever a face object is a named instance of a GX or OpenType variation font.</p>
+<p>[Since 2.9] Changing the design coordinates with <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> or <a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a> does not influence the return value of this macro (only <a href="ft2-multiple_masters.html#FT_Set_Named_Instance">FT_Set_Named_Instance</a> does that).</p>
+
+<h4>since</h4>
+<p>2.7</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_IS_VARIATION">FT_IS_VARIATION</h3>
+<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
+<pre>
+#define <b>FT_IS_VARIATION</b>( face ) \
+ ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_VARIATION">FT_FACE_FLAG_VARIATION</a> )
+</pre>
+
+<p>A macro that returns true whenever a face object has been altered by <a href="ft2-multiple_masters.html#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a>, <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a>, or <a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a>.</p>
+
+<h4>since</h4>
+<p>2.9</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
<h3 id="FT_SizeRec">FT_SizeRec</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
@@ -792,30 +834,58 @@
<p>The height of the scaled EM square in pixels, hence the term &lsquo;ppem&rsquo; (pixels per EM). It is also referred to as &lsquo;nominal height&rsquo;.</p>
</td></tr>
<tr><td class="val" id="x_scale">x_scale</td><td class="desc">
-<p>A 16.16 fractional scaling value used to convert horizontal metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
+<p>A 16.16 fractional scaling value to convert horizontal metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
</td></tr>
<tr><td class="val" id="y_scale">y_scale</td><td class="desc">
-<p>A 16.16 fractional scaling value used to convert vertical metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
+<p>A 16.16 fractional scaling value to convert vertical metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
</td></tr>
<tr><td class="val" id="ascender">ascender</td><td class="desc">
-<p>The ascender in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
+<p>The ascender in 26.6 fractional pixels, rounded up to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
<tr><td class="val" id="descender">descender</td><td class="desc">
-<p>The descender in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
+<p>The descender in 26.6 fractional pixels, rounded down to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
<tr><td class="val" id="height">height</td><td class="desc">
-<p>The height in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
+<p>The height in 26.6 fractional pixels, rounded to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
<tr><td class="val" id="max_advance">max_advance</td><td class="desc">
-<p>The maximum advance width in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
+<p>The maximum advance width in 26.6 fractional pixels, rounded to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
</table>
<h4>note</h4>
-<p>The scaling values, if relevant, are determined first during a size changing operation. The remaining fields are then set by the driver. For scalable formats, they are usually set to scaled values of the corresponding fields in <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
-<p>Note that due to glyph hinting, these values might not be exact for certain fonts. Thus they must be treated as unreliable with an error margin of at least one pixel!</p>
+<p>The scaling values, if relevant, are determined first during a size changing operation. The remaining fields are then set by the driver. For scalable formats, they are usually set to scaled values of the corresponding fields in <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>. Some values like ascender or descender are rounded for historical reasons; more precise values (for outline fonts) can be derived by scaling the corresponding <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> values manually, with code similar to the following.</p>
+<pre class="colored">
+ scaled_ascender = FT_MulFix( face-&gt;ascender,
+ size_metrics-&gt;y_scale );
+</pre>
+<p>Note that due to glyph hinting and the selected rendering mode these values are usually not exact; consequently, they must be treated as unreliable with an error margin of at least one pixel!</p>
<p>Indeed, the only way to get the exact metrics is to render <i>all</i> glyphs. As this would be a definite performance hit, it is up to client applications to perform such computations.</p>
-<p>The FT_Size_Metrics structure is valid for bitmap fonts also.</p>
+<p>The &lsquo;FT_Size_Metrics&rsquo; structure is valid for bitmap fonts also.</p>
+<p><b>TrueType</b> <b>fonts</b> <b>with</b> <b>native</b> <b>bytecode</b> <b>hinting</b></p>
+<p>All applications that handle TrueType fonts with native hinting must be aware that TTFs expect different rounding of vertical font dimensions. The application has to cater for this, especially if it wants to rely on a TTF's vertical data (for example, to properly align box characters vertically).</p>
+<p>Only the application knows <i>in</i> <i>advance</i> that it is going to use native hinting for TTFs! FreeType, on the other hand, selects the hinting mode not at the time of creating an <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object but much later, namely while calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
+<p>Here is some pseudo code that illustrates a possible solution.</p>
+<pre class="colored">
+ font_format = FT_Get_Font_Format( face );
+
+ if ( !strcmp( font_format, "TrueType" ) &amp;&amp;
+ do_native_bytecode_hinting )
+ {
+ ascender = ROUND( FT_MulFix( face-&gt;ascender,
+ size_metrics-&gt;y_scale ) );
+ descender = ROUND( FT_MulFix( face-&gt;descender,
+ size_metrics-&gt;y_scale ) );
+ }
+ else
+ {
+ ascender = size_metrics-&gt;ascender;
+ descender = size_metrics-&gt;descender;
+ }
+
+ height = size_metrics-&gt;height;
+ max_advance = size_metrics-&gt;max_advance;
+</pre>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -891,19 +961,19 @@
<p>This shorthand is, depending on <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a>, the transformed (hinted) advance width for the glyph, in 26.6 fractional pixel format. As specified with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a>, it uses either the &lsquo;horiAdvance&rsquo; or the &lsquo;vertAdvance&rsquo; value of &lsquo;metrics&rsquo; field.</p>
</td></tr>
<tr><td class="val" id="format">format</td><td class="desc">
-<p>This field indicates the format of the image contained in the glyph slot. Typically <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>, <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>, or <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>, but others are possible.</p>
+<p>This field indicates the format of the image contained in the glyph slot. Typically <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>, <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>, or <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>, but other values are possible.</p>
</td></tr>
<tr><td class="val" id="bitmap">bitmap</td><td class="desc">
-<p>This field is used as a bitmap descriptor when the slot format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>. Note that the address and content of the bitmap buffer can change between calls of <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> and a few other functions.</p>
+<p>This field is used as a bitmap descriptor. Note that the address and content of the bitmap buffer can change between calls of <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> and a few other functions.</p>
</td></tr>
<tr><td class="val" id="bitmap_left">bitmap_left</td><td class="desc">
-<p>The bitmap's left bearing expressed in integer pixels. Only valid if the format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>, this is, if the glyph slot contains a bitmap.</p>
+<p>The bitmap's left bearing expressed in integer pixels.</p>
</td></tr>
<tr><td class="val" id="bitmap_top">bitmap_top</td><td class="desc">
-<p>The bitmap's top bearing expressed in integer pixels. Remember that this is the distance from the baseline to the top-most glyph scanline, upwards y&nbsp;coordinates being <b>positive</b>.</p>
+<p>The bitmap's top bearing expressed in integer pixels. This is the distance from the baseline to the top-most glyph scanline, upwards y&nbsp;coordinates being <b>positive</b>.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
-<p>The outline descriptor for the current glyph image if its format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>. Once a glyph is loaded, &lsquo;outline&rsquo; can be transformed, distorted, embolded, etc. However, it must not be freed.</p>
+<p>The outline descriptor for the current glyph image if its format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>. Once a glyph is loaded, &lsquo;outline&rsquo; can be transformed, distorted, emboldened, etc. However, it must not be freed.</p>
</td></tr>
<tr><td class="val" id="num_subglyphs">num_subglyphs</td><td class="desc">
<p>The number of subglyphs in a composite glyph. This field is only valid for the composite glyph format that should normally only be loaded with the <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a> flag.</p>
@@ -912,13 +982,13 @@
<p>An array of subglyph descriptors for composite glyphs. There are &lsquo;num_subglyphs&rsquo; elements in there. Currently internal to FreeType.</p>
</td></tr>
<tr><td class="val" id="control_data">control_data</td><td class="desc">
-<p>Certain font drivers can also return the control data for a given glyph image (e.g. TrueType bytecode, Type&nbsp;1 charstrings, etc.). This field is a pointer to such data.</p>
+<p>Certain font drivers can also return the control data for a given glyph image (e.g. TrueType bytecode, Type&nbsp;1 charstrings, etc.). This field is a pointer to such data; it is currently internal to FreeType.</p>
</td></tr>
<tr><td class="val" id="control_len">control_len</td><td class="desc">
-<p>This is the length in bytes of the control data.</p>
+<p>This is the length in bytes of the control data. Currently internal to FreeType.</p>
</td></tr>
<tr><td class="val" id="other">other</td><td class="desc">
-<p>Really wicked formats can use this pointer to present their own glyph image to client applications. Note that the application needs to know about the image format.</p>
+<p>Reserved.</p>
</td></tr>
<tr><td class="val" id="lsb_delta">lsb_delta</td><td class="desc">
<p>The difference between hinted and unhinted left side bearing while auto-hinting is active. Zero otherwise.</p>
@@ -929,32 +999,53 @@
</table>
<h4>note</h4>
-<p>If <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> is called with default flags (see <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a>) the glyph image is loaded in the glyph slot in its native format (e.g., an outline glyph for TrueType and Type&nbsp;1 formats).</p>
-<p>This image can later be converted into a bitmap by calling <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. This function finds the current renderer for the native image's format, then invokes it.</p>
+<p>If <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> is called with default flags (see <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a>) the glyph image is loaded in the glyph slot in its native format (e.g., an outline glyph for TrueType and Type&nbsp;1 formats). [Since 2.9] The prospective bitmap metrics are calculated according to <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> and other flags even for the outline glyph, even if <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a> is not set.</p>
+<p>This image can later be converted into a bitmap by calling <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. This function searches the current renderer for the native image's format, then invokes it.</p>
<p>The renderer is in charge of transforming the native image through the slot's face transformation fields, then converting it into a bitmap that is returned in &lsquo;slot-&gt;bitmap&rsquo;.</p>
<p>Note that &lsquo;slot-&gt;bitmap_left&rsquo; and &lsquo;slot-&gt;bitmap_top&rsquo; are also used to specify the position of the bitmap relative to the current pen position (e.g., coordinates (0,0) on the baseline). Of course, &lsquo;slot-&gt;format&rsquo; is also changed to <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>.</p>
-<p>Here is a small pseudo code fragment that shows how to use &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo;:</p>
+<p>Here is a small pseudo code fragment that shows how to use &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; to do fractional positioning of glyphs:</p>
<pre class="colored">
- FT_Pos origin_x = 0;
- FT_Pos prev_rsb_delta = 0;
+ FT_GlyphSlot slot = face-&gt;glyph;
+ FT_Pos origin_x = 0;
for all glyphs do
- &lt;compute kern between current and previous glyph and add it to
- `origin_x'&gt;
+ &lt;load glyph with `FT_Load_Glyph'&gt;
+
+ FT_Outline_Translate( slot-&gt;outline, origin_x &amp; 63, 0 );
+
+ &lt;save glyph image, or render glyph, or ...&gt;
+
+ &lt;compute kern between current and next glyph
+ and add it to `origin_x'&gt;
+
+ origin_x += slot-&gt;advance.x;
+ origin_x += slot-&gt;rsb_delta - slot-&gt;lsb_delta;
+ endfor
+</pre>
+<p>Here is another small pseudo code fragment that shows how to use &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; to improve integer positioning of glyphs:</p>
+<pre class="colored">
+ FT_GlyphSlot slot = face-&gt;glyph;
+ FT_Pos origin_x = 0;
+ FT_Pos prev_rsb_delta = 0;
+
+
+ for all glyphs do
+ &lt;compute kern between current and previous glyph
+ and add it to `origin_x'&gt;
&lt;load glyph with `FT_Load_Glyph'&gt;
- if ( prev_rsb_delta - face-&gt;glyph-&gt;lsb_delta &gt;= 32 )
+ if ( prev_rsb_delta - slot-&gt;lsb_delta &gt; 32 )
origin_x -= 64;
- else if ( prev_rsb_delta - face-&gt;glyph-&gt;lsb_delta &lt; -32 )
+ else if ( prev_rsb_delta - slot-&gt;lsb_delta &lt; -31 )
origin_x += 64;
- prev_rsb_delta = face-&gt;glyph-&gt;rsb_delta;
+ prev_rsb_delta = slot-&gt;rsb_delta;
&lt;save glyph image, or render glyph, or ...&gt;
- origin_x += face-&gt;glyph-&gt;advance.x;
+ origin_x += slot-&gt;advance.x;
endfor
</pre>
<p>If you use strong auto-hinting, you <b>must</b> apply these delta values! Otherwise you will experience far too large inter-glyph spacing at small rendering sizes in most cases. Note that it doesn't harm to use the above code for other hinting modes also, since the delta values are zero then.</p>
@@ -982,7 +1073,7 @@
} <b>FT_Glyph_Metrics</b>;
</pre>
-<p>A structure used to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel format; if the flag <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> has been used while loading the glyph, values are expressed in font units instead.</p>
+<p>A structure to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel format; if the flag <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> has been used while loading the glyph, values are expressed in font units instead.</p>
<h4>fields</h4>
<table class="fields">
@@ -1015,6 +1106,7 @@
<h4>note</h4>
<p>If not disabled with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a>, the values represent dimensions of the hinted glyph (in case hinting is applicable).</p>
<p>Stroking a glyph with an outside border does not increase &lsquo;horiAdvance&rsquo; or &lsquo;vertAdvance&rsquo;; you have to manually adjust these values to account for the added width and height.</p>
+<p>FreeType doesn't use the &lsquo;VORG&rsquo; table data for CFF fonts because it doesn't have an interface to quickly retrieve the glyph height. The y&nbsp;coordinate of the vertical origin can be simply computed as &lsquo;vertBearingY + height&rsquo; after loading a glyph.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -1074,7 +1166,7 @@
</table>
<h4>note</h4>
-<p>Windows FNT: The nominal size given in a FNT font is not reliable. Thus when the driver finds it incorrect, it sets &lsquo;size&rsquo; to some calculated values and sets &lsquo;x_ppem&rsquo; and &lsquo;y_ppem&rsquo; to the pixel width and height given in the font, respectively.</p>
+<p>Windows FNT: The nominal size given in a FNT font is not reliable. If the driver finds it incorrect, it sets &lsquo;size&rsquo; to some calculated values, and &lsquo;x_ppem&rsquo; and &lsquo;y_ppem&rsquo; to the pixel width and height given in the font, respectively.</p>
<p>TrueType embedded bitmaps: &lsquo;size&rsquo;, &lsquo;width&rsquo;, and &lsquo;height&rsquo; values are not contained in the bitmap strike itself. They are computed from the global font parameters.</p>
<hr>
@@ -1101,9 +1193,10 @@
<p>FreeType error code. 0&nbsp;means success.</p>
<h4>note</h4>
-<p>In case you want to provide your own memory allocating routines, use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> instead, followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> (or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>).</p>
+<p>In case you want to provide your own memory allocating routines, use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> instead, followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> (or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>) and <a href="ft2-module_management.html#FT_Set_Default_Properties">FT_Set_Default_Properties</a>.</p>
<p>See the documentation of <a href="ft2-base_interface.html#FT_Library">FT_Library</a> and <a href="ft2-base_interface.html#FT_Face">FT_Face</a> for multi-threading issues.</p>
<p>If you need reference-counting (cf. <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>), use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> and <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a>.</p>
+<p>If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is set, this function reads the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable to control driver properties. See section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; for more.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -1142,7 +1235,7 @@
<a href="ft2-base_interface.html#FT_Face">FT_Face</a> *aface );
</pre>
-<p>This function calls <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font by its pathname.</p>
+<p>Call <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font by its pathname.</p>
<h4>inout</h4>
<table class="fields">
@@ -1242,7 +1335,7 @@
<a href="ft2-base_interface.html#FT_Face">FT_Face</a> *aface );
</pre>
-<p>This function calls <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font that has been loaded into memory.</p>
+<p>Call <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font that has been loaded into memory.</p>
<h4>inout</h4>
<table class="fields">
@@ -1281,6 +1374,85 @@
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
+<h3 id="FT_Face_Properties">FT_Face_Properties</h3>
+<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Face_Properties</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> num_properties,
+ <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a>* properties );
+</pre>
+
+<p>Set or override certain (library or module-wide) properties on a face-by-face basis. Useful for finer-grained control and avoiding locks on shared structures (threads can modify their own faces as they see fit).</p>
+<p>Contrary to <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a>, this function uses <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> so that you can pass multiple properties to the target face in one call. Note that only a subset of the available properties can be controlled.</p>
+<p>* <a href="ft2-parameter_tags.html#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a> (stem darkening, corresponding to the property &lsquo;no-stem-darkening&rsquo; provided by the &lsquo;autofit&rsquo;, &lsquo;cff&rsquo;, &lsquo;type1&rsquo;, and &lsquo;t1cid&rsquo; modules; see <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a>).</p>
+<p>* <a href="ft2-parameter_tags.html#FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a> (LCD filter weights, corresponding to function <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a>).</p>
+<p>* <a href="ft2-parameter_tags.html#FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</a> (seed value for the CFF, Type&nbsp;1, and CID &lsquo;random&rsquo; operator, corresponding to the &lsquo;random-seed&rsquo; property provided by the &lsquo;cff&rsquo;, &lsquo;type1&rsquo;, and &lsquo;t1cid&rsquo; modules; see <a href="ft2-properties.html#random-seed">random-seed</a>).</p>
+<p>Pass NULL as &lsquo;data&rsquo; in <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> for a given tag to reset the option and use the library or module default again.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face object.</p>
+</td></tr>
+<tr><td class="val" id="num_properties">num_properties</td><td class="desc">
+<p>The number of properties that follow.</p>
+</td></tr>
+<tr><td class="val" id="properties">properties</td><td class="desc">
+<p>A handle to an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> array with &lsquo;num_properties&rsquo; elements.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>Here an example that sets three properties. You must define FT_CONFIG_OPTION_SUBPIXEL_RENDERING to make the LCD filter examples work.</p>
+<pre class="colored">
+ FT_Parameter property1;
+ FT_Bool darken_stems = 1;
+
+ FT_Parameter property2;
+ FT_LcdFiveTapFilter custom_weight =
+ { 0x11, 0x44, 0x56, 0x44, 0x11 };
+
+ FT_Parameter property3;
+ FT_Int32 random_seed = 314159265;
+
+ FT_Parameter properties[3] = { property1,
+ property2,
+ property3 };
+
+
+ property1.tag = FT_PARAM_TAG_STEM_DARKENING;
+ property1.data = &amp;darken_stems;
+
+ property2.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
+ property2.data = custom_weight;
+
+ property3.tag = FT_PARAM_TAG_RANDOM_SEED;
+ property3.data = &amp;random_seed;
+
+ FT_Face_Properties( face, 3, properties );
+</pre>
+<p>The next example resets a single property to its default value.</p>
+<pre class="colored">
+ FT_Parameter property;
+
+
+ property.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
+ property.data = NULL;
+
+ FT_Face_Properties( face, 1, &amp;property );
+</pre>
+
+<h4>since</h4>
+<p>2.8</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
<h3 id="FT_Open_Face">FT_Open_Face</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
@@ -1307,8 +1479,8 @@
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>This field holds two different values. Bits 0-15 are the index of the face in the font file (starting with value&nbsp;0). Set it to&nbsp;0 if there is only one face in the font file.</p>
-<p>Bits 16-30 are relevant to GX variation fonts only, specifying the named instance index for the current face index (starting with value&nbsp;1; value&nbsp;0 makes FreeType ignore named instances). For non-GX fonts, bits 16-30 are ignored. Assuming that you want to access the third named instance in face&nbsp;4, &lsquo;face_index&rsquo; should be set to 0x00030004. If you want to access face&nbsp;4 without GX variation handling, simply set &lsquo;face_index&rsquo; to value&nbsp;4.</p>
-<p>FT_Open_Face and its siblings can be used to quickly check whether the font format of a given font resource is supported by FreeType. In general, if the &lsquo;face_index&rsquo; argument is negative, the function's return value is&nbsp;0 if the font format is recognized, or non-zero otherwise. The function allocates a more or less empty face handle in &lsquo;*aface&rsquo; (if &lsquo;aface&rsquo; isn't NULL); the only two useful fields in this special case are &lsquo;face-&gt;num_faces&rsquo; and &lsquo;face-&gt;style_flags&rsquo;. For any negative value of &lsquo;face_index&rsquo;, &lsquo;face-&gt;num_faces&rsquo; gives the number of faces within the font file. For the negative value &lsquo;-(N+1)&rsquo; (with &lsquo;N&rsquo; a 16-bit value), bits 16-30 in &lsquo;face-&gt;style_flags&rsquo; give the number of named instances in face &lsquo;N&rsquo; if we have a GX variation font (or zero otherwise). After examination, the returned <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure should be deallocated with a call to <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
+<p>[Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation fonts only, specifying the named instance index for the current face index (starting with value&nbsp;1; value&nbsp;0 makes FreeType ignore named instances). For non-variation fonts, bits 16-30 are ignored. Assuming that you want to access the third named instance in face&nbsp;4, &lsquo;face_index&rsquo; should be set to 0x00030004. If you want to access face&nbsp;4 without variation handling, simply set &lsquo;face_index&rsquo; to value&nbsp;4.</p>
+<p>&lsquo;FT_Open_Face&rsquo; and its siblings can be used to quickly check whether the font format of a given font resource is supported by FreeType. In general, if the &lsquo;face_index&rsquo; argument is negative, the function's return value is&nbsp;0 if the font format is recognized, or non-zero otherwise. The function allocates a more or less empty face handle in &lsquo;*aface&rsquo; (if &lsquo;aface&rsquo; isn't NULL); the only two useful fields in this special case are &lsquo;face-&gt;num_faces&rsquo; and &lsquo;face-&gt;style_flags&rsquo;. For any negative value of &lsquo;face_index&rsquo;, &lsquo;face-&gt;num_faces&rsquo; gives the number of faces within the font file. For the negative value &lsquo;-(N+1)&rsquo; (with &lsquo;N&rsquo; a non-negative 16-bit value), bits 16-30 in &lsquo;face-&gt;style_flags&rsquo; give the number of named instances in face &lsquo;N&rsquo; if we have a variation font (or zero otherwise). After examination, the returned <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure should be deallocated with a call to <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
</td></tr>
</table>
@@ -1408,7 +1580,7 @@
} <b>FT_Open_Args</b>;
</pre>
-<p>A structure used to indicate how to open a new font file or stream. A pointer to such a structure can be used as a parameter for the functions <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>.</p>
+<p>A structure to indicate how to open a new font file or stream. A pointer to such a structure can be used as a parameter for the functions <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>.</p>
<h4>fields</h4>
<table class="fields">
@@ -1428,7 +1600,7 @@
<p>A handle to a source stream object.</p>
</td></tr>
<tr><td class="val" id="driver">driver</td><td class="desc">
-<p>This field is exclusively used by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>; it simply specifies the font driver to use to open the face. If set to&nbsp;0, FreeType tries to load the face with each one of the drivers in its list.</p>
+<p>This field is exclusively used by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>; it simply specifies the font driver to use for opening the face. If set to NULL, FreeType tries to load the face with each one of the drivers in its list.</p>
</td></tr>
<tr><td class="val" id="num_params">num_params</td><td class="desc">
<p>The number of extra parameters.</p>
@@ -1445,7 +1617,7 @@
<p>Otherwise, if the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a> bit is set, assume that this is a normal file and use &lsquo;pathname&rsquo; to open it.</p>
<p>If the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a> bit is set, <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> only tries to open the file with the driver whose handler is in &lsquo;driver&rsquo;.</p>
<p>If the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a> bit is set, the parameters given by &lsquo;num_params&rsquo; and &lsquo;params&rsquo; is used. They are ignored otherwise.</p>
-<p>Ideally, both the &lsquo;pathname&rsquo; and &lsquo;params&rsquo; fields should be tagged as &lsquo;const&rsquo;; this is missing for API backwards compatibility. In other words, applications should treat them as read-only.</p>
+<p>Ideally, both the &lsquo;pathname&rsquo; and &lsquo;params&rsquo; fields should be tagged as &lsquo;const&rsquo;; this is missing for API backward compatibility. In other words, applications should treat them as read-only.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -1462,7 +1634,7 @@
} <b>FT_Parameter</b>;
</pre>
-<p>A simple structure used to pass more or less generic parameters to <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>.</p>
+<p>A simple structure to pass more or less generic parameters to <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>.</p>
<h4>fields</h4>
<table class="fields">
@@ -1475,7 +1647,7 @@
</table>
<h4>note</h4>
-<p>The ID and function of parameters are driver-specific. See the various FT_PARAM_TAG_XXX flags for more information.</p>
+<p>The ID and function of parameters are driver-specific. See section &lsquo;<a href="ft2-parameter_tags.html#parameter_tags">Parameter Tags</a>&rsquo; for more information.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -1489,7 +1661,7 @@
<span class="keyword">const</span> <span class="keyword">char</span>* filepathname );
</pre>
-<p>This function calls <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a> to attach a file.</p>
+<p>Call <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a> to attach a file.</p>
<h4>inout</h4>
<table class="fields">
@@ -1541,7 +1713,7 @@
<h4>note</h4>
<p>The meaning of the &lsquo;attach&rsquo; (i.e., what really happens when the new file is read) is not fixed by FreeType itself. It really depends on the font format (and thus the font driver).</p>
-<p>Client applications are expected to know what they are doing when invoking this function. Most drivers simply do not implement file attachments.</p>
+<p>Client applications are expected to know what they are doing when invoking this function. Most drivers simply do not implement file or stream attachments.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -1558,7 +1730,7 @@
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> vert_resolution );
</pre>
-<p>This function calls <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in points).</p>
+<p>Call <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in points).</p>
<h4>inout</h4>
<table class="fields">
@@ -1587,6 +1759,7 @@
<p>FreeType error code. 0&nbsp;means success.</p>
<h4>note</h4>
+<p>While this function allows fractional points as input values, the resulting ppem value for the given resolution is always rounded to the nearest integer.</p>
<p>If either the character width or height is zero, it is set equal to the other value.</p>
<p>If either the horizontal or vertical resolution is zero, it is set equal to the other value.</p>
<p>A character width or height smaller than 1pt is set to 1pt; if both resolution values are zero, they are set to 72dpi.</p>
@@ -1605,7 +1778,7 @@
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> pixel_height );
</pre>
-<p>This function calls <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in pixels).</p>
+<p>Call <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in pixels).</p>
<h4>inout</h4>
<table class="fields">
@@ -1628,7 +1801,7 @@
<p>FreeType error code. 0&nbsp;means success.</p>
<h4>note</h4>
-<p>You should not rely on the resulting glyphs matching, or being constrained, to this pixel size. Refer to <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to understand how requested sizes relate to actual sizes.</p>
+<p>You should not rely on the resulting glyphs matching or being constrained to this pixel size. Refer to <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to understand how requested sizes relate to actual sizes.</p>
<p>Don't use this function if you are using the FreeType cache API.</p>
<hr>
@@ -1664,7 +1837,8 @@
<h4>note</h4>
<p>Although drivers may select the bitmap strike matching the request, you should not rely on this if you intend to select a particular bitmap strike. Use <a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a> instead in that case.</p>
-<p>The relation between the requested size and the resulting glyph size is dependent entirely on how the size is defined in the source face. The font designer chooses the final size of each glyph relative to this size. For more information refer to &lsquo;<a href="http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html">http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html</a>&rsquo;</p>
+<p>The relation between the requested size and the resulting glyph size is dependent entirely on how the size is defined in the source face. The font designer chooses the final size of each glyph relative to this size. For more information refer to &lsquo;<a href="https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html">https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html</a>&rsquo;.</p>
+<p>Contrary to <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, this function doesn't have special code to normalize zero-valued widths, heights, or resolutions (which lead to errors in most cases).</p>
<p>Don't use this function if you are using the FreeType cache API.</p>
<hr>
@@ -1700,7 +1874,7 @@
<h4>note</h4>
<p>For bitmaps embedded in outline fonts it is common that only a subset of the available glyphs at a given ppem value is available. FreeType silently uses outlines if there is no bitmap for a given glyph index.</p>
-<p>For GX variation fonts, a bitmap strike makes sense only if the default instance is active (this is, no glyph variation takes place); otherwise, FreeType simply ignores bitmap strikes. The same is true for all named instances that are different from the default instance.</p>
+<p>For GX and OpenType variation fonts, a bitmap strike makes sense only if the default instance is active (this is, no glyph variation takes place); otherwise, FreeType simply ignores bitmap strikes. The same is true for all named instances that are different from the default instance.</p>
<p>Don't use this function if you are using the FreeType cache API.</p>
<hr>
@@ -1732,7 +1906,7 @@
<p>This is the standard scaling found in most applications. In particular, use this size request type for TrueType fonts if they provide optical scaling or something similar. Note, however, that &lsquo;units_per_EM&rsquo; is a rather abstract value which bears no relation to the actual size of the glyphs in a font.</p>
</td></tr>
<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_REAL_DIM">FT_SIZE_REQUEST_TYPE_REAL_DIM</td><td class="desc">
-<p>The real dimension. The sum of the &lsquo;ascender&rsquo; and (minus of) the &lsquo;descender&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> are used to determine both scaling values.</p>
+<p>The real dimension. The sum of the &lsquo;ascender&rsquo; and (minus of) the &lsquo;descender&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> is used to determine both scaling values.</p>
</td></tr>
<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_BBOX">FT_SIZE_REQUEST_TYPE_BBOX</td><td class="desc">
<p>The font bounding box. The width and height of the &lsquo;bbox&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> are used to determine the horizontal and vertical scaling value, respectively.</p>
@@ -1767,7 +1941,7 @@
} <b>FT_Size_RequestRec</b>;
</pre>
-<p>A structure used to model a size request.</p>
+<p>A structure to model a size request.</p>
<h4>fields</h4>
<table class="fields">
@@ -1781,15 +1955,15 @@
<p>The desired height, given as a 26.6 fractional point value (with 72pt = 1in).</p>
</td></tr>
<tr><td class="val" id="horiResolution">horiResolution</td><td class="desc">
-<p>The horizontal resolution (dpi, i.e., pixels per inch). If set to zero, &lsquo;width&rsquo; is treated as a 26.6 fractional <b>pixel</b> value.</p>
+<p>The horizontal resolution (dpi, i.e., pixels per inch). If set to zero, &lsquo;width&rsquo; is treated as a 26.6 fractional <b>pixel</b> value, which gets internally rounded to an integer.</p>
</td></tr>
<tr><td class="val" id="vertResolution">vertResolution</td><td class="desc">
-<p>The vertical resolution (dpi, i.e., pixels per inch). If set to zero, &lsquo;height&rsquo; is treated as a 26.6 fractional <b>pixel</b> value.</p>
+<p>The vertical resolution (dpi, i.e., pixels per inch). If set to zero, &lsquo;height&rsquo; is treated as a 26.6 fractional <b>pixel</b> value, which gets internally rounded to an integer.</p>
</td></tr>
</table>
<h4>note</h4>
-<p>If &lsquo;width&rsquo; is zero, then the horizontal scaling value is set equal to the vertical scaling value, and vice versa.</p>
+<p>If &lsquo;width&rsquo; is zero, the horizontal scaling value is set equal to the vertical scaling value, and vice versa.</p>
<p>If &lsquo;type&rsquo; is FT_SIZE_REQUEST_TYPE_SCALES, &lsquo;width&rsquo; and &lsquo;height&rsquo; are interpreted directly as 16.16 fractional scaling values, without any further modification, and both &lsquo;horiResolution&rsquo; and &lsquo;vertResolution&rsquo; are ignored.</p>
<hr>
@@ -1817,7 +1991,7 @@
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* delta );
</pre>
-<p>A function used to set the transformation that is applied to glyph images when they are loaded into a glyph slot through <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
+<p>Set the transformation that is applied to glyph images when they are loaded into a glyph slot through <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
<h4>inout</h4>
<table class="fields">
@@ -1829,10 +2003,10 @@
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="matrix">matrix</td><td class="desc">
-<p>A pointer to the transformation's 2x2 matrix. Use&nbsp;0 for the identity matrix.</p>
+<p>A pointer to the transformation's 2x2 matrix. Use NULL for the identity matrix.</p>
</td></tr>
<tr><td class="val" id="delta">delta</td><td class="desc">
-<p>A pointer to the translation vector. Use&nbsp;0 for the null vector.</p>
+<p>A pointer to the translation vector. Use NULL for the null vector.</p>
</td></tr>
</table>
@@ -1853,7 +2027,7 @@
<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> load_flags );
</pre>
-<p>A function used to load a single glyph into the glyph slot of a face object.</p>
+<p>Load a glyph into the glyph slot of a face object.</p>
<h4>inout</h4>
<table class="fields">
@@ -1892,7 +2066,7 @@
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> charcode );
</pre>
-<p>Return the glyph index of a given character code. This function uses a charmap object to do the mapping.</p>
+<p>Return the glyph index of a given character code. This function uses the currently selected charmap to do the mapping.</p>
<h4>input</h4>
<table class="fields">
@@ -1922,7 +2096,7 @@
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *agindex );
</pre>
-<p>This function is used to return the first character code in the current charmap of a given face. It also returns the corresponding glyph index.</p>
+<p>Return the first character code in the current charmap of a given face, together with its corresponding glyph index.</p>
<h4>input</h4>
<table class="fields">
@@ -1942,7 +2116,7 @@
<p>The charmap's first character code.</p>
<h4>note</h4>
-<p>You should use this function with <a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a> to be able to parse all character codes available in a given charmap. The code should look like this:</p>
+<p>You should use this function together with <a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a> to parse all character codes available in a given charmap. The code should look like this:</p>
<pre class="colored">
FT_ULong charcode;
FT_UInt gindex;
@@ -1972,7 +2146,7 @@
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *agindex );
</pre>
-<p>This function is used to return the next character code in the current charmap of a given face following the value &lsquo;char_code&rsquo;, as well as the corresponding glyph index.</p>
+<p>Return the next character code in the current charmap of a given face following the value &lsquo;char_code&rsquo;, as well as the corresponding glyph index.</p>
<h4>input</h4>
<table class="fields">
@@ -1995,7 +2169,7 @@
<p>The charmap's next character code.</p>
<h4>note</h4>
-<p>You should use this function with <a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a> to walk over all character codes available in a given charmap. See the note for this function for a simple code example.</p>
+<p>You should use this function with <a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a> to walk over all character codes available in a given charmap. See the note for that function for a simple code example.</p>
<p>Note that &lsquo;*agindex&rsquo; is set to&nbsp;0 when there are no more codes in the charmap.</p>
<hr>
@@ -2010,7 +2184,7 @@
<a href="ft2-basic_types.html#FT_String">FT_String</a>* glyph_name );
</pre>
-<p>Return the glyph index of a given glyph name. This function uses driver specific objects to do the translation.</p>
+<p>Return the glyph index of a given glyph name.</p>
<h4>input</h4>
<table class="fields">
@@ -2038,7 +2212,7 @@
<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> load_flags );
</pre>
-<p>A function used to load a single glyph into the glyph slot of a face object, according to its character code.</p>
+<p>Load a glyph into the glyph slot of a face object, accessed by its character code.</p>
<h4>inout</h4>
<table class="fields">
@@ -2062,6 +2236,8 @@
<h4>note</h4>
<p>This function simply calls <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> and <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
+<p>Many fonts contain glyphs that can't be loaded by this function since its glyph indices are not listed in any of the font's charmaps.</p>
+<p>If no active cmap is set up (i.e., &lsquo;face-&gt;charmap&rsquo; is zero), the call to <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> is omitted, and the function behaves identically to <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -2099,7 +2275,7 @@
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="render_mode">render_mode</td><td class="desc">
-<p>This is the render mode used to render the glyph image into a bitmap. See <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> for a list of possible values.</p>
+<p>The render mode used to render the glyph image into a bitmap. See <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> for a list of possible values.</p>
</td></tr>
</table>
@@ -2107,10 +2283,10 @@
<p>FreeType error code. 0&nbsp;means success.</p>
<h4>note</h4>
-<p>To get meaningful results, font scaling values must be set with functions like <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> before calling FT_Render_Glyph.</p>
+<p>To get meaningful results, font scaling values must be set with functions like <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> before calling &lsquo;FT_Render_Glyph&rsquo;.</p>
<p>When FreeType outputs a bitmap of a glyph, it really outputs an alpha coverage map. If a pixel is completely covered by a filled-in outline, the bitmap contains 0xFF at that pixel, meaning that 0xFF/0xFF fraction of that pixel is covered, meaning the pixel is 100% black (or 0% bright). If a pixel is only 50% covered (value 0x80), the pixel is made 50% black (50% bright or a middle shade of grey). 0% covered means 0% black (100% bright or white).</p>
<p>On high-DPI screens like on smartphones and tablets, the pixels are so small that their chance of being completely covered and therefore completely black are fairly good. On the low-DPI screens, however, the situation is different. The pixels are too large for most of the details of a glyph and shades of gray are the norm rather than the exception.</p>
-<p>This is relevant because all our screens have a second problem: they are not linear. 1&nbsp;+&nbsp;1 is not&nbsp;2. Twice the value does not result in twice the brightness. When a pixel is only 50% covered, the coverage map says 50% black, and this translates to a pixel value of 128 when you use 8&nbsp;bits per channel (0-255). However, this does not translate to 50% brightness for that pixel on our sRGB and gamma&nbsp;2.2 screens. Due to their non-linearity, they dwell longer in the darks and only a pixel value of about 186 results in 50% brightness – 128 ends up too dark on both bright and dark backgrounds. The net result is that dark text looks burnt-out, pixely and blotchy on bright background, bright text too frail on dark backgrounds, and colored text on colored background (for example, red on green) seems to have dark halos or &lsquo;dirt&rsquo; around it. The situation is especially ugly for diagonal stems like in &lsquo;w&rsquo; glyph shapes where the quality of FreeType's anti-aliasing depends on the correct display of grays. On high-DPI screens where smaller, fully black pixels reign supreme, this doesn't matter, but on our low-DPI screens with all the gray shades, it does. 0% and 100% brightness are the same things in linear and non-linear space, just all the shades in-between aren't.</p>
+<p>This is relevant because all our screens have a second problem: they are not linear. 1&nbsp;+&nbsp;1 is not&nbsp;2. Twice the value does not result in twice the brightness. When a pixel is only 50% covered, the coverage map says 50% black, and this translates to a pixel value of 128 when you use 8&nbsp;bits per channel (0-255). However, this does not translate to 50% brightness for that pixel on our sRGB and gamma&nbsp;2.2 screens. Due to their non-linearity, they dwell longer in the darks and only a pixel value of about 186 results in 50% brightness -- 128 ends up too dark on both bright and dark backgrounds. The net result is that dark text looks burnt-out, pixely and blotchy on bright background, bright text too frail on dark backgrounds, and colored text on colored background (for example, red on green) seems to have dark halos or &lsquo;dirt&rsquo; around it. The situation is especially ugly for diagonal stems like in &lsquo;w&rsquo; glyph shapes where the quality of FreeType's anti-aliasing depends on the correct display of grays. On high-DPI screens where smaller, fully black pixels reign supreme, this doesn't matter, but on our low-DPI screens with all the gray shades, it does. 0% and 100% brightness are the same things in linear and non-linear space, just all the shades in-between aren't.</p>
<p>The blending function for placing text over a background is</p>
<pre class="colored">
dst = alpha * src + (1 - alpha) * dst ,
@@ -2150,14 +2326,14 @@
#define ft_render_mode_mono <a href="ft2-base_interface.html#FT_RENDER_MODE_MONO">FT_RENDER_MODE_MONO</a>
</pre>
-<p>An enumeration type that lists the render modes supported by FreeType&nbsp;2. Each mode corresponds to a specific type of scanline conversion performed on the outline.</p>
+<p>Render modes supported by FreeType&nbsp;2. Each mode corresponds to a specific type of scanline conversion performed on the outline.</p>
<p>For bitmap fonts and embedded bitmaps the &lsquo;bitmap-&gt;pixel_mode&rsquo; field in the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure gives the format of the returned bitmap.</p>
<p>All modes except <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a> use 256 levels of opacity, indicating pixel coverage. Use linear alpha blending and gamma correction to correctly render non-monochrome glyph bitmaps onto a surface; see <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>.</p>
<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_RENDER_MODE_NORMAL">FT_RENDER_MODE_NORMAL</td><td class="desc">
-<p>This is the default render mode; it corresponds to 8-bit anti-aliased bitmaps.</p>
+<p>Default render mode; it corresponds to 8-bit anti-aliased bitmaps.</p>
</td></tr>
<tr><td class="val" id="FT_RENDER_MODE_LIGHT">FT_RENDER_MODE_LIGHT</td><td class="desc">
<p>This is equivalent to <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a>. It is only defined as a separate value because render modes are also used indirectly to define hinting algorithm selectors. See <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> for details.</p>
@@ -2166,15 +2342,15 @@
<p>This mode corresponds to 1-bit bitmaps (with 2&nbsp;levels of opacity).</p>
</td></tr>
<tr><td class="val" id="FT_RENDER_MODE_LCD">FT_RENDER_MODE_LCD</td><td class="desc">
-<p>This mode corresponds to horizontal RGB and BGR sub-pixel displays like LCD screens. It produces 8-bit bitmaps that are 3&nbsp;times the width of the original glyph outline in pixels, and which use the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a> mode.</p>
+<p>This mode corresponds to horizontal RGB and BGR subpixel displays like LCD screens. It produces 8-bit bitmaps that are 3&nbsp;times the width of the original glyph outline in pixels, and which use the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a> mode.</p>
</td></tr>
<tr><td class="val" id="FT_RENDER_MODE_LCD_V">FT_RENDER_MODE_LCD_V</td><td class="desc">
-<p>This mode corresponds to vertical RGB and BGR sub-pixel displays (like PDA screens, rotated LCD displays, etc.). It produces 8-bit bitmaps that are 3&nbsp;times the height of the original glyph outline in pixels and use the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a> mode.</p>
+<p>This mode corresponds to vertical RGB and BGR subpixel displays (like PDA screens, rotated LCD displays, etc.). It produces 8-bit bitmaps that are 3&nbsp;times the height of the original glyph outline in pixels and use the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a> mode.</p>
</td></tr>
</table>
<h4>note</h4>
-<p>The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be filtered to reduce color-fringes by using <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> (not active in the default builds). It is up to the caller to either call <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> (if available) or do the filtering itself.</p>
+<p>Should you define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your &lsquo;ftoption.h&rsquo;, which enables patented ClearType-style rendering, the LCD-optimized glyph bitmaps should be filtered to reduce color fringes inherent to this technology. You can either set up LCD filtering with <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> or <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>, or do the filtering yourself. The default FreeType LCD rendering technology does not require filtering.</p>
<p>The selected render mode only affects vector glyphs of a font. Embedded bitmaps often have a different pixel mode like <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a>. You can use <a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a> to transform them into 8-bit pixmaps.</p>
<hr>
@@ -2192,7 +2368,7 @@
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a> *akerning );
</pre>
-<p>Return the kerning vector between two glyphs of a same face.</p>
+<p>Return the kerning vector between two glyphs of the same face.</p>
<h4>input</h4>
<table class="fields">
@@ -2222,6 +2398,7 @@
<h4>note</h4>
<p>Only horizontal layouts (left-to-right &amp; right-to-left) are supported by this method. Other layouts, or more sophisticated kernings, are out of the scope of this API function -- they can be implemented through format-specific interfaces.</p>
+<p>Kerning for OpenType fonts implemented in a &lsquo;GPOS&rsquo; table is not supported; use <a href="ft2-base_interface.html#FT_HAS_KERNING">FT_HAS_KERNING</a> to find out whether a font has data that can be extracted with &lsquo;FT_Get_Kerning&rsquo;.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -2232,7 +2409,7 @@
<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Kerning_Mode_
{
- <a href="ft2-base_interface.html#FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</a> = 0,
+ <a href="ft2-base_interface.html#FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</a> = 0,
<a href="ft2-base_interface.html#FT_KERNING_UNFITTED">FT_KERNING_UNFITTED</a>,
<a href="ft2-base_interface.html#FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</a>
@@ -2246,15 +2423,15 @@
#define ft_kerning_unscaled <a href="ft2-base_interface.html#FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</a>
</pre>
-<p>An enumeration used to specify which kerning values to return in <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>
+<p>An enumeration to specify the format of kerning values returned by <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>
<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</td><td class="desc">
-<p>Return grid-fitted kerning distances in pixels (value is&nbsp;0). Whether they are scaled depends on <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>.</p>
+<p>Return grid-fitted kerning distances in 26.6 fractional pixels.</p>
</td></tr>
<tr><td class="val" id="FT_KERNING_UNFITTED">FT_KERNING_UNFITTED</td><td class="desc">
-<p>Return un-grid-fitted kerning distances in 26.6 fractional pixels. Whether they are scaled depends on <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>.</p>
+<p>Return un-grid-fitted kerning distances in 26.6 fractional pixels.</p>
</td></tr>
<tr><td class="val" id="FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</td><td class="desc">
<p>Return the kerning vector in original font units.</p>
@@ -2263,6 +2440,7 @@
<h4>note</h4>
<p>FT_KERNING_DEFAULT returns full pixel values; it also makes FreeType heuristically scale down kerning distances at small ppem values so that they don't become too big.</p>
+<p>Both FT_KERNING_DEFAULT and FT_KERNING_UNFITTED use the current horizontal scaling factor (as set e.g. with <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>) to convert font units to pixels.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -2305,7 +2483,7 @@
<h4>note</h4>
<p>Currently, only the Type&nbsp;1 font driver supports track kerning, using data from AFM files (if attached with <a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a> or <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>).</p>
-<p>Only very few AFM files come with track kerning data; please refer to the Adobe's AFM specification for more details.</p>
+<p>Only very few AFM files come with track kerning data; please refer to Adobe's AFM specification for more details.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -2363,7 +2541,7 @@
<b>FT_Get_Postscript_Name</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
</pre>
-<p>Retrieve the ASCII PostScript name of a given face, if available. This only works with PostScript and TrueType fonts.</p>
+<p>Retrieve the ASCII PostScript name of a given face, if available. This only works with PostScript, TrueType, and OpenType fonts.</p>
<h4>input</h4>
<table class="fields">
@@ -2377,6 +2555,9 @@
<h4>note</h4>
<p>The returned pointer is owned by the face and is destroyed with it.</p>
+<p>For variation fonts, this string changes if you select a different instance, and you have to call &lsquo;FT_Get_PostScript_Name&rsquo; again to retrieve it. FreeType follows Adobe TechNote #5902, &lsquo;Generating PostScript Names for Fonts Using OpenType Font Variations&rsquo;.</p>
+<p><a href="https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html">https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html</a></p>
+<p>[Since 2.9] Special PostScript names for named instances are only returned if the named instance is set with <a href="ft2-multiple_masters.html#FT_Set_Named_Instance">FT_Set_Named_Instance</a> (and the font has corresponding entries in its &lsquo;fvar&rsquo; table). If <a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a> returns true, the algorithmically derived PostScript name is provided, not looking up special entries for named instances.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -2406,10 +2587,10 @@
<p>An <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a> tag identifying the charmap. Use this with <a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a>.</p>
</td></tr>
<tr><td class="val" id="platform_id">platform_id</td><td class="desc">
-<p>An ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and should be emulated for other formats.</p>
+<p>An ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and gets emulated for other formats.</p>
</td></tr>
<tr><td class="val" id="encoding_id">encoding_id</td><td class="desc">
-<p>A platform specific encoding number. This also comes from the TrueType specification and should be emulated similarly.</p>
+<p>A platform specific encoding number. This also comes from the TrueType specification and gets emulated similarly.</p>
</td></tr>
</table>
@@ -2481,7 +2662,7 @@
<h4>note</h4>
<p>This function returns an error if the charmap is not part of the face (i.e., if it is not listed in the &lsquo;face-&gt;charmaps&rsquo; table).</p>
-<p>It also fails if a type&nbsp;14 charmap is selected.</p>
+<p>It also fails if an OpenType type&nbsp;14 charmap is selected (which doesn't map character codes to glyph indices at all).</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -2517,7 +2698,7 @@
<b>FT_Get_FSType_Flags</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
</pre>
-<p>Return the fsType flags for a font.</p>
+<p>Return the &lsquo;fsType&rsquo; flags for a font.</p>
<h4>input</h4>
<table class="fields">
@@ -2527,7 +2708,7 @@
</table>
<h4>return</h4>
-<p>The fsType flags, <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a>.</p>
+<p>The &lsquo;fsType&rsquo; flags, see <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a>.</p>
<h4>note</h4>
<p>Use this function rather than directly reading the &lsquo;fs_type&rsquo; field in the <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> structure, which is only guaranteed to return the correct results for Type&nbsp;1 fonts.</p>
@@ -2587,7 +2768,7 @@
<p>FreeType error code. 0&nbsp;means success.</p>
<h4>note</h4>
-<p>The values of &lsquo;*p_arg1&rsquo;, &lsquo;*p_arg2&rsquo;, and &lsquo;*p_transform&rsquo; must be interpreted depending on the flags returned in &lsquo;*p_flags&rsquo;. See the TrueType specification for details.</p>
+<p>The values of &lsquo;*p_arg1&rsquo;, &lsquo;*p_arg2&rsquo;, and &lsquo;*p_transform&rsquo; must be interpreted depending on the flags returned in &lsquo;*p_flags&rsquo;. See the OpenType specification for details.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -2599,7 +2780,7 @@
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Face_InternalRec_* <b>FT_Face_Internal</b>;
</pre>
-<p>An opaque handle to an &lsquo;FT_Face_InternalRec&rsquo; structure, used to model private data of a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object.</p>
+<p>An opaque handle to an &lsquo;FT_Face_InternalRec&rsquo; structure that models the private data of a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object.</p>
<p>This structure might change between releases of FreeType&nbsp;2 and is not generally available to client applications.</p>
<hr>
@@ -2648,6 +2829,7 @@
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</a> ( 1L &lt;&lt; 12 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a> ( 1L &lt;&lt; 13 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a> ( 1L &lt;&lt; 14 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_VARIATION">FT_FACE_FLAG_VARIATION</a> ( 1L &lt;&lt; 15 )
</pre>
<p>A list of bit flags used in the &lsquo;face_flags&rsquo; field of the <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> structure. They inform client applications of properties of the corresponding face.</p>
@@ -2655,52 +2837,56 @@
<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</td><td class="desc">
-<p>Indicates that the face contains outline glyphs. This doesn't prevent bitmap strikes, i.e., a face can have both this and <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a> set.</p>
+<p>The face contains outline glyphs. Note that a face can contain bitmap strikes also, i.e., a face can have both this flag and <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a> set.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</td><td class="desc">
-<p>Indicates that the face contains bitmap strikes. See also the &lsquo;num_fixed_sizes&rsquo; and &lsquo;available_sizes&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
+<p>The face contains bitmap strikes. See also the &lsquo;num_fixed_sizes&rsquo; and &lsquo;available_sizes&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</td><td class="desc">
-<p>Indicates that the face contains fixed-width characters (like Courier, Lucido, MonoType, etc.).</p>
+<p>The face contains fixed-width characters (like Courier, Lucida, MonoType, etc.).</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</td><td class="desc">
-<p>Indicates that the face uses the &lsquo;sfnt&rsquo; storage scheme. For now, this means TrueType and OpenType.</p>
+<p>The face uses the SFNT storage scheme. For now, this means TrueType and OpenType.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</td><td class="desc">
-<p>Indicates that the face contains horizontal glyph metrics. This should be set for all common formats.</p>
+<p>The face contains horizontal glyph metrics. This should be set for all common formats.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</td><td class="desc">
-<p>Indicates that the face contains vertical glyph metrics. This is only available in some formats, not all of them.</p>
+<p>The face contains vertical glyph metrics. This is only available in some formats, not all of them.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</td><td class="desc">
-<p>Indicates that the face contains kerning information. If set, the kerning distance can be retrieved through the function <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>. Otherwise the function always return the vector (0,0). Note that FreeType doesn't handle kerning data from the &lsquo;GPOS&rsquo; table (as present in some OpenType fonts).</p>
+<p>The face contains kerning information. If set, the kerning distance can be retrieved using the function <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>. Otherwise the function always return the vector (0,0). Note that FreeType doesn't handle kerning data from the SFNT &lsquo;GPOS&rsquo; table (as present in many OpenType fonts).</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_FAST_GLYPHS">FT_FACE_FLAG_FAST_GLYPHS</td><td class="desc">
<p>THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</td><td class="desc">
-<p>Indicates that the font contains multiple masters and is capable of interpolating between them. See the multiple-masters specific API for details.</p>
+<p>The face contains multiple masters and is capable of interpolating between them. Supported formats are Adobe MM, TrueType GX, and OpenType variation fonts.</p>
+<p>See section &lsquo;<a href="ft2-multiple_masters.html#multiple_masters">Multiple Masters</a>&rsquo; for API details.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</td><td class="desc">
-<p>Indicates that the font contains glyph names that can be retrieved through <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a>. Note that some TrueType fonts contain broken glyph name tables. Use the function <a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a> when needed.</p>
+<p>The face contains glyph names, which can be retrieved using <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a>. Note that some TrueType fonts contain broken glyph name tables. Use the function <a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a> when needed.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</td><td class="desc">
<p>Used internally by FreeType to indicate that a face's stream was provided by the client application and should not be destroyed when <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> is called. Don't read or test this flag.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</td><td class="desc">
-<p>Set if the font driver has a hinting machine of its own. For example, with TrueType fonts, it makes sense to use data from the SFNT &lsquo;gasp&rsquo; table only if the native TrueType hinting engine (with the bytecode interpreter) is available and active.</p>
+<p>The font driver has a hinting machine of its own. For example, with TrueType fonts, it makes sense to use data from the SFNT &lsquo;gasp&rsquo; table only if the native TrueType hinting engine (with the bytecode interpreter) is available and active.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</td><td class="desc">
-<p>Set if the font is CID-keyed. In that case, the font is not accessed by glyph indices but by CID values. For subsetted CID-keyed fonts this has the consequence that not all index values are a valid argument to FT_Load_Glyph. Only the CID values for which corresponding glyphs in the subsetted font exist make FT_Load_Glyph return successfully; in all other cases you get an &lsquo;FT_Err_Invalid_Argument&rsquo; error.</p>
-<p>Note that CID-keyed fonts that are in an SFNT wrapper don't have this flag set since the glyphs are accessed in the normal way (using contiguous indices); the &lsquo;CID-ness&rsquo; isn't visible to the application.</p>
+<p>The face is CID-keyed. In that case, the face is not accessed by glyph indices but by CID values. For subsetted CID-keyed fonts this has the consequence that not all index values are a valid argument to <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>. Only the CID values for which corresponding glyphs in the subsetted font exist make &lsquo;FT_Load_Glyph&rsquo; return successfully; in all other cases you get an &lsquo;FT_Err_Invalid_Argument&rsquo; error.</p>
+<p>Note that CID-keyed fonts that are in an SFNT wrapper (this is, all OpenType/CFF fonts) don't have this flag set since the glyphs are accessed in the normal way (using contiguous indices); the &lsquo;CID-ness&rsquo; isn't visible to the application.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</td><td class="desc">
-<p>Set if the font is &lsquo;tricky&rsquo;, this is, it always needs the font format's native hinting engine to get a reasonable result. A typical example is the Chinese font &lsquo;mingli.ttf&rsquo; that uses TrueType bytecode instructions to move and scale all of its subglyphs.</p>
+<p>The face is &lsquo;tricky&rsquo;, this is, it always needs the font format's native hinting engine to get a reasonable result. A typical example is the old Chinese font &lsquo;mingli.ttf&rsquo; (but not &lsquo;mingliu.ttc&rsquo;) that uses TrueType bytecode instructions to move and scale all of its subglyphs.</p>
<p>It is not possible to auto-hint such fonts using <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>; it will also ignore <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a>. You have to set both <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a> to really disable hinting; however, you probably never want this except for demonstration purposes.</p>
<p>Currently, there are about a dozen TrueType fonts in the list of tricky fonts; they are hard-coded in file &lsquo;ttobjs.c&rsquo;.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</td><td class="desc">
-<p>Set if the font has color glyph tables. To access color glyphs use <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a>.</p>
+<p>[Since 2.5.1] The face has color glyph tables. To access color glyphs use <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a>.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_VARIATION">FT_FACE_FLAG_VARIATION</td><td class="desc">
+<p>[Since 2.9] Set if the current face (or named instance) has been altered with <a href="ft2-multiple_masters.html#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a>, <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a>, or <a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a>. This flag is unset by a call to <a href="ft2-multiple_masters.html#FT_Set_Named_Instance">FT_Set_Named_Instance</a>.</p>
</td></tr>
</table>
@@ -2715,15 +2901,15 @@
#define <a href="ft2-base_interface.html#FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</a> ( 1 &lt;&lt; 1 )
</pre>
-<p>A list of bit flags used to indicate the style of a given face. These are used in the &lsquo;style_flags&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
+<p>A list of bit flags to indicate the style of a given face. These are used in the &lsquo;style_flags&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</td><td class="desc">
-<p>Indicates that a given face style is italic or oblique.</p>
+<p>The face style is italic or oblique.</p>
</td></tr>
<tr><td class="val" id="FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</td><td class="desc">
-<p>Indicates that a given face is bold.</p>
+<p>The face is bold.</p>
</td></tr>
</table>
@@ -2799,21 +2985,21 @@
#define <a href="ft2-base_interface.html#FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</a> ( 1L &lt;&lt; 12 )
#define <a href="ft2-base_interface.html#FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</a> ( 1L &lt;&lt; 13 )
#define <a href="ft2-base_interface.html#FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</a> ( 1L &lt;&lt; 15 )
- /* Bits 16..19 are used by `FT_LOAD_TARGET_' */
+ /* Bits 16-19 are used by `FT_LOAD_TARGET_' */
#define <a href="ft2-base_interface.html#FT_LOAD_COLOR">FT_LOAD_COLOR</a> ( 1L &lt;&lt; 20 )
#define <a href="ft2-base_interface.html#FT_LOAD_COMPUTE_METRICS">FT_LOAD_COMPUTE_METRICS</a> ( 1L &lt;&lt; 21 )
#define <a href="ft2-base_interface.html#FT_LOAD_BITMAP_METRICS_ONLY">FT_LOAD_BITMAP_METRICS_ONLY</a> ( 1L &lt;&lt; 22 )
</pre>
-<p>A list of bit field constants used with <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to indicate what kind of operations to perform during glyph loading.</p>
+<p>A list of bit field constants for <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to indicate what kind of operations to perform during glyph loading.</p>
<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</td><td class="desc">
<p>Corresponding to&nbsp;0, this value is used as the default glyph load operation. In this case, the following happens:</p>
<p>1. FreeType looks for a bitmap for the glyph corresponding to the face's current size. If one is found, the function returns. The bitmap data can be accessed from the glyph slot (see note below).</p>
-<p>2. If no embedded bitmap is searched or found, FreeType looks for a scalable outline. If one is found, it is loaded from the font file, scaled to device pixels, then &lsquo;hinted&rsquo; to the pixel grid in order to optimize it. The outline data can be accessed from the glyph slot (see note below).</p>
-<p>Note that by default, the glyph loader doesn't render outlines into bitmaps. The following flags are used to modify this default behaviour to more specific and useful cases.</p>
+<p>2. If no embedded bitmap is searched for or found, FreeType looks for a scalable outline. If one is found, it is loaded from the font file, scaled to device pixels, then &lsquo;hinted&rsquo; to the pixel grid in order to optimize it. The outline data can be accessed from the glyph slot (see note below).</p>
+<p>Note that by default the glyph loader doesn't render outlines into bitmaps. The following flags are used to modify this default behaviour to more specific and useful cases.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</td><td class="desc">
<p>Don't scale the loaded outline glyph but keep it in font units.</p>
@@ -2837,38 +3023,38 @@
<p>In case <a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a> doesn't return true, you shouldn't use this flag currently. Reason is that in this case vertical metrics get synthesized, and those values are not always consistent across various font formats.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</td><td class="desc">
-<p>Indicates that the auto-hinter is preferred over the font's native hinter. See also the note below.</p>
+<p>Prefer the auto-hinter over the font's native hinter. See also the note below.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</td><td class="desc">
-<p>Indicates that the font driver should perform pedantic verifications during glyph loading. This is mostly used to detect broken glyphs in fonts. By default, FreeType tries to handle broken fonts also.</p>
+<p>Make the font driver perform pedantic verifications during glyph loading. This is mostly used to detect broken glyphs in fonts. By default, FreeType tries to handle broken fonts also.</p>
<p>In particular, errors from the TrueType bytecode engine are not passed to the application if this flag is not set; this might result in partially hinted or distorted glyphs in case a glyph's bytecode is buggy.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</td><td class="desc">
-<p>Indicate that the font driver should not load composite glyphs recursively. Instead, it should set the &lsquo;num_subglyph&rsquo; and &lsquo;subglyphs&rsquo; values of the glyph slot accordingly, and set &lsquo;glyph-&gt;format&rsquo; to <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>. The description of subglyphs can then be accessed with <a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a>.</p>
+<p>Don't load composite glyphs recursively. Instead, the font driver should set the &lsquo;num_subglyph&rsquo; and &lsquo;subglyphs&rsquo; values of the glyph slot accordingly, and set &lsquo;glyph-&gt;format&rsquo; to <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>. The description of subglyphs can then be accessed with <a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a>.</p>
<p>This flag implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a>.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</td><td class="desc">
-<p>Indicates that the transform matrix set by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a> should be ignored.</p>
+<p>Ignore the transform matrix set by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a>.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</td><td class="desc">
<p>This flag is used with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a> to indicate that you want to render an outline glyph to a 1-bit monochrome bitmap glyph, with 8&nbsp;pixels packed into each byte of the bitmap data.</p>
<p>Note that this has no effect on the hinting algorithm used. You should rather use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> so that the monochrome-optimized hinting algorithm is used.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</td><td class="desc">
-<p>Indicates that the &lsquo;linearHoriAdvance&rsquo; and &lsquo;linearVertAdvance&rsquo; fields of <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> should be kept in font units. See <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> for details.</p>
+<p>Keep &lsquo;linearHoriAdvance&rsquo; and &lsquo;linearVertAdvance&rsquo; fields of <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> in font units. See <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> for details.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</td><td class="desc">
-<p>Disable auto-hinter. See also the note below.</p>
+<p>Disable the auto-hinter. See also the note below.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_COLOR">FT_LOAD_COLOR</td><td class="desc">
-<p>This flag is used to request loading of color embedded-bitmap images. The resulting color bitmaps, if available, will have the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a> format. When the flag is not used and color bitmaps are found, they will be converted to 256-level gray bitmaps transparently. Those bitmaps will be in the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a> format.</p>
+<p>[Since 2.5] Load embedded color bitmap images. The resulting color bitmaps, if available, will have the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a> format. If the flag is not set and color bitmaps are found, they are converted to 256-level gray bitmaps transparently, using the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a> format.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_COMPUTE_METRICS">FT_LOAD_COMPUTE_METRICS</td><td class="desc">
-<p>This flag sets computing glyph metrics without the use of bundled metrics tables (for example, the &lsquo;hdmx&rsquo; table in TrueType fonts). Well-behaving fonts have optimized bundled metrics and these should be used. This flag is mainly used by font validating or font editing applications, which need to ignore, verify, or edit those tables.</p>
+<p>[Since 2.6.1] Compute glyph metrics from the glyph data, without the use of bundled metrics tables (for example, the &lsquo;hdmx&rsquo; table in TrueType fonts). This flag is mainly used by font validating or font editing applications, which need to ignore, verify, or edit those tables.</p>
<p>Currently, this flag is only implemented for TrueType fonts.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_BITMAP_METRICS_ONLY">FT_LOAD_BITMAP_METRICS_ONLY</td><td class="desc">
-<p>This flag is used to request loading of the metrics and bitmap image information of a (possibly embedded) bitmap glyph without allocating or copying the bitmap image data itself. No effect if the target glyph is not a bitmap image.</p>
+<p>[Since 2.7.1] Request loading of the metrics and bitmap image information of a (possibly embedded) bitmap glyph without allocating or copying the bitmap image data itself. No effect if the target glyph is not a bitmap image.</p>
<p>This flag unsets <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a>.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_CROP_BITMAP">FT_LOAD_CROP_BITMAP</td><td class="desc">
@@ -2901,22 +3087,24 @@
#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</a> FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_LCD_V">FT_RENDER_MODE_LCD_V</a> )
</pre>
-<p>A list of values that are used to select a specific hinting algorithm to use by the hinter. You should OR one of these values to your &lsquo;load_flags&rsquo; when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
-<p>Note that font's native hinters may ignore the hinting algorithm you have specified (e.g., the TrueType bytecode interpreter). You can set <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a> to ensure that the auto-hinter is used.</p>
+<p>A list of values to select a specific hinting algorithm for the hinter. You should OR one of these values to your &lsquo;load_flags&rsquo; when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
+<p>Note that a font's native hinters may ignore the hinting algorithm you have specified (e.g., the TrueType bytecode interpreter). You can set <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a> to ensure that the auto-hinter is used.</p>
<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_LOAD_TARGET_NORMAL">FT_LOAD_TARGET_NORMAL</td><td class="desc">
-<p>This corresponds to the default hinting algorithm, optimized for standard gray-level rendering. For monochrome output, use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> instead.</p>
+<p>The default hinting algorithm, optimized for standard gray-level rendering. For monochrome output, use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> instead.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</td><td class="desc">
-<p>A lighter hinting algorithm for gray-level modes. Many generated glyphs are fuzzier but better resemble their original shape. This is achieved by snapping glyphs to the pixel grid only vertically (Y-axis), as is done by Microsoft's ClearType and Adobe's proprietary font renderer. This preserves inter-glyph spacing in horizontal text. The snapping is done either by the native font driver if the driver itself and the font support it or by the auto-hinter.</p>
+<p>A lighter hinting algorithm for gray-level modes. Many generated glyphs are fuzzier but better resemble their original shape. This is achieved by snapping glyphs to the pixel grid only vertically (Y-axis), as is done by FreeType's new CFF engine or Microsoft's ClearType font renderer. This preserves inter-glyph spacing in horizontal text. The snapping is done either by the native font driver, if the driver itself and the font support it, or by the auto-hinter.</p>
+<p>Advance widths are rounded to integer values; however, using the &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; fields of <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a>, it is possible to get fractional advance widths for subpixel positioning (which is recommended to use).</p>
+<p>If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active, TrueType-like metrics are used to make this mode behave similarly as in unpatched FreeType versions between 2.4.6 and 2.7.1 (inclusive).</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</td><td class="desc">
<p>Strong hinting algorithm that should only be used for monochrome output. The result is probably unpleasant if the glyph is rendered in non-monochrome modes.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</td><td class="desc">
-<p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> optimized for horizontally decimated LCD displays.</p>
+<p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a> optimized for horizontally decimated LCD displays.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</td><td class="desc">
<p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> optimized for vertically decimated LCD displays.</p>
@@ -2933,6 +3121,7 @@
FT_Render_Glyph( face-&gt;glyph, FT_RENDER_MODE_LCD );
</pre>
+<p>In general, you should stick with one rendering mode. For example, switching between <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> and <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> enforces a lot of recomputation for TrueType fonts, which is slow. Another reason is caching: Selecting a different mode usually causes changes in both the outlines and the rasterized bitmaps; it is thus necessary to empty the cache after a mode switch to avoid false hits.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -2950,7 +3139,7 @@
#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_USE_MY_METRICS">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a> 0x200
</pre>
-<p>A list of constants used to describe subglyphs. Please refer to the TrueType specification for the meaning of the various flags.</p>
+<p>A list of constants describing subglyphs. Please refer to the &lsquo;glyf&rsquo; table description in the OpenType specification for the meaning of the various flags (which get synthesized for non-OpenType subglyphs).</p>
<h4>values</h4>
<table class="fields">
@@ -2993,7 +3182,7 @@
</pre>
<p>A list of bit flags used in the &lsquo;fsType&rsquo; field of the OS/2 table in a TrueType or OpenType font and the &lsquo;FSType&rsquo; entry in a PostScript font. These bit flags are returned by <a href="ft2-base_interface.html#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a>; they inform client applications of embedding and subsetting restrictions associated with a font.</p>
-<p>See <a href="http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf">http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf</a> for more details.</p>
+<p>See <a href="https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf">https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf</a> for more details.</p>
<h4>values</h4>
<table class="fields">
@@ -3004,22 +3193,22 @@
<p>Fonts that have only this bit set must not be modified, embedded or exchanged in any manner without first obtaining permission of the font software copyright owner.</p>
</td></tr>
<tr><td class="val" id="FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</td><td class="desc">
-<p>If this bit is set, the font may be embedded and temporarily loaded on the remote system. Documents containing Preview &amp; Print fonts must be opened &lsquo;read-only&rsquo;; no edits can be applied to the document.</p>
+<p>The font may be embedded and temporarily loaded on the remote system. Documents containing Preview &amp; Print fonts must be opened &lsquo;read-only&rsquo;; no edits can be applied to the document.</p>
</td></tr>
<tr><td class="val" id="FT_FSTYPE_EDITABLE_EMBEDDING">FT_FSTYPE_EDITABLE_EMBEDDING</td><td class="desc">
-<p>If this bit is set, the font may be embedded but must only be installed temporarily on other systems. In contrast to Preview &amp; Print fonts, documents containing editable fonts may be opened for reading, editing is permitted, and changes may be saved.</p>
+<p>The font may be embedded but must only be installed temporarily on other systems. In contrast to Preview &amp; Print fonts, documents containing editable fonts may be opened for reading, editing is permitted, and changes may be saved.</p>
</td></tr>
<tr><td class="val" id="FT_FSTYPE_NO_SUBSETTING">FT_FSTYPE_NO_SUBSETTING</td><td class="desc">
-<p>If this bit is set, the font may not be subsetted prior to embedding.</p>
+<p>The font may not be subsetted prior to embedding.</p>
</td></tr>
<tr><td class="val" id="FT_FSTYPE_BITMAP_EMBEDDING_ONLY">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</td><td class="desc">
-<p>If this bit is set, only bitmaps contained in the font may be embedded; no outline data may be embedded. If there are no bitmaps available in the font, then the font is unembeddable.</p>
+<p>Only bitmaps contained in the font may be embedded; no outline data may be embedded. If there are no bitmaps available in the font, then the font is unembeddable.</p>
</td></tr>
</table>
<h4>note</h4>
<p>The flags are ORed together, thus more than a single value can be returned.</p>
-<p>While the fsType flags can indicate that a font may be embedded, a license with the font vendor may be separately required to use the font in this way.</p>
+<p>While the &lsquo;fsType&rsquo; flags can indicate that a font may be embedded, a license with the font vendor may be separately required to use the font in this way.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -3036,18 +3225,5 @@
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-<div class="section">
-<h3 id="FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</h3>
-<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
-<pre>
-#define <b>FT_IS_NAMED_INSTANCE</b>( face ) \
- ( (face)-&gt;face_index &amp; 0x7FFF0000L )
-</pre>
-
-<p>A macro that returns true whenever a face object is a named instance of a GX variation font.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
</body>
</html>
diff --git a/modules/freetype2/docs/reference/ft2-basic_types.html b/modules/freetype2/docs/reference/ft2-basic_types.html
index 373d81182..0e622397c 100644
--- a/modules/freetype2/docs/reference/ft2-basic_types.html
+++ b/modules/freetype2/docs/reference/ft2-basic_types.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="basic_types">Basic Data Types</h1>
<h2>Synopsis</h2>
@@ -661,7 +661,7 @@
<h3 id="FT_Generic_Finalizer">FT_Generic_Finalizer</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
- <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Generic_Finalizer</b>)(<span class="keyword">void</span>* object);
+ <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Generic_Finalizer</b>)( <span class="keyword">void</span>* object );
</pre>
<p>Describe a function used to destroy the &lsquo;client&rsquo; data of any FreeType object. See the description of the <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a> type for details of usage.</p>
@@ -781,7 +781,7 @@
<p>An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on rotated LCD displays; the bitmap is three times taller than the original glyph image. See also <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a>.</p>
</td></tr>
<tr><td class="val" id="FT_PIXEL_MODE_BGRA">FT_PIXEL_MODE_BGRA</td><td class="desc">
-<p>An image with four 8-bit channels per pixel, representing a color image (such as emoticons) with alpha channel. For each pixel, the format is BGRA, which means, the blue channel comes first in memory. The color channels are pre-multiplied and in the sRGB colorspace. For example, full red at half-translucent opacity will be represented as &lsquo;00,00,80,80&rsquo;, not &lsquo;00,00,FF,80&rsquo;. See also <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a>.</p>
+<p>[Since 2.5] An image with four 8-bit channels per pixel, representing a color image (such as emoticons) with alpha channel. For each pixel, the format is BGRA, which means, the blue channel comes first in memory. The color channels are pre-multiplied and in the sRGB colorspace. For example, full red at half-translucent opacity will be represented as &lsquo;00,00,80,80&rsquo;, not &lsquo;00,00,FF,80&rsquo;. See also <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a>.</p>
</td></tr>
</table>
@@ -827,7 +827,7 @@
<p>The glyph image is a bitmap, and can be described as an <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>. You generally need to access the &lsquo;bitmap&rsquo; field of the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure to read it.</p>
</td></tr>
<tr><td class="val" id="FT_GLYPH_FORMAT_OUTLINE">FT_GLYPH_FORMAT_OUTLINE</td><td class="desc">
-<p>The glyph image is a vectorial outline made of line segments and Bézier arcs; it can be described as an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>; you generally want to access the &lsquo;outline&rsquo; field of the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure to read it.</p>
+<p>The glyph image is a vectorial outline made of line segments and Bezier arcs; it can be described as an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>; you generally want to access the &lsquo;outline&rsquo; field of the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure to read it.</p>
</td></tr>
<tr><td class="val" id="FT_GLYPH_FORMAT_PLOTTER">FT_GLYPH_FORMAT_PLOTTER</td><td class="desc">
<p>The glyph image is a vectorial path with no inside and outside contours. Some Type&nbsp;1 fonts, like those in the Hershey family, contain glyphs in this format. These are described as <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>, but FreeType isn't currently capable of rendering them correctly.</p>
diff --git a/modules/freetype2/docs/reference/ft2-bdf_fonts.html b/modules/freetype2/docs/reference/ft2-bdf_fonts.html
index 331336641..f11cb21c8 100644
--- a/modules/freetype2/docs/reference/ft2-bdf_fonts.html
+++ b/modules/freetype2/docs/reference/ft2-bdf_fonts.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="bdf_fonts">BDF and PCF Files</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-bitmap_handling.html b/modules/freetype2/docs/reference/ft2-bitmap_handling.html
index 9a11f1044..d80acc473 100644
--- a/modules/freetype2/docs/reference/ft2-bitmap_handling.html
+++ b/modules/freetype2/docs/reference/ft2-bitmap_handling.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="bitmap_handling">Bitmap Handling</h1>
<h2>Synopsis</h2>
@@ -147,7 +147,7 @@
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Bitmap_Copy</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *source,
- <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *target);
+ <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *target );
</pre>
<p>Copy a bitmap into another one.</p>
diff --git a/modules/freetype2/docs/reference/ft2-bzip2.html b/modules/freetype2/docs/reference/ft2-bzip2.html
index 1b9fe9d61..bb787cffc 100644
--- a/modules/freetype2/docs/reference/ft2-bzip2.html
+++ b/modules/freetype2/docs/reference/ft2-bzip2.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="bzip2">BZIP2 Streams</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-cache_subsystem.html b/modules/freetype2/docs/reference/ft2-cache_subsystem.html
index 7c5d65715..d2d60697a 100644
--- a/modules/freetype2/docs/reference/ft2-cache_subsystem.html
+++ b/modules/freetype2/docs/reference/ft2-cache_subsystem.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="cache_subsystem">Cache Sub-System</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-cff_driver.html b/modules/freetype2/docs/reference/ft2-cff_driver.html
index 4fc747ed5..6e7c1d967 100644
--- a/modules/freetype2/docs/reference/ft2-cff_driver.html
+++ b/modules/freetype2/docs/reference/ft2-cff_driver.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,134 +100,21 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="cff_driver">The CFF driver</h1>
-<h2>Synopsis</h2>
-<table class="synopsis">
-<tr><td><a href="#hinting-engine(cff)">hinting-engine</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#no-stem-darkening(cff)">no-stem-darkening</a></td><td><a href="#FT_CFF_HINTING_XXX">FT_CFF_HINTING_XXX</a></td></tr>
-<tr><td><a href="#darkening-parameters(cff)">darkening-parameters</a></td><td></td></tr>
-</table>
-
-<p>While FreeType's CFF driver doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. The list below gives the available properties together with the necessary macros and structures.</p>
+<p>While FreeType's CFF driver doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>.</p>
<p>The CFF driver's module name is &lsquo;cff&rsquo;.</p>
+<p>Available properties are <a href="ft2-properties.html#hinting-engine">hinting-engine</a>, <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a>, <a href="ft2-properties.html#darkening-parameters">darkening-parameters</a>, and <a href="ft2-properties.html#random-seed">random-seed</a>, as documented in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p>
<p><b>Hinting</b> <b>and</b> <b>antialiasing</b> <b>principles</b> <b>of</b> <b>the</b> <b>new</b> <b>engine</b></p>
<p>The rasterizer is positioning horizontal features (e.g., ascender height &amp; x-height, or crossbars) on the pixel grid and minimizing the amount of antialiasing applied to them, while placing vertical features (vertical stems) on the pixel grid without hinting, thus representing the stem position and weight accurately. Sometimes the vertical stems may be only partially black. In this context, &lsquo;antialiasing&rsquo; means that stems are not positioned exactly on pixel borders, causing a fuzzy appearance.</p>
<p>There are two principles behind this approach.</p>
<p>1) No hinting in the horizontal direction: Unlike &lsquo;superhinted&rsquo; TrueType, which changes glyph widths to accommodate regular inter-glyph spacing, Adobe's approach is &lsquo;faithful to the design&rsquo; in representing both the glyph width and the inter-glyph spacing designed for the font. This makes the screen display as close as it can be to the result one would get with infinite resolution, while preserving what is considered the key characteristics of each glyph. Note that the distances between unhinted and grid-fitted positions at small sizes are comparable to kerning values and thus would be noticeable (and distracting) while reading if hinting were applied.</p>
-<p>One of the reasons to not hint horizontally is antialiasing for LCD screens: The pixel geometry of modern displays supplies three vertical sub-pixels as the eye moves horizontally across each visible pixel. On devices where we can be certain this characteristic is present a rasterizer can take advantage of the sub-pixels to add increments of weight. In Western writing systems this turns out to be the more critical direction anyway; the weights and spacing of vertical stems (see above) are central to Armenian, Cyrillic, Greek, and Latin type designs. Even when the rasterizer uses greyscale antialiasing instead of color (a necessary compromise when one doesn't know the screen characteristics), the unhinted vertical features preserve the design's weight and spacing much better than aliased type would.</p>
+<p>One of the reasons to not hint horizontally is antialiasing for LCD screens: The pixel geometry of modern displays supplies three vertical subpixels as the eye moves horizontally across each visible pixel. On devices where we can be certain this characteristic is present a rasterizer can take advantage of the subpixels to add increments of weight. In Western writing systems this turns out to be the more critical direction anyway; the weights and spacing of vertical stems (see above) are central to Armenian, Cyrillic, Greek, and Latin type designs. Even when the rasterizer uses greyscale antialiasing instead of color (a necessary compromise when one doesn't know the screen characteristics), the unhinted vertical features preserve the design's weight and spacing much better than aliased type would.</p>
<p>2) Alignment in the vertical direction: Weights and spacing along the y&nbsp;axis are less critical; what is much more important is the visual alignment of related features (like cap-height and x-height). The sense of alignment for these is enhanced by the sharpness of grid-fit edges, while the cruder vertical resolution (full pixels instead of 1/3 pixels) is less of a problem.</p>
<p>On the technical side, horizontal alignment zones for ascender, x-height, and other important height values (traditionally called &lsquo;blue zones&rsquo;) as defined in the font are positioned independently, each being rounded to the nearest pixel edge, taking care of overshoot suppression at small sizes, stem darkening, and scaling.</p>
<p>Hstems (this is, hint values defined in the font to help align horizontal features) that fall within a blue zone are said to be &lsquo;captured&rsquo; and are aligned to that zone. Uncaptured stems are moved in one of four ways, top edge up or down, bottom edge up or down. Unless there are conflicting hstems, the smallest movement is taken to minimize distortion.</p>
-<div class="section">
-<h3 id="hinting-engine(cff)">hinting-engine</h3>
-
-<p>Thanks to Adobe, which contributed a new hinting (and parsing) engine, an application can select between &lsquo;freetype&rsquo; and &lsquo;adobe&rsquo; if compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration macro isn't defined, &lsquo;hinting-engine&rsquo; does nothing.</p>
-<p>The default engine is &lsquo;freetype&rsquo; if CFF_CONFIG_OPTION_OLD_ENGINE is defined, and &lsquo;adobe&rsquo; otherwise.</p>
-<p>The following example code demonstrates how to select Adobe's hinting engine (omitting the error handling).</p>
-<pre class="colored">
- FT_Library library;
- FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
-
-
- FT_Init_FreeType( &amp;library );
-
- FT_Property_Set( library, "cff",
- "hinting-engine", &amp;hinting_engine );
-</pre>
-
-<h4>note</h4>
-<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
-<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values &lsquo;adobe&rsquo; or &lsquo;freetype&rsquo;).</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="no-stem-darkening(cff)">no-stem-darkening</h3>
-
-<p>By default, the Adobe CFF engine darkens stems at smaller sizes, regardless of hinting, to enhance contrast. This feature requires a rendering system with proper gamma correction. Setting this property, stem darkening gets switched off.</p>
-<p>Note that stem darkening is never applied if <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> is set.</p>
-<pre class="colored">
- FT_Library library;
- FT_Bool no_stem_darkening = TRUE;
-
-
- FT_Init_FreeType( &amp;library );
-
- FT_Property_Set( library, "cff",
- "no-stem-darkening", &amp;no_stem_darkening );
-</pre>
-
-<h4>note</h4>
-<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
-<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively).</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="darkening-parameters(cff)">darkening-parameters</h3>
-
-<p>By default, the Adobe CFF engine darkens stems as follows (if the &lsquo;no-stem-darkening&rsquo; property isn't set):</p>
-<pre class="colored">
- stem width &lt;= 0.5px: darkening amount = 0.4px
- stem width = 1px: darkening amount = 0.275px
- stem width = 1.667px: darkening amount = 0.275px
- stem width &gt;= 2.333px: darkening amount = 0px
-</pre>
-<p>and piecewise linear in-between. At configuration time, these four control points can be set with the macro &lsquo;CFF_CONFIG_OPTION_DARKENING_PARAMETERS&rsquo;. At runtime, the control points can be changed using the &lsquo;darkening-parameters&rsquo; property, as the following example demonstrates.</p>
-<pre class="colored">
- FT_Library library;
- FT_Int darken_params[8] = { 500, 300, // x1, y1
- 1000, 200, // x2, y2
- 1500, 100, // x3, y3
- 2000, 0 }; // x4, y4
-
-
- FT_Init_FreeType( &amp;library );
-
- FT_Property_Set( library, "cff",
- "darkening-parameters", darken_params );
-</pre>
-<p>The x&nbsp;values give the stem width, and the y&nbsp;values the darkening amount. The unit is 1000th of pixels. All coordinate values must be positive; the x&nbsp;values must be monotonically increasing; the y&nbsp;values must be monotonically decreasing and smaller than or equal to 500 (corresponding to half a pixel); the slope of each linear piece must be shallower than -1 (e.g., -.4).</p>
-
-<h4>note</h4>
-<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
-<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable, using eight comma-separated integers without spaces. Here the above example, using &lsquo;\&rsquo; to break the line for readability.</p>
-<pre class="colored">
- FREETYPE_PROPERTIES=\
- cff:darkening-parameters=500,300,1000,200,1500,100,2000,0
-</pre>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="FT_CFF_HINTING_XXX">FT_CFF_HINTING_XXX</h3>
-<p>Defined in FT_CFF_DRIVER_H (freetype/ftcffdrv.h).</p>
-<pre>
-#define <a href="ft2-cff_driver.html#FT_CFF_HINTING_FREETYPE">FT_CFF_HINTING_FREETYPE</a> 0
-#define <a href="ft2-cff_driver.html#FT_CFF_HINTING_ADOBE">FT_CFF_HINTING_ADOBE</a> 1
-</pre>
-
-<p>A list of constants used for the <a href="ft2-cff_driver.html#hinting-engine(cff)">hinting-engine</a> property to select the hinting engine for CFF fonts.</p>
-
-<h4>values</h4>
-<table class="fields">
-<tr><td class="val" id="FT_CFF_HINTING_FREETYPE">FT_CFF_HINTING_FREETYPE</td><td class="desc">
-<p>Use the old FreeType hinting engine.</p>
-</td></tr>
-<tr><td class="val" id="FT_CFF_HINTING_ADOBE">FT_CFF_HINTING_ADOBE</td><td class="desc">
-<p>Use the hinting engine contributed by Adobe.</p>
-</td></tr>
-</table>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
</body>
</html>
diff --git a/modules/freetype2/docs/reference/ft2-cid_fonts.html b/modules/freetype2/docs/reference/ft2-cid_fonts.html
index 282563666..9dcab71b4 100644
--- a/modules/freetype2/docs/reference/ft2-cid_fonts.html
+++ b/modules/freetype2/docs/reference/ft2-cid_fonts.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="cid_fonts">CID Fonts</h1>
<h2>Synopsis</h2>
@@ -121,7 +121,7 @@
<b>FT_Get_CID_Registry_Ordering_Supplement</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<span class="keyword">const</span> <span class="keyword">char</span>* *registry,
<span class="keyword">const</span> <span class="keyword">char</span>* *ordering,
- <a href="ft2-basic_types.html#FT_Int">FT_Int</a> *supplement);
+ <a href="ft2-basic_types.html#FT_Int">FT_Int</a> *supplement );
</pre>
<p>Retrieve the Registry/Ordering/Supplement triple (also known as the "R/O/S") from a CID-keyed font.</p>
diff --git a/modules/freetype2/docs/reference/ft2-computations.html b/modules/freetype2/docs/reference/ft2-computations.html
index 9f840e862..d615dcfa2 100644
--- a/modules/freetype2/docs/reference/ft2-computations.html
+++ b/modules/freetype2/docs/reference/ft2-computations.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="computations">Computations</h1>
<h2>Synopsis</h2>
@@ -129,7 +129,7 @@
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> c );
</pre>
-<p>A very simple function used to perform the computation &lsquo;(a*b)/c&rsquo; with maximum accuracy (it uses a 64-bit intermediate integer whenever necessary).</p>
+<p>Compute &lsquo;(a*b)/c&rsquo; with maximum accuracy, using a 64-bit intermediate integer whenever necessary.</p>
<p>This function isn't necessarily as fast as some processor specific operations, but is at least completely portable.</p>
<h4>input</h4>
@@ -160,7 +160,7 @@
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> b );
</pre>
-<p>A very simple function used to perform the computation &lsquo;(a*b)/0x10000&rsquo; with maximum accuracy. Most of the time this is used to multiply a given value by a 16.16 fixed-point factor.</p>
+<p>Compute &lsquo;(a*b)/0x10000&rsquo; with maximum accuracy. Its main use is to multiply a given value by a 16.16 fixed-point factor.</p>
<h4>input</h4>
<table class="fields">
@@ -191,7 +191,7 @@
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> b );
</pre>
-<p>A very simple function used to perform the computation &lsquo;(a*0x10000)/b&rsquo; with maximum accuracy. Most of the time, this is used to divide a given value by a 16.16 fixed-point factor.</p>
+<p>Compute &lsquo;(a*0x10000)/b&rsquo; with maximum accuracy. Its main use is to divide a given value by a 16.16 fixed-point factor.</p>
<h4>input</h4>
<table class="fields">
@@ -217,7 +217,7 @@
<b>FT_RoundFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> a );
</pre>
-<p>A very simple function used to round a 16.16 fixed number.</p>
+<p>Round a 16.16 fixed number.</p>
<h4>input</h4>
<table class="fields">
@@ -227,7 +227,10 @@
</table>
<h4>return</h4>
-<p>&lsquo;a&rsquo; rounded to nearest 16.16 fixed integer, halfway cases away from zero.</p>
+<p>&lsquo;a&rsquo; rounded to the nearest 16.16 fixed integer, halfway cases away from zero.</p>
+
+<h4>note</h4>
+<p>The function uses wrap-around arithmetic.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -240,7 +243,7 @@
<b>FT_CeilFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> a );
</pre>
-<p>A very simple function used to compute the ceiling function of a 16.16 fixed number.</p>
+<p>Compute the smallest following integer of a 16.16 fixed number.</p>
<h4>input</h4>
<table class="fields">
@@ -252,6 +255,9 @@
<h4>return</h4>
<p>&lsquo;a&rsquo; rounded towards plus infinity.</p>
+<h4>note</h4>
+<p>The function uses wrap-around arithmetic.</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -263,7 +269,7 @@
<b>FT_FloorFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> a );
</pre>
-<p>A very simple function used to compute the floor function of a 16.16 fixed number.</p>
+<p>Compute the largest previous integer of a 16.16 fixed number.</p>
<h4>input</h4>
<table class="fields">
@@ -336,6 +342,7 @@
<h4>note</h4>
<p>The result is undefined if either &lsquo;a&rsquo; or &lsquo;b&rsquo; is zero.</p>
+<p>Since the function uses wrap-around arithmetic, results become meaningless if the arguments are very large.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
diff --git a/modules/freetype2/docs/reference/ft2-error_code_values.html b/modules/freetype2/docs/reference/ft2-error_code_values.html
index a8d89102a..f53f6cd33 100644
--- a/modules/freetype2/docs/reference/ft2-error_code_values.html
+++ b/modules/freetype2/docs/reference/ft2-error_code_values.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="error_code_values">Error Code Values</h1>
<h2>Synopsis</h2>
@@ -293,6 +293,10 @@
"invalid PostScript (post) table format" )
FT_ERRORDEF_( Invalid_Post_Table, 0x9B,
"invalid PostScript (post) table" )
+ FT_ERRORDEF_( DEF_In_Glyf_Bytecode, 0x9C,
+ "found FDEF or IDEF opcode in glyf bytecode" )
+ FT_ERRORDEF_( Missing_Bitmap, 0x9D,
+ "missing bitmap in strike" )
/* CFF, CID, and Type 1 errors */
diff --git a/modules/freetype2/docs/reference/ft2-error_enumerations.html b/modules/freetype2/docs/reference/ft2-error_enumerations.html
index 3798e4957..916980233 100644
--- a/modules/freetype2/docs/reference/ft2-error_enumerations.html
+++ b/modules/freetype2/docs/reference/ft2-error_enumerations.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,15 +100,15 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="error_enumerations">Error Enumerations</h1>
<p>The header file &lsquo;fterrors.h&rsquo; (which is automatically included by &lsquo;freetype.h&rsquo; defines the handling of FreeType's enumeration constants. It can also be used to generate error message strings with a small macro trick explained below.</p>
<p><b>Error</b> <b>Formats</b></p>
-<p>The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be defined in &lsquo;ftoption.h&rsquo; in order to make the higher byte indicate the module where the error has happened (this is not compatible with standard builds of FreeType&amp;nbsp;2, however). See the file &lsquo;ftmoderr.h&rsquo; for more details.</p>
+<p>The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be defined in &lsquo;ftoption.h&rsquo; in order to make the higher byte indicate the module where the error has happened (this is not compatible with standard builds of FreeType&nbsp;2, however). See the file &lsquo;ftmoderr.h&rsquo; for more details.</p>
<p><b>Error</b> <b>Message</b> <b>Strings</b></p>
-<p>Error definitions are set up with special macros that allow client applications to build a table of error message strings. The strings are not included in a normal build of FreeType&amp;nbsp;2 to save space (most client applications do not use them).</p>
+<p>Error definitions are set up with special macros that allow client applications to build a table of error message strings. The strings are not included in a normal build of FreeType&nbsp;2 to save space (most client applications do not use them).</p>
<p>To do so, you have to define the following macros before including this file.</p>
<pre class="colored">
FT_ERROR_START_LIST
diff --git a/modules/freetype2/docs/reference/ft2-font_formats.html b/modules/freetype2/docs/reference/ft2-font_formats.html
index c63a9a28d..54c4adfdf 100644
--- a/modules/freetype2/docs/reference/ft2-font_formats.html
+++ b/modules/freetype2/docs/reference/ft2-font_formats.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="font_formats">Font Formats</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-gasp_table.html b/modules/freetype2/docs/reference/ft2-gasp_table.html
index 5e6afe005..3bb22ee35 100644
--- a/modules/freetype2/docs/reference/ft2-gasp_table.html
+++ b/modules/freetype2/docs/reference/ft2-gasp_table.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="gasp_table">Gasp Table</h1>
<h2>Synopsis</h2>
@@ -118,8 +118,8 @@
#define <a href="ft2-gasp_table.html#FT_GASP_NO_TABLE">FT_GASP_NO_TABLE</a> -1
#define <a href="ft2-gasp_table.html#FT_GASP_DO_GRIDFIT">FT_GASP_DO_GRIDFIT</a> 0x01
#define <a href="ft2-gasp_table.html#FT_GASP_DO_GRAY">FT_GASP_DO_GRAY</a> 0x02
+#define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</a> 0x04
#define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_SMOOTHING">FT_GASP_SYMMETRIC_SMOOTHING</a> 0x08
-#define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</a> 0x10
</pre>
<p>A list of values and/or bit-flags returned by the <a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a> function.</p>
@@ -162,7 +162,7 @@
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> ppem );
</pre>
-<p>Read the &lsquo;gasp&rsquo; table from a TrueType or OpenType font file and return the entry corresponding to a given character pixel size.</p>
+<p>For a TrueType or OpenType font file, return the rasterizer behaviour flags from the font's &lsquo;gasp&rsquo; table corresponding to a given character pixel size.</p>
<h4>input</h4>
<table class="fields">
@@ -177,6 +177,9 @@
<h4>return</h4>
<p>Bit flags (see <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a>), or <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a> if there is no &lsquo;gasp&rsquo; table in the face.</p>
+<h4>note</h4>
+<p>If you want to use the MM functionality of OpenType variation fonts (i.e., using <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> and friends), call this function <b>after</b> setting an instance since the return values can change.</p>
+
<h4>since</h4>
<p>2.3.0</p>
diff --git a/modules/freetype2/docs/reference/ft2-glyph_management.html b/modules/freetype2/docs/reference/ft2-glyph_management.html
index 682369fad..00ef43ab5 100644
--- a/modules/freetype2/docs/reference/ft2-glyph_management.html
+++ b/modules/freetype2/docs/reference/ft2-glyph_management.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="glyph_management">Glyph Management</h1>
<h2>Synopsis</h2>
@@ -288,6 +288,9 @@
<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
+<h4>note</h4>
+<p>Because &lsquo;*aglyph-&gt;advance.x&rsquo; and '*aglyph-&gt;advance.y' are 16.16 fixed-point numbers, &lsquo;slot-&gt;advance.x&rsquo; and &lsquo;slot-&gt;advance.y&rsquo; (which are in 26.6 fixed-point format) must be in the range ]-32768;32768[.</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -418,7 +421,7 @@
<a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> *acbox );
</pre>
-<p>Return a glyph's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bézier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bézier outside arcs).</p>
+<p>Return a glyph's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bezier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bezier outside arcs).</p>
<p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component, which is dedicated to this single task.</p>
<h4>input</h4>
@@ -507,7 +510,7 @@
// load glyph
- error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT );
+ error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT );
// extract glyph image
error = FT_Get_Glyph( face-&gt;glyph, &amp;glyph );
diff --git a/modules/freetype2/docs/reference/ft2-glyph_stroker.html b/modules/freetype2/docs/reference/ft2-glyph_stroker.html
index c1348704d..b1398107b 100644
--- a/modules/freetype2/docs/reference/ft2-glyph_stroker.html
+++ b/modules/freetype2/docs/reference/ft2-glyph_stroker.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="glyph_stroker">Glyph Stroker</h1>
<h2>Synopsis</h2>
@@ -170,7 +170,7 @@
<p></p>
</td></tr>
<tr><td class="val" id="FT_STROKER_LINEJOIN_MITER">FT_STROKER_LINEJOIN_MITER</td><td class="desc">
-<p>Used to render mitered line joins, with variable bevels if the miter limit is exceeded. The intersection of the strokes is clipped at a line perpendicular to the bisector of the angle between the strokes, at the distance from the intersection of the segments equal to the product of the miter limit value and the border radius. This prevents long spikes being created. FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for backwards compatibility.</p>
+<p>Used to render mitered line joins, with variable bevels if the miter limit is exceeded. The intersection of the strokes is clipped at a line perpendicular to the bisector of the angle between the strokes, at the distance from the intersection of the segments equal to the product of the miter limit value and the border radius. This prevents long spikes being created. FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for backward compatibility.</p>
</td></tr>
</table>
@@ -614,7 +614,7 @@
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to );
</pre>
-<p>&lsquo;Draw&rsquo; a single quadratic Bézier in the stroker's current sub-path, from the last position.</p>
+<p>&lsquo;Draw&rsquo; a single quadratic Bezier in the stroker's current sub-path, from the last position.</p>
<h4>input</h4>
<table class="fields">
@@ -622,7 +622,7 @@
<p>The target stroker handle.</p>
</td></tr>
<tr><td class="val" id="control">control</td><td class="desc">
-<p>A pointer to a Bézier control point.</p>
+<p>A pointer to a Bezier control point.</p>
</td></tr>
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the destination point.</p>
@@ -649,7 +649,7 @@
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to );
</pre>
-<p>&lsquo;Draw&rsquo; a single cubic Bézier in the stroker's current sub-path, from the last position.</p>
+<p>&lsquo;Draw&rsquo; a single cubic Bezier in the stroker's current sub-path, from the last position.</p>
<h4>input</h4>
<table class="fields">
@@ -657,10 +657,10 @@
<p>The target stroker handle.</p>
</td></tr>
<tr><td class="val" id="control1">control1</td><td class="desc">
-<p>A pointer to the first Bézier control point.</p>
+<p>A pointer to the first Bezier control point.</p>
</td></tr>
<tr><td class="val" id="control2">control2</td><td class="desc">
-<p>A pointer to second Bézier control point.</p>
+<p>A pointer to second Bezier control point.</p>
</td></tr>
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the destination point.</p>
diff --git a/modules/freetype2/docs/reference/ft2-glyph_variants.html b/modules/freetype2/docs/reference/ft2-glyph_variants.html
index b1585526d..b74b5b083 100644
--- a/modules/freetype2/docs/reference/ft2-glyph_variants.html
+++ b/modules/freetype2/docs/reference/ft2-glyph_variants.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,9 +100,9 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
-<h1 id="glyph_variants">Glyph Variants</h1>
+<h1 id="glyph_variants">Unicode Variation Sequences</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td><a href="#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td></tr>
@@ -111,12 +111,14 @@
</table>
-<p>Many CJK characters have variant forms. They are a sort of grey area somewhere between being totally irrelevant and semantically distinct; for this reason, the Unicode consortium decided to introduce Ideographic Variation Sequences (IVS), consisting of a Unicode base character and one of 240 variant selectors (U+E0100-U+E01EF), instead of further extending the already huge code range for CJK characters.</p>
-<p>An IVS is registered and unique; for further details please refer to Unicode Technical Standard #37, the Ideographic Variation Database:</p>
-<p><a href="http://www.unicode.org/reports/tr37/">http://www.unicode.org/reports/tr37/</a></p>
-<p>To date (November 2014), the character with the most variants is U+9089, having 32 such IVS.</p>
-<p>Adobe and MS decided to support IVS with a new cmap subtable (format&nbsp;14). It is an odd subtable because it is not a mapping of input code points to glyphs, but contains lists of all variants supported by the font.</p>
-<p>A variant may be either &lsquo;default&rsquo; or &lsquo;non-default&rsquo;. A default variant is the one you will get for that code point if you look it up in the standard Unicode cmap. A non-default variant is a different glyph.</p>
+<p>Many characters, especially for CJK scripts, have variant forms. They are a sort of grey area somewhere between being totally irrelevant and semantically distinct; for this reason, the Unicode consortium decided to introduce Variation Sequences (VS), consisting of a Unicode base character and a variation selector instead of further extending the already huge number of characters.</p>
+<p>Unicode maintains two different sets, namely &lsquo;Standardized Variation Sequences&rsquo; and registered &lsquo;Ideographic Variation Sequences&rsquo; (IVS), collected in the &lsquo;Ideographic Variation Database&rsquo; (IVD).</p>
+<p><a href="https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt">https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt</a> <a href="https://unicode.org/reports/tr37/">https://unicode.org/reports/tr37/</a> <a href="https://unicode.org/ivd/">https://unicode.org/ivd/</a></p>
+<p>To date (January 2017), the character with the most ideographic variations is U+9089, having 32 such IVS.</p>
+<p>Three Mongolian Variation Selectors have the values U+180B-U+180D; 256 generic Variation Selectors are encoded in the ranges U+FE00-U+FE0F and U+E0100-U+E01EF. IVS currently use Variation Selectors from the range U+E0100-U+E01EF only.</p>
+<p>A VS consists of the base character value followed by a single Variation Selector. For example, to get the first variation of U+9089, you have to write the character sequence &lsquo;U+9089 U+E0100&rsquo;.</p>
+<p>Adobe and MS decided to support both standardized and ideographic VS with a new cmap subtable (format&nbsp;14). It is an odd subtable because it is not a mapping of input code points to glyphs, but contains lists of all variations supported by the font.</p>
+<p>A variation may be either &lsquo;default&rsquo; or &lsquo;non-default&rsquo; for a given font. A default variation is the one you will get for that code point if you look it up in the standard Unicode cmap. A non-default variation is a different glyph.</p>
<div class="section">
<h3 id="FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</h3>
@@ -166,7 +168,7 @@
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> variantSelector );
</pre>
-<p>Check whether this variant of this Unicode character is the one to be found in the &lsquo;cmap&rsquo;.</p>
+<p>Check whether this variation of this Unicode character is the one to be found in the &lsquo;cmap&rsquo;.</p>
<h4>input</h4>
<table class="fields">
@@ -182,7 +184,7 @@
</table>
<h4>return</h4>
-<p>1&nbsp;if found in the standard (Unicode) cmap, 0&nbsp;if found in the variation selector cmap, or -1 if it is not a variant.</p>
+<p>1&nbsp;if found in the standard (Unicode) cmap, 0&nbsp;if found in the variation selector cmap, or -1 if it is not a variation.</p>
<h4>note</h4>
<p>This function is only meaningful if the font has a variation selector cmap subtable.</p>
@@ -201,7 +203,7 @@
<b>FT_Face_GetVariantSelectors</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
</pre>
-<p>Return a zero-terminated list of Unicode variant selectors found in the font.</p>
+<p>Return a zero-terminated list of Unicode variation selectors found in the font.</p>
<h4>input</h4>
<table class="fields">
@@ -211,7 +213,7 @@
</table>
<h4>return</h4>
-<p>A pointer to an array of selector code points, or NULL if there is no valid variant selector cmap subtable.</p>
+<p>A pointer to an array of selector code points, or NULL if there is no valid variation selector cmap subtable.</p>
<h4>note</h4>
<p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
@@ -231,7 +233,7 @@
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> charcode );
</pre>
-<p>Return a zero-terminated list of Unicode variant selectors found for the specified character code.</p>
+<p>Return a zero-terminated list of Unicode variation selectors found for the specified character code.</p>
<h4>input</h4>
<table class="fields">
@@ -244,7 +246,7 @@
</table>
<h4>return</h4>
-<p>A pointer to an array of variant selector code points that are active for the given character, or NULL if the corresponding list is empty.</p>
+<p>A pointer to an array of variation selector code points that are active for the given character, or NULL if the corresponding list is empty.</p>
<h4>note</h4>
<p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
@@ -264,7 +266,7 @@
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> variantSelector );
</pre>
-<p>Return a zero-terminated list of Unicode character codes found for the specified variant selector.</p>
+<p>Return a zero-terminated list of Unicode character codes found for the specified variation selector.</p>
<h4>input</h4>
<table class="fields">
@@ -272,12 +274,12 @@
<p>A handle to the source face object.</p>
</td></tr>
<tr><td class="val" id="variantSelector">variantSelector</td><td class="desc">
-<p>The variant selector code point in Unicode.</p>
+<p>The variation selector code point in Unicode.</p>
</td></tr>
</table>
<h4>return</h4>
-<p>A list of all the code points that are specified by this selector (both default and non-default codes are returned) or NULL if there is no valid cmap or the variant selector is invalid.</p>
+<p>A list of all the code points that are specified by this selector (both default and non-default codes are returned) or NULL if there is no valid cmap or the variation selector is invalid.</p>
<h4>note</h4>
<p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
diff --git a/modules/freetype2/docs/reference/ft2-gx_validation.html b/modules/freetype2/docs/reference/ft2-gx_validation.html
index 995877fb4..81ad8be36 100644
--- a/modules/freetype2/docs/reference/ft2-gx_validation.html
+++ b/modules/freetype2/docs/reference/ft2-gx_validation.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="gx_validation">TrueTypeGX/AAT Validation</h1>
<h2>Synopsis</h2>
@@ -253,7 +253,7 @@
<h3 id="FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</h3>
<p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p>
<pre>
-#define <b>FT_VALIDATE_GX_LENGTH</b> (FT_VALIDATE_GX_LAST_INDEX + 1)
+#define <b>FT_VALIDATE_GX_LENGTH</b> ( FT_VALIDATE_GX_LAST_INDEX + 1 )
</pre>
<p>The number of tables checked in this module. Use it as a parameter for the &lsquo;table-length&rsquo; argument of function <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a>.</p>
diff --git a/modules/freetype2/docs/reference/ft2-gzip.html b/modules/freetype2/docs/reference/ft2-gzip.html
index 4f2c33361..51a9d29fc 100644
--- a/modules/freetype2/docs/reference/ft2-gzip.html
+++ b/modules/freetype2/docs/reference/ft2-gzip.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="gzip">GZIP Streams</h1>
<h2>Synopsis</h2>
@@ -192,6 +192,9 @@
<h4>note</h4>
<p>This function may return &lsquo;FT_Err_Unimplemented_Feature&rsquo; if your build of FreeType was not compiled with zlib support.</p>
+<h4>since</h4>
+<p>2.5.1</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
diff --git a/modules/freetype2/docs/reference/ft2-header_file_macros.html b/modules/freetype2/docs/reference/ft2-header_file_macros.html
index 5ff5f9305..88cb179d0 100644
--- a/modules/freetype2/docs/reference/ft2-header_file_macros.html
+++ b/modules/freetype2/docs/reference/ft2-header_file_macros.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,37 +100,35 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="header_file_macros">Header File Macros</h1>
<h2>Synopsis</h2>
<table class="synopsis">
-<tr><td><a href="#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td><a href="#FT_BZIP2_H">FT_BZIP2_H</a></td></tr>
-<tr><td><a href="#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td><a href="#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
-<tr><td><a href="#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td><a href="#FT_GLYPH_H">FT_GLYPH_H</a></td></tr>
-<tr><td><a href="#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td><a href="#FT_BITMAP_H">FT_BITMAP_H</a></td></tr>
-<tr><td><a href="#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td><a href="#FT_BBOX_H">FT_BBOX_H</a></td></tr>
-<tr><td><a href="#FT_ERRORS_H">FT_ERRORS_H</a></td><td><a href="#FT_CACHE_H">FT_CACHE_H</a></td></tr>
-<tr><td><a href="#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td><a href="#FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</a></td></tr>
-<tr><td><a href="#FT_SYSTEM_H">FT_SYSTEM_H</a></td><td><a href="#FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</a></td></tr>
-<tr><td><a href="#FT_IMAGE_H">FT_IMAGE_H</a></td><td><a href="#FT_CACHE_CHARMAP_H">FT_CACHE_CHARMAP_H</a></td></tr>
-<tr><td><a href="#FT_TYPES_H">FT_TYPES_H</a></td><td><a href="#FT_MAC_H">FT_MAC_H</a></td></tr>
-<tr><td><a href="#FT_LIST_H">FT_LIST_H</a></td><td><a href="#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td></tr>
-<tr><td><a href="#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td><a href="#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td></tr>
-<tr><td><a href="#FT_SIZES_H">FT_SIZES_H</a></td><td><a href="#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td></tr>
-<tr><td><a href="#FT_MODULE_H">FT_MODULE_H</a></td><td><a href="#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td></tr>
-<tr><td><a href="#FT_RENDER_H">FT_RENDER_H</a></td><td><a href="#FT_PFR_H">FT_PFR_H</a></td></tr>
+<tr><td><a href="#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td><a href="#FT_BDF_H">FT_BDF_H</a></td></tr>
+<tr><td><a href="#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td><a href="#FT_CID_H">FT_CID_H</a></td></tr>
+<tr><td><a href="#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td><a href="#FT_GZIP_H">FT_GZIP_H</a></td></tr>
+<tr><td><a href="#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td><a href="#FT_LZW_H">FT_LZW_H</a></td></tr>
+<tr><td><a href="#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td><a href="#FT_BZIP2_H">FT_BZIP2_H</a></td></tr>
+<tr><td><a href="#FT_ERRORS_H">FT_ERRORS_H</a></td><td><a href="#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
+<tr><td><a href="#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td><a href="#FT_GLYPH_H">FT_GLYPH_H</a></td></tr>
+<tr><td><a href="#FT_SYSTEM_H">FT_SYSTEM_H</a></td><td><a href="#FT_BITMAP_H">FT_BITMAP_H</a></td></tr>
+<tr><td><a href="#FT_IMAGE_H">FT_IMAGE_H</a></td><td><a href="#FT_BBOX_H">FT_BBOX_H</a></td></tr>
+<tr><td><a href="#FT_TYPES_H">FT_TYPES_H</a></td><td><a href="#FT_CACHE_H">FT_CACHE_H</a></td></tr>
+<tr><td><a href="#FT_LIST_H">FT_LIST_H</a></td><td><a href="#FT_MAC_H">FT_MAC_H</a></td></tr>
+<tr><td><a href="#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td><a href="#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td></tr>
+<tr><td><a href="#FT_SIZES_H">FT_SIZES_H</a></td><td><a href="#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td></tr>
+<tr><td><a href="#FT_MODULE_H">FT_MODULE_H</a></td><td><a href="#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td></tr>
+<tr><td><a href="#FT_RENDER_H">FT_RENDER_H</a></td><td><a href="#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td></tr>
+<tr><td><a href="#FT_DRIVER_H">FT_DRIVER_H</a></td><td><a href="#FT_PFR_H">FT_PFR_H</a></td></tr>
<tr><td><a href="#FT_AUTOHINTER_H">FT_AUTOHINTER_H</a></td><td><a href="#FT_STROKER_H">FT_STROKER_H</a></td></tr>
<tr><td><a href="#FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</a></td><td><a href="#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td></tr>
<tr><td><a href="#FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</a></td><td><a href="#FT_FONT_FORMATS_H">FT_FONT_FORMATS_H</a></td></tr>
-<tr><td><a href="#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td><td><a href="#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
-<tr><td><a href="#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td><td><a href="#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td></tr>
-<tr><td><a href="#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td><td><a href="#FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</a></td></tr>
-<tr><td><a href="#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td><td><a href="#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td></tr>
-<tr><td><a href="#FT_BDF_H">FT_BDF_H</a></td><td><a href="#FT_GASP_H">FT_GASP_H</a></td></tr>
-<tr><td><a href="#FT_CID_H">FT_CID_H</a></td><td><a href="#FT_ADVANCES_H">FT_ADVANCES_H</a></td></tr>
-<tr><td><a href="#FT_GZIP_H">FT_GZIP_H</a></td><td><a href="#':'">':'</a></td></tr>
-<tr><td><a href="#FT_LZW_H">FT_LZW_H</a></td><td></td></tr>
+<tr><td><a href="#FT_PCF_DRIVER_H">FT_PCF_DRIVER_H</a></td><td><a href="#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
+<tr><td><a href="#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td><td><a href="#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td></tr>
+<tr><td><a href="#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td><td><a href="#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td></tr>
+<tr><td><a href="#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td><td><a href="#FT_GASP_H">FT_GASP_H</a></td></tr>
+<tr><td><a href="#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td><td><a href="#FT_ADVANCES_H">FT_ADVANCES_H</a></td></tr>
</table>
@@ -322,12 +320,24 @@
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
+<h3 id="FT_DRIVER_H">FT_DRIVER_H</h3>
+<pre>
+#define <b>FT_DRIVER_H</b> &lt;freetype/ftdriver.h&gt;
+</pre>
+
+<p>A macro used in #include statements to name the file containing structures and macros related to the driver modules.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
<h3 id="FT_AUTOHINTER_H">FT_AUTOHINTER_H</h3>
<pre>
-#define <b>FT_AUTOHINTER_H</b> &lt;freetype/ftautoh.h&gt;
+#define <b>FT_AUTOHINTER_H</b> <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a>
</pre>
<p>A macro used in #include statements to name the file containing structures and macros related to the auto-hinting module.</p>
+<p>Deprecated since version 2.9; use <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a> instead.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -335,10 +345,11 @@
<div class="section">
<h3 id="FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</h3>
<pre>
-#define <b>FT_CFF_DRIVER_H</b> &lt;freetype/ftcffdrv.h&gt;
+#define <b>FT_CFF_DRIVER_H</b> <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a>
</pre>
<p>A macro used in #include statements to name the file containing structures and macros related to the CFF driver module.</p>
+<p>Deprecated since version 2.9; use <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a> instead.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -346,10 +357,23 @@
<div class="section">
<h3 id="FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</h3>
<pre>
-#define <b>FT_TRUETYPE_DRIVER_H</b> &lt;freetype/ftttdrv.h&gt;
+#define <b>FT_TRUETYPE_DRIVER_H</b> <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a>
</pre>
<p>A macro used in #include statements to name the file containing structures and macros related to the TrueType driver module.</p>
+<p>Deprecated since version 2.9; use <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a> instead.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PCF_DRIVER_H">FT_PCF_DRIVER_H</h3>
+<pre>
+#define <b>FT_PCF_DRIVER_H</b> <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a>
+</pre>
+
+<p>A macro used in #include statements to name the file containing structures and macros related to the PCF driver module.</p>
+<p>Deprecated since version 2.9; use <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a> instead.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -509,44 +533,6 @@
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
-<h3 id="FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</h3>
-<pre>
-#define <b>FT_CACHE_IMAGE_H</b> <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a>
-</pre>
-
-<p>A macro used in #include statements to name the file containing the &lsquo;glyph image&rsquo; API of the FreeType&nbsp;2 cache sub-system.</p>
-<p>It is used to define a cache for <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> elements. You can also use the API defined in <a href="ft2-header_file_macros.html#FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</a> if you only need to store small glyph bitmaps, as it will use less memory.</p>
-<p>This macro is deprecated. Simply include <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a> to have all glyph image-related cache declarations.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</h3>
-<pre>
-#define <b>FT_CACHE_SMALL_BITMAPS_H</b> <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a>
-</pre>
-
-<p>A macro used in #include statements to name the file containing the &lsquo;small bitmaps&rsquo; API of the FreeType&nbsp;2 cache sub-system.</p>
-<p>It is used to define a cache for small glyph bitmaps in a relatively memory-efficient way. You can also use the API defined in <a href="ft2-header_file_macros.html#FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</a> if you want to cache arbitrary glyph images, including scalable outlines.</p>
-<p>This macro is deprecated. Simply include <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a> to have all small bitmaps-related cache declarations.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="FT_CACHE_CHARMAP_H">FT_CACHE_CHARMAP_H</h3>
-<pre>
-#define <b>FT_CACHE_CHARMAP_H</b> <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a>
-</pre>
-
-<p>A macro used in #include statements to name the file containing the &lsquo;charmap&rsquo; API of the FreeType&nbsp;2 cache sub-system.</p>
-<p>This macro is deprecated. Simply include <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a> to have all charmap-based cache declarations.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
<h3 id="FT_MAC_H">FT_MAC_H</h3>
<pre>
#define <b>FT_MAC_H</b> &lt;freetype/ftmac.h&gt;
@@ -672,17 +658,6 @@
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
-<h3 id="FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</h3>
-<pre>
-#define <b>FT_UNPATENTED_HINTING_H</b> &lt;freetype/ttunpat.h&gt;
-</pre>
-
-<p>Deprecated.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
<h3 id="FT_INCREMENTAL_H">FT_INCREMENTAL_H</h3>
<pre>
#define <b>FT_INCREMENTAL_H</b> &lt;freetype/ftincrem.h&gt;
@@ -715,25 +690,5 @@
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-<div class="section">
-<h3 id="':'">':'</h3>
-<p>Defined in FT_CONFIG_OPTIONS_H (freetype/config/ftoption.h).</p>
-<pre>
-#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
-</pre>
-<h4>property-name1</h4>
-<p>'=' &lt;property-value1&gt;</p>
-
-<h4>module-name2</h4>
-<p>':'</p>
-
-<h4>property-name2</h4>
-<p>'=' &lt;property-value2&gt; ...</p>
-<p>Example:</p>
-<p>FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ cff:no-stem-darkening=1 \ autofitter:warping=1</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
</body>
</html>
diff --git a/modules/freetype2/docs/reference/ft2-header_inclusion.html b/modules/freetype2/docs/reference/ft2-header_inclusion.html
index 7be8391e0..107ac5c89 100644
--- a/modules/freetype2/docs/reference/ft2-header_inclusion.html
+++ b/modules/freetype2/docs/reference/ft2-header_inclusion.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="header_inclusion">FreeType's header inclusion scheme</h1>
diff --git a/modules/freetype2/docs/reference/ft2-incremental.html b/modules/freetype2/docs/reference/ft2-incremental.html
index 8f65b9f87..225728296 100644
--- a/modules/freetype2/docs/reference/ft2-incremental.html
+++ b/modules/freetype2/docs/reference/ft2-incremental.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="incremental">Incremental Loading</h1>
<h2>Synopsis</h2>
@@ -109,13 +109,13 @@
<tr><td><a href="#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></td><td><a href="#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></td></tr>
<tr><td><a href="#FT_Incremental_Metrics">FT_Incremental_Metrics</a></td><td><a href="#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></td></tr>
<tr><td><a href="#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></td><td><a href="#FT_Incremental_Interface">FT_Incremental_Interface</a></td></tr>
-<tr><td><a href="#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td><a href="#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td></tr>
+<tr><td><a href="#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td></td></tr>
</table>
<p>This section contains various functions used to perform so-called &lsquo;incremental&rsquo; glyph loading. This is a mode where all glyphs loaded from a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a> are provided by the client application.</p>
<p>Apart from that, all other tables are loaded normally from the font file. This mode is useful when FreeType is used within another engine, e.g., a PostScript Imaging Processor.</p>
-<p>To enable this mode, you must use <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>, passing an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> with the <a href="ft2-incremental.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a> tag and an <a href="ft2-incremental.html#FT_Incremental_Interface">FT_Incremental_Interface</a> value. See the comments for <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a> for an example.</p>
+<p>To enable this mode, you must use <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>, passing an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> with the <a href="ft2-parameter_tags.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a> tag and an <a href="ft2-incremental.html#FT_Incremental_Interface">FT_Incremental_Interface</a> value. See the comments for <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a> for an example.</p>
<div class="section">
<h3 id="FT_Incremental">FT_Incremental</h3>
@@ -330,7 +330,7 @@
} <b>FT_Incremental_InterfaceRec</b>;
</pre>
-<p>A structure to be used with <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to indicate that the user wants to support incremental glyph loading. You should use it with <a href="ft2-incremental.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a> as in the following example:</p>
+<p>A structure to be used with <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to indicate that the user wants to support incremental glyph loading. You should use it with <a href="ft2-parameter_tags.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a> as in the following example:</p>
<pre class="colored">
FT_Incremental_InterfaceRec inc_int;
FT_Parameter parameter;
@@ -371,17 +371,5 @@
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-<div class="section">
-<h3 id="FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</h3>
-<p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p>
-<pre>
-#define <b>FT_PARAM_TAG_INCREMENTAL</b> <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'n', 'c', 'r' )
-</pre>
-
-<p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to indicate an incremental loading object to be used by FreeType.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
</body>
</html>
diff --git a/modules/freetype2/docs/reference/ft2-index.html b/modules/freetype2/docs/reference/ft2-index.html
index b61bddb6f..ee99e2ff2 100644
--- a/modules/freetype2/docs/reference/ft2-index.html
+++ b/modules/freetype2/docs/reference/ft2-index.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,286 +100,280 @@
<body>
<table class="index-toc-link"><tr><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<table class="index">
-<tr><td><a href="ft2-header_file_macros.html#':'">':'</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XY_SCALE</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_ATOM</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LcdFilter</a></td><td><a href="ft2-base_interface.html#FT_SubGlyph">FT_SubGlyph</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a></td><td><a href="ft2-header_file_macros.html#FT_LIST_H">FT_LIST_H</a></td><td><a href="ft2-header_file_macros.html#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a></td><td><a href="ft2-base_interface.html#FT_Library">FT_Library</a></td><td><a href="ft2-header_file_macros.html#FT_SYSTEM_H">FT_SYSTEM_H</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_NONE</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td><a href="ft2-basic_types.html#FT_Tag">FT_Tag</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_Property">BDF_Property</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></td><td><a href="ft2-computations.html#FT_Tan">FT_Tan</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a></td><td><a href="ft2-version.html#FT_Library_Version">FT_Library_Version</a></td><td><a href="ft2-header_file_macros.html#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PropertyType</a></td><td><a href="ft2-list_processing.html#FT_List">FT_List</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceDict">CID_FaceDict</a></td><td><a href="ft2-list_processing.html#FT_List_Add">FT_List_Add</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_NONE</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a></td><td><a href="ft2-list_processing.html#FT_List_Destructor">FT_List_Destructor</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_PATENTED</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceInfo">CID_FaceInfo</a></td><td><a href="ft2-list_processing.html#FT_List_Finalize">FT_List_Finalize</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a></td><td><a href="ft2-list_processing.html#FT_List_Find">FT_List_Find</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FontDict">CID_FontDict</a></td><td><a href="ft2-list_processing.html#FT_List_Insert">FT_List_Insert</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_Info">CID_Info</a></td><td><a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#darkening-parameters(autofit)">darkening-parameters (autofit)</a></td><td><a href="ft2-list_processing.html#FT_List_Iterator">FT_List_Iterator</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a></td></tr>
-<tr><td><a href="ft2-cff_driver.html#darkening-parameters(cff)">darkening-parameters (cff)</a></td><td><a href="ft2-list_processing.html#FT_List_Remove">FT_List_Remove</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#default-script">default-script</a></td><td><a href="ft2-list_processing.html#FT_List_Up">FT_List_Up</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MAJOR</a></td><td><a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a></td><td><a href="ft2-header_file_macros.html#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MINOR</a></td><td><a href="ft2-list_processing.html#FT_ListNodeRec">FT_ListNodeRec</a></td><td><a href="ft2-header_file_macros.html#FT_TYPES_H">FT_TYPES_H</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_PATCH</a></td><td><a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a></td><td><a href="ft2-basic_types.html#FT_UFWord">FT_UFWord</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_XXX</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_BITMAP_METRICS_ONLY</a></td><td><a href="ft2-basic_types.html#FT_UInt">FT_UInt</a></td></tr>
-<tr><td><a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a></td><td><a href="ft2-basic_types.html#FT_UInt16">FT_UInt16</a></td></tr>
-<tr><td><a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COMPUTE_METRICS</a></td><td><a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_ADVANCES_H">FT_ADVANCES_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_CROP_BITMAP</a></td><td><a href="ft2-basic_types.html#FT_UInt64">FT_UInt64</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a></td><td><a href="ft2-basic_types.html#FT_ULong">FT_ULong</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a></td><td><a href="ft2-header_file_macros.html#FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</a></td></tr>
-<tr><td><a href="ft2-system_interface.html#FT_Alloc_Func">FT_Alloc_Func</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</a></td><td><a href="ft2-basic_types.html#FT_UnitVector">FT_UnitVector</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_2PI">FT_ANGLE_2PI</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a></td><td><a href="ft2-basic_types.html#FT_UShort">FT_UShort</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_APPLE</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_PI2">FT_ANGLE_PI2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_BASE</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_PI4">FT_ANGLE_PI4</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_bsln</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Angle">FT_Angle</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_BITMAP</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERN</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Angle_Diff">FT_Angle_Diff</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Atan2">FT_Atan2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_feat</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GDEF</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_PEDANTIC</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GPOS</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_AUTOHINTER_H">FT_AUTOHINTER_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GSUB</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_CJK</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GX</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_INDIC</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD_V</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_LATIN</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_NONE</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_JSTF</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_just</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BBOX_H">FT_BBOX_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_kern</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_BBox">FT_BBox</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_lcar</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BDF_H">FT_BDF_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_MATH</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BITMAP_H">FT_BITMAP_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_MS</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a></td><td><a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_mort</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a></td><td><a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_morx</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Copy">FT_Bitmap_Copy</a></td><td><a href="ft2-truetype_tables.html#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OT</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a></td><td><a href="ft2-basic_types.html#FT_Long">FT_Long</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></td><td><a href="ft2-header_file_macros.html#FT_LZW_H">FT_LZW_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_opbd</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Init">FT_Bitmap_Init</a></td><td><a href="ft2-header_file_macros.html#FT_MAC_H">FT_MAC_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_prop</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_trak</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyph">FT_BitmapGlyph</a></td><td><a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Axis">FT_Var_Axis</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a></td><td><a href="ft2-computations.html#FT_Matrix_Invert">FT_Matrix_Invert</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Named_Style">FT_Var_Named_Style</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Bool">FT_Bool</a></td><td><a href="ft2-computations.html#FT_Matrix_Multiply">FT_Matrix_Multiply</a></td><td><a href="ft2-basic_types.html#FT_Vector">FT_Vector</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Byte">FT_Byte</a></td><td><a href="ft2-system_interface.html#FT_Memory">FT_Memory</a></td><td><a href="ft2-computations.html#FT_Vector_From_Polar">FT_Vector_From_Polar</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a></td><td><a href="ft2-system_interface.html#FT_MemoryRec">FT_MemoryRec</a></td><td><a href="ft2-computations.html#FT_Vector_Length">FT_Vector_Length</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BZIP2_H">FT_BZIP2_H</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="ft2-computations.html#FT_Vector_Polarize">FT_Vector_Polarize</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_CHARMAP_H">FT_CACHE_CHARMAP_H</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a></td><td><a href="ft2-computations.html#FT_Vector_Rotate">FT_Vector_Rotate</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td><a href="ft2-computations.html#FT_Vector_Transform">FT_Vector_Transform</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_H">FT_MODULE_H</a></td><td><a href="ft2-computations.html#FT_Vector_Unit">FT_Vector_Unit</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</a></td><td><a href="ft2-module_management.html#FT_Module">FT_Module</a></td><td><a href="ft2-header_file_macros.html#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_CeilFix">FT_CeilFix</a></td><td><a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_Header">FT_WinFNT_Header</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</a></td><td><a href="ft2-module_management.html#FT_Module_Constructor">FT_Module_Constructor</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></td></tr>
-<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_ADOBE</a></td><td><a href="ft2-module_management.html#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1250</a></td></tr>
-<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_FREETYPE</a></td><td><a href="ft2-module_management.html#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a></td></tr>
-<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_XXX</a></td><td><a href="ft2-header_file_macros.html#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1252</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Char">FT_Char</a></td><td><a href="ft2-computations.html#FT_MulDiv">FT_MulDiv</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1253</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a></td><td><a href="ft2-computations.html#FT_MulFix">FT_MulFix</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1254</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a></td><td><a href="ft2-multiple_masters.html#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1255</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CID_H">FT_CID_H</a></td><td><a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1256</a></td></tr>
-<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Free">FT_ClassicKern_Free</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1257</a></td></tr>
-<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1258</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1361</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td><a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP874</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td><a href="ft2-base_interface.html#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP932</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td><a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP936</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Cos">FT_Cos</a></td><td><a href="ft2-basic_types.html#FT_Offset">FT_Offset</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP949</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Data">FT_Data</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP950</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_DivFix">FT_DivFix</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_DEFAULT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_MAC</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_OEM</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_SYMBOL</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_XXX</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-sizes_management.html#FT_Done_Size">FT_Done_Size</a></td><td><a href="ft2-header_file_macros.html#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Driver">FT_Driver</a></td><td><a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a></td><td><a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_CUSTOM</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Free">FT_OpenType_Free</a></td><td><a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_EXPERT</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a></td><td><a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_LATIN_1</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_LEFT</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_STANDARD</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_RIGHT</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_APPLE_ROMAN</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_NONE</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_New">FTC_ImageCache_New</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_GB2312</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageTypeRec">FTC_ImageTypeRec</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_BIG5</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_EVEN_ODD_FILL</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_GB2312</a></td><td><a href="ft2-header_file_macros.html#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Done">FTC_Manager_Done</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_JOHAB</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_HIGH_PRECISION</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SJIS</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_WANSUNG</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_NONE</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_NONE</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_OWNER</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Reset">FTC_Manager_Reset</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_OLD_LATIN_2</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_REVERSE_FILL</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SINGLE_PASS</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a></td><td><a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_ERRORS_H">FT_ERRORS_H</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Check">FT_Outline_Check</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></td></tr>
-<tr><td><a href="ft2-error_code_values.html#FT_Err_XXX">FT_Err_XXX</a></td><td><a href="ft2-outline_processing.html#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Error">FT_Error</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Copy">FT_Outline_Copy</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a></td><td><a href="ft2-outline_processing.html#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_F2Dot14">FT_F2Dot14</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Decompose">FT_Outline_Decompose</a></td><td><a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Done">FT_Outline_Done</a></td><td><a href="ft2-auto_hinter.html#fallback-script">fallback-script</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_COLOR</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td><a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="ft2-outline_processing.html#FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</a></td><td><a href="ft2-cff_driver.html#hinting-engine(cff)">hinting-engine (cff)</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FAST_GLYPHS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a></td><td><a href="ft2-auto_hinter.html#increase-x-height">increase-x-height</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td><a href="ft2-tt_driver.html#interpreter-version">interpreter-version</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td><td><a href="ft2-auto_hinter.html#no-stem-darkening(autofit)">no-stem-darkening (autofit)</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td><td><a href="ft2-cff_driver.html#no-stem-darkening(cff)">no-stem-darkening (cff)</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HINTER</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_FUZZ</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SCALE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_KERNING</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SHIFT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_VALUE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SCALABLE</a></td><td><a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SFNT</a></td><td><a href="ft2-outline_processing.html#FT_Outline_New">FT_Outline_New</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING_KEY</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_ENTRY</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VERTICAL</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_TYPE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Transform">FT_Outline_Transform</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_BLUE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Face">FT_Face</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Translate">FT_Outline_Translate</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_NAME</a></td></tr>
-<tr><td><a href="ft2-version.html#FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyph">FT_OutlineGlyph</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_OTHER_BLUE</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_BBOX</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td><a href="ft2-sfnt_names.html#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_MATRIX</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></td><td><a href="ft2-sfnt_names.html#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_NAME</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></td><td><a href="ft2-incremental.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_TYPE</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td><td><a href="ft2-truetype_tables.html#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FORCE_BOLD</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Face_Internal">FT_Face_Internal</a></td><td><a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FS_TYPE</a></td></tr>
-<tr><td><a href="ft2-version.html#FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</a></td><td><a href="ft2-header_file_macros.html#FT_PFR_H">FT_PFR_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FULL_NAME</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_IS_FIXED_PITCH</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ITALIC_ANGLE</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_FloorFix">FT_FloorFix</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LANGUAGE_GROUP</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_FONT_FORMATS_H">FT_FONT_FORMATS_H</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY4</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LEN_IV</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_MIN_FEATURE</a></td></tr>
-<tr><td><a href="ft2-system_interface.html#FT_Free_Func">FT_Free_Func</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NOTICE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_BLUE_VALUES</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_EDITABLE_EMBEDDING</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_NONE</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_CHAR_STRINGS</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_INSTALLABLE_EMBEDDING</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_Pixel_Mode</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_BLUES</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_NO_SUBSETTING</a></td><td><a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_OTHER_BLUES</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a></td><td><a href="ft2-basic_types.html#FT_Pos">FT_Pos</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_OTHER_BLUES</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a></td><td><a href="ft2-auto_hinter.html#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_H</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td><td><a href="ft2-auto_hinter.html#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_V</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_FWord">FT_FWord</a></td><td><a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_SUBRS</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRAY</a></td><td><a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_OTHER_BLUE</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRIDFIT</a></td><td><a href="ft2-basic_types.html#FT_PtrDist">FT_PtrDist</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PAINT_TYPE</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GASP_H">FT_GASP_H</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_AA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PASSWORD</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_CLIP</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_RND_STEM_UP</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_GRIDFIT</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DEFAULT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_HW</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_SMOOTHING</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_VW</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_H</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Generic">FT_Generic</a></td><td><a href="ft2-raster.html#FT_Raster">FT_Raster</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_V</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Generic_Finalizer">FT_Generic_Finalizer</a></td><td><a href="ft2-raster.html#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_SUBR</a></td></tr>
-<tr><td><a href="ft2-quick_advance.html#FT_Get_Advance">FT_Get_Advance</a></td><td><a href="ft2-raster.html#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_POSITION</a></td></tr>
-<tr><td><a href="ft2-quick_advance.html#FT_Get_Advances">FT_Get_Advances</a></td><td><a href="ft2-raster.html#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_THICKNESS</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td><a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNIQUE_ID</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td><td><a href="ft2-raster.html#FT_Raster_NewFunc">FT_Raster_NewFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_VERSION</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td><a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_WEIGHT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td><td><a href="ft2-raster.html#FT_Raster_RenderFunc">FT_Raster_RenderFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_Dict_Keys</a></td></tr>
-<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</a></td><td><a href="ft2-raster.html#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a></td><td><a href="ft2-type1_tables.html#PS_FontInfo">PS_FontInfo</a></td></tr>
-<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</a></td><td><a href="ft2-raster.html#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a></td><td><a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a></td></tr>
-<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</a></td><td><a href="ft2-header_file_macros.html#FT_RENDER_H">FT_RENDER_H</a></td><td><a href="ft2-type1_tables.html#PS_Private">PS_Private</a></td></tr>
-<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a></td></tr>
-<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SCALE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LIGHT</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SHIFT</a></td></tr>
-<tr><td><a href="ft2-font_formats.html#FT_Get_Font_Format">FT_Get_Font_Format</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_VALUES</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_BLUES</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a></td><td><a href="ft2-system_interface.html#FT_Realloc_Func">FT_Realloc_Func</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_OTHER_BLUES</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Get_Glyph">FT_Get_Glyph</a></td><td><a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FORCE_BOLD</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td><td><a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_ITALIC_ANGLE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a></td><td><a href="ft2-module_management.html#FT_Remove_Module">FT_Remove_Module</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_OTHER_BLUES</a></td></tr>
-<tr><td><a href="ft2-multiple_masters.html#FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</a></td><td><a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_HEIGHT</a></td></tr>
-<tr><td><a href="ft2-multiple_masters.html#FT_Get_MM_Var">FT_Get_MM_Var</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_WIDTH</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Get_Module">FT_Get_Module</a></td><td><a href="ft2-module_management.html#FT_Renderer">FT_Renderer</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_HEIGHTS</a></td></tr>
-<tr><td><a href="ft2-multiple_masters.html#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td><a href="ft2-module_management.html#FT_Renderer_Class">FT_Renderer_Class</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_WIDTHS</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td><a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_POSITION</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="ft2-computations.html#FT_RoundFix">FT_RoundFix</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_THICKNESS</a></td></tr>
-<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></td><td><a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_Blend_Flags</a></td></tr>
-<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></td><td><a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ARRAY</a></td></tr>
-<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></td><td><a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_EXPERT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td><td><a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ISOLATIN1</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</a></td><td><a href="ft2-module_management.html#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_NONE</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_STANDARD</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_EncodingType</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Get_Renderer">FT_Get_Renderer</a></td><td><a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="ft2-type1_tables.html#T1_FontInfo">T1_FontInfo</a></td></tr>
-<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td><td><a href="ft2-module_management.html#FT_Set_Renderer">FT_Set_Renderer</a></td><td><a href="ft2-type1_tables.html#T1_Private">T1_Private</a></td></tr>
-<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td><td><a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_CUSTOM</a></td></tr>
-<tr><td><a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_EXPERT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_LATIN_1</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HEAD</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_STANDARD</a></td></tr>
-<tr><td><a href="ft2-truetype_engine.html#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HHEA</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-multiple_masters.html#FT_Get_Var_Blend_Coordinates">FT_Get_Var_Blend_Coordinates</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_MAXP</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_DEFAULT</a></td></tr>
-<tr><td><a href="ft2-multiple_masters.html#FT_Get_Var_Design_Coordinates">FT_Get_Var_Design_Coordinates</a></td><td><a href="ft2-header_file_macros.html#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_ISO_10646</a></td></tr>
-<tr><td><a href="ft2-winfnt_fonts.html#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_OS2</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_1_1</a></td></tr>
-<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_PCLT</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_2_0</a></td></tr>
-<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_POST</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_32</a></td></tr>
-<tr><td><a href="ft2-mac_specific.html#FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_VHEA</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_VARIANT_SELECTOR</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_GRIDFIT</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="ft2-truetype_tables.html#TT_Header">TT_Header</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a></td><td><a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a></td><td><a href="ft2-truetype_tables.html#TT_HoriHeader">TT_HoriHeader</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a></td><td><a href="ft2-basic_types.html#FT_Short">FT_Short</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_35</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_BBOX</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_38</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_CELL</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_40</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_NOMINAL</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_REAL_DIM</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_10646</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_SCALES</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_7BIT_ASCII</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a></td><td><a href="ft2-header_file_macros.html#FT_SIZES_H">FT_SIZES_H</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_8859_1</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GLYPH_H">FT_GLYPH_H</a></td><td><a href="ft2-computations.html#FT_Sin">FT_Sin</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a></td><td><a href="ft2-base_interface.html#FT_Size">FT_Size</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARABIC</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a></td><td><a href="ft2-base_interface.html#FT_Size_Internal">FT_Size_Internal</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARMENIAN</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a></td><td><a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_BENGALI</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a></td><td><a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_BURMESE</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_DEVANAGARI</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="ft2-base_interface.html#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GEEZ</a></td></tr>
-<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_Stroke">FT_Glyph_Stroke</a></td><td><a href="ft2-base_interface.html#FT_SizeRec">FT_SizeRec</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GEORGIAN</a></td></tr>
-<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></td><td><a href="ft2-base_interface.html#FT_Slot_Internal">FT_Slot_Internal</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GREEK</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</a></td><td><a href="ft2-raster.html#FT_Span">FT_Span</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GUJARATI</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Transform">FT_Glyph_Transform</a></td><td><a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GURMUKHI</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_HEBREW</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_RIGHT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_JAPANESE</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></td><td><a href="ft2-header_file_macros.html#FT_STROKER_H">FT_STROKER_H</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KANNADA</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_BUTT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KHMER</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KOREAN</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GZIP_H">FT_GZIP_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_SQUARE</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_LAOTIAN</a></td></tr>
-<tr><td><a href="ft2-gzip.html#FT_Gzip_Uncompress">FT_Gzip_Uncompress</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_BEVEL</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MALAYALAM</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MALDIVIAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_FIXED</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MONGOLIAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_VARIABLE</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ORIYA</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ROMAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_BOLD</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_RSYMBOL</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_ITALIC</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_RUSSIAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SIMPLIFIED_CHINESE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="ft2-system_interface.html#FT_Stream">FT_Stream</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SINDHI</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a></td><td><a href="ft2-system_interface.html#FT_Stream_CloseFunc">FT_Stream_CloseFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SINHALESE</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_IMAGE_H">FT_IMAGE_H</a></td><td><a href="ft2-system_interface.html#FT_Stream_IoFunc">FT_Stream_IoFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SLAVIC</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a></td><td><a href="ft2-bzip2.html#FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TAMIL</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td><td><a href="ft2-gzip.html#FT_Stream_OpenGzip">FT_Stream_OpenGzip</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TELUGU</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a></td><td><a href="ft2-lzw.html#FT_Stream_OpenLZW">FT_Stream_OpenLZW</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_THAI</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td><a href="ft2-system_interface.html#FT_StreamDesc">FT_StreamDesc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TIBETAN</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></td><td><a href="ft2-system_interface.html#FT_StreamRec">FT_StreamRec</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TRADITIONAL_CHINESE</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></td><td><a href="ft2-basic_types.html#FT_String">FT_String</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_UNINTERP</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_VIETNAMESE</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_Interface">FT_Incremental_Interface</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></td><td><a href="ft2-truetype_tables.html#TT_MaxProfile">TT_MaxProfile</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_Metrics">FT_Incremental_Metrics</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_BIG_5</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Done">FT_Stroker_Done</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_GB2312</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_JOHAB</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Int">FT_Int</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Export">FT_Stroker_Export</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SJIS</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Int16">FT_Int16</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SYMBOL_CS</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Int32">FT_Int32</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UCS_4</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Int64">FT_Int64</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UNICODE_CS</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_Stroker_LineCap</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_WANSUNG</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineTo">FT_Stroker_LineTo</a></td><td><a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_New">FT_Stroker_New</a></td><td><a href="ft2-truetype_tables.html#TT_PCLT">TT_PCLT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_SFNT">FT_IS_SFNT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ADOBE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Rewind">FT_Stroker_Rewind</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_DEFAULT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Set">FT_Stroker_Set</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_CUSTOM</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNFITTED</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ISO</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_2X2</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_Kerning_Mode</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_DEFAULT</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a></td><td><a href="ft2-truetype_tables.html#TT_Postscript">TT_Postscript</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_SCALE</a></td><td><a href="ft2-truetype_tables.html#TT_VertHeader">TT_VertHeader</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY1</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a></td><td><a href="ft2-auto_hinter.html#warping">warping</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LIGHT</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td><td></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_ATOM</a></td><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNFITTED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Done">FT_Stroker_Done</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a></td><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a></td><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_Kerning_Mode</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Export">FT_Stroker_Export</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_NONE</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_DEFAULT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_Property">BDF_Property</a></td><td><a href="ft2-header_file_macros.html#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PropertyType</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY1</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_Stroker_LineCap</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceDict">CID_FaceDict</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LIGHT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineTo">FT_Stroker_LineTo</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceInfo">CID_FaceInfo</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LcdFilter</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_New">FT_Stroker_New</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a></td><td><a href="ft2-header_file_macros.html#FT_LIST_H">FT_LIST_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FontDict">CID_FontDict</a></td><td><a href="ft2-base_interface.html#FT_Library">FT_Library</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Rewind">FT_Stroker_Rewind</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_Info">CID_Info</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Set">FT_Stroker_Set</a></td></tr>
+<tr><td><a href="ft2-properties.html#darkening-parameters">darkening-parameters</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a></td></tr>
+<tr><td><a href="ft2-properties.html#default-script">default-script</a></td><td><a href="ft2-version.html#FT_Library_Version">FT_Library_Version</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_2X2</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MAJOR</a></td><td><a href="ft2-list_processing.html#FT_List">FT_List</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MINOR</a></td><td><a href="ft2-list_processing.html#FT_List_Add">FT_List_Add</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_PATCH</a></td><td><a href="ft2-list_processing.html#FT_List_Destructor">FT_List_Destructor</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_XXX</a></td><td><a href="ft2-list_processing.html#FT_List_Finalize">FT_List_Finalize</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_SCALE</a></td></tr>
+<tr><td><a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a></td><td><a href="ft2-list_processing.html#FT_List_Find">FT_List_Find</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a></td></tr>
+<tr><td><a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></td><td><a href="ft2-list_processing.html#FT_List_Insert">FT_List_Insert</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_ADVANCES_H">FT_ADVANCES_H</a></td><td><a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XY_SCALE</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="ft2-list_processing.html#FT_List_Iterator">FT_List_Iterator</a></td><td><a href="ft2-base_interface.html#FT_SubGlyph">FT_SubGlyph</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a></td><td><a href="ft2-list_processing.html#FT_List_Remove">FT_List_Remove</a></td><td><a href="ft2-header_file_macros.html#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td></tr>
+<tr><td><a href="ft2-system_interface.html#FT_Alloc_Func">FT_Alloc_Func</a></td><td><a href="ft2-list_processing.html#FT_List_Up">FT_List_Up</a></td><td><a href="ft2-header_file_macros.html#FT_SYSTEM_H">FT_SYSTEM_H</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_2PI">FT_ANGLE_2PI</a></td><td><a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a></td><td><a href="ft2-basic_types.html#FT_Tag">FT_Tag</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a></td><td><a href="ft2-list_processing.html#FT_ListNodeRec">FT_ListNodeRec</a></td><td><a href="ft2-computations.html#FT_Tan">FT_Tan</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_PI2">FT_ANGLE_PI2</a></td><td><a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a></td><td><a href="ft2-header_file_macros.html#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_PI4">FT_ANGLE_PI4</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_BITMAP_METRICS_ONLY</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Angle">FT_Angle</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_NONE</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Angle_Diff">FT_Angle_Diff</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COMPUTE_METRICS</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_PATENTED</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Atan2">FT_Atan2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_CROP_BITMAP</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_AUTOHINTER_H">FT_AUTOHINTER_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td></tr>
+<tr><td><a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_CJK</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a></td></tr>
+<tr><td><a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_INDIC</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a></td></tr>
+<tr><td><a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_LATIN</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a></td></tr>
+<tr><td><a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_NONE</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a></td><td><a href="ft2-header_file_macros.html#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td></tr>
+<tr><td><a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_BITMAP</a></td><td><a href="ft2-header_file_macros.html#FT_TYPES_H">FT_TYPES_H</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BBOX_H">FT_BBOX_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a></td><td><a href="ft2-basic_types.html#FT_UFWord">FT_UFWord</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_BBox">FT_BBox</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a></td><td><a href="ft2-basic_types.html#FT_UInt">FT_UInt</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BDF_H">FT_BDF_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a></td><td><a href="ft2-basic_types.html#FT_UInt16">FT_UInt16</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BITMAP_H">FT_BITMAP_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_PEDANTIC</a></td><td><a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a></td><td><a href="ft2-basic_types.html#FT_UInt64">FT_UInt64</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD</a></td><td><a href="ft2-basic_types.html#FT_ULong">FT_ULong</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Copy">FT_Bitmap_Copy</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD_V</a></td><td><a href="ft2-basic_types.html#FT_UnitVector">FT_UnitVector</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a></td><td><a href="ft2-basic_types.html#FT_UShort">FT_UShort</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_APPLE</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Init">FT_Bitmap_Init</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_BASE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_bsln</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyph">FT_BitmapGlyph</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERN</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Bool">FT_Bool</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_feat</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Byte">FT_Byte</a></td><td><a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GDEF</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a></td><td><a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GPOS</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BZIP2_H">FT_BZIP2_H</a></td><td><a href="ft2-truetype_tables.html#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GSUB</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a></td><td><a href="ft2-basic_types.html#FT_Long">FT_Long</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GX</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_CeilFix">FT_CeilFix</a></td><td><a href="ft2-header_file_macros.html#FT_LZW_H">FT_LZW_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</a></td><td><a href="ft2-header_file_macros.html#FT_MAC_H">FT_MAC_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Char">FT_Char</a></td><td><a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_JSTF</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a></td><td><a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_just</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a></td><td><a href="ft2-computations.html#FT_Matrix_Invert">FT_Matrix_Invert</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_kern</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CID_H">FT_CID_H</a></td><td><a href="ft2-computations.html#FT_Matrix_Multiply">FT_Matrix_Multiply</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_lcar</a></td></tr>
+<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Free">FT_ClassicKern_Free</a></td><td><a href="ft2-system_interface.html#FT_Memory">FT_Memory</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_MATH</a></td></tr>
+<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a></td><td><a href="ft2-system_interface.html#FT_MemoryRec">FT_MemoryRec</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_MS</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_mort</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_morx</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OT</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_H">FT_MODULE_H</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Cos">FT_Cos</a></td><td><a href="ft2-module_management.html#FT_Module">FT_Module</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_opbd</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Data">FT_Data</a></td><td><a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_prop</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_DivFix">FT_DivFix</a></td><td><a href="ft2-module_management.html#FT_Module_Constructor">FT_Module_Constructor</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_trak</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a></td><td><a href="ft2-module_management.html#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="ft2-multiple_masters.html#FT_VAR_AXIS_FLAG_XXX">FT_VAR_AXIS_FLAG_HIDDEN</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="ft2-module_management.html#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="ft2-multiple_masters.html#FT_VAR_AXIS_FLAG_XXX">FT_VAR_AXIS_FLAG_XXX</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a></td><td><a href="ft2-header_file_macros.html#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Axis">FT_Var_Axis</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a></td><td><a href="ft2-computations.html#FT_MulDiv">FT_MulDiv</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Named_Style">FT_Var_Named_Style</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Done_MM_Var">FT_Done_MM_Var</a></td><td><a href="ft2-computations.html#FT_MulFix">FT_MulFix</a></td><td><a href="ft2-basic_types.html#FT_Vector">FT_Vector</a></td></tr>
+<tr><td><a href="ft2-sizes_management.html#FT_Done_Size">FT_Done_Size</a></td><td><a href="ft2-multiple_masters.html#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="ft2-computations.html#FT_Vector_From_Polar">FT_Vector_From_Polar</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a></td><td><a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a></td><td><a href="ft2-computations.html#FT_Vector_Length">FT_Vector_Length</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Driver">FT_Driver</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></td><td><a href="ft2-computations.html#FT_Vector_Polarize">FT_Vector_Polarize</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a></td><td><a href="ft2-computations.html#FT_Vector_Rotate">FT_Vector_Rotate</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_CUSTOM</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></td><td><a href="ft2-computations.html#FT_Vector_Transform">FT_Vector_Transform</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_EXPERT</a></td><td><a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a></td><td><a href="ft2-computations.html#FT_Vector_Unit">FT_Vector_Unit</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_LATIN_1</a></td><td><a href="ft2-base_interface.html#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="ft2-header_file_macros.html#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_STANDARD</a></td><td><a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_Header">FT_WinFNT_Header</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_APPLE_ROMAN</a></td><td><a href="ft2-basic_types.html#FT_Offset">FT_Offset</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1250</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_BIG5</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1252</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_GB2312</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1253</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_JOHAB</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1254</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SJIS</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_XXX</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1255</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a></td><td><a href="ft2-header_file_macros.html#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1256</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_WANSUNG</a></td><td><a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1257</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_NONE</a></td><td><a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1258</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_OLD_LATIN_2</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Free">FT_OpenType_Free</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1361</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_PRC</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP874</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_LEFT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP932</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_RIGHT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP936</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_NONE</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP949</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP950</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_ERRORS_H">FT_ERRORS_H</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_DEFAULT</a></td></tr>
+<tr><td><a href="ft2-error_code_values.html#FT_Err_XXX">FT_Err_XXX</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_MAC</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Error">FT_Error</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_EVEN_ODD_FILL</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_OEM</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a></td><td><a href="ft2-header_file_macros.html#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_SYMBOL</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_F2Dot14">FT_F2Dot14</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_HIGH_PRECISION</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_COLOR</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_NONE</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FAST_GLYPHS</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_OWNER</a></td><td><a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_REVERSE_FILL</a></td><td><a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SINGLE_PASS</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HINTER</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_New">FTC_ImageCache_New</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_KERNING</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Check">FT_Outline_Check</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageTypeRec">FTC_ImageTypeRec</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SCALABLE</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Copy">FT_Outline_Copy</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SFNT</a></td><td><a href="ft2-outline_processing.html#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Done">FTC_Manager_Done</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Decompose">FT_Outline_Decompose</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VARIATION</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Done">FT_Outline_Done</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VERTICAL</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td><td><a href="ft2-outline_processing.html#FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Face">FT_Face</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Reset">FTC_Manager_Reset</a></td></tr>
+<tr><td><a href="ft2-version.html#FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Face_Internal">FT_Face_Internal</a></td><td><a href="ft2-outline_processing.html#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a></td><td><a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a></td></tr>
+<tr><td><a href="ft2-version.html#FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</a></td><td><a href="ft2-outline_processing.html#FT_Outline_New">FT_Outline_New</a></td><td><a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a></td><td><a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td><a href="ft2-properties.html#fallback-script">fallback-script</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_FloorFix">FT_FloorFix</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Transform">FT_Outline_Transform</a></td><td><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_FONT_FORMATS_H">FT_FONT_FORMATS_H</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Translate">FT_Outline_Translate</a></td><td><a href="ft2-properties.html#hinting-engine">hinting-engine</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyph">FT_OutlineGlyph</a></td><td><a href="ft2-properties.html#increase-x-height">increase-x-height</a></td></tr>
+<tr><td><a href="ft2-system_interface.html#FT_Free_Func">FT_Free_Func</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a></td><td><a href="ft2-properties.html#interpreter-version">interpreter-version</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</a></td><td><a href="ft2-properties.html#no-long-family-names">no-long-family-names</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_EDITABLE_EMBEDDING</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</a></td><td><a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_INSTALLABLE_EMBEDDING</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_FUZZ</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_NO_SUBSETTING</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SCALE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SHIFT</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_VALUE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_FWord">FT_FWord</a></td><td><a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING_KEY</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRAY</a></td><td><a href="ft2-header_file_macros.html#FT_PCF_DRIVER_H">FT_PCF_DRIVER_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_ENTRY</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRIDFIT</a></td><td><a href="ft2-header_file_macros.html#FT_PFR_H">FT_PFR_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_TYPE</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GASP_H">FT_GASP_H</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_BLUE</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_NAME</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_GRIDFIT</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_OTHER_BLUE</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_SMOOTHING</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY4</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_BBOX</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_MATRIX</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Generic">FT_Generic</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_NAME</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Generic_Finalizer">FT_Generic_Finalizer</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_TYPE</a></td></tr>
+<tr><td><a href="ft2-quick_advance.html#FT_Get_Advance">FT_Get_Advance</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_NONE</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FORCE_BOLD</a></td></tr>
+<tr><td><a href="ft2-quick_advance.html#FT_Get_Advances">FT_Get_Advances</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_Pixel_Mode</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FS_TYPE</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td><a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FULL_NAME</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td><td><a href="ft2-basic_types.html#FT_Pos">FT_Pos</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_IS_FIXED_PITCH</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td><a href="ft2-properties.html#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ITALIC_ANGLE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td><td><a href="ft2-properties.html#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LANGUAGE_GROUP</a></td></tr>
+<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</a></td><td><a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LEN_IV</a></td></tr>
+<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</a></td><td><a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_MIN_FEATURE</a></td></tr>
+<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</a></td><td><a href="ft2-basic_types.html#FT_PtrDist">FT_PtrDist</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NOTICE</a></td></tr>
+<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_AA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_BLUE_VALUES</a></td></tr>
+<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_CLIP</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_CHAR_STRINGS</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DEFAULT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_BLUES</a></td></tr>
+<tr><td><a href="ft2-font_formats.html#FT_Get_Font_Format">FT_Get_Font_Format</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a></td><td><a href="ft2-raster.html#FT_Raster">FT_Raster</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_H</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Get_Glyph">FT_Get_Glyph</a></td><td><a href="ft2-raster.html#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_V</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td><td><a href="ft2-raster.html#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_SUBRS</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a></td><td><a href="ft2-raster.html#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_OTHER_BLUE</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</a></td><td><a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PAINT_TYPE</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_MM_Var">FT_Get_MM_Var</a></td><td><a href="ft2-raster.html#FT_Raster_NewFunc">FT_Raster_NewFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PASSWORD</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Get_Module">FT_Get_Module</a></td><td><a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_RND_STEM_UP</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td><a href="ft2-raster.html#FT_Raster_RenderFunc">FT_Raster_RenderFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_HW</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td><a href="ft2-raster.html#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_VW</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="ft2-raster.html#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_H</a></td></tr>
+<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></td><td><a href="ft2-header_file_macros.html#FT_RENDER_H">FT_RENDER_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_V</a></td></tr>
+<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_SUBR</a></td></tr>
+<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_POSITION</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LIGHT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_THICKNESS</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNIQUE_ID</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_VERSION</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a></td><td><a href="ft2-system_interface.html#FT_Realloc_Func">FT_Realloc_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_WEIGHT</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Get_Renderer">FT_Get_Renderer</a></td><td><a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_Dict_Keys</a></td></tr>
+<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a></td><td><a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a></td><td><a href="ft2-type1_tables.html#PS_FontInfo">PS_FontInfo</a></td></tr>
+<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td><td><a href="ft2-module_management.html#FT_Remove_Module">FT_Remove_Module</a></td><td><a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a></td></tr>
+<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td><td><a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a></td><td><a href="ft2-type1_tables.html#PS_Private">PS_Private</a></td></tr>
+<tr><td><a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a></td><td><a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td><td><a href="ft2-module_management.html#FT_Renderer">FT_Renderer</a></td><td><a href="ft2-properties.html#random-seed">random-seed</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td><td><a href="ft2-module_management.html#FT_Renderer_Class">FT_Renderer_Class</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SCALE</a></td></tr>
+<tr><td><a href="ft2-truetype_engine.html#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a></td><td><a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SHIFT</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_Var_Axis_Flags">FT_Get_Var_Axis_Flags</a></td><td><a href="ft2-computations.html#FT_RoundFix">FT_RoundFix</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_VALUES</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_Var_Blend_Coordinates">FT_Get_Var_Blend_Coordinates</a></td><td><a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_BLUES</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_Var_Design_Coordinates">FT_Get_Var_Design_Coordinates</a></td><td><a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-winfnt_fonts.html#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></td><td><a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FORCE_BOLD</a></td></tr>
+<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</a></td><td><a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_ITALIC_ANGLE</a></td></tr>
+<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></td><td><a href="ft2-module_management.html#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-mac_specific.html#FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</a></td><td><a href="ft2-module_management.html#FT_Set_Default_Properties">FT_Set_Default_Properties</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_HEIGHT</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_GRIDFIT</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_WIDTH</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_HEIGHTS</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Named_Instance">FT_Set_Named_Instance</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_WIDTHS</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a></td><td><a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_POSITION</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a></td><td><a href="ft2-module_management.html#FT_Set_Renderer">FT_Set_Renderer</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_THICKNESS</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a></td><td><a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_Blend_Flags</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ARRAY</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_EXPERT</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HEAD</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ISOLATIN1</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HHEA</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_NONE</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GLYPH_H">FT_GLYPH_H</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_MAXP</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_STANDARD</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a></td><td><a href="ft2-header_file_macros.html#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_EncodingType</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_OS2</a></td><td><a href="ft2-type1_tables.html#T1_FontInfo">T1_FontInfo</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_PCLT</a></td><td><a href="ft2-type1_tables.html#T1_Private">T1_Private</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_POST</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_CUSTOM</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_VHEA</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_EXPERT</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_LATIN_1</a></td></tr>
+<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_Stroke">FT_Glyph_Stroke</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_STANDARD</a></td></tr>
+<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></td><td><a href="ft2-sfnt_names.html#FT_SfntLangTag">FT_SfntLangTag</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</a></td><td><a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_DEFAULT</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Transform">FT_Glyph_Transform</a></td><td><a href="ft2-basic_types.html#FT_Short">FT_Short</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_FULL_UNICODE</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_BBOX</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_ISO_10646</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_CELL</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_1_1</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_NOMINAL</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_2_0</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_REAL_DIM</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_32</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_SCALES</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_VARIANT_SELECTOR</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GZIP_H">FT_GZIP_H</a></td><td><a href="ft2-header_file_macros.html#FT_SIZES_H">FT_SIZES_H</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-gzip.html#FT_Gzip_Uncompress">FT_Gzip_Uncompress</a></td><td><a href="ft2-computations.html#FT_Sin">FT_Sin</a></td><td><a href="ft2-truetype_tables.html#TT_Header">TT_Header</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td><a href="ft2-base_interface.html#FT_Size">FT_Size</a></td><td><a href="ft2-truetype_tables.html#TT_HoriHeader">TT_HoriHeader</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td><td><a href="ft2-base_interface.html#FT_Size_Internal">FT_Size_Internal</a></td><td><a href="ft2-properties.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_35</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="ft2-properties.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_38</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a></td><td><a href="ft2-properties.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_40</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td><a href="ft2-properties.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="ft2-base_interface.html#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_10646</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="ft2-base_interface.html#FT_SizeRec">FT_SizeRec</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_7BIT_ASCII</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="ft2-base_interface.html#FT_Slot_Internal">FT_Slot_Internal</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_8859_1</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a></td><td><a href="ft2-raster.html#FT_Span">FT_Span</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-properties.html#FT_HINTING_XXX">FT_HINTING_ADOBE</a></td><td><a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-properties.html#FT_HINTING_XXX">FT_HINTING_FREETYPE</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</a></td></tr>
+<tr><td><a href="ft2-properties.html#FT_HINTING_XXX">FT_HINTING_XXX</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_RIGHT</a></td><td><a href="ft2-truetype_tables.html#TT_MaxProfile">TT_MaxProfile</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_IMAGE_H">FT_IMAGE_H</a></td><td><a href="ft2-header_file_macros.html#FT_STROKER_H">FT_STROKER_H</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_BIG_5</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_BUTT</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_JOHAB</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_PRC</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_SQUARE</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SJIS</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_BEVEL</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SYMBOL_CS</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UCS_4</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_FIXED</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UNICODE_CS</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_VARIABLE</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_WANSUNG</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_Interface">FT_Incremental_Interface</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_BOLD</a></td><td><a href="ft2-truetype_tables.html#TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_Metrics">FT_Incremental_Metrics</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_ITALIC</a></td><td><a href="ft2-truetype_tables.html#TT_NAME_ID_XXX">TT_NAME_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td><td><a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="ft2-system_interface.html#FT_Stream">FT_Stream</a></td><td><a href="ft2-truetype_tables.html#TT_PCLT">TT_PCLT</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int">FT_Int</a></td><td><a href="ft2-system_interface.html#FT_Stream_CloseFunc">FT_Stream_CloseFunc</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ADOBE</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int16">FT_Int16</a></td><td><a href="ft2-system_interface.html#FT_Stream_IoFunc">FT_Stream_IoFunc</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int32">FT_Int32</a></td><td><a href="ft2-bzip2.html#FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_CUSTOM</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int64">FT_Int64</a></td><td><a href="ft2-gzip.html#FT_Stream_OpenGzip">FT_Stream_OpenGzip</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ISO</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="ft2-lzw.html#FT_Stream_OpenLZW">FT_Stream_OpenLZW</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="ft2-system_interface.html#FT_StreamDesc">FT_StreamDesc</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</a></td><td><a href="ft2-system_interface.html#FT_StreamRec">FT_StreamRec</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="ft2-basic_types.html#FT_String">FT_String</a></td><td><a href="ft2-truetype_tables.html#TT_Postscript">TT_Postscript</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_SFNT">FT_IS_SFNT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a></td><td><a href="ft2-truetype_tables.html#TT_UCR_XXX">TT_UCR_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></td><td><a href="ft2-truetype_tables.html#TT_VertHeader">TT_VertHeader</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></td><td><a href="ft2-properties.html#warping">warping</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_DEFAULT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></td><td></td></tr>
</table>
<hr>
<table class="index-toc-link"><tr><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<div class="timestamp">generated on Fri Dec 30 21:17:18 2016</div></body>
+<div class="timestamp">generated on Tue May 1 23:34:43 2018</div></body>
</html>
diff --git a/modules/freetype2/docs/reference/ft2-lcd_filtering.html b/modules/freetype2/docs/reference/ft2-lcd_filtering.html
index 27d74da8a..1e5d5ed71 100644
--- a/modules/freetype2/docs/reference/ft2-lcd_filtering.html
+++ b/modules/freetype2/docs/reference/ft2-lcd_filtering.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="lcd_filtering">LCD Filtering</h1>
<h2>Synopsis</h2>
@@ -110,8 +110,8 @@
</table>
-<p>Subpixel rendering exploits the color-striped structure of LCD pixels, increasing the available resolution in the direction of the stripe (usually horizontal RGB) by a factor of&nbsp;3. Since these subpixels are color pixels, using them unfiltered creates severe color fringes. Use the <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> API to specify a low-pass filter, which is then applied to subpixel-rendered bitmaps generated through <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. The filter sacrifices some of the higher resolution to reduce color fringes, making the glyph image slightly blurrier. Positional improvements will remain.</p>
-<p>Note that no filter is active by default, and that this function is <b>not</b> implemented in default builds of the library. You need to #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your &lsquo;ftoption.h&rsquo; file in order to activate it and explicitly call <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> to enable it.</p>
+<p>Should you #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your &lsquo;ftoption.h&rsquo;, which enables patented ClearType-style rendering, the LCD-optimized glyph bitmaps should be filtered to reduce color fringes inherent to this technology. The default FreeType LCD rendering uses different technology, and API described below, although available, does nothing.</p>
+<p>ClearType-style LCD rendering exploits the color-striped structure of LCD pixels, increasing the available resolution in the direction of the stripe (usually horizontal RGB) by a factor of&nbsp;3. Since these subpixels are color pixels, using them unfiltered creates severe color fringes. Use the <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> API to specify a low-pass filter, which is then applied to subpixel-rendered bitmaps generated through <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. The filter sacrifices some of the higher resolution to reduce color fringes, making the glyph image slightly blurrier. Positional improvements will remain.</p>
<p>A filter should have two properties:</p>
<p>1) It should be normalized, meaning the sum of the 5&nbsp;components should be 256 (0x100). It is possible to go above or under this target sum, however: going under means tossing out contrast, going over means invoking clamping and thereby non-linearities that increase contrast somewhat at the expense of greater distortion and color-fringing. Contrast is better enhanced through stem darkening.</p>
<p>2) It should be color-balanced, meaning a filter &lsquo;{&nbsp;a, b, c, b, a&nbsp;}&rsquo; where a&nbsp;+ b&nbsp;=&nbsp;c. It distributes the computed coverage for one subpixel to all subpixels equally, sacrificing some won resolution but drastically reducing color-fringing. Positioning improvements remain! Note that color-fringing can only really be minimized when using a color-balanced filter and alpha-blending the glyph onto a surface in linear space; see <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>.</p>
@@ -217,6 +217,23 @@
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Library_SetLcdFilterWeights</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">unsigned</span> <span class="keyword">char</span> *weights );
+
+
+ /*
+ * @type:
+ * FT_LcdFiveTapFilter
+ *
+ * @description:
+ * A <span class="keyword">typedef</span> for passing the five LCD filter weights to
+ * @<a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> within an @<a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structure.
+ *
+ * @since:
+ * 2.8
+ *
+ */
+#define FT_LCD_FILTER_FIVE_TAPS 5
+
+ <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS];
</pre>
<p>This function can be used to enable LCD filter with custom weights, instead of using presets in <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a>.</p>
@@ -236,6 +253,7 @@
<h4>note</h4>
<p>Due to <b>PATENTS</b> covering subpixel rendering, this function doesn't do anything except returning &lsquo;FT_Err_Unimplemented_Feature&rsquo; if the configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined in your build of the library, which should correspond to all default builds of FreeType.</p>
+<p>LCD filter weights can also be set per face using <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> with <a href="ft2-parameter_tags.html#FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a>.</p>
<h4>since</h4>
<p>2.4.0</p>
diff --git a/modules/freetype2/docs/reference/ft2-list_processing.html b/modules/freetype2/docs/reference/ft2-list_processing.html
index d590ae954..bc4beae8a 100644
--- a/modules/freetype2/docs/reference/ft2-list_processing.html
+++ b/modules/freetype2/docs/reference/ft2-list_processing.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="list_processing">List Processing</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-lzw.html b/modules/freetype2/docs/reference/ft2-lzw.html
index 2040b605e..2e24b9334 100644
--- a/modules/freetype2/docs/reference/ft2-lzw.html
+++ b/modules/freetype2/docs/reference/ft2-lzw.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="lzw">LZW Streams</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-mac_specific.html b/modules/freetype2/docs/reference/ft2-mac_specific.html
index c8c465c16..46ee03bab 100644
--- a/modules/freetype2/docs/reference/ft2-mac_specific.html
+++ b/modules/freetype2/docs/reference/ft2-mac_specific.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="mac_specific">Mac Specific Interface</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-module_management.html b/modules/freetype2/docs/reference/ft2-module_management.html
index 52d364781..b14dae4cc 100644
--- a/modules/freetype2/docs/reference/ft2-module_management.html
+++ b/modules/freetype2/docs/reference/ft2-module_management.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,20 +100,25 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="module_management">Module Management</h1>
<h2>Synopsis</h2>
<table class="synopsis">
-<tr><td><a href="#FT_Module">FT_Module</a></td><td><a href="#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="#FT_Renderer">FT_Renderer</a></td></tr>
-<tr><td><a href="#FT_Module_Constructor">FT_Module_Constructor</a></td><td>&nbsp;</td><td><a href="#FT_Renderer_Class">FT_Renderer_Class</a></td></tr>
-<tr><td><a href="#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="#FT_Property_Set">FT_Property_Set</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="#FT_Property_Get">FT_Property_Get</a></td><td><a href="#FT_Get_Renderer">FT_Get_Renderer</a></td></tr>
-<tr><td><a href="#FT_Module_Class">FT_Module_Class</a></td><td>&nbsp;</td><td><a href="#FT_Set_Renderer">FT_Set_Renderer</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_New_Library">FT_New_Library</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_Add_Module">FT_Add_Module</a></td><td><a href="#FT_Done_Library">FT_Done_Library</a></td><td><a href="#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td></tr>
-<tr><td><a href="#FT_Get_Module">FT_Get_Module</a></td><td><a href="#FT_Reference_Library">FT_Reference_Library</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_Remove_Module">FT_Remove_Module</a></td><td>&nbsp;</td><td><a href="#FT_Driver">FT_Driver</a></td></tr>
+<tr><td><a href="#FT_Module">FT_Module</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Module_Constructor">FT_Module_Constructor</a></td><td><a href="#FT_New_Library">FT_New_Library</a></td></tr>
+<tr><td><a href="#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="#FT_Done_Library">FT_Done_Library</a></td></tr>
+<tr><td><a href="#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="#FT_Reference_Library">FT_Reference_Library</a></td></tr>
+<tr><td><a href="#FT_Module_Class">FT_Module_Class</a></td><td>&nbsp;</td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Renderer">FT_Renderer</a></td></tr>
+<tr><td><a href="#FT_Add_Module">FT_Add_Module</a></td><td><a href="#FT_Renderer_Class">FT_Renderer_Class</a></td></tr>
+<tr><td><a href="#FT_Get_Module">FT_Get_Module</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Remove_Module">FT_Remove_Module</a></td><td><a href="#FT_Get_Renderer">FT_Get_Renderer</a></td></tr>
+<tr><td><a href="#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="#FT_Set_Renderer">FT_Set_Renderer</a></td></tr>
+<tr><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Property_Set">FT_Property_Set</a></td><td><a href="#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td></tr>
+<tr><td><a href="#FT_Property_Get">FT_Property_Get</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Set_Default_Properties">FT_Set_Default_Properties</a></td><td><a href="#FT_Driver">FT_Driver</a></td></tr>
</table>
@@ -148,7 +153,7 @@
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ModuleRec_* <b>FT_Module</b>;
</pre>
-<p>A handle to a given FreeType module object. Each module can be a font driver, a renderer, or anything else that provides services to the formers.</p>
+<p>A handle to a given FreeType module object. A module can be a font driver, a renderer, or anything else that provides services to the former.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -411,11 +416,11 @@
<p>The module name.</p>
</td></tr>
<tr><td class="val" id="property_name">property_name</td><td class="desc">
-<p>The property name. Properties are described in the &lsquo;Synopsis&rsquo; subsection of the module's documentation.</p>
+<p>The property name. Properties are described in section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
<p>Note that only a few modules have properties.</p>
</td></tr>
<tr><td class="val" id="value">value</td><td class="desc">
-<p>A generic pointer to a variable or structure that gives the new value of the property. The exact definition of &lsquo;value&rsquo; is dependent on the property; see the &lsquo;Synopsis&rsquo; subsection of the module's documentation.</p>
+<p>A generic pointer to a variable or structure that gives the new value of the property. The exact definition of &lsquo;value&rsquo; is dependent on the property; see section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
</td></tr>
</table>
@@ -463,14 +468,14 @@
<p>The module name.</p>
</td></tr>
<tr><td class="val" id="property_name">property_name</td><td class="desc">
-<p>The property name. Properties are described in the &lsquo;Synopsis&rsquo; subsection of the module's documentation.</p>
+<p>The property name. Properties are described in section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
</td></tr>
</table>
<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="value">value</td><td class="desc">
-<p>A generic pointer to a variable or structure that gives the value of the property. The exact definition of &lsquo;value&rsquo; is dependent on the property; see the &lsquo;Synopsis&rsquo; subsection of the module's documentation.</p>
+<p>A generic pointer to a variable or structure that gives the value of the property. The exact definition of &lsquo;value&rsquo; is dependent on the property; see section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
</td></tr>
</table>
@@ -502,6 +507,46 @@
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
+<h3 id="FT_Set_Default_Properties">FT_Set_Default_Properties</h3>
+<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
+<pre>
+ FT_EXPORT( <span class="keyword">void</span> )
+ <b>FT_Set_Default_Properties</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
+</pre>
+
+<p>If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is set, this function reads the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable to control driver properties. See section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; for more.</p>
+<p>If the compilation option is not set, this function does nothing.</p>
+<p>&lsquo;FREETYPE_PROPERTIES&rsquo; has the following syntax form (broken here into multiple lines for better readability).</p>
+<pre class="colored">
+ &lt;optional whitespace&gt;
+ &lt;module-name1&gt; ':'
+ &lt;property-name1&gt; '=' &lt;property-value1&gt;
+ &lt;whitespace&gt;
+ &lt;module-name2&gt; ':'
+ &lt;property-name2&gt; '=' &lt;property-value2&gt;
+ ...
+</pre>
+<p>Example:</p>
+<pre class="colored">
+ FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
+ cff:no-stem-darkening=1 \
+ autofitter:warping=1
+</pre>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
+<p>A handle to a new library object.</p>
+</td></tr>
+</table>
+
+<h4>since</h4>
+<p>2.8</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
<h3 id="FT_New_Library">FT_New_Library</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
@@ -511,7 +556,7 @@
</pre>
<p>This function is used to create a new FreeType library instance from a given memory object. It is thus possible to use libraries with distinct memory allocators within the same program. Note, however, that the used <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> structure is expected to remain valid for the life of the <a href="ft2-base_interface.html#FT_Library">FT_Library</a> object.</p>
-<p>Normally, you would call this function (followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>) instead of <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a> to initialize the FreeType library.</p>
+<p>Normally, you would call this function (followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>, and a call to <a href="ft2-module_management.html#FT_Set_Default_Properties">FT_Set_Default_Properties</a>) instead of <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a> to initialize the FreeType library.</p>
<p>Don't use <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a> but <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a> to destroy a library instance.</p>
<h4>input</h4>
@@ -597,7 +642,7 @@
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_RendererRec_* <b>FT_Renderer</b>;
</pre>
-<p>A handle to a given FreeType renderer. A renderer is a special module in charge of converting a glyph image to a bitmap, when necessary. Each renderer supports a given glyph image format, and one or more target surface depths.</p>
+<p>A handle to a given FreeType renderer. A renderer is a module in charge of converting a glyph's outline image to a bitmap. It supports a single glyph image format, and one or more target surface depths.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -770,7 +815,7 @@
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_DriverRec_* <b>FT_Driver</b>;
</pre>
-<p>A handle to a given FreeType font driver object. Each font driver is a special module capable of creating faces from font files.</p>
+<p>A handle to a given FreeType font driver object. A font driver is a module capable of creating faces from font files.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
diff --git a/modules/freetype2/docs/reference/ft2-multiple_masters.html b/modules/freetype2/docs/reference/ft2-multiple_masters.html
index 2c4d590cd..669dc0ab3 100644
--- a/modules/freetype2/docs/reference/ft2-multiple_masters.html
+++ b/modules/freetype2/docs/reference/ft2-multiple_masters.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,23 +100,25 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="multiple_masters">Multiple Masters</h1>
<h2>Synopsis</h2>
<table class="synopsis">
-<tr><td><a href="#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td></tr>
-<tr><td><a href="#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td></tr>
-<tr><td><a href="#FT_Var_Axis">FT_Var_Axis</a></td><td><a href="#FT_Get_Var_Design_Coordinates">FT_Get_Var_Design_Coordinates</a></td></tr>
-<tr><td><a href="#FT_Var_Named_Style">FT_Var_Named_Style</a></td><td><a href="#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td></tr>
-<tr><td><a href="#FT_MM_Var">FT_MM_Var</a></td><td><a href="#FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</a></td></tr>
-<tr><td><a href="#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td><a href="#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td></tr>
-<tr><td><a href="#FT_Get_MM_Var">FT_Get_MM_Var</a></td><td><a href="#FT_Get_Var_Blend_Coordinates">FT_Get_Var_Blend_Coordinates</a></td></tr>
+<tr><td><a href="#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="#FT_Get_Var_Design_Coordinates">FT_Get_Var_Design_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Var_Axis">FT_Var_Axis</a></td><td><a href="#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Var_Named_Style">FT_Var_Named_Style</a></td><td><a href="#FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</a></td></tr>
+<tr><td><a href="#FT_MM_Var">FT_MM_Var</a></td><td><a href="#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td><a href="#FT_Get_Var_Blend_Coordinates">FT_Get_Var_Blend_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Get_MM_Var">FT_Get_MM_Var</a></td><td><a href="#FT_VAR_AXIS_FLAG_XXX">FT_VAR_AXIS_FLAG_XXX</a></td></tr>
+<tr><td><a href="#FT_Done_MM_Var">FT_Done_MM_Var</a></td><td><a href="#FT_Get_Var_Axis_Flags">FT_Get_Var_Axis_Flags</a></td></tr>
+<tr><td><a href="#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td><td><a href="#FT_Set_Named_Instance">FT_Set_Named_Instance</a></td></tr>
</table>
<p>The following types and functions are used to manage Multiple Master fonts, i.e., the selection of specific design instances by setting design axis coordinates.</p>
-<p>George Williams has extended this interface to make it work with both Type&nbsp;1 Multiple Masters fonts and GX distortable (var) fonts. Some of these routines only work with MM fonts, others will work with both types. They are similar enough that a consistent interface makes sense.</p>
+<p>Besides Adobe MM fonts, the interface supports Apple's TrueType GX and OpenType variation fonts. Some of the routines only work with Adobe MM fonts, others will work with all three types. They are similar enough that a consistent interface makes sense.</p>
<div class="section">
<h3 id="FT_MM_Axis">FT_MM_Axis</h3>
@@ -131,8 +133,8 @@
} <b>FT_MM_Axis</b>;
</pre>
-<p>A simple structure used to model a given axis in design space for Multiple Masters fonts.</p>
-<p>This structure can't be used for GX var fonts.</p>
+<p>A structure to model a given axis in design space for Multiple Masters fonts.</p>
+<p>This structure can't be used for TrueType GX or OpenType variation fonts.</p>
<h4>fields</h4>
<table class="fields">
@@ -163,8 +165,8 @@
} <b>FT_Multi_Master</b>;
</pre>
-<p>A structure used to model the axes and space of a Multiple Masters font.</p>
-<p>This structure can't be used for GX var fonts.</p>
+<p>A structure to model the axes and space of a Multiple Masters font.</p>
+<p>This structure can't be used for TrueType GX or OpenType variation fonts.</p>
<h4>fields</h4>
<table class="fields">
@@ -200,30 +202,33 @@
} <b>FT_Var_Axis</b>;
</pre>
-<p>A simple structure used to model a given axis in design space for Multiple Masters and GX var fonts.</p>
+<p>A structure to model a given axis in design space for Multiple Masters, TrueType GX, and OpenType variation fonts.</p>
<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="name">name</td><td class="desc">
-<p>The axis's name. Not always meaningful for GX.</p>
+<p>The axis's name. Not always meaningful for TrueType GX or OpenType variation fonts.</p>
</td></tr>
<tr><td class="val" id="minimum">minimum</td><td class="desc">
<p>The axis's minimum design coordinate.</p>
</td></tr>
<tr><td class="val" id="def">def</td><td class="desc">
-<p>The axis's default design coordinate. FreeType computes meaningful default values for MM; it is then an integer value, not in 16.16 format.</p>
+<p>The axis's default design coordinate. FreeType computes meaningful default values for Adobe MM fonts.</p>
</td></tr>
<tr><td class="val" id="maximum">maximum</td><td class="desc">
<p>The axis's maximum design coordinate.</p>
</td></tr>
<tr><td class="val" id="tag">tag</td><td class="desc">
-<p>The axis's tag (the GX equivalent to &lsquo;name&rsquo;). FreeType provides default values for MM if possible.</p>
+<p>The axis's tag (the equivalent to &lsquo;name&rsquo; for TrueType GX and OpenType variation fonts). FreeType provides default values for Adobe MM fonts if possible.</p>
</td></tr>
<tr><td class="val" id="strid">strid</td><td class="desc">
-<p>The entry in &lsquo;name&rsquo; table (another GX version of &lsquo;name&rsquo;). Not meaningful for MM.</p>
+<p>The axis name entry in the font's &lsquo;name&rsquo; table. This is another (and often better) version of the &lsquo;name&rsquo; field for TrueType GX or OpenType variation fonts. Not meaningful for Adobe MM fonts.</p>
</td></tr>
</table>
+<h4>note</h4>
+<p>The fields &lsquo;minimum&rsquo;, &lsquo;def&rsquo;, and &lsquo;maximum&rsquo; are 16.16 fractional values for TrueType GX and OpenType variation fonts. For Adobe MM fonts, the values are integers.</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -240,16 +245,19 @@
} <b>FT_Var_Named_Style</b>;
</pre>
-<p>A simple structure used to model a named style in a GX var font.</p>
-<p>This structure can't be used for MM fonts.</p>
+<p>A structure to model a named instance in a TrueType GX or OpenType variation font.</p>
+<p>This structure can't be used for Adobe MM fonts.</p>
<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="coords">coords</td><td class="desc">
-<p>The design coordinates for this style. This is an array with one entry for each axis.</p>
+<p>The design coordinates for this instance. This is an array with one entry for each axis.</p>
</td></tr>
<tr><td class="val" id="strid">strid</td><td class="desc">
-<p>The entry in &lsquo;name&rsquo; table identifying this style.</p>
+<p>The entry in &lsquo;name&rsquo; table identifying this instance.</p>
+</td></tr>
+<tr><td class="val" id="psid">psid</td><td class="desc">
+<p>The entry in &lsquo;name&rsquo; table identifying a PostScript name for this instance. Value 0xFFFF indicates a missing entry.</p>
</td></tr>
</table>
@@ -271,26 +279,26 @@
} <b>FT_MM_Var</b>;
</pre>
-<p>A structure used to model the axes and space of a Multiple Masters or GX var distortable font.</p>
-<p>Some fields are specific to one format and not to the other.</p>
+<p>A structure to model the axes and space of an Adobe MM, TrueType GX, or OpenType variation font.</p>
+<p>Some fields are specific to one format and not to the others.</p>
<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="num_axis">num_axis</td><td class="desc">
-<p>The number of axes. The maximum value is&nbsp;4 for MM; no limit in GX.</p>
+<p>The number of axes. The maximum value is&nbsp;4 for Adobe MM fonts; no limit in TrueType GX or OpenType variation fonts.</p>
</td></tr>
<tr><td class="val" id="num_designs">num_designs</td><td class="desc">
-<p>The number of designs; should be normally 2^num_axis for MM fonts. Not meaningful for GX (where every glyph could have a different number of designs).</p>
+<p>The number of designs; should be normally 2^num_axis for Adobe MM fonts. Not meaningful for TrueType GX or OpenType variation fonts (where every glyph could have a different number of designs).</p>
</td></tr>
<tr><td class="val" id="num_namedstyles">num_namedstyles</td><td class="desc">
-<p>The number of named styles; a &lsquo;named style&rsquo; is a tuple of design coordinates that has a string ID (in the &lsquo;name&rsquo; table) associated with it. The font can tell the user that, for example, [Weight=1.5,Width=1.1] is &lsquo;Bold&rsquo;.</p>
-<p>For Type 1 Multiple Masters fonts, this value is always zero because the format does not support named styles.</p>
+<p>The number of named styles; a &lsquo;named style&rsquo; is a tuple of design coordinates that has a string ID (in the &lsquo;name&rsquo; table) associated with it. The font can tell the user that, for example, [Weight=1.5,Width=1.1] is &lsquo;Bold&rsquo;. Another name for &lsquo;named style&rsquo; is &lsquo;named instance&rsquo;.</p>
+<p>For Adobe Multiple Masters fonts, this value is always zero because the format does not support named styles.</p>
</td></tr>
<tr><td class="val" id="axis">axis</td><td class="desc">
-<p>An axis descriptor table. GX fonts contain slightly more data than MM. Memory management of this pointer is done internally by FreeType.</p>
+<p>An axis descriptor table. TrueType GX and OpenType variation fonts contain slightly more data than Adobe MM fonts. Memory management of this pointer is done internally by FreeType.</p>
</td></tr>
<tr><td class="val" id="namedstyle">namedstyle</td><td class="desc">
-<p>A named style table. Only meaningful with GX. Memory management of this pointer is done internally by FreeType.</p>
+<p>A named style (instance) table. Only meaningful for TrueType GX and OpenType variation fonts. Memory management of this pointer is done internally by FreeType.</p>
</td></tr>
</table>
@@ -306,8 +314,8 @@
<a href="ft2-multiple_masters.html#FT_Multi_Master">FT_Multi_Master</a> *amaster );
</pre>
-<p>Retrieve the Multiple Master descriptor of a given font.</p>
-<p>This function can't be used with GX fonts.</p>
+<p>Retrieve a variation descriptor of a given Adobe MM font.</p>
+<p>This function can't be used with TrueType GX or OpenType variation fonts.</p>
<h4>input</h4>
<table class="fields">
@@ -338,7 +346,8 @@
<a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a>* *amaster );
</pre>
-<p>Retrieve the Multiple Master/GX var descriptor of a given font.</p>
+<p>Retrieve a variation descriptor for a given font.</p>
+<p>This function works with all supported variation formats.</p>
<h4>input</h4>
<table class="fields">
@@ -350,7 +359,31 @@
<h4>output</h4>
<table class="fields">
<tr><td class="val" id="amaster">amaster</td><td class="desc">
-<p>The Multiple Masters/GX var descriptor. Allocates a data structure, which the user must deallocate with &lsquo;free&rsquo; after use.</p>
+<p>The variation descriptor. Allocates a data structure, which the user must deallocate with a call to <a href="ft2-multiple_masters.html#FT_Done_MM_Var">FT_Done_MM_Var</a> after use.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Done_MM_Var">FT_Done_MM_Var</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Done_MM_Var</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
+ <a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a> *amaster );
+</pre>
+
+<p>Free the memory allocated by <a href="ft2-multiple_masters.html#FT_Get_MM_Var">FT_Get_MM_Var</a>.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
+<p>A handle of the face's parent library object that was used in the call to <a href="ft2-multiple_masters.html#FT_Get_MM_Var">FT_Get_MM_Var</a> to create &lsquo;amaster&rsquo;.</p>
</td></tr>
</table>
@@ -370,8 +403,8 @@
<a href="ft2-basic_types.html#FT_Long">FT_Long</a>* coords );
</pre>
-<p>For Multiple Masters fonts, choose an interpolated font design through design coordinates.</p>
-<p>This function can't be used with GX fonts.</p>
+<p>For Adobe MM fonts, choose an interpolated font design through design coordinates.</p>
+<p>This function can't be used with TrueType GX or OpenType variation fonts.</p>
<h4>inout</h4>
<table class="fields">
@@ -393,6 +426,10 @@
<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
+<h4>note</h4>
+<p>[Since 2.8.1] To reset all axes to the default values, call the function with &lsquo;num_coords&rsquo; set to zero and &lsquo;coords&rsquo; set to NULL.</p>
+<p>[Since 2.9] If &lsquo;num_coords&rsquo; is larger than zero, this function sets the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VARIATION</a> bit in <a href="ft2-base_interface.html#FT_Face">FT_Face</a>'s &lsquo;face_flags&rsquo; field (i.e., <a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a> will return true). If &lsquo;num_coords&rsquo; is zero, this bit flag gets unset.</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -406,7 +443,8 @@
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>* coords );
</pre>
-<p>For Multiple Master or GX Var fonts, choose an interpolated font design through design coordinates.</p>
+<p>Choose an interpolated font design through design coordinates.</p>
+<p>This function works with all supported variation formats.</p>
<h4>inout</h4>
<table class="fields">
@@ -428,6 +466,10 @@
<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
+<h4>note</h4>
+<p>[Since 2.8.1] To reset all axes to the default values, call the function with &lsquo;num_coords&rsquo; set to zero and &lsquo;coords&rsquo; set to NULL. [Since 2.9] &lsquo;Default values&rsquo; means the currently selected named instance (or the base font if no named instance is selected).</p>
+<p>[Since 2.9] If &lsquo;num_coords&rsquo; is larger than zero, this function sets the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VARIATION</a> bit in <a href="ft2-base_interface.html#FT_Face">FT_Face</a>'s &lsquo;face_flags&rsquo; field (i.e., <a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a> will return true). If &lsquo;num_coords&rsquo; is zero, this bit flag gets unset.</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -441,7 +483,8 @@
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>* coords );
</pre>
-<p>For Multiple Master and GX Var fonts, get the design coordinates of the currently selected interpolated font.</p>
+<p>Get the design coordinates of the currently selected interpolated font.</p>
+<p>This function works with all supported variation formats.</p>
<h4>input</h4>
<table class="fields">
@@ -463,6 +506,9 @@
<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
+<h4>since</h4>
+<p>2.7.1</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -476,7 +522,8 @@
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>* coords );
</pre>
-<p>For Multiple Masters and GX var fonts, choose an interpolated font design through normalized blend coordinates.</p>
+<p>Choose an interpolated font design through normalized blend coordinates.</p>
+<p>This function works with all supported variation formats.</p>
<h4>inout</h4>
<table class="fields">
@@ -491,13 +538,17 @@
<p>The number of available design coordinates. If it is larger than the number of axes, ignore the excess values. If it is smaller than the number of axes, use default values for the remaining axes.</p>
</td></tr>
<tr><td class="val" id="coords">coords</td><td class="desc">
-<p>The design coordinates array (each element must be between 0 and 1.0 for MM fonts, and between -1.0 and 1.0 for GX var fonts).</p>
+<p>The design coordinates array (each element must be between 0 and 1.0 for Adobe MM fonts, and between -1.0 and 1.0 for TrueType GX and OpenType variation fonts).</p>
</td></tr>
</table>
<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
+<h4>note</h4>
+<p>[Since 2.8.1] To reset all axes to the default values, call the function with &lsquo;num_coords&rsquo; set to zero and &lsquo;coords&rsquo; set to NULL. [Since 2.9] &lsquo;Default values&rsquo; means the currently selected named instance (or the base font if no named instance is selected).</p>
+<p>[Since 2.9] If &lsquo;num_coords&rsquo; is larger than zero, this function sets the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VARIATION</a> bit in <a href="ft2-base_interface.html#FT_Face">FT_Face</a>'s &lsquo;face_flags&rsquo; field (i.e., <a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a> will return true). If &lsquo;num_coords&rsquo; is zero, this bit flag gets unset.</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -511,7 +562,8 @@
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>* coords );
</pre>
-<p>For Multiple Masters and GX var fonts, get the normalized blend coordinates of the currently selected interpolated font.</p>
+<p>Get the normalized blend coordinates of the currently selected interpolated font.</p>
+<p>This function works with all supported variation formats.</p>
<h4>input</h4>
<table class="fields">
@@ -519,7 +571,7 @@
<p>A handle to the source face.</p>
</td></tr>
<tr><td class="val" id="num_coords">num_coords</td><td class="desc">
-<p>The number of normalized blend coordinates to retrieve. If it is larger than the number of axes, set the excess values to&nbsp;0.5 for MM fonts, and to&nbsp;0 for GX var fonts.</p>
+<p>The number of normalized blend coordinates to retrieve. If it is larger than the number of axes, set the excess values to&nbsp;0.5 for Adobe MM fonts, and to&nbsp;0 for TrueType GX and OpenType variation fonts.</p>
</td></tr>
</table>
@@ -533,6 +585,9 @@
<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
+<h4>since</h4>
+<p>2.7.1</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -563,6 +618,104 @@
<p>This is another name of <a href="ft2-multiple_masters.html#FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</a>.</p>
+<h4>since</h4>
+<p>2.7.1</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_VAR_AXIS_FLAG_XXX">FT_VAR_AXIS_FLAG_XXX</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
+<pre>
+#define <a href="ft2-multiple_masters.html#FT_VAR_AXIS_FLAG_HIDDEN">FT_VAR_AXIS_FLAG_HIDDEN</a> 1
+</pre>
+
+<p>A list of bit flags used in the return value of <a href="ft2-multiple_masters.html#FT_Get_Var_Axis_Flags">FT_Get_Var_Axis_Flags</a>.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_VAR_AXIS_FLAG_HIDDEN">FT_VAR_AXIS_FLAG_HIDDEN</td><td class="desc">
+<p>The variation axis should not be exposed to user interfaces.</p>
+</td></tr>
+</table>
+
+<h4>since</h4>
+<p>2.8.1</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Var_Axis_Flags">FT_Get_Var_Axis_Flags</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Get_Var_Axis_Flags</b>( <a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a>* master,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> axis_index,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>* flags );
+</pre>
+
+<p>Get the &lsquo;flags&rsquo; field of an OpenType Variation Axis Record.</p>
+<p>Not meaningful for Adobe MM fonts (&lsquo;*flags&rsquo; is always zero).</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="master">master</td><td class="desc">
+<p>The variation descriptor.</p>
+</td></tr>
+<tr><td class="val" id="axis_index">axis_index</td><td class="desc">
+<p>The index of the requested variation axis.</p>
+</td></tr>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="flags">flags</td><td class="desc">
+<p>The &lsquo;flags&rsquo; field. See <a href="ft2-multiple_masters.html#FT_VAR_AXIS_FLAG_XXX">FT_VAR_AXIS_FLAG_XXX</a> for possible values.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>since</h4>
+<p>2.8.1</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Set_Named_Instance">FT_Set_Named_Instance</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Set_Named_Instance</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> instance_index );
+</pre>
+
+<p>Set or change the current named instance.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face.</p>
+</td></tr>
+<tr><td class="val" id="instance_index">instance_index</td><td class="desc">
+<p>The index of the requested instance, starting with value 1. If set to value 0, FreeType switches to font access without a named instance.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>The function uses the value of &lsquo;instance_index&rsquo; to set bits 16-30 of the face's &lsquo;face_index&rsquo; field. It also resets any variation applied to the font, and the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VARIATION</a> bit of the face's &lsquo;face_flags&rsquo; field gets reset to zero (i.e., <a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a> will return false).</p>
+<p>For Adobe MM fonts (which don't have named instances) this function simply resets the current face to the default instance.</p>
+
+<h4>since</h4>
+<p>2.9</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
diff --git a/modules/freetype2/docs/reference/ft2-ot_validation.html b/modules/freetype2/docs/reference/ft2-ot_validation.html
index 342a8cf2a..27bd40a16 100644
--- a/modules/freetype2/docs/reference/ft2-ot_validation.html
+++ b/modules/freetype2/docs/reference/ft2-ot_validation.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="ot_validation">OpenType Validation</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-outline_processing.html b/modules/freetype2/docs/reference/ft2-outline_processing.html
index 0cc16fca6..3b12f93b2 100644
--- a/modules/freetype2/docs/reference/ft2-outline_processing.html
+++ b/modules/freetype2/docs/reference/ft2-outline_processing.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="outline_processing">Outline Processing</h1>
<h2>Synopsis</h2>
@@ -157,8 +157,8 @@
</td></tr>
<tr><td class="val" id="tags">tags</td><td class="desc">
<p>A pointer to an array of &lsquo;n_points&rsquo; chars, giving each outline point's type.</p>
-<p>If bit&nbsp;0 is unset, the point is &lsquo;off&rsquo; the curve, i.e., a Bézier control point, while it is &lsquo;on&rsquo; if set.</p>
-<p>Bit&nbsp;1 is meaningful for &lsquo;off&rsquo; points only. If set, it indicates a third-order Bézier arc control point; and a second-order control point if unset.</p>
+<p>If bit&nbsp;0 is unset, the point is &lsquo;off&rsquo; the curve, i.e., a Bezier control point, while it is &lsquo;on&rsquo; if set.</p>
+<p>Bit&nbsp;1 is meaningful for &lsquo;off&rsquo; points only. If set, it indicates a third-order Bezier arc control point; and a second-order control point if unset.</p>
<p>If bit&nbsp;2 is set, bits 5-7 contain the drop-out mode (as defined in the OpenType specification; the value is the same as the argument to the SCANMODE instruction).</p>
<p>Bits 3 and&nbsp;4 are reserved for internal purposes.</p>
</td></tr>
@@ -256,7 +256,6 @@
<h4>note</h4>
<p>If the outline's &lsquo;owner&rsquo; field is not set, only the outline descriptor will be released.</p>
-<p>The reason why this function takes an &lsquo;library&rsquo; parameter is simply to use ft_mem_free().</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -410,6 +409,9 @@
<p>Embolden an outline. The new outline will be &lsquo;xstrength&rsquo; pixels wider and &lsquo;ystrength&rsquo; pixels higher. Otherwise, it is similar to <a href="ft2-outline_processing.html#FT_Outline_Embolden">FT_Outline_Embolden</a>, which uses the same strength in both directions.</p>
+<h4>since</h4>
+<p>2.4.10</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -472,7 +474,7 @@
<a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> *acbox );
</pre>
-<p>Return an outline's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bézier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bézier outside arcs).</p>
+<p>Return an outline's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bezier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bezier outside arcs).</p>
<p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component, which is dedicated to this single task.</p>
<h4>input</h4>
@@ -504,7 +506,7 @@
<a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> *abbox );
</pre>
-<p>Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm that returns <i>very</i> quickly when the two boxes coincide. Otherwise, the outline Bézier arcs are traversed to extract their extrema.</p>
+<p>Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm that returns <i>very</i> quickly when the two boxes coincide. Otherwise, the outline Bezier arcs are traversed to extract their extrema.</p>
<h4>input</h4>
<table class="fields">
@@ -619,7 +621,7 @@
<span class="keyword">void</span>* user );
</pre>
-<p>Walk over an outline's structure to decompose it into individual segments and Bézier arcs. This function also emits &lsquo;move to&rsquo; operations to indicate the start of new contours in the outline.</p>
+<p>Walk over an outline's structure to decompose it into individual segments and Bezier arcs. This function also emits &lsquo;move to&rsquo; operations to indicate the start of new contours in the outline.</p>
<h4>input</h4>
<table class="fields">
@@ -665,7 +667,7 @@
} <b>FT_Outline_Funcs</b>;
</pre>
-<p>A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Béziers.</p>
+<p>A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Beziers.</p>
<h4>fields</h4>
<table class="fields">
@@ -676,10 +678,10 @@
<p>The segment emitter.</p>
</td></tr>
<tr><td class="val" id="conic_to">conic_to</td><td class="desc">
-<p>The second-order Bézier arc emitter.</p>
+<p>The second-order Bezier arc emitter.</p>
</td></tr>
<tr><td class="val" id="cubic_to">cubic_to</td><td class="desc">
-<p>The third-order Bézier arc emitter.</p>
+<p>The third-order Bezier arc emitter.</p>
</td></tr>
<tr><td class="val" id="shift">shift</td><td class="desc">
<p>The shift that is applied to coordinates before they are sent to the emitter.</p>
@@ -693,7 +695,7 @@
<p>The point coordinates sent to the emitters are the transformed version of the original coordinates (this is important for high accuracy during scan-conversion). The transformation is simple:</p>
<pre class="colored">
x' = (x &lt;&lt; shift) - delta
- y' = (x &lt;&lt; shift) - delta
+ y' = (y &lt;&lt; shift) - delta
</pre>
<p>Set the values of &lsquo;shift&rsquo; and &lsquo;delta&rsquo; to&nbsp;0 to get the original point coordinates.</p>
@@ -773,7 +775,7 @@
</pre>
<p>A function pointer type used to describe the signature of a &lsquo;conic to&rsquo; function during outline walking or decomposition.</p>
-<p>A &lsquo;conic to&rsquo; is emitted to indicate a second-order Bézier arc in the outline.</p>
+<p>A &lsquo;conic to&rsquo; is emitted to indicate a second-order Bezier arc in the outline.</p>
<h4>input</h4>
<table class="fields">
@@ -808,15 +810,15 @@
</pre>
<p>A function pointer type used to describe the signature of a &lsquo;cubic to&rsquo; function during outline walking or decomposition.</p>
-<p>A &lsquo;cubic to&rsquo; is emitted to indicate a third-order Bézier arc.</p>
+<p>A &lsquo;cubic to&rsquo; is emitted to indicate a third-order Bezier arc.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="control1">control1</td><td class="desc">
-<p>A pointer to the first Bézier control point.</p>
+<p>A pointer to the first Bezier control point.</p>
</td></tr>
<tr><td class="val" id="control2">control2</td><td class="desc">
-<p>A pointer to the second Bézier control point.</p>
+<p>A pointer to the second Bezier control point.</p>
</td></tr>
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the target end point.</p>
diff --git a/modules/freetype2/docs/reference/ft2-parameter_tags.html b/modules/freetype2/docs/reference/ft2-parameter_tags.html
new file mode 100644
index 000000000..b1d1e642d
--- /dev/null
+++ b/modules/freetype2/docs/reference/ft2-parameter_tags.html
@@ -0,0 +1,232 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"https://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>FreeType-2.9.1 API Reference</title>
+<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
+ body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
+ color: #000000;
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
+
+ h1 { text-align: center; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
+
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
+
+ span.keyword { font-family: monospace;
+ text-align: left;
+ white-space: pre;
+ color: darkblue; }
+
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
+
+</style>
+</head>
+<body>
+
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.9.1 API Reference</h1>
+
+<h1 id="parameter_tags">Parameter Tags</h1>
+<h2>Synopsis</h2>
+<table class="synopsis">
+<tr><td><a href="#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</a></td></tr>
+<tr><td><a href="#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</a></td></tr>
+<tr><td><a href="#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td></tr>
+<tr><td><a href="#FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a></td></tr>
+<tr><td><a href="#FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</a></td></tr>
+<tr><td><a href="#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a></td></tr>
+<tr><td><a href="#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td></tr>
+</table>
+
+
+<p>This section contains macros for the <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structure that are used with various functions to activate some special functionality or different behaviour of various components of FreeType.</p>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</h3>
+<pre>
+#define <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</b> \
+ <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 'f' )
+
+
+ /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
+ <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</b>
+</pre>
+
+<p>A tag for <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> to make <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> ignore typographic family names in the &lsquo;name&rsquo; table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.</p>
+
+<h4>since</h4>
+<p>2.8</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</h3>
+<pre>
+#define <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</b> \
+ <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 's' )
+
+
+ /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
+ <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</b>
+</pre>
+
+<p>A tag for <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> to make <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> ignore typographic subfamily names in the &lsquo;name&rsquo; table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.</p>
+
+<h4>since</h4>
+<p>2.8</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</h3>
+<pre>
+#define <b>FT_PARAM_TAG_INCREMENTAL</b> \
+ <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'n', 'c', 'r' )
+</pre>
+
+<p>An <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> tag to be used with <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to indicate incremental glyph loading.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</h3>
+<pre>
+#define <b>FT_PARAM_TAG_LCD_FILTER_WEIGHTS</b> \
+ <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'l', 'c', 'd', 'f' )
+</pre>
+
+<p>An <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> tag to be used with <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>. The corresponding argument specifies the five LCD filter weights for a given face (if using <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD</a>, for example), overriding the global default values or the values set up with <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a>.</p>
+
+<h4>since</h4>
+<p>2.8</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</h3>
+<pre>
+#define <b>FT_PARAM_TAG_RANDOM_SEED</b> \
+ <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 's', 'e', 'e', 'd' )
+</pre>
+
+<p>An <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> tag to be used with <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>. The corresponding 32bit signed integer argument overrides the font driver's random seed value with a face-specific one; see <a href="ft2-properties.html#random-seed">random-seed</a>.</p>
+
+<h4>since</h4>
+<p>2.8</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</h3>
+<pre>
+#define <b>FT_PARAM_TAG_STEM_DARKENING</b> \
+ <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'd', 'a', 'r', 'k' )
+</pre>
+
+<p>An <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> tag to be used with <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>. The corresponding Boolean argument specifies whether to apply stem darkening, overriding the global default values or the values set up with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> (see <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a>).</p>
+<p>This is a passive setting that only takes effect if the font driver or autohinter honors it, which the CFF, Type&nbsp;1, and CID drivers always do, but the autohinter only in &lsquo;light&rsquo; hinting mode (as of version 2.9).</p>
+
+<h4>since</h4>
+<p>2.8</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</h3>
+<pre>
+#define <b>FT_PARAM_TAG_UNPATENTED_HINTING</b> \
+ <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'u', 'n', 'p', 'a' )
+</pre>
+
+<p>Deprecated, no effect.</p>
+<p>Previously: A constant used as the tag of an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structure to indicate that unpatented methods only should be used by the TrueType bytecode interpreter for a typeface opened by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+</body>
+</html>
diff --git a/modules/freetype2/docs/reference/ft2-pcf_driver.html b/modules/freetype2/docs/reference/ft2-pcf_driver.html
new file mode 100644
index 000000000..2bc4c966f
--- /dev/null
+++ b/modules/freetype2/docs/reference/ft2-pcf_driver.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"https://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>FreeType-2.9.1 API Reference</title>
+<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
+ body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
+ color: #000000;
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
+
+ h1 { text-align: center; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
+
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
+
+ span.keyword { font-family: monospace;
+ text-align: left;
+ white-space: pre;
+ color: darkblue; }
+
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
+
+</style>
+</head>
+<body>
+
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.9.1 API Reference</h1>
+
+<h1 id="pcf_driver">The PCF driver</h1>
+
+<p>While FreeType's PCF driver doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. Right now, there is a single property <a href="ft2-properties.html#no-long-family-names">no-long-family-names</a> available if FreeType is compiled with PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.</p>
+<p>The PCF driver's module name is &lsquo;pcf&rsquo;.</p>
+
+</body>
+</html>
diff --git a/modules/freetype2/docs/reference/ft2-pfr_fonts.html b/modules/freetype2/docs/reference/ft2-pfr_fonts.html
index c9eca0fe2..18c97c60e 100644
--- a/modules/freetype2/docs/reference/ft2-pfr_fonts.html
+++ b/modules/freetype2/docs/reference/ft2-pfr_fonts.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="pfr_fonts">PFR Fonts</h1>
<h2>Synopsis</h2>
@@ -141,7 +141,7 @@
<p>Metrics resolution. This is equivalent to &lsquo;outline_resolution&rsquo; for non-PFR fonts. Optional (parameter can be NULL).</p>
</td></tr>
<tr><td class="val" id="ametrics_x_scale">ametrics_x_scale</td><td class="desc">
-<p>A 16.16 fixed-point number used to scale distance expressed in metrics units to device sub-pixels. This is equivalent to &lsquo;face-&gt;size-&gt;x_scale&rsquo;, but for metrics only. Optional (parameter can be NULL).</p>
+<p>A 16.16 fixed-point number used to scale distance expressed in metrics units to device subpixels. This is equivalent to &lsquo;face-&gt;size-&gt;x_scale&rsquo;, but for metrics only. Optional (parameter can be NULL).</p>
</td></tr>
<tr><td class="val" id="ametrics_y_scale">ametrics_y_scale</td><td class="desc">
<p>Same as &lsquo;ametrics_x_scale&rsquo; but for the vertical direction. optional (parameter can be NULL).</p>
@@ -195,7 +195,7 @@
<h4>note</h4>
<p>This function always return distances in original PFR metrics units. This is unlike <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a> with the <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a> mode, which always returns distances converted to outline units.</p>
-<p>You can use the value of the &lsquo;x_scale&rsquo; and &lsquo;y_scale&rsquo; parameters returned by <a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a> to scale these to device sub-pixels.</p>
+<p>You can use the value of the &lsquo;x_scale&rsquo; and &lsquo;y_scale&rsquo; parameters returned by <a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a> to scale these to device subpixels.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -233,7 +233,7 @@
<p>FreeType error code. 0&nbsp;means success.</p>
<h4>note</h4>
-<p>You can use the &lsquo;x_scale&rsquo; or &lsquo;y_scale&rsquo; results of <a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a> to convert the advance to device sub-pixels (i.e., 1/64th of pixels).</p>
+<p>You can use the &lsquo;x_scale&rsquo; or &lsquo;y_scale&rsquo; results of <a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a> to convert the advance to device subpixels (i.e., 1/64th of pixels).</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
diff --git a/modules/freetype2/docs/reference/ft2-properties.html b/modules/freetype2/docs/reference/ft2-properties.html
new file mode 100644
index 000000000..60f067a19
--- /dev/null
+++ b/modules/freetype2/docs/reference/ft2-properties.html
@@ -0,0 +1,704 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"https://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>FreeType-2.9.1 API Reference</title>
+<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
+ body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
+ color: #000000;
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
+
+ h1 { text-align: center; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
+
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
+
+ span.keyword { font-family: monospace;
+ text-align: left;
+ white-space: pre;
+ color: darkblue; }
+
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
+
+</style>
+</head>
+<body>
+
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.9.1 API Reference</h1>
+
+<h1 id="properties">Driver properties</h1>
+<h2>Synopsis</h2>
+<table class="synopsis">
+<tr><td><a href="#FT_HINTING_XXX">FT_HINTING_XXX</a></td><td><a href="#glyph-to-script-map">glyph-to-script-map</a></td></tr>
+<tr><td><a href="#hinting-engine">hinting-engine</a></td><td><a href="#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td></tr>
+<tr><td><a href="#no-stem-darkening">no-stem-darkening</a></td><td><a href="#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td></tr>
+<tr><td><a href="#darkening-parameters">darkening-parameters</a></td><td><a href="#fallback-script">fallback-script</a></td></tr>
+<tr><td><a href="#random-seed">random-seed</a></td><td><a href="#default-script">default-script</a></td></tr>
+<tr><td><a href="#no-long-family-names">no-long-family-names</a></td><td><a href="#increase-x-height">increase-x-height</a></td></tr>
+<tr><td><a href="#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></td><td><a href="#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td></tr>
+<tr><td><a href="#interpreter-version">interpreter-version</a></td><td><a href="#warping">warping</a></td></tr>
+</table>
+
+
+<p>Driver modules can be controlled by setting and unsetting properties, using the functions <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. This section documents the available properties, together with auxiliary macros and structures.</p>
+
+<div class="section">
+<h3 id="FT_HINTING_XXX">FT_HINTING_XXX</h3>
+<p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
+<pre>
+#define <a href="ft2-properties.html#FT_HINTING_FREETYPE">FT_HINTING_FREETYPE</a> 0
+#define <a href="ft2-properties.html#FT_HINTING_ADOBE">FT_HINTING_ADOBE</a> 1
+
+ /* these constants (introduced in 2.4.12) are deprecated */
+#define FT_CFF_HINTING_FREETYPE <a href="ft2-properties.html#FT_HINTING_FREETYPE">FT_HINTING_FREETYPE</a>
+#define FT_CFF_HINTING_ADOBE <a href="ft2-properties.html#FT_HINTING_ADOBE">FT_HINTING_ADOBE</a>
+</pre>
+
+<p>A list of constants used for the <a href="ft2-properties.html#hinting-engine">hinting-engine</a> property to select the hinting engine for CFF, Type&nbsp;1, and CID fonts.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_HINTING_FREETYPE">FT_HINTING_FREETYPE</td><td class="desc">
+<p>Use the old FreeType hinting engine.</p>
+</td></tr>
+<tr><td class="val" id="FT_HINTING_ADOBE">FT_HINTING_ADOBE</td><td class="desc">
+<p>Use the hinting engine contributed by Adobe.</p>
+</td></tr>
+</table>
+
+<h4>since</h4>
+<p>2.9</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="hinting-engine">hinting-engine</h3>
+
+<p>Thanks to Adobe, which contributed a new hinting (and parsing) engine, an application can select between &lsquo;freetype&rsquo; and &lsquo;adobe&rsquo; if compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration macro isn't defined, &lsquo;hinting-engine&rsquo; does nothing.</p>
+<p>The same holds for the Type&nbsp;1 and CID modules if compiled with T1_CONFIG_OPTION_OLD_ENGINE.</p>
+<p>For the &lsquo;cff&rsquo; module, the default engine is &lsquo;freetype&rsquo; if CFF_CONFIG_OPTION_OLD_ENGINE is defined, and &lsquo;adobe&rsquo; otherwise.</p>
+<p>For both the &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules, the default engine is &lsquo;freetype&rsquo; if T1_CONFIG_OPTION_OLD_ENGINE is defined, and &lsquo;adobe&rsquo; otherwise.</p>
+<p>The following example code demonstrates how to select Adobe's hinting engine for the &lsquo;cff&rsquo; module (omitting the error handling).</p>
+<pre class="colored">
+ FT_Library library;
+ FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "cff",
+ "hinting-engine", &amp;hinting_engine );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values &lsquo;adobe&rsquo; or &lsquo;freetype&rsquo;).</p>
+
+<h4>since</h4>
+<p>2.4.12 (for &lsquo;cff&rsquo; module)</p>
+<p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="no-stem-darkening">no-stem-darkening</h3>
+
+<p>All glyphs that pass through the auto-hinter will be emboldened unless this property is set to TRUE. The same is true for the CFF, Type&nbsp;1, and CID font modules if the &lsquo;Adobe&rsquo; engine is selected (which is the default).</p>
+<p>Stem darkening emboldens glyphs at smaller sizes to make them more readable on common low-DPI screens when using linear alpha blending and gamma correction, see <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. When not using linear alpha blending and gamma correction, glyphs will appear heavy and fuzzy!</p>
+<p>Gamma correction essentially lightens fonts since shades of grey are shifted to higher pixel values (=&nbsp;higher brightness) to match the original intention to the reality of our screens. The side-effect is that glyphs &lsquo;thin out&rsquo;. Mac OS&nbsp;X and Adobe's proprietary font rendering library implement a counter-measure: stem darkening at smaller sizes where shades of gray dominate. By emboldening a glyph slightly in relation to its pixel size, individual pixels get higher coverage of filled-in outlines and are therefore &lsquo;blacker&rsquo;. This counteracts the &lsquo;thinning out&rsquo; of glyphs, making text remain readable at smaller sizes.</p>
+<p>By default, the Adobe engines for CFF, Type&nbsp;1, and CID fonts darken stems at smaller sizes, regardless of hinting, to enhance contrast. Setting this property, stem darkening gets switched off.</p>
+<p>For the auto-hinter, stem-darkening is experimental currently and thus switched off by default (this is, &lsquo;no-stem-darkening&rsquo; is set to TRUE by default). Total consistency with the CFF driver is not achieved right now because the emboldening method differs and glyphs must be scaled down on the Y-axis to keep outline points inside their precomputed blue zones. The smaller the size (especially 9ppem and down), the higher the loss of emboldening versus the CFF driver.</p>
+<p>Note that stem darkening is never applied if <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> is set.</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Bool no_stem_darkening = TRUE;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "cff",
+ "no-stem-darkening", &amp;no_stem_darkening );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively). It can also be set per face using <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> with <a href="ft2-parameter_tags.html#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a>.</p>
+
+<h4>since</h4>
+<p>2.4.12 (for &lsquo;cff&rsquo; module)</p>
+<p>2.6.2 (for &lsquo;autofitter&rsquo; module)</p>
+<p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="darkening-parameters">darkening-parameters</h3>
+
+<p>By default, the Adobe hinting engine, as used by the CFF, Type&nbsp;1, and CID font drivers, darkens stems as follows (if the &lsquo;no-stem-darkening&rsquo; property isn't set):</p>
+<pre class="colored">
+ stem width &lt;= 0.5px: darkening amount = 0.4px
+ stem width = 1px: darkening amount = 0.275px
+ stem width = 1.667px: darkening amount = 0.275px
+ stem width &gt;= 2.333px: darkening amount = 0px
+</pre>
+<p>and piecewise linear in-between. At configuration time, these four control points can be set with the macro &lsquo;CFF_CONFIG_OPTION_DARKENING_PARAMETERS&rsquo;; the CFF, Type&nbsp;1, and CID drivers share these values. At runtime, the control points can be changed using the &lsquo;darkening-parameters&rsquo; property, as the following example demonstrates for the Type&nbsp;1 driver.</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Int darken_params[8] = { 500, 300, // x1, y1
+ 1000, 200, // x2, y2
+ 1500, 100, // x3, y3
+ 2000, 0 }; // x4, y4
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "type1",
+ "darkening-parameters", darken_params );
+</pre>
+<p>The x&nbsp;values give the stem width, and the y&nbsp;values the darkening amount. The unit is 1000th of pixels. All coordinate values must be positive; the x&nbsp;values must be monotonically increasing; the y&nbsp;values must be monotonically decreasing and smaller than or equal to 500 (corresponding to half a pixel); the slope of each linear piece must be shallower than -1 (e.g., -.4).</p>
+<p>The auto-hinter provides this property, too, as an experimental feature. See <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a> for more.</p>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable, using eight comma-separated integers without spaces. Here the above example, using &lsquo;\&rsquo; to break the line for readability.</p>
+<pre class="colored">
+ FREETYPE_PROPERTIES=\
+ type1:darkening-parameters=500,300,1000,200,1500,100,2000,0
+</pre>
+
+<h4>since</h4>
+<p>2.5.1 (for &lsquo;cff&rsquo; module)</p>
+<p>2.6.2 (for &lsquo;autofitter&rsquo; module)</p>
+<p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="random-seed">random-seed</h3>
+
+<p>By default, the seed value for the CFF &lsquo;random&rsquo; operator and the similar &lsquo;0 28 callothersubr pop&rsquo; command for the Type&nbsp;1 and CID drivers is set to a random value. However, mainly for debugging purposes, it is often necessary to use a known value as a seed so that the pseudo-random number sequences generated by &lsquo;random&rsquo; are repeatable.</p>
+<p>The &lsquo;random-seed&rsquo; property does that. Its argument is a signed 32bit integer; if the value is zero or negative, the seed given by the &lsquo;intitialRandomSeed&rsquo; private DICT operator in a CFF file gets used (or a default value if there is no such operator). If the value is positive, use it instead of &lsquo;initialRandomSeed&rsquo;, which is consequently ignored.</p>
+
+<h4>note</h4>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable. It can also be set per face using <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> with <a href="ft2-parameter_tags.html#FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</a>.</p>
+
+<h4>since</h4>
+<p>2.8 (for &lsquo;cff&rsquo; module)</p>
+<p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="no-long-family-names">no-long-family-names</h3>
+
+<p>If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling FreeType, the PCF driver constructs long family names.</p>
+<p>There are many PCF fonts just called &lsquo;Fixed&rsquo; which look completely different, and which have nothing to do with each other. When selecting &lsquo;Fixed&rsquo; in KDE or Gnome one gets results that appear rather random, the style changes often if one changes the size and one cannot select some fonts at all. The improve this situation, the PCF module prepends the foundry name (plus a space) to the family name. It also checks whether there are &lsquo;wide&rsquo; characters; all put together, family names like &lsquo;Sony Fixed&rsquo; or &lsquo;Misc Fixed Wide&rsquo; are constructed.</p>
+<p>If &lsquo;no-long-family-names&rsquo; is set, this feature gets switched off.</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Bool no_long_family_names = TRUE;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "pcf",
+ "no-long-family-names",
+ &amp;no_long_family_names );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively).</p>
+
+<h4>since</h4>
+<p>2.8</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</h3>
+<p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
+<pre>
+#define <a href="ft2-properties.html#TT_INTERPRETER_VERSION_35">TT_INTERPRETER_VERSION_35</a> 35
+#define <a href="ft2-properties.html#TT_INTERPRETER_VERSION_38">TT_INTERPRETER_VERSION_38</a> 38
+#define <a href="ft2-properties.html#TT_INTERPRETER_VERSION_40">TT_INTERPRETER_VERSION_40</a> 40
+</pre>
+
+<p>A list of constants used for the <a href="ft2-properties.html#interpreter-version">interpreter-version</a> property to select the hinting engine for Truetype fonts.</p>
+<p>The numeric value in the constant names represents the version number as returned by the &lsquo;GETINFO&rsquo; bytecode instruction.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="TT_INTERPRETER_VERSION_35">TT_INTERPRETER_VERSION_35</td><td class="desc">
+<p>Version&nbsp;35 corresponds to MS rasterizer v.1.7 as used e.g. in Windows&nbsp;98; only grayscale and B/W rasterizing is supported.</p>
+</td></tr>
+<tr><td class="val" id="TT_INTERPRETER_VERSION_38">TT_INTERPRETER_VERSION_38</td><td class="desc">
+<p>Version&nbsp;38 corresponds to MS rasterizer v.1.9; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in the Internet Explorer&nbsp;9 running on Windows&nbsp;7). It is used in FreeType to select the &lsquo;Infinality&rsquo; subpixel hinting code. The code may be removed in a future version.</p>
+</td></tr>
+<tr><td class="val" id="TT_INTERPRETER_VERSION_40">TT_INTERPRETER_VERSION_40</td><td class="desc">
+<p>Version&nbsp;40 corresponds to MS rasterizer v.2.1; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in Microsoft's Edge Browser on Windows&nbsp;10). It is used in FreeType to select the &lsquo;minimal&rsquo; subpixel hinting code, a stripped-down and higher performance version of the &lsquo;Infinality&rsquo; code.</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>This property controls the behaviour of the bytecode interpreter and thus how outlines get hinted. It does <b>not</b> control how glyph get rasterized! In particular, it does not control subpixel color filtering.</p>
+<p>If FreeType has not been compiled with the configuration option TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version&nbsp;38 or&nbsp;40 causes an &lsquo;FT_Err_Unimplemented_Feature&rsquo; error.</p>
+<p>Depending on the graphics framework, Microsoft uses different bytecode and rendering engines. As a consequence, the version numbers returned by a call to the &lsquo;GETINFO&rsquo; bytecode instruction are more convoluted than desired.</p>
+<p>Here are two tables that try to shed some light on the possible values for the MS rasterizer engine, together with the additional features introduced by it.</p>
+<pre class="colored">
+ GETINFO framework version feature
+ -------------------------------------------------------------------
+ 3 GDI (Win 3.1), v1.0 16-bit, first version
+ TrueImage
+ 33 GDI (Win NT 3.1), v1.5 32-bit
+ HP Laserjet
+ 34 GDI (Win 95) v1.6 font smoothing,
+ new SCANTYPE opcode
+ 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET
+ bits in composite glyphs
+ 36 MGDI (Win CE 2) v1.6+ classic ClearType
+ 37 GDI (XP and later), v1.8 ClearType
+ GDI+ old (before Vista)
+ 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType,
+ WPF Y-direction ClearType,
+ additional error checking
+ 39 DWrite (before Win 8) v2.0 subpixel ClearType flags
+ in GETINFO opcode,
+ bug fixes
+ 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag
+ DWrite (Win 8) in GETINFO opcode,
+ Gray ClearType
+</pre>
+<p>The &lsquo;version&rsquo; field gives a rough orientation only, since some applications provided certain features much earlier (as an example, Microsoft Reader used subpixel and Y-direction ClearType already in Windows 2000). Similarly, updates to a given framework might include improved hinting support.</p>
+<pre class="colored">
+ version sampling rendering comment
+ x y x y
+ --------------------------------------------------------------
+ v1.0 normal normal B/W B/W bi-level
+ v1.6 high high gray gray grayscale
+ v1.8 high normal color-filter B/W (GDI) ClearType
+ v1.9 high high color-filter gray Color ClearType
+ v2.1 high normal gray B/W Gray ClearType
+ v2.1 high high gray gray Gray ClearType
+</pre>
+<p>Color and Gray ClearType are the two available variants of &lsquo;Y-direction ClearType&rsquo;, meaning grayscale rasterization along the Y-direction; the name used in the TrueType specification for this feature is &lsquo;symmetric smoothing&rsquo;. &lsquo;Classic ClearType&rsquo; is the original algorithm used before introducing a modified version in Win&nbsp;XP. Another name for v1.6's grayscale rendering is &lsquo;font smoothing&rsquo;, and &lsquo;Color ClearType&rsquo; is sometimes also called &lsquo;DWrite ClearType&rsquo;. To differentiate between today's Color ClearType and the earlier ClearType variant with B/W rendering along the vertical axis, the latter is sometimes called &lsquo;GDI ClearType&rsquo;.</p>
+<p>&lsquo;Normal&rsquo; and &lsquo;high&rsquo; sampling describe the (virtual) resolution to access the rasterized outline after the hinting process. &lsquo;Normal&rsquo; means 1 sample per grid line (i.e., B/W). In the current Microsoft implementation, &lsquo;high&rsquo; means an extra virtual resolution of 16x16 (or 16x1) grid lines per pixel for bytecode instructions like &lsquo;MIRP&rsquo;. After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid lines for color filtering if Color ClearType is activated.</p>
+<p>Note that &lsquo;Gray ClearType&rsquo; is essentially the same as v1.6's grayscale rendering. However, the GETINFO instruction handles it differently: v1.6 returns bit&nbsp;12 (hinting for grayscale), while v2.1 returns bits&nbsp;13 (hinting for ClearType), 18 (symmetrical smoothing), and&nbsp;19 (Gray ClearType). Also, this mode respects bits 2 and&nbsp;3 for the version&nbsp;1 gasp table exclusively (like Color ClearType), while v1.6 only respects the values of version&nbsp;0 (bits 0 and&nbsp;1).</p>
+<p>Keep in mind that the features of the above interpreter versions might not map exactly to FreeType features or behavior because it is a fundamentally different library with different internals.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="interpreter-version">interpreter-version</h3>
+
+<p>Currently, three versions are available, two representing the bytecode interpreter with subpixel hinting support (old &lsquo;Infinality&rsquo; code and new stripped-down and higher performance &lsquo;minimal&rsquo; code) and one without, respectively. The default is subpixel support if TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support otherwise (since it isn't available then).</p>
+<p>If subpixel hinting is on, many TrueType bytecode instructions behave differently compared to B/W or grayscale rendering (except if &lsquo;native ClearType&rsquo; is selected by the font). Microsoft's main idea is to render at a much increased horizontal resolution, then sampling down the created output to subpixel precision. However, many older fonts are not suited to this and must be specially taken care of by applying (hardcoded) tweaks in Microsoft's interpreter.</p>
+<p>Details on subpixel hinting and some of the necessary tweaks can be found in Greg Hitchcock's whitepaper at &lsquo;<a href="https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>&rsquo;. Note that FreeType currently doesn't really &lsquo;subpixel hint&rsquo; (6x1, 6x2, or 6x5 supersampling) like discussed in the paper. Depending on the chosen interpreter, it simply ignores instructions on vertical stems to arrive at very similar results.</p>
+<p>The following example code demonstrates how to deactivate subpixel hinting (omitting the error handling).</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Face face;
+ FT_UInt interpreter_version = TT_INTERPRETER_VERSION_35;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "truetype",
+ "interpreter-version",
+ &amp;interpreter_version );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values &lsquo;35&rsquo;, &lsquo;38&rsquo;, or &lsquo;40&rsquo;).</p>
+
+<h4>since</h4>
+<p>2.5</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="glyph-to-script-map">glyph-to-script-map</h3>
+
+<p><b>Experimental</b> <b>only</b></p>
+<p>The auto-hinter provides various script modules to hint glyphs. Examples of supported scripts are Latin or CJK. Before a glyph is auto-hinted, the Unicode character map of the font gets examined, and the script is then determined based on Unicode character ranges, see below.</p>
+<p>OpenType fonts, however, often provide much more glyphs than character codes (small caps, superscripts, ligatures, swashes, etc.), to be controlled by so-called &lsquo;features&rsquo;. Handling OpenType features can be quite complicated and thus needs a separate library on top of FreeType.</p>
+<p>The mapping between glyph indices and scripts (in the auto-hinter sense, see the <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a> values) is stored as an array with &lsquo;num_glyphs&rsquo; elements, as found in the font's <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure. The &lsquo;glyph-to-script-map&rsquo; property returns a pointer to this array, which can be modified as needed. Note that the modification should happen before the first glyph gets processed by the auto-hinter so that the global analysis of the font shapes actually uses the modified mapping.</p>
+<p>The following example code demonstrates how to access it (omitting the error handling).</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Face face;
+ FT_Prop_GlyphToScriptMap prop;
+
+
+ FT_Init_FreeType( &amp;library );
+ FT_New_Face( library, "foo.ttf", 0, &amp;face );
+
+ prop.face = face;
+
+ FT_Property_Get( library, "autofitter",
+ "glyph-to-script-map", &amp;prop );
+
+ // adjust `prop.map' as needed right here
+
+ FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
+</pre>
+
+<h4>since</h4>
+<p>2.4.11</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</h3>
+<p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
+<pre>
+#define <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_NONE">FT_AUTOHINTER_SCRIPT_NONE</a> 0
+#define <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_LATIN">FT_AUTOHINTER_SCRIPT_LATIN</a> 1
+#define <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_CJK">FT_AUTOHINTER_SCRIPT_CJK</a> 2
+#define <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_INDIC">FT_AUTOHINTER_SCRIPT_INDIC</a> 3
+</pre>
+
+<p><b>Experimental</b> <b>only</b></p>
+<p>A list of constants used for the <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a> property to specify the script submodule the auto-hinter should use for hinting a particular glyph.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_NONE">FT_AUTOHINTER_SCRIPT_NONE</td><td class="desc">
+<p>Don't auto-hint this glyph.</p>
+</td></tr>
+<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_LATIN">FT_AUTOHINTER_SCRIPT_LATIN</td><td class="desc">
+<p>Apply the latin auto-hinter. For the auto-hinter, &lsquo;latin&rsquo; is a very broad term, including Cyrillic and Greek also since characters from those scripts share the same design constraints.</p>
+<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
+<pre class="colored">
+ U+0020 - U+007F // Basic Latin (no control characters)
+ U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
+ U+0100 - U+017F // Latin Extended-A
+ U+0180 - U+024F // Latin Extended-B
+ U+0250 - U+02AF // IPA Extensions
+ U+02B0 - U+02FF // Spacing Modifier Letters
+ U+0300 - U+036F // Combining Diacritical Marks
+ U+0370 - U+03FF // Greek and Coptic
+ U+0400 - U+04FF // Cyrillic
+ U+0500 - U+052F // Cyrillic Supplement
+ U+1D00 - U+1D7F // Phonetic Extensions
+ U+1D80 - U+1DBF // Phonetic Extensions Supplement
+ U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
+ U+1E00 - U+1EFF // Latin Extended Additional
+ U+1F00 - U+1FFF // Greek Extended
+ U+2000 - U+206F // General Punctuation
+ U+2070 - U+209F // Superscripts and Subscripts
+ U+20A0 - U+20CF // Currency Symbols
+ U+2150 - U+218F // Number Forms
+ U+2460 - U+24FF // Enclosed Alphanumerics
+ U+2C60 - U+2C7F // Latin Extended-C
+ U+2DE0 - U+2DFF // Cyrillic Extended-A
+ U+2E00 - U+2E7F // Supplemental Punctuation
+ U+A640 - U+A69F // Cyrillic Extended-B
+ U+A720 - U+A7FF // Latin Extended-D
+ U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
+ U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
+ U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
+</pre>
+<p></p>
+</td></tr>
+<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_CJK">FT_AUTOHINTER_SCRIPT_CJK</td><td class="desc">
+<p>Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old Vietnamese, and some other scripts.</p>
+<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
+<pre class="colored">
+ U+1100 - U+11FF // Hangul Jamo
+ U+2E80 - U+2EFF // CJK Radicals Supplement
+ U+2F00 - U+2FDF // Kangxi Radicals
+ U+2FF0 - U+2FFF // Ideographic Description Characters
+ U+3000 - U+303F // CJK Symbols and Punctuation
+ U+3040 - U+309F // Hiragana
+ U+30A0 - U+30FF // Katakana
+ U+3100 - U+312F // Bopomofo
+ U+3130 - U+318F // Hangul Compatibility Jamo
+ U+3190 - U+319F // Kanbun
+ U+31A0 - U+31BF // Bopomofo Extended
+ U+31C0 - U+31EF // CJK Strokes
+ U+31F0 - U+31FF // Katakana Phonetic Extensions
+ U+3200 - U+32FF // Enclosed CJK Letters and Months
+ U+3300 - U+33FF // CJK Compatibility
+ U+3400 - U+4DBF // CJK Unified Ideographs Extension A
+ U+4DC0 - U+4DFF // Yijing Hexagram Symbols
+ U+4E00 - U+9FFF // CJK Unified Ideographs
+ U+A960 - U+A97F // Hangul Jamo Extended-A
+ U+AC00 - U+D7AF // Hangul Syllables
+ U+D7B0 - U+D7FF // Hangul Jamo Extended-B
+ U+F900 - U+FAFF // CJK Compatibility Ideographs
+ U+FE10 - U+FE1F // Vertical forms
+ U+FE30 - U+FE4F // CJK Compatibility Forms
+ U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
+ U+1B000 - U+1B0FF // Kana Supplement
+ U+1D300 - U+1D35F // Tai Xuan Hing Symbols
+ U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
+ U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
+ U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
+ U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
+ U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
+</pre>
+<p></p>
+</td></tr>
+<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_INDIC">FT_AUTOHINTER_SCRIPT_INDIC</td><td class="desc">
+<p>Apply the indic auto-hinter, covering all major scripts from the Indian sub-continent and some other related scripts like Thai, Lao, or Tibetan.</p>
+<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
+<pre class="colored">
+ U+0900 - U+0DFF // Indic Range
+ U+0F00 - U+0FFF // Tibetan
+ U+1900 - U+194F // Limbu
+ U+1B80 - U+1BBF // Sundanese
+ U+A800 - U+A82F // Syloti Nagri
+ U+ABC0 - U+ABFF // Meetei Mayek
+ U+11800 - U+118DF // Sharada
+</pre>
+<p>Note that currently Indic support is rudimentary only, missing blue zone support.</p>
+</td></tr>
+</table>
+
+<h4>since</h4>
+<p>2.4.11</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</h3>
+<p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_GlyphToScriptMap_
+ {
+ <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face;
+ <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>* map;
+
+ } <b>FT_Prop_GlyphToScriptMap</b>;
+</pre>
+
+<p><b>Experimental</b> <b>only</b></p>
+<p>The data exchange structure for the <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a> property.</p>
+
+<h4>since</h4>
+<p>2.4.11</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="fallback-script">fallback-script</h3>
+
+<p><b>Experimental</b> <b>only</b></p>
+<p>If no auto-hinter script module can be assigned to a glyph, a fallback script gets assigned to it (see also the <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a> property). By default, this is <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_CJK</a>. Using the &lsquo;fallback-script&rsquo; property, this fallback value can be changed.</p>
+<pre class="colored">
+ FT_Library library;
+ FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "autofitter",
+ "fallback-script", &amp;fallback_script );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the fallback script value gets triggered either by setting or reading a face-specific property like <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a>, or by auto-hinting any glyph from that face. In particular, if you have already created an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure but not loaded any glyph (using the auto-hinter), a change of the fallback script will affect this face.</p>
+
+<h4>since</h4>
+<p>2.4.11</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="default-script">default-script</h3>
+
+<p><b>Experimental</b> <b>only</b></p>
+<p>If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make the HarfBuzz library access OpenType features for getting better glyph coverages, this property sets the (auto-fitter) script to be used for the default (OpenType) script data of a font's GSUB table. Features for the default script are intended for all scripts not explicitly handled in GSUB; an example is a &lsquo;dlig&rsquo; feature, containing the combination of the characters &lsquo;T&rsquo;, &lsquo;E&rsquo;, and &lsquo;L&rsquo; to form a &lsquo;TEL&rsquo; ligature.</p>
+<p>By default, this is <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_LATIN</a>. Using the &lsquo;default-script&rsquo; property, this default value can be changed.</p>
+<pre class="colored">
+ FT_Library library;
+ FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "autofitter",
+ "default-script", &amp;default_script );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the default script value gets triggered either by setting or reading a face-specific property like <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a>, or by auto-hinting any glyph from that face. In particular, if you have already created an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure but not loaded any glyph (using the auto-hinter), a change of the default script will affect this face.</p>
+
+<h4>since</h4>
+<p>2.5.3</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="increase-x-height">increase-x-height</h3>
+
+<p>For ppem values in the range 6&nbsp;&lt;= ppem &lt;= &lsquo;increase-x-height&rsquo;, round up the font's x&nbsp;height much more often than normally. If the value is set to&nbsp;0, which is the default, this feature is switched off. Use this property to improve the legibility of small font sizes if necessary.</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Face face;
+ FT_Prop_IncreaseXHeight prop;
+
+
+ FT_Init_FreeType( &amp;library );
+ FT_New_Face( library, "foo.ttf", 0, &amp;face );
+ FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
+
+ prop.face = face;
+ prop.limit = 14;
+
+ FT_Property_Set( library, "autofitter",
+ "increase-x-height", &amp;prop );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>Set this value right after calling <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, but before loading any glyph (using the auto-hinter).</p>
+
+<h4>since</h4>
+<p>2.4.11</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</h3>
+<p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_IncreaseXHeight_
+ {
+ <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face;
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> limit;
+
+ } <b>FT_Prop_IncreaseXHeight</b>;
+</pre>
+
+<p>The data exchange structure for the <a href="ft2-properties.html#increase-x-height">increase-x-height</a> property.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="warping">warping</h3>
+
+<p><b>Experimental</b> <b>only</b></p>
+<p>If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to activate the warp hinting code in the auto-hinter, this property switches warping on and off.</p>
+<p>Warping only works in &lsquo;normal&rsquo; auto-hinting mode replacing it. The idea of the code is to slightly scale and shift a glyph along the non-hinted dimension (which is usually the horizontal axis) so that as much of its segments are aligned (more or less) to the grid. To find out a glyph's optimal scaling and shifting value, various parameter combinations are tried and scored.</p>
+<p>By default, warping is off. The example below shows how to switch on warping (omitting the error handling).</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Bool warping = 1;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "autofitter",
+ "warping", &amp;warping );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively).</p>
+<p>The warping code can also change advance widths. Have a look at the &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; fields in the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure for details on improving inter-glyph distances while rendering.</p>
+<p>Since warping is a global property of the auto-hinter it is best to change its value before rendering any face. Otherwise, you should reload all faces that get auto-hinted in &lsquo;normal&rsquo; hinting mode.</p>
+
+<h4>since</h4>
+<p>2.6</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+</body>
+</html>
diff --git a/modules/freetype2/docs/reference/ft2-quick_advance.html b/modules/freetype2/docs/reference/ft2-quick_advance.html
index 3222485af..dafefcf5b 100644
--- a/modules/freetype2/docs/reference/ft2-quick_advance.html
+++ b/modules/freetype2/docs/reference/ft2-quick_advance.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="quick_advance">Quick retrieval of advance values</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-raster.html b/modules/freetype2/docs/reference/ft2-raster.html
index c6932187b..db8e8a395 100644
--- a/modules/freetype2/docs/reference/ft2-raster.html
+++ b/modules/freetype2/docs/reference/ft2-raster.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="raster">Scanline Converter</h1>
<h2>Synopsis</h2>
@@ -370,8 +370,8 @@
#define FT_Raster_Reset_Func <b>FT_Raster_ResetFunc</b>
</pre>
-<p>FreeType used to provide an area of memory called the &lsquo;render pool&rsquo; available to all registered rasters. This was not thread safe however and now FreeType never allocates this pool. NULL is always passed in as pool_base.</p>
-<p>This function is called each time the render pool changes, or just after a new raster object is created.</p>
+<p>FreeType used to provide an area of memory called the &lsquo;render pool&rsquo; available to all registered rasterizers. This was not thread safe, however, and now FreeType never allocates this pool.</p>
+<p>This function is called after a new raster object is created.</p>
<h4>input</h4>
<table class="fields">
@@ -379,15 +379,15 @@
<p>A handle to the new raster object.</p>
</td></tr>
<tr><td class="val" id="pool_base">pool_base</td><td class="desc">
-<p>The address in memory of the render pool.</p>
+<p>Previously, the address in memory of the render pool. Set this to NULL.</p>
</td></tr>
<tr><td class="val" id="pool_size">pool_size</td><td class="desc">
-<p>The size in bytes of the render pool.</p>
+<p>Previously, the size in bytes of the render pool. Set this to 0.</p>
</td></tr>
</table>
<h4>note</h4>
-<p>Rasters should ignore the render pool and rely on dynamic or stack allocation if they want to (a handle to the memory allocator is passed to the raster constructor).</p>
+<p>Rasterizers should rely on dynamic or stack allocation if they want to (a handle to the memory allocator is passed to the rasterizer constructor).</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
diff --git a/modules/freetype2/docs/reference/ft2-sfnt_names.html b/modules/freetype2/docs/reference/ft2-sfnt_names.html
index b7be194e9..2d3d55337 100644
--- a/modules/freetype2/docs/reference/ft2-sfnt_names.html
+++ b/modules/freetype2/docs/reference/ft2-sfnt_names.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,20 +100,17 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="sfnt_names">SFNT Names</h1>
<h2>Synopsis</h2>
<table class="synopsis">
-<tr><td><a href="#FT_SfntName">FT_SfntName</a></td></tr>
-<tr><td><a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td></tr>
-<tr><td><a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td></tr>
-<tr><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></td></tr>
-<tr><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></td></tr>
+<tr><td><a href="#FT_SfntName">FT_SfntName</a></td><td><a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td><td><a href="#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a></td></tr>
+<tr><td><a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td><td><a href="#FT_SfntLangTag">FT_SfntLangTag</a></td><td></td></tr>
</table>
-<p>The TrueType and OpenType specifications allow the inclusion of a special &lsquo;names table&rsquo; in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc.</p>
+<p>The TrueType and OpenType specifications allow the inclusion of a special names table (&lsquo;name&rsquo;) in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc.</p>
<p>The definitions below are used to access them if available.</p>
<p>Note that this has nothing to do with glyph names!</p>
@@ -129,7 +126,7 @@
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> name_id;
<a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* string; /* this string is *not* null-terminated! */
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> string_len; /* in bytes */
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> string_len; /* in bytes */
} <b>FT_SfntName</b>;
</pre>
@@ -139,20 +136,20 @@
<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="platform_id">platform_id</td><td class="desc">
-<p>The platform ID for &lsquo;string&rsquo;.</p>
+<p>The platform ID for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a> for possible values.</p>
</td></tr>
<tr><td class="val" id="encoding_id">encoding_id</td><td class="desc">
-<p>The encoding ID for &lsquo;string&rsquo;.</p>
+<p>The encoding ID for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a>, and <a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a> for possible values.</p>
</td></tr>
<tr><td class="val" id="language_id">language_id</td><td class="desc">
-<p>The language ID for &lsquo;string&rsquo;.</p>
+<p>The language ID for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</a> and <a href="ft2-truetype_tables.html#TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</a> for possible values.</p>
+<p>Registered OpenType values for &lsquo;language_id&rsquo; are always smaller than 0x8000; values equal or larger than 0x8000 usually indicate a language tag string (introduced in OpenType version 1.6). Use function <a href="ft2-sfnt_names.html#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a> with &lsquo;language_id&rsquo; as its argument to retrieve the associated language tag.</p>
</td></tr>
<tr><td class="val" id="name_id">name_id</td><td class="desc">
-<p>An identifier for &lsquo;string&rsquo;.</p>
+<p>An identifier for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_NAME_ID_XXX">TT_NAME_ID_XXX</a> for possible values.</p>
</td></tr>
<tr><td class="val" id="string">string</td><td class="desc">
-<p>The &lsquo;name&rsquo; string. Note that its format differs depending on the (platform,encoding) pair. It can be a Pascal String, a UTF-16 one, etc.</p>
-<p>Generally speaking, the string is not zero-terminated. Please refer to the TrueType specification for details.</p>
+<p>The &lsquo;name&rsquo; string. Note that its format differs depending on the (platform,encoding) pair, being either a string of bytes (without a terminating NULL byte) or containing UTF-16BE entities.</p>
</td></tr>
<tr><td class="val" id="string_len">string_len</td><td class="desc">
<p>The length of &lsquo;string&rsquo; in bytes.</p>
@@ -160,8 +157,7 @@
</table>
<h4>note</h4>
-<p>Possible values for &lsquo;platform_id&rsquo;, &lsquo;encoding_id&rsquo;, &lsquo;language_id&rsquo;, and &lsquo;name_id&rsquo; are given in the file &lsquo;ttnameid.h&rsquo;. For details please refer to the TrueType or OpenType specification.</p>
-<p>See also <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a>, <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a>, and <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a>.</p>
+<p>Please refer to the TrueType or OpenType specification for more details.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -222,32 +218,84 @@
<p>FreeType error code. 0&nbsp;means success.</p>
<h4>note</h4>
-<p>The &lsquo;string&rsquo; array returned in the &lsquo;aname&rsquo; structure is not null-terminated. The application should deallocate it if it is no longer in use.</p>
+<p>The &lsquo;string&rsquo; array returned in the &lsquo;aname&rsquo; structure is not null-terminated. Note that you don't have to deallocate &lsquo;string&rsquo; by yourself; FreeType takes care of it if you call <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
<p>Use <a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a> to get the total number of available &lsquo;name&rsquo; table entries, then do a loop until you get the right platform, encoding, and name ID.</p>
+<p>&lsquo;name&rsquo; table format&nbsp;1 entries can use language tags also, see <a href="ft2-sfnt_names.html#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a>.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
-<h3 id="FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</h3>
+<h3 id="FT_SfntLangTag">FT_SfntLangTag</h3>
<p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p>
<pre>
-#define <b>FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</b> <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 'f' )
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SfntLangTag_
+ {
+ <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* string; /* this string is *not* null-terminated! */
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> string_len; /* in bytes */
+
+ } <b>FT_SfntLangTag</b>;
</pre>
-<p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to make FT_Open_Face() ignore preferred family subfamily names in &lsquo;name&rsquo; table since OpenType version 1.4. For backwards compatibility with legacy systems that have a 4-face-per-family restriction.</p>
+<p>A structure to model a language tag entry from an SFNT &lsquo;name&rsquo; table.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="string">string</td><td class="desc">
+<p>The language tag string, encoded in UTF-16BE (without trailing NULL bytes).</p>
+</td></tr>
+<tr><td class="val" id="string_len">string_len</td><td class="desc">
+<p>The length of &lsquo;string&rsquo; in <b>bytes</b>.</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>Please refer to the TrueType or OpenType specification for more details.</p>
+
+<h4>since</h4>
+<p>2.8</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
-<h3 id="FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</h3>
+<h3 id="FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</h3>
<p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p>
<pre>
-#define <b>FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</b> <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 's' )
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Get_Sfnt_LangTag</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> langID,
+ <a href="ft2-sfnt_names.html#FT_SfntLangTag">FT_SfntLangTag</a> *alangTag );
</pre>
-<p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to make FT_Open_Face() ignore preferred subfamily names in &lsquo;name&rsquo; table since OpenType version 1.4. For backwards compatibility with legacy systems that have a 4-face-per-family restriction.</p>
+<p>Retrieve the language tag associated with a language ID of an SFNT &lsquo;name&rsquo; table entry.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face.</p>
+</td></tr>
+<tr><td class="val" id="langID">langID</td><td class="desc">
+<p>The language ID, as returned by <a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a>. This is always a value larger than 0x8000.</p>
+</td></tr>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="alangTag">alangTag</td><td class="desc">
+<p>The language tag associated with the &lsquo;name&rsquo; table entry's language ID.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>The &lsquo;string&rsquo; array returned in the &lsquo;alangTag&rsquo; structure is not null-terminated. Note that you don't have to deallocate &lsquo;string&rsquo; by yourself; FreeType takes care of it if you call <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
+<p>Only &lsquo;name&rsquo; table format&nbsp;1 supports language tags. For format&nbsp;0 tables, this function always returns FT_Err_Invalid_Table. For invalid format&nbsp;1 language ID values, FT_Err_Invalid_Argument is returned.</p>
+
+<h4>since</h4>
+<p>2.8</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
diff --git a/modules/freetype2/docs/reference/ft2-sizes_management.html b/modules/freetype2/docs/reference/ft2-sizes_management.html
index 10bdec545..1e4daf9e2 100644
--- a/modules/freetype2/docs/reference/ft2-sizes_management.html
+++ b/modules/freetype2/docs/reference/ft2-sizes_management.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="sizes_management">Size Management</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-system_interface.html b/modules/freetype2/docs/reference/ft2-system_interface.html
index 8b457a803..b9162306c 100644
--- a/modules/freetype2/docs/reference/ft2-system_interface.html
+++ b/modules/freetype2/docs/reference/ft2-system_interface.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="system_interface">System Interface</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-t1_cid_driver.html b/modules/freetype2/docs/reference/ft2-t1_cid_driver.html
new file mode 100644
index 000000000..a255eeb48
--- /dev/null
+++ b/modules/freetype2/docs/reference/ft2-t1_cid_driver.html
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"https://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>FreeType-2.9.1 API Reference</title>
+<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
+ body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
+ color: #000000;
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
+
+ h1 { text-align: center; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
+
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
+
+ span.keyword { font-family: monospace;
+ text-align: left;
+ white-space: pre;
+ color: darkblue; }
+
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
+
+</style>
+</head>
+<body>
+
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.9.1 API Reference</h1>
+
+<h1 id="t1_cid_driver">The Type 1 and CID drivers</h1>
+
+<p>It is possible to control the behaviour of FreeType's Type&nbsp;1 and Type&nbsp;1 CID drivers with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>.</p>
+<p>Behind the scenes, both drivers use the Adobe CFF engine for hinting; however, the used properties must be specified separately.</p>
+<p>The Type&nbsp;1 driver's module name is &lsquo;type1&rsquo;; the CID driver's module name is &lsquo;t1cid&rsquo;.</p>
+<p>Available properties are <a href="ft2-properties.html#hinting-engine">hinting-engine</a>, <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a>, <a href="ft2-properties.html#darkening-parameters">darkening-parameters</a>, and <a href="ft2-properties.html#random-seed">random-seed</a>, as documented in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p>
+<p>Please see the &lsquo;<a href="ft2-cff_driver.html#cff_driver">The CFF driver</a>&rsquo; section for more details on the new hinting engine.</p>
+
+</body>
+</html>
diff --git a/modules/freetype2/docs/reference/ft2-toc.html b/modules/freetype2/docs/reference/ft2-toc.html
index ff3efe95e..c803ca1de 100644
--- a/modules/freetype2/docs/reference/ft2-toc.html
+++ b/modules/freetype2/docs/reference/ft2-toc.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1>Table of Contents</h1>
<div class="section">
@@ -126,8 +126,8 @@
<tr><td class="link"><a href="ft2-base_interface.html">Base Interface</a></td><td class="desc">
<p>The FreeType&nbsp;2 base font interface.</p>
</td></tr>
-<tr><td class="link"><a href="ft2-glyph_variants.html">Glyph Variants</a></td><td class="desc">
-<p>The FreeType&nbsp;2 interface to Unicode Ideographic Variation Sequences (IVS), using the SFNT cmap format&nbsp;14.</p>
+<tr><td class="link"><a href="ft2-glyph_variants.html">Unicode Variation Sequences</a></td><td class="desc">
+<p>The FreeType&nbsp;2 interface to Unicode Variation Sequences (UVS), using the SFNT cmap format&nbsp;14.</p>
</td></tr>
<tr><td class="link"><a href="ft2-glyph_management.html">Glyph Management</a></td><td class="desc">
<p>Generic interface to manage individual glyph data.</p>
@@ -187,9 +187,21 @@
<tr><td class="link"><a href="ft2-cff_driver.html">The CFF driver</a></td><td class="desc">
<p>Controlling the CFF driver module.</p>
</td></tr>
+<tr><td class="link"><a href="ft2-t1_cid_driver.html">The Type 1 and CID drivers</a></td><td class="desc">
+<p>Controlling the Type&nbsp;1 and CID driver modules.</p>
+</td></tr>
<tr><td class="link"><a href="ft2-tt_driver.html">The TrueType driver</a></td><td class="desc">
<p>Controlling the TrueType driver module.</p>
</td></tr>
+<tr><td class="link"><a href="ft2-pcf_driver.html">The PCF driver</a></td><td class="desc">
+<p>Controlling the PCF driver module.</p>
+</td></tr>
+<tr><td class="link"><a href="ft2-properties.html">Driver properties</a></td><td class="desc">
+<p>Controlling driver modules.</p>
+</td></tr>
+<tr><td class="link"><a href="ft2-parameter_tags.html">Parameter Tags</a></td><td class="desc">
+<p>Macros for driver property and font loading parameter tags.</p>
+</td></tr>
</table>
</div>
<div class="section">
@@ -277,5 +289,5 @@
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td></tr></table>
-<div class="timestamp">generated on Fri Dec 30 21:17:18 2016</div></body>
+<div class="timestamp">generated on Tue May 1 23:34:43 2018</div></body>
</html>
diff --git a/modules/freetype2/docs/reference/ft2-truetype_engine.html b/modules/freetype2/docs/reference/ft2-truetype_engine.html
index 30dd082e1..4ad43f454 100644
--- a/modules/freetype2/docs/reference/ft2-truetype_engine.html
+++ b/modules/freetype2/docs/reference/ft2-truetype_engine.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="truetype_engine">The TrueType Engine</h1>
<h2>Synopsis</h2>
diff --git a/modules/freetype2/docs/reference/ft2-truetype_tables.html b/modules/freetype2/docs/reference/ft2-truetype_tables.html
index f61e1c903..9cddc35c9 100644
--- a/modules/freetype2/docs/reference/ft2-truetype_tables.html
+++ b/modules/freetype2/docs/reference/ft2-truetype_tables.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,27 +100,25 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="truetype_tables">TrueType Tables</h1>
<h2>Synopsis</h2>
<table class="synopsis">
-<tr><td><a href="#TT_Header">TT_Header</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#TT_HoriHeader">TT_HoriHeader</a></td><td><a href="#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td></tr>
-<tr><td><a href="#TT_VertHeader">TT_VertHeader</a></td><td><a href="#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td></tr>
-<tr><td><a href="#TT_OS2">TT_OS2</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#TT_Postscript">TT_Postscript</a></td><td><a href="#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td></tr>
-<tr><td><a href="#TT_PCLT">TT_PCLT</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#TT_MaxProfile">TT_MaxProfile</a></td><td><a href="#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td></tr>
-<tr><td><a href="#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
-<tr><td><a href="#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
-<tr><td><a href="#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
-<tr><td><a href="#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
+<tr><td><a href="#TT_Header">TT_Header</a></td><td><a href="#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
+<tr><td><a href="#TT_HoriHeader">TT_HoriHeader</a></td><td><a href="#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
+<tr><td><a href="#TT_VertHeader">TT_VertHeader</a></td><td>&nbsp;</td><td><a href="#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
+<tr><td><a href="#TT_OS2">TT_OS2</a></td><td><a href="#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td><td><a href="#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
+<tr><td><a href="#TT_Postscript">TT_Postscript</a></td><td><a href="#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td><td><a href="#TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</a></td></tr>
+<tr><td><a href="#TT_PCLT">TT_PCLT</a></td><td>&nbsp;</td><td><a href="#TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</a></td></tr>
+<tr><td><a href="#TT_MaxProfile">TT_MaxProfile</a></td><td><a href="#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td><td><a href="#TT_NAME_ID_XXX">TT_NAME_ID_XXX</a></td></tr>
+<tr><td>&nbsp;</td><td>&nbsp;</td><td><a href="#TT_UCR_XXX">TT_UCR_XXX</a></td></tr>
+<tr><td><a href="#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td><td></td></tr>
+<tr><td><a href="#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td><td></td></tr>
</table>
-<p>This section contains the definition of TrueType-specific tables as well as some routines used to access and process them.</p>
+<p>This section contains definitions of some basic tables specific to TrueType and OpenType as well as some routines used to access and process them.</p>
<div class="section">
<h3 id="TT_Header">TT_Header</h3>
@@ -155,7 +153,7 @@
} <b>TT_Header</b>;
</pre>
-<p>A structure used to model a TrueType font header table. All fields follow the TrueType specification.</p>
+<p>A structure to model a TrueType font header table. All fields follow the OpenType specification.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -185,9 +183,9 @@
<a href="ft2-basic_types.html#FT_Short">FT_Short</a> metric_Data_Format;
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> number_Of_HMetrics;
- /* The following fields are not defined by the TrueType specification */
+ /* The following fields are not defined by the OpenType specification */
/* but they are used to connect the metrics header to the relevant */
- /* `HMTX' table. */
+ /* `hmtx' table. */
<span class="keyword">void</span>* long_metrics;
<span class="keyword">void</span>* short_metrics;
@@ -195,7 +193,7 @@
} <b>TT_HoriHeader</b>;
</pre>
-<p>A structure used to model a TrueType horizontal header, the &lsquo;hhea&rsquo; table, as well as the corresponding horizontal metrics table, i.e., the &lsquo;hmtx&rsquo; table.</p>
+<p>A structure to model a TrueType horizontal header, the &lsquo;hhea&rsquo; table, as well as the corresponding horizontal metrics table, &lsquo;hmtx&rsquo;.</p>
<h4>fields</h4>
<table class="fields">
@@ -205,12 +203,12 @@
<tr><td class="val" id="Ascender">Ascender</td><td class="desc">
<p>The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
-<p>You should use the &lsquo;sTypoAscender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
+<p>You should use the &lsquo;sTypoAscender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
</td></tr>
<tr><td class="val" id="Descender">Descender</td><td class="desc">
<p>The font's descender, i.e., the distance from the baseline to the bottom-most of all glyph points found in the font. It is negative.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
-<p>You should use the &lsquo;sTypoDescender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
+<p>You should use the &lsquo;sTypoDescender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
</td></tr>
<tr><td class="val" id="Line_Gap">Line_Gap</td><td class="desc">
<p>The font's line gap, i.e., the distance to add to the ascender and descender to get the BTB, i.e., the baseline-to-baseline distance for the font.</p>
@@ -233,6 +231,9 @@
<tr><td class="val" id="caret_Slope_Run">caret_Slope_Run</td><td class="desc">
<p>The run coefficient of the cursor's slope.</p>
</td></tr>
+<tr><td class="val" id="caret_Offset">caret_Offset</td><td class="desc">
+<p>The cursor's offset for slanted fonts.</p>
+</td></tr>
<tr><td class="val" id="Reserved">Reserved</td><td class="desc">
<p>8&nbsp;reserved bytes.</p>
</td></tr>
@@ -251,8 +252,7 @@
</table>
<h4>note</h4>
-<p>IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields, which are different.</p>
-<p>This ensures that a single function in the &lsquo;ttload&rsquo; module is able to read both the horizontal and vertical headers.</p>
+<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;caret_Slope_Rise&rsquo;, &lsquo;caret_Slope_Run&rsquo;, and &lsquo;caret_Offset&rsquo;.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -270,9 +270,9 @@
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> advance_Height_Max; /* advance height maximum */
- <a href="ft2-basic_types.html#FT_Short">FT_Short</a> min_Top_Side_Bearing; /* minimum left-sb or top-sb */
- <a href="ft2-basic_types.html#FT_Short">FT_Short</a> min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */
- <a href="ft2-basic_types.html#FT_Short">FT_Short</a> yMax_Extent; /* xmax or ymax extents */
+ <a href="ft2-basic_types.html#FT_Short">FT_Short</a> min_Top_Side_Bearing; /* minimum top-sb */
+ <a href="ft2-basic_types.html#FT_Short">FT_Short</a> min_Bottom_Side_Bearing; /* minimum bottom-sb */
+ <a href="ft2-basic_types.html#FT_Short">FT_Short</a> yMax_Extent; /* ymax extents */
<a href="ft2-basic_types.html#FT_Short">FT_Short</a> caret_Slope_Rise;
<a href="ft2-basic_types.html#FT_Short">FT_Short</a> caret_Slope_Run;
<a href="ft2-basic_types.html#FT_Short">FT_Short</a> caret_Offset;
@@ -282,9 +282,9 @@
<a href="ft2-basic_types.html#FT_Short">FT_Short</a> metric_Data_Format;
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> number_Of_VMetrics;
- /* The following fields are not defined by the TrueType specification */
- /* but they're used to connect the metrics header to the relevant */
- /* `HMTX' or `VMTX' table. */
+ /* The following fields are not defined by the OpenType specification */
+ /* but they are used to connect the metrics header to the relevant */
+ /* `vmtx' table. */
<span class="keyword">void</span>* long_metrics;
<span class="keyword">void</span>* short_metrics;
@@ -292,7 +292,7 @@
} <b>TT_VertHeader</b>;
</pre>
-<p>A structure used to model a TrueType vertical header, the &lsquo;vhea&rsquo; table, as well as the corresponding vertical metrics table, i.e., the &lsquo;vmtx&rsquo; table.</p>
+<p>A structure used to model a TrueType vertical header, the &lsquo;vhea&rsquo; table, as well as the corresponding vertical metrics table, &lsquo;vmtx&rsquo;.</p>
<h4>fields</h4>
<table class="fields">
@@ -302,12 +302,12 @@
<tr><td class="val" id="Ascender">Ascender</td><td class="desc">
<p>The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
-<p>You should use the &lsquo;sTypoAscender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
+<p>You should use the &lsquo;sTypoAscender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
</td></tr>
<tr><td class="val" id="Descender">Descender</td><td class="desc">
<p>The font's descender, i.e., the distance from the baseline to the bottom-most of all glyph points found in the font. It is negative.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
-<p>You should use the &lsquo;sTypoDescender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
+<p>You should use the &lsquo;sTypoDescender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
</td></tr>
<tr><td class="val" id="Line_Gap">Line_Gap</td><td class="desc">
<p>The font's line gap, i.e., the distance to add to the ascender and descender to get the BTB, i.e., the baseline-to-baseline distance for the font.</p>
@@ -331,7 +331,7 @@
<p>The run coefficient of the cursor's slope.</p>
</td></tr>
<tr><td class="val" id="caret_Offset">caret_Offset</td><td class="desc">
-<p>The cursor's offset for slanted fonts. This value is &lsquo;reserved&rsquo; in vmtx version 1.0.</p>
+<p>The cursor's offset for slanted fonts.</p>
</td></tr>
<tr><td class="val" id="Reserved">Reserved</td><td class="desc">
<p>8&nbsp;reserved bytes.</p>
@@ -339,7 +339,7 @@
<tr><td class="val" id="metric_Data_Format">metric_Data_Format</td><td class="desc">
<p>Always&nbsp;0.</p>
</td></tr>
-<tr><td class="val" id="number_Of_HMetrics">number_Of_HMetrics</td><td class="desc">
+<tr><td class="val" id="number_Of_VMetrics">number_Of_VMetrics</td><td class="desc">
<p>Number of VMetrics entries in the &lsquo;vmtx&rsquo; table -- this value can be smaller than the total number of glyphs in the font.</p>
</td></tr>
<tr><td class="val" id="long_metrics">long_metrics</td><td class="desc">
@@ -351,8 +351,7 @@
</table>
<h4>note</h4>
-<p>IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields, which are different.</p>
-<p>This ensures that a single function in the &lsquo;ttload&rsquo; module is able to read both the horizontal and vertical headers.</p>
+<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;Ascender&rsquo;, &lsquo;Descender&rsquo;, &lsquo;Line_Gap&rsquo;, &lsquo;caret_Slope_Rise&rsquo;, &lsquo;caret_Slope_Run&rsquo;, and &lsquo;caret_Offset&rsquo;.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -419,8 +418,12 @@
} <b>TT_OS2</b>;
</pre>
-<p>A structure used to model a TrueType OS/2 table. All fields comply to the OpenType specification.</p>
-<p>Note that we now support old Mac fonts that do not include an OS/2 table. In this case, the &lsquo;version&rsquo; field is always set to 0xFFFF.</p>
+<p>A structure to model a TrueType &lsquo;OS/2&rsquo; table. All fields comply to the OpenType specification.</p>
+<p>Note that we now support old Mac fonts that do not include an &lsquo;OS/2&rsquo; table. In this case, the &lsquo;version&rsquo; field is always set to 0xFFFF.</p>
+
+<h4>note</h4>
+<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;sCapHeight&rsquo;, &lsquo;sTypoAscender&rsquo;, &lsquo;sTypoDescender&rsquo;, &lsquo;sTypoLineGap&rsquo;, &lsquo;sxHeight&rsquo;, &lsquo;usWinAscent&rsquo;, &lsquo;usWinDescent&rsquo;, &lsquo;yStrikeoutPosition&rsquo;, &lsquo;yStrikeoutSize&rsquo;, &lsquo;ySubscriptXOffset&rsquo;, &lsquo;ySubScriptXSize&rsquo;, &lsquo;ySubscriptYOffset&rsquo;, &lsquo;ySubscriptYSize&rsquo;, &lsquo;ySuperscriptXOffset&rsquo;, &lsquo;ySuperscriptXSize&rsquo;, &lsquo;ySuperscriptYOffset&rsquo;, and &lsquo;ySuperscriptYSize&rsquo;.</p>
+<p>Possible values for bits in the &lsquo;ulUnicodeRangeX&rsquo; fields are given by the <a href="ft2-truetype_tables.html#TT_UCR_XXX">TT_UCR_XXX</a> macros.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -441,13 +444,16 @@
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> minMemType1;
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> maxMemType1;
- /* Glyph names follow in the file, but we don't */
- /* load them by default. See the ttpost.c file. */
+ /* Glyph names follow in the `post' table, but we don't */
+ /* load them by default. */
} <b>TT_Postscript</b>;
</pre>
-<p>A structure used to model a TrueType PostScript table. All fields comply to the TrueType specification. This structure does not reference the PostScript glyph names, which can be nevertheless accessed with the &lsquo;ttpost&rsquo; module.</p>
+<p>A structure to model a TrueType &lsquo;post&rsquo; table. All fields comply to the OpenType specification. This structure does not reference a font's PostScript glyph names; use <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a> to retrieve them.</p>
+
+<h4>note</h4>
+<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;underlinePosition&rsquo; and &lsquo;underlineThickness&rsquo;.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -477,7 +483,7 @@
} <b>TT_PCLT</b>;
</pre>
-<p>A structure used to model a TrueType PCLT table. All fields comply to the TrueType specification.</p>
+<p>A structure to model a TrueType &lsquo;PCLT&rsquo; table. All fields comply to the OpenType specification.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -507,7 +513,7 @@
} <b>TT_MaxProfile</b>;
</pre>
-<p>The maximum profile is a table containing many max values, which can be used to pre-allocate arrays. This ensures that no memory allocation occurs during a glyph load.</p>
+<p>The maximum profile (&lsquo;maxp&rsquo;) table contains many max values, which can be used to pre-allocate arrays for speeding up glyph loading and hinting.</p>
<h4>fields</h4>
<table class="fields">
@@ -518,16 +524,16 @@
<p>The number of glyphs in this TrueType font.</p>
</td></tr>
<tr><td class="val" id="maxPoints">maxPoints</td><td class="desc">
-<p>The maximum number of points in a non-composite TrueType glyph. See also the structure element &lsquo;maxCompositePoints&rsquo;.</p>
+<p>The maximum number of points in a non-composite TrueType glyph. See also &lsquo;maxCompositePoints&rsquo;.</p>
</td></tr>
<tr><td class="val" id="maxContours">maxContours</td><td class="desc">
-<p>The maximum number of contours in a non-composite TrueType glyph. See also the structure element &lsquo;maxCompositeContours&rsquo;.</p>
+<p>The maximum number of contours in a non-composite TrueType glyph. See also &lsquo;maxCompositeContours&rsquo;.</p>
</td></tr>
<tr><td class="val" id="maxCompositePoints">maxCompositePoints</td><td class="desc">
-<p>The maximum number of points in a composite TrueType glyph. See also the structure element &lsquo;maxPoints&rsquo;.</p>
+<p>The maximum number of points in a composite TrueType glyph. See also &lsquo;maxPoints&rsquo;.</p>
</td></tr>
<tr><td class="val" id="maxCompositeContours">maxCompositeContours</td><td class="desc">
-<p>The maximum number of contours in a composite TrueType glyph. See also the structure element &lsquo;maxContours&rsquo;.</p>
+<p>The maximum number of contours in a composite TrueType glyph. See also &lsquo;maxContours&rsquo;.</p>
</td></tr>
<tr><td class="val" id="maxZones">maxZones</td><td class="desc">
<p>The maximum number of zones used for glyph hinting.</p>
@@ -593,7 +599,7 @@
#define ft_sfnt_pclt <a href="ft2-truetype_tables.html#FT_SFNT_PCLT">FT_SFNT_PCLT</a>
</pre>
-<p>An enumeration used to specify the index of an SFNT table. Used in the <a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a> API function.</p>
+<p>An enumeration to specify indices of SFNT tables loaded and parsed by FreeType during initialization of an SFNT font. Used in the <a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a> API function.</p>
<h4>values</h4>
<table class="fields">
@@ -632,7 +638,7 @@
<a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a> tag );
</pre>
-<p>Return a pointer to a given SFNT table within a face.</p>
+<p>Return a pointer to a given SFNT table stored within a face.</p>
<h4>input</h4>
<table class="fields">
@@ -645,7 +651,7 @@
</table>
<h4>return</h4>
-<p>A type-less pointer to the table. This will be&nbsp;0 in case of error, or if the corresponding table was not found <b>OR</b> loaded from the file.</p>
+<p>A type-less pointer to the table. This will be NULL in case of error, or if the corresponding table was not found <b>OR</b> loaded from the file.</p>
<p>Use a typecast according to &lsquo;tag&rsquo; to access the structure elements.</p>
<h4>note</h4>
@@ -675,7 +681,7 @@
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>* length );
</pre>
-<p>Load any font table into client memory.</p>
+<p>Load any SFNT font table into client memory.</p>
<h4>input</h4>
<table class="fields">
@@ -683,10 +689,10 @@
<p>A handle to the source face.</p>
</td></tr>
<tr><td class="val" id="tag">tag</td><td class="desc">
-<p>The four-byte tag of the table to load. Use the value&nbsp;0 if you want to access the whole font file. Otherwise, you can use one of the definitions found in the <a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a> file, or forge a new one with <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>.</p>
+<p>The four-byte tag of the table to load. Use value&nbsp;0 if you want to access the whole font file. Otherwise, you can use one of the definitions found in the <a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a> file, or forge a new one with <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>.</p>
</td></tr>
<tr><td class="val" id="offset">offset</td><td class="desc">
-<p>The starting offset in the table (or file if tag == 0).</p>
+<p>The starting offset in the table (or file if tag&nbsp;==&nbsp;0).</p>
</td></tr>
</table>
@@ -700,7 +706,7 @@
<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="length">length</td><td class="desc">
-<p>If the &lsquo;length&rsquo; parameter is NULL, then try to load the whole table. Return an error code if it fails.</p>
+<p>If the &lsquo;length&rsquo; parameter is NULL, try to load the whole table. Return an error code if it fails.</p>
<p>Else, if &lsquo;*length&rsquo; is&nbsp;0, exit immediately while returning the table's (or file) full size in it.</p>
<p>Else the number of bytes to read from the table or file, from the starting offset.</p>
</td></tr>
@@ -783,7 +789,7 @@
<b>FT_Get_CMap_Language_ID</b>( <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a> charmap );
</pre>
-<p>Return TrueType/sfnt specific cmap language ID. Definitions of language ID values are in &lsquo;ttnameid.h&rsquo;.</p>
+<p>Return cmap language ID as specified in the OpenType standard. Definitions of language ID values are in file <a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a>.</p>
<h4>input</h4>
<table class="fields">
@@ -793,7 +799,7 @@
</table>
<h4>return</h4>
-<p>The language ID of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to a TrueType/sfnt face, just return&nbsp;0 as the default value.</p>
+<p>The language ID of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to an SFNT face, just return&nbsp;0 as the default value.</p>
<p>For a format&nbsp;14 cmap (to access Unicode IVS), the return value is 0xFFFFFFFF.</p>
<hr>
@@ -807,7 +813,7 @@
<b>FT_Get_CMap_Format</b>( <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a> charmap );
</pre>
-<p>Return TrueType/sfnt specific cmap format.</p>
+<p>Return the format of an SFNT &lsquo;cmap&rsquo; table.</p>
<h4>input</h4>
<table class="fields">
@@ -817,19 +823,19 @@
</table>
<h4>return</h4>
-<p>The format of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to a TrueType/sfnt face, return -1.</p>
+<p>The format of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to an SFNT face, return -1.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</h3>
-<p>Defined in FT_UNPATENTED_HINTING_H (freetype/ttunpat.h).</p>
<pre>
-#define <b>FT_PARAM_TAG_UNPATENTED_HINTING</b> <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'u', 'n', 'p', 'a' )
+#define <b>FT_PARAM_TAG_UNPATENTED_HINTING</b> \
+ <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'u', 'n', 'p', 'a' )
</pre>
-<p>Deprecated.</p>
+<p>Deprecated, no effect.</p>
<p>Previously: A constant used as the tag of an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structure to indicate that unpatented methods only should be used by the TrueType bytecode interpreter for a typeface opened by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>.</p>
<hr>
@@ -878,12 +884,13 @@
<h3 id="TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_DEFAULT">TT_APPLE_ID_DEFAULT</a> 0 /* Unicode 1.0 */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_1_1">TT_APPLE_ID_UNICODE_1_1</a> 1 /* specify Hangul at U+34xx */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_ISO_10646">TT_APPLE_ID_ISO_10646</a> 2 /* deprecated */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_2_0">TT_APPLE_ID_UNICODE_2_0</a> 3 /* or later */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_DEFAULT">TT_APPLE_ID_DEFAULT</a> 0 /* Unicode 1.0 */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_1_1">TT_APPLE_ID_UNICODE_1_1</a> 1 /* specify Hangul at U+34xx */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_ISO_10646">TT_APPLE_ID_ISO_10646</a> 2 /* deprecated */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_2_0">TT_APPLE_ID_UNICODE_2_0</a> 3 /* or later */
#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_32">TT_APPLE_ID_UNICODE_32</a> 4 /* 2.0 or later, full repertoire */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_VARIANT_SELECTOR">TT_APPLE_ID_VARIANT_SELECTOR</a> 5 /* variation selector data */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_VARIANT_SELECTOR">TT_APPLE_ID_VARIANT_SELECTOR</a> 5 /* variation selector data */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_FULL_UNICODE">TT_APPLE_ID_FULL_UNICODE</a> 6 /* used with type 13 cmaps */
</pre>
<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a> charmaps and name entries.</p>
@@ -908,6 +915,9 @@
<tr><td class="val" id="TT_APPLE_ID_VARIANT_SELECTOR">TT_APPLE_ID_VARIANT_SELECTOR</td><td class="desc">
<p>From Adobe, not Apple. Not a normal cmap. Specifies variations on a real cmap.</p>
</td></tr>
+<tr><td class="val" id="TT_APPLE_ID_FULL_UNICODE">TT_APPLE_ID_FULL_UNICODE</td><td class="desc">
+<p>Used for fallback fonts that provide complete Unicode coverage with a type&nbsp;13 cmap.</p>
+</td></tr>
</table>
<hr>
@@ -917,150 +927,44 @@
<h3 id="TT_MAC_ID_XXX">TT_MAC_ID_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ROMAN">TT_MAC_ID_ROMAN</a> 0
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_JAPANESE">TT_MAC_ID_JAPANESE</a> 1
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TRADITIONAL_CHINESE">TT_MAC_ID_TRADITIONAL_CHINESE</a> 2
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_KOREAN">TT_MAC_ID_KOREAN</a> 3
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ARABIC">TT_MAC_ID_ARABIC</a> 4
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_HEBREW">TT_MAC_ID_HEBREW</a> 5
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GREEK">TT_MAC_ID_GREEK</a> 6
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_RUSSIAN">TT_MAC_ID_RUSSIAN</a> 7
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_RSYMBOL">TT_MAC_ID_RSYMBOL</a> 8
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_DEVANAGARI">TT_MAC_ID_DEVANAGARI</a> 9
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GURMUKHI">TT_MAC_ID_GURMUKHI</a> 10
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GUJARATI">TT_MAC_ID_GUJARATI</a> 11
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ORIYA">TT_MAC_ID_ORIYA</a> 12
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_BENGALI">TT_MAC_ID_BENGALI</a> 13
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TAMIL">TT_MAC_ID_TAMIL</a> 14
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TELUGU">TT_MAC_ID_TELUGU</a> 15
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_KANNADA">TT_MAC_ID_KANNADA</a> 16
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_MALAYALAM">TT_MAC_ID_MALAYALAM</a> 17
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SINHALESE">TT_MAC_ID_SINHALESE</a> 18
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_BURMESE">TT_MAC_ID_BURMESE</a> 19
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_KHMER">TT_MAC_ID_KHMER</a> 20
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_THAI">TT_MAC_ID_THAI</a> 21
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_LAOTIAN">TT_MAC_ID_LAOTIAN</a> 22
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GEORGIAN">TT_MAC_ID_GEORGIAN</a> 23
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ARMENIAN">TT_MAC_ID_ARMENIAN</a> 24
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_MALDIVIAN">TT_MAC_ID_MALDIVIAN</a> 25
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SIMPLIFIED_CHINESE">TT_MAC_ID_SIMPLIFIED_CHINESE</a> 25
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TIBETAN">TT_MAC_ID_TIBETAN</a> 26
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_MONGOLIAN">TT_MAC_ID_MONGOLIAN</a> 27
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GEEZ">TT_MAC_ID_GEEZ</a> 28
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SLAVIC">TT_MAC_ID_SLAVIC</a> 29
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_VIETNAMESE">TT_MAC_ID_VIETNAMESE</a> 30
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SINDHI">TT_MAC_ID_SINDHI</a> 31
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_UNINTERP">TT_MAC_ID_UNINTERP</a> 32
+#define TT_MAC_ID_ROMAN 0
+#define TT_MAC_ID_JAPANESE 1
+#define TT_MAC_ID_TRADITIONAL_CHINESE 2
+#define TT_MAC_ID_KOREAN 3
+#define TT_MAC_ID_ARABIC 4
+#define TT_MAC_ID_HEBREW 5
+#define TT_MAC_ID_GREEK 6
+#define TT_MAC_ID_RUSSIAN 7
+#define TT_MAC_ID_RSYMBOL 8
+#define TT_MAC_ID_DEVANAGARI 9
+#define TT_MAC_ID_GURMUKHI 10
+#define TT_MAC_ID_GUJARATI 11
+#define TT_MAC_ID_ORIYA 12
+#define TT_MAC_ID_BENGALI 13
+#define TT_MAC_ID_TAMIL 14
+#define TT_MAC_ID_TELUGU 15
+#define TT_MAC_ID_KANNADA 16
+#define TT_MAC_ID_MALAYALAM 17
+#define TT_MAC_ID_SINHALESE 18
+#define TT_MAC_ID_BURMESE 19
+#define TT_MAC_ID_KHMER 20
+#define TT_MAC_ID_THAI 21
+#define TT_MAC_ID_LAOTIAN 22
+#define TT_MAC_ID_GEORGIAN 23
+#define TT_MAC_ID_ARMENIAN 24
+#define TT_MAC_ID_MALDIVIAN 25
+#define TT_MAC_ID_SIMPLIFIED_CHINESE 25
+#define TT_MAC_ID_TIBETAN 26
+#define TT_MAC_ID_MONGOLIAN 27
+#define TT_MAC_ID_GEEZ 28
+#define TT_MAC_ID_SLAVIC 29
+#define TT_MAC_ID_VIETNAMESE 30
+#define TT_MAC_ID_SINDHI 31
+#define TT_MAC_ID_UNINTERP 32
</pre>
<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> charmaps and name entries.</p>
-<h4>values</h4>
-<table class="fields">
-<tr><td class="val" id="TT_MAC_ID_ROMAN">TT_MAC_ID_ROMAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_JAPANESE">TT_MAC_ID_JAPANESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_TRADITIONAL_CHINESE">TT_MAC_ID_TRADITIONAL_CHINESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_KOREAN">TT_MAC_ID_KOREAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_ARABIC">TT_MAC_ID_ARABIC</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_HEBREW">TT_MAC_ID_HEBREW</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_GREEK">TT_MAC_ID_GREEK</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_RUSSIAN">TT_MAC_ID_RUSSIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_RSYMBOL">TT_MAC_ID_RSYMBOL</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_DEVANAGARI">TT_MAC_ID_DEVANAGARI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_GURMUKHI">TT_MAC_ID_GURMUKHI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_GUJARATI">TT_MAC_ID_GUJARATI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_ORIYA">TT_MAC_ID_ORIYA</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_BENGALI">TT_MAC_ID_BENGALI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_TAMIL">TT_MAC_ID_TAMIL</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_TELUGU">TT_MAC_ID_TELUGU</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_KANNADA">TT_MAC_ID_KANNADA</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_MALAYALAM">TT_MAC_ID_MALAYALAM</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_SINHALESE">TT_MAC_ID_SINHALESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_BURMESE">TT_MAC_ID_BURMESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_KHMER">TT_MAC_ID_KHMER</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_THAI">TT_MAC_ID_THAI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_LAOTIAN">TT_MAC_ID_LAOTIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_GEORGIAN">TT_MAC_ID_GEORGIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_ARMENIAN">TT_MAC_ID_ARMENIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_MALDIVIAN">TT_MAC_ID_MALDIVIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_SIMPLIFIED_CHINESE">TT_MAC_ID_SIMPLIFIED_CHINESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_TIBETAN">TT_MAC_ID_TIBETAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_MONGOLIAN">TT_MAC_ID_MONGOLIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_GEEZ">TT_MAC_ID_GEEZ</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_SLAVIC">TT_MAC_ID_SLAVIC</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_VIETNAMESE">TT_MAC_ID_VIETNAMESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_SINDHI">TT_MAC_ID_SINDHI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_UNINTERP">TT_MAC_ID_UNINTERP</td><td class="desc">
-<p></p>
-</td></tr>
-</table>
-
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -1099,11 +1003,14 @@
#define <a href="ft2-truetype_tables.html#TT_MS_ID_SYMBOL_CS">TT_MS_ID_SYMBOL_CS</a> 0
#define <a href="ft2-truetype_tables.html#TT_MS_ID_UNICODE_CS">TT_MS_ID_UNICODE_CS</a> 1
#define <a href="ft2-truetype_tables.html#TT_MS_ID_SJIS">TT_MS_ID_SJIS</a> 2
-#define <a href="ft2-truetype_tables.html#TT_MS_ID_GB2312">TT_MS_ID_GB2312</a> 3
+#define <a href="ft2-truetype_tables.html#TT_MS_ID_PRC">TT_MS_ID_PRC</a> 3
#define <a href="ft2-truetype_tables.html#TT_MS_ID_BIG_5">TT_MS_ID_BIG_5</a> 4
#define <a href="ft2-truetype_tables.html#TT_MS_ID_WANSUNG">TT_MS_ID_WANSUNG</a> 5
#define <a href="ft2-truetype_tables.html#TT_MS_ID_JOHAB">TT_MS_ID_JOHAB</a> 6
#define <a href="ft2-truetype_tables.html#TT_MS_ID_UCS_4">TT_MS_ID_UCS_4</a> 10
+
+ /* this value is deprecated */
+#define TT_MS_ID_GB2312 <a href="ft2-truetype_tables.html#TT_MS_ID_PRC">TT_MS_ID_PRC</a>
</pre>
<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a> charmaps and name entries.</p>
@@ -1111,28 +1018,28 @@
<h4>values</h4>
<table class="fields">
<tr><td class="val" id="TT_MS_ID_SYMBOL_CS">TT_MS_ID_SYMBOL_CS</td><td class="desc">
-<p>Corresponds to Microsoft symbol encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a>.</p>
+<p>Microsoft symbol encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_UNICODE_CS">TT_MS_ID_UNICODE_CS</td><td class="desc">
-<p>Corresponds to a Microsoft WGL4 charmap, matching Unicode. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a>.</p>
+<p>Microsoft WGL4 charmap, matching Unicode. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_SJIS">TT_MS_ID_SJIS</td><td class="desc">
-<p>Corresponds to SJIS Japanese encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a>.</p>
+<p>Shift JIS Japanese encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a>.</p>
</td></tr>
-<tr><td class="val" id="TT_MS_ID_GB2312">TT_MS_ID_GB2312</td><td class="desc">
-<p>Corresponds to Simplified Chinese as used in Mainland China. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_GB2312</a>.</p>
+<tr><td class="val" id="TT_MS_ID_PRC">TT_MS_ID_PRC</td><td class="desc">
+<p>Chinese encodings as used in the People's Republic of China (PRC). This means the encodings GB&nbsp;2312 and its supersets GBK and GB&nbsp;18030. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_PRC</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_BIG_5">TT_MS_ID_BIG_5</td><td class="desc">
-<p>Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a>.</p>
+<p>Traditional Chinese as used in Taiwan and Hong Kong. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_WANSUNG">TT_MS_ID_WANSUNG</td><td class="desc">
-<p>Corresponds to Korean Wansung encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a>.</p>
+<p>Korean Extended Wansung encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_JOHAB">TT_MS_ID_JOHAB</td><td class="desc">
-<p>Corresponds to Johab encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a>.</p>
+<p>Korean Johab encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_UCS_4">TT_MS_ID_UCS_4</td><td class="desc">
-<p>Corresponds to UCS-4 or UTF-32 charmaps. This has been added to the OpenType specification version 1.4 (mid-2001.)</p>
+<p>UCS-4 or UTF-32 charmaps. This has been added to the OpenType specification version 1.4 (mid-2001).</p>
</td></tr>
</table>
@@ -1170,5 +1077,793 @@
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
+<pre>
+#define TT_MAC_LANGID_ENGLISH 0
+#define TT_MAC_LANGID_FRENCH 1
+#define TT_MAC_LANGID_GERMAN 2
+#define TT_MAC_LANGID_ITALIAN 3
+#define TT_MAC_LANGID_DUTCH 4
+#define TT_MAC_LANGID_SWEDISH 5
+#define TT_MAC_LANGID_SPANISH 6
+#define TT_MAC_LANGID_DANISH 7
+#define TT_MAC_LANGID_PORTUGUESE 8
+#define TT_MAC_LANGID_NORWEGIAN 9
+#define TT_MAC_LANGID_HEBREW 10
+#define TT_MAC_LANGID_JAPANESE 11
+#define TT_MAC_LANGID_ARABIC 12
+#define TT_MAC_LANGID_FINNISH 13
+#define TT_MAC_LANGID_GREEK 14
+#define TT_MAC_LANGID_ICELANDIC 15
+#define TT_MAC_LANGID_MALTESE 16
+#define TT_MAC_LANGID_TURKISH 17
+#define TT_MAC_LANGID_CROATIAN 18
+#define TT_MAC_LANGID_CHINESE_TRADITIONAL 19
+#define TT_MAC_LANGID_URDU 20
+#define TT_MAC_LANGID_HINDI 21
+#define TT_MAC_LANGID_THAI 22
+#define TT_MAC_LANGID_KOREAN 23
+#define TT_MAC_LANGID_LITHUANIAN 24
+#define TT_MAC_LANGID_POLISH 25
+#define TT_MAC_LANGID_HUNGARIAN 26
+#define TT_MAC_LANGID_ESTONIAN 27
+#define TT_MAC_LANGID_LETTISH 28
+#define TT_MAC_LANGID_SAAMISK 29
+#define TT_MAC_LANGID_FAEROESE 30
+#define TT_MAC_LANGID_FARSI 31
+#define TT_MAC_LANGID_RUSSIAN 32
+#define TT_MAC_LANGID_CHINESE_SIMPLIFIED 33
+#define TT_MAC_LANGID_FLEMISH 34
+#define TT_MAC_LANGID_IRISH 35
+#define TT_MAC_LANGID_ALBANIAN 36
+#define TT_MAC_LANGID_ROMANIAN 37
+#define TT_MAC_LANGID_CZECH 38
+#define TT_MAC_LANGID_SLOVAK 39
+#define TT_MAC_LANGID_SLOVENIAN 40
+#define TT_MAC_LANGID_YIDDISH 41
+#define TT_MAC_LANGID_SERBIAN 42
+#define TT_MAC_LANGID_MACEDONIAN 43
+#define TT_MAC_LANGID_BULGARIAN 44
+#define TT_MAC_LANGID_UKRAINIAN 45
+#define TT_MAC_LANGID_BYELORUSSIAN 46
+#define TT_MAC_LANGID_UZBEK 47
+#define TT_MAC_LANGID_KAZAKH 48
+#define TT_MAC_LANGID_AZERBAIJANI 49
+#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT 49
+#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT 50
+#define TT_MAC_LANGID_ARMENIAN 51
+#define TT_MAC_LANGID_GEORGIAN 52
+#define TT_MAC_LANGID_MOLDAVIAN 53
+#define TT_MAC_LANGID_KIRGHIZ 54
+#define TT_MAC_LANGID_TAJIKI 55
+#define TT_MAC_LANGID_TURKMEN 56
+#define TT_MAC_LANGID_MONGOLIAN 57
+#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT 57
+#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT 58
+#define TT_MAC_LANGID_PASHTO 59
+#define TT_MAC_LANGID_KURDISH 60
+#define TT_MAC_LANGID_KASHMIRI 61
+#define TT_MAC_LANGID_SINDHI 62
+#define TT_MAC_LANGID_TIBETAN 63
+#define TT_MAC_LANGID_NEPALI 64
+#define TT_MAC_LANGID_SANSKRIT 65
+#define TT_MAC_LANGID_MARATHI 66
+#define TT_MAC_LANGID_BENGALI 67
+#define TT_MAC_LANGID_ASSAMESE 68
+#define TT_MAC_LANGID_GUJARATI 69
+#define TT_MAC_LANGID_PUNJABI 70
+#define TT_MAC_LANGID_ORIYA 71
+#define TT_MAC_LANGID_MALAYALAM 72
+#define TT_MAC_LANGID_KANNADA 73
+#define TT_MAC_LANGID_TAMIL 74
+#define TT_MAC_LANGID_TELUGU 75
+#define TT_MAC_LANGID_SINHALESE 76
+#define TT_MAC_LANGID_BURMESE 77
+#define TT_MAC_LANGID_KHMER 78
+#define TT_MAC_LANGID_LAO 79
+#define TT_MAC_LANGID_VIETNAMESE 80
+#define TT_MAC_LANGID_INDONESIAN 81
+#define TT_MAC_LANGID_TAGALOG 82
+#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT 83
+#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT 84
+#define TT_MAC_LANGID_AMHARIC 85
+#define TT_MAC_LANGID_TIGRINYA 86
+#define TT_MAC_LANGID_GALLA 87
+#define TT_MAC_LANGID_SOMALI 88
+#define TT_MAC_LANGID_SWAHILI 89
+#define TT_MAC_LANGID_RUANDA 90
+#define TT_MAC_LANGID_RUNDI 91
+#define TT_MAC_LANGID_CHEWA 92
+#define TT_MAC_LANGID_MALAGASY 93
+#define TT_MAC_LANGID_ESPERANTO 94
+#define TT_MAC_LANGID_WELSH 128
+#define TT_MAC_LANGID_BASQUE 129
+#define TT_MAC_LANGID_CATALAN 130
+#define TT_MAC_LANGID_LATIN 131
+#define TT_MAC_LANGID_QUECHUA 132
+#define TT_MAC_LANGID_GUARANI 133
+#define TT_MAC_LANGID_AYMARA 134
+#define TT_MAC_LANGID_TATAR 135
+#define TT_MAC_LANGID_UIGHUR 136
+#define TT_MAC_LANGID_DZONGKHA 137
+#define TT_MAC_LANGID_JAVANESE 138
+#define TT_MAC_LANGID_SUNDANESE 139
+
+ /* The following codes are new as of 2000-03-10 */
+#define TT_MAC_LANGID_GALICIAN 140
+#define TT_MAC_LANGID_AFRIKAANS 141
+#define TT_MAC_LANGID_BRETON 142
+#define TT_MAC_LANGID_INUKTITUT 143
+#define TT_MAC_LANGID_SCOTTISH_GAELIC 144
+#define TT_MAC_LANGID_MANX_GAELIC 145
+#define TT_MAC_LANGID_IRISH_GAELIC 146
+#define TT_MAC_LANGID_TONGAN 147
+#define TT_MAC_LANGID_GREEK_POLYTONIC 148
+#define TT_MAC_LANGID_GREELANDIC 149
+#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT 150
+</pre>
+
+<p>Possible values of the language identifier field in the name records of the SFNT &lsquo;name&rsquo; table if the &lsquo;platform&rsquo; identifier code is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a>. These values are also used as return values for function <a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a>.</p>
+<p>The canonical source for Apple's IDs is</p>
+<p><a href="https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html">https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html</a></p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
+<pre>
+#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401
+#define TT_MS_LANGID_ARABIC_IRAQ 0x0801
+#define TT_MS_LANGID_ARABIC_EGYPT 0x0C01
+#define TT_MS_LANGID_ARABIC_LIBYA 0x1001
+#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401
+#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801
+#define TT_MS_LANGID_ARABIC_TUNISIA 0x1C01
+#define TT_MS_LANGID_ARABIC_OMAN 0x2001
+#define TT_MS_LANGID_ARABIC_YEMEN 0x2401
+#define TT_MS_LANGID_ARABIC_SYRIA 0x2801
+#define TT_MS_LANGID_ARABIC_JORDAN 0x2C01
+#define TT_MS_LANGID_ARABIC_LEBANON 0x3001
+#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401
+#define TT_MS_LANGID_ARABIC_UAE 0x3801
+#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3C01
+#define TT_MS_LANGID_ARABIC_QATAR 0x4001
+#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402
+#define TT_MS_LANGID_CATALAN_CATALAN 0x0403
+#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404
+#define TT_MS_LANGID_CHINESE_PRC 0x0804
+#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0C04
+#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004
+#define TT_MS_LANGID_CHINESE_MACAO 0x1404
+#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405
+#define TT_MS_LANGID_DANISH_DENMARK 0x0406
+#define TT_MS_LANGID_GERMAN_GERMANY 0x0407
+#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807
+#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0C07
+#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007
+#define TT_MS_LANGID_GERMAN_LIECHTENSTEIN 0x1407
+#define TT_MS_LANGID_GREEK_GREECE 0x0408
+#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409
+#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809
+#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0C09
+#define TT_MS_LANGID_ENGLISH_CANADA 0x1009
+#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409
+#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809
+#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1C09
+#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009
+#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409
+#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809
+#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2C09
+#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009
+#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409
+#define TT_MS_LANGID_ENGLISH_INDIA 0x4009
+#define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409
+#define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809
+#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040A
+#define TT_MS_LANGID_SPANISH_MEXICO 0x080A
+#define TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT 0x0C0A
+#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100A
+#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140A
+#define TT_MS_LANGID_SPANISH_PANAMA 0x180A
+#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1C0A
+#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200A
+#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240A
+#define TT_MS_LANGID_SPANISH_PERU 0x280A
+#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2C0A
+#define TT_MS_LANGID_SPANISH_ECUADOR 0x300A
+#define TT_MS_LANGID_SPANISH_CHILE 0x340A
+#define TT_MS_LANGID_SPANISH_URUGUAY 0x380A
+#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3C0A
+#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400A
+#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440A
+#define TT_MS_LANGID_SPANISH_HONDURAS 0x480A
+#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4C0A
+#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500A
+#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540A
+#define TT_MS_LANGID_FINNISH_FINLAND 0x040B
+#define TT_MS_LANGID_FRENCH_FRANCE 0x040C
+#define TT_MS_LANGID_FRENCH_BELGIUM 0x080C
+#define TT_MS_LANGID_FRENCH_CANADA 0x0C0C
+#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100C
+#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140C
+#define TT_MS_LANGID_FRENCH_MONACO 0x180C
+#define TT_MS_LANGID_HEBREW_ISRAEL 0x040D
+#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040E
+#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040F
+#define TT_MS_LANGID_ITALIAN_ITALY 0x0410
+#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810
+#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411
+#define TT_MS_LANGID_KOREAN_KOREA 0x0412
+#define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413
+#define TT_MS_LANGID_DUTCH_BELGIUM 0x0813
+#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414
+#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK 0x0814
+#define TT_MS_LANGID_POLISH_POLAND 0x0415
+#define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416
+#define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816
+#define TT_MS_LANGID_ROMANSH_SWITZERLAND 0x0417
+#define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418
+#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419
+#define TT_MS_LANGID_CROATIAN_CROATIA 0x041A
+#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081A
+#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0C1A
+#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101A
+#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141A
+#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181A
+#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x1C1A
+#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC 0x201A
+#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041B
+#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041C
+#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041D
+#define TT_MS_LANGID_SWEDISH_FINLAND 0x081D
+#define TT_MS_LANGID_THAI_THAILAND 0x041E
+#define TT_MS_LANGID_TURKISH_TURKEY 0x041F
+#define TT_MS_LANGID_URDU_PAKISTAN 0x0420
+#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421
+#define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422
+#define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423
+#define TT_MS_LANGID_SLOVENIAN_SLOVENIA 0x0424
+#define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425
+#define TT_MS_LANGID_LATVIAN_LATVIA 0x0426
+#define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427
+#define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428
+#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042A
+#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042B
+#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042C
+#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082C
+#define TT_MS_LANGID_BASQUE_BASQUE 0x042D
+#define TT_MS_LANGID_UPPER_SORBIAN_GERMANY 0x042E
+#define TT_MS_LANGID_LOWER_SORBIAN_GERMANY 0x082E
+#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042F
+#define TT_MS_LANGID_SETSWANA_SOUTH_AFRICA 0x0432
+#define TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA 0x0434
+#define TT_MS_LANGID_ISIZULU_SOUTH_AFRICA 0x0435
+#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436
+#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437
+#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438
+#define TT_MS_LANGID_HINDI_INDIA 0x0439
+#define TT_MS_LANGID_MALTESE_MALTA 0x043A
+#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043B
+#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083B
+#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3B
+#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103B
+#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143B
+#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183B
+#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3B
+#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203B
+#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243B
+#define TT_MS_LANGID_IRISH_IRELAND 0x083C
+#define TT_MS_LANGID_MALAY_MALAYSIA 0x043E
+#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083E
+#define TT_MS_LANGID_KAZAKH_KAZAKHSTAN 0x043F
+#define TT_MS_LANGID_KYRGYZ_KYRGYZSTAN /* Cyrillic*/ 0x0440
+#define TT_MS_LANGID_KISWAHILI_KENYA 0x0441
+#define TT_MS_LANGID_TURKMEN_TURKMENISTAN 0x0442
+#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443
+#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843
+#define TT_MS_LANGID_TATAR_RUSSIA 0x0444
+#define TT_MS_LANGID_BENGALI_INDIA 0x0445
+#define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845
+#define TT_MS_LANGID_PUNJABI_INDIA 0x0446
+#define TT_MS_LANGID_GUJARATI_INDIA 0x0447
+#define TT_MS_LANGID_ODIA_INDIA 0x0448
+#define TT_MS_LANGID_TAMIL_INDIA 0x0449
+#define TT_MS_LANGID_TELUGU_INDIA 0x044A
+#define TT_MS_LANGID_KANNADA_INDIA 0x044B
+#define TT_MS_LANGID_MALAYALAM_INDIA 0x044C
+#define TT_MS_LANGID_ASSAMESE_INDIA 0x044D
+#define TT_MS_LANGID_MARATHI_INDIA 0x044E
+#define TT_MS_LANGID_SANSKRIT_INDIA 0x044F
+#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450
+#define TT_MS_LANGID_MONGOLIAN_PRC 0x0850
+#define TT_MS_LANGID_TIBETAN_PRC 0x0451
+#define TT_MS_LANGID_WELSH_UNITED_KINGDOM 0x0452
+#define TT_MS_LANGID_KHMER_CAMBODIA 0x0453
+#define TT_MS_LANGID_LAO_LAOS 0x0454
+#define TT_MS_LANGID_GALICIAN_GALICIAN 0x0456
+#define TT_MS_LANGID_KONKANI_INDIA 0x0457
+#define TT_MS_LANGID_SYRIAC_SYRIA 0x045A
+#define TT_MS_LANGID_SINHALA_SRI_LANKA 0x045B
+#define TT_MS_LANGID_INUKTITUT_CANADA 0x045D
+#define TT_MS_LANGID_INUKTITUT_CANADA_LATIN 0x085D
+#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045E
+#define TT_MS_LANGID_TAMAZIGHT_ALGERIA 0x085F
+#define TT_MS_LANGID_NEPALI_NEPAL 0x0461
+#define TT_MS_LANGID_FRISIAN_NETHERLANDS 0x0462
+#define TT_MS_LANGID_PASHTO_AFGHANISTAN 0x0463
+#define TT_MS_LANGID_FILIPINO_PHILIPPINES 0x0464
+#define TT_MS_LANGID_DHIVEHI_MALDIVES 0x0465
+#define TT_MS_LANGID_HAUSA_NIGERIA 0x0468
+#define TT_MS_LANGID_YORUBA_NIGERIA 0x046A
+#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046B
+#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086B
+#define TT_MS_LANGID_QUECHUA_PERU 0x0C6B
+#define TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA 0x046C
+#define TT_MS_LANGID_BASHKIR_RUSSIA 0x046D
+#define TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG 0x046E
+#define TT_MS_LANGID_GREENLANDIC_GREENLAND 0x046F
+#define TT_MS_LANGID_IGBO_NIGERIA 0x0470
+#define TT_MS_LANGID_YI_PRC 0x0478
+#define TT_MS_LANGID_MAPUDUNGUN_CHILE 0x047A
+#define TT_MS_LANGID_MOHAWK_MOHAWK 0x047C
+#define TT_MS_LANGID_BRETON_FRANCE 0x047E
+#define TT_MS_LANGID_UIGHUR_PRC 0x0480
+#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481
+#define TT_MS_LANGID_OCCITAN_FRANCE 0x0482
+#define TT_MS_LANGID_CORSICAN_FRANCE 0x0483
+#define TT_MS_LANGID_ALSATIAN_FRANCE 0x0484
+#define TT_MS_LANGID_YAKUT_RUSSIA 0x0485
+#define TT_MS_LANGID_KICHE_GUATEMALA 0x0486
+#define TT_MS_LANGID_KINYARWANDA_RWANDA 0x0487
+#define TT_MS_LANGID_WOLOF_SENEGAL 0x0488
+#define TT_MS_LANGID_DARI_AFGHANISTAN 0x048C
+</pre>
+
+<p>Possible values of the language identifier field in the name records of the SFNT &lsquo;name&rsquo; table if the &lsquo;platform&rsquo; identifier code is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a>. These values are also used as return values for function <a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a>.</p>
+<p>The canonical source for Microsoft's IDs is</p>
+<p><a href="https://www.microsoft.com/globaldev/reference/lcid-all.mspx">https://www.microsoft.com/globaldev/reference/lcid-all.mspx</a> ,</p>
+<p>however, we only provide macros for language identifiers present in the OpenType specification: Microsoft has abandoned the concept of LCIDs (language code identifiers), and format&nbsp;1 of the &lsquo;name&rsquo; table provides a better mechanism for languages not covered here.</p>
+<p>More legacy values not listed in the reference can be found in the <a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a> header file.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_NAME_ID_XXX">TT_NAME_ID_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
+<pre>
+#define TT_NAME_ID_COPYRIGHT 0
+#define TT_NAME_ID_FONT_FAMILY 1
+#define TT_NAME_ID_FONT_SUBFAMILY 2
+#define TT_NAME_ID_UNIQUE_ID 3
+#define TT_NAME_ID_FULL_NAME 4
+#define TT_NAME_ID_VERSION_STRING 5
+#define TT_NAME_ID_PS_NAME 6
+#define TT_NAME_ID_TRADEMARK 7
+
+ /* the following values are from the OpenType spec */
+#define TT_NAME_ID_MANUFACTURER 8
+#define TT_NAME_ID_DESIGNER 9
+#define TT_NAME_ID_DESCRIPTION 10
+#define TT_NAME_ID_VENDOR_URL 11
+#define TT_NAME_ID_DESIGNER_URL 12
+#define TT_NAME_ID_LICENSE 13
+#define TT_NAME_ID_LICENSE_URL 14
+ /* number 15 is reserved */
+#define TT_NAME_ID_TYPOGRAPHIC_FAMILY 16
+#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY 17
+#define TT_NAME_ID_MAC_FULL_NAME 18
+
+ /* The following code is new as of 2000-01-21 */
+#define TT_NAME_ID_SAMPLE_TEXT 19
+
+ /* This is new in OpenType 1.3 */
+#define TT_NAME_ID_CID_FINDFONT_NAME 20
+
+ /* This is new in OpenType 1.5 */
+#define TT_NAME_ID_WWS_FAMILY 21
+#define TT_NAME_ID_WWS_SUBFAMILY 22
+
+ /* This is new in OpenType 1.7 */
+#define TT_NAME_ID_LIGHT_BACKGROUND 23
+#define TT_NAME_ID_DARK_BACKGROUND 24
+
+ /* This is new in OpenType 1.8 */
+#define TT_NAME_ID_VARIATIONS_PREFIX 25
+
+ /* these two values are deprecated */
+#define TT_NAME_ID_PREFERRED_FAMILY TT_NAME_ID_TYPOGRAPHIC_FAMILY
+#define TT_NAME_ID_PREFERRED_SUBFAMILY TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
+</pre>
+
+<p>Possible values of the &lsquo;name&rsquo; identifier field in the name records of an SFNT &lsquo;name&rsquo; table. These values are platform independent.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_UCR_XXX">TT_UCR_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
+<pre>
+ /* ulUnicodeRange1 */
+ /* --------------- */
+
+ /* Bit 0 Basic Latin */
+#define TT_UCR_BASIC_LATIN (1L &lt;&lt; 0) /* U+0020-U+007E */
+ /* Bit 1 C1 Controls and Latin-1 Supplement */
+#define TT_UCR_LATIN1_SUPPLEMENT (1L &lt;&lt; 1) /* U+0080-U+00FF */
+ /* Bit 2 Latin Extended-A */
+#define TT_UCR_LATIN_EXTENDED_A (1L &lt;&lt; 2) /* U+0100-U+017F */
+ /* Bit 3 Latin Extended-B */
+#define TT_UCR_LATIN_EXTENDED_B (1L &lt;&lt; 3) /* U+0180-U+024F */
+ /* Bit 4 IPA Extensions */
+ /* Phonetic Extensions */
+ /* Phonetic Extensions Supplement */
+#define TT_UCR_IPA_EXTENSIONS (1L &lt;&lt; 4) /* U+0250-U+02AF */
+ /* U+1D00-U+1D7F */
+ /* U+1D80-U+1DBF */
+ /* Bit 5 Spacing Modifier Letters */
+ /* Modifier Tone Letters */
+#define TT_UCR_SPACING_MODIFIER (1L &lt;&lt; 5) /* U+02B0-U+02FF */
+ /* U+A700-U+A71F */
+ /* Bit 6 Combining Diacritical Marks */
+ /* Combining Diacritical Marks Supplement */
+#define TT_UCR_COMBINING_DIACRITICAL_MARKS (1L &lt;&lt; 6) /* U+0300-U+036F */
+ /* U+1DC0-U+1DFF */
+ /* Bit 7 Greek and Coptic */
+#define TT_UCR_GREEK (1L &lt;&lt; 7) /* U+0370-U+03FF */
+ /* Bit 8 Coptic */
+#define TT_UCR_COPTIC (1L &lt;&lt; 8) /* U+2C80-U+2CFF */
+ /* Bit 9 Cyrillic */
+ /* Cyrillic Supplement */
+ /* Cyrillic Extended-A */
+ /* Cyrillic Extended-B */
+#define TT_UCR_CYRILLIC (1L &lt;&lt; 9) /* U+0400-U+04FF */
+ /* U+0500-U+052F */
+ /* U+2DE0-U+2DFF */
+ /* U+A640-U+A69F */
+ /* Bit 10 Armenian */
+#define TT_UCR_ARMENIAN (1L &lt;&lt; 10) /* U+0530-U+058F */
+ /* Bit 11 Hebrew */
+#define TT_UCR_HEBREW (1L &lt;&lt; 11) /* U+0590-U+05FF */
+ /* Bit 12 Vai */
+#define TT_UCR_VAI (1L &lt;&lt; 12) /* U+A500-U+A63F */
+ /* Bit 13 Arabic */
+ /* Arabic Supplement */
+#define TT_UCR_ARABIC (1L &lt;&lt; 13) /* U+0600-U+06FF */
+ /* U+0750-U+077F */
+ /* Bit 14 NKo */
+#define TT_UCR_NKO (1L &lt;&lt; 14) /* U+07C0-U+07FF */
+ /* Bit 15 Devanagari */
+#define TT_UCR_DEVANAGARI (1L &lt;&lt; 15) /* U+0900-U+097F */
+ /* Bit 16 Bengali */
+#define TT_UCR_BENGALI (1L &lt;&lt; 16) /* U+0980-U+09FF */
+ /* Bit 17 Gurmukhi */
+#define TT_UCR_GURMUKHI (1L &lt;&lt; 17) /* U+0A00-U+0A7F */
+ /* Bit 18 Gujarati */
+#define TT_UCR_GUJARATI (1L &lt;&lt; 18) /* U+0A80-U+0AFF */
+ /* Bit 19 Oriya */
+#define TT_UCR_ORIYA (1L &lt;&lt; 19) /* U+0B00-U+0B7F */
+ /* Bit 20 Tamil */
+#define TT_UCR_TAMIL (1L &lt;&lt; 20) /* U+0B80-U+0BFF */
+ /* Bit 21 Telugu */
+#define TT_UCR_TELUGU (1L &lt;&lt; 21) /* U+0C00-U+0C7F */
+ /* Bit 22 Kannada */
+#define TT_UCR_KANNADA (1L &lt;&lt; 22) /* U+0C80-U+0CFF */
+ /* Bit 23 Malayalam */
+#define TT_UCR_MALAYALAM (1L &lt;&lt; 23) /* U+0D00-U+0D7F */
+ /* Bit 24 Thai */
+#define TT_UCR_THAI (1L &lt;&lt; 24) /* U+0E00-U+0E7F */
+ /* Bit 25 Lao */
+#define TT_UCR_LAO (1L &lt;&lt; 25) /* U+0E80-U+0EFF */
+ /* Bit 26 Georgian */
+ /* Georgian Supplement */
+#define TT_UCR_GEORGIAN (1L &lt;&lt; 26) /* U+10A0-U+10FF */
+ /* U+2D00-U+2D2F */
+ /* Bit 27 Balinese */
+#define TT_UCR_BALINESE (1L &lt;&lt; 27) /* U+1B00-U+1B7F */
+ /* Bit 28 Hangul Jamo */
+#define TT_UCR_HANGUL_JAMO (1L &lt;&lt; 28) /* U+1100-U+11FF */
+ /* Bit 29 Latin Extended Additional */
+ /* Latin Extended-C */
+ /* Latin Extended-D */
+#define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L &lt;&lt; 29) /* U+1E00-U+1EFF */
+ /* U+2C60-U+2C7F */
+ /* U+A720-U+A7FF */
+ /* Bit 30 Greek Extended */
+#define TT_UCR_GREEK_EXTENDED (1L &lt;&lt; 30) /* U+1F00-U+1FFF */
+ /* Bit 31 General Punctuation */
+ /* Supplemental Punctuation */
+#define TT_UCR_GENERAL_PUNCTUATION (1L &lt;&lt; 31) /* U+2000-U+206F */
+ /* U+2E00-U+2E7F */
+
+ /* ulUnicodeRange2 */
+ /* --------------- */
+
+ /* Bit 32 Superscripts And Subscripts */
+#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L &lt;&lt; 0) /* U+2070-U+209F */
+ /* Bit 33 Currency Symbols */
+#define TT_UCR_CURRENCY_SYMBOLS (1L &lt;&lt; 1) /* U+20A0-U+20CF */
+ /* Bit 34 Combining Diacritical Marks For Symbols */
+#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
+ (1L &lt;&lt; 2) /* U+20D0-U+20FF */
+ /* Bit 35 Letterlike Symbols */
+#define TT_UCR_LETTERLIKE_SYMBOLS (1L &lt;&lt; 3) /* U+2100-U+214F */
+ /* Bit 36 Number Forms */
+#define TT_UCR_NUMBER_FORMS (1L &lt;&lt; 4) /* U+2150-U+218F */
+ /* Bit 37 Arrows */
+ /* Supplemental Arrows-A */
+ /* Supplemental Arrows-B */
+ /* Miscellaneous Symbols and Arrows */
+#define TT_UCR_ARROWS (1L &lt;&lt; 5) /* U+2190-U+21FF */
+ /* U+27F0-U+27FF */
+ /* U+2900-U+297F */
+ /* U+2B00-U+2BFF */
+ /* Bit 38 Mathematical Operators */
+ /* Supplemental Mathematical Operators */
+ /* Miscellaneous Mathematical Symbols-A */
+ /* Miscellaneous Mathematical Symbols-B */
+#define TT_UCR_MATHEMATICAL_OPERATORS (1L &lt;&lt; 6) /* U+2200-U+22FF */
+ /* U+2A00-U+2AFF */
+ /* U+27C0-U+27EF */
+ /* U+2980-U+29FF */
+ /* Bit 39 Miscellaneous Technical */
+#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L &lt;&lt; 7) /* U+2300-U+23FF */
+ /* Bit 40 Control Pictures */
+#define TT_UCR_CONTROL_PICTURES (1L &lt;&lt; 8) /* U+2400-U+243F */
+ /* Bit 41 Optical Character Recognition */
+#define TT_UCR_OCR (1L &lt;&lt; 9) /* U+2440-U+245F */
+ /* Bit 42 Enclosed Alphanumerics */
+#define TT_UCR_ENCLOSED_ALPHANUMERICS (1L &lt;&lt; 10) /* U+2460-U+24FF */
+ /* Bit 43 Box Drawing */
+#define TT_UCR_BOX_DRAWING (1L &lt;&lt; 11) /* U+2500-U+257F */
+ /* Bit 44 Block Elements */
+#define TT_UCR_BLOCK_ELEMENTS (1L &lt;&lt; 12) /* U+2580-U+259F */
+ /* Bit 45 Geometric Shapes */
+#define TT_UCR_GEOMETRIC_SHAPES (1L &lt;&lt; 13) /* U+25A0-U+25FF */
+ /* Bit 46 Miscellaneous Symbols */
+#define TT_UCR_MISCELLANEOUS_SYMBOLS (1L &lt;&lt; 14) /* U+2600-U+26FF */
+ /* Bit 47 Dingbats */
+#define TT_UCR_DINGBATS (1L &lt;&lt; 15) /* U+2700-U+27BF */
+ /* Bit 48 CJK Symbols and Punctuation */
+#define TT_UCR_CJK_SYMBOLS (1L &lt;&lt; 16) /* U+3000-U+303F */
+ /* Bit 49 Hiragana */
+#define TT_UCR_HIRAGANA (1L &lt;&lt; 17) /* U+3040-U+309F */
+ /* Bit 50 Katakana */
+ /* Katakana Phonetic Extensions */
+#define TT_UCR_KATAKANA (1L &lt;&lt; 18) /* U+30A0-U+30FF */
+ /* U+31F0-U+31FF */
+ /* Bit 51 Bopomofo */
+ /* Bopomofo Extended */
+#define TT_UCR_BOPOMOFO (1L &lt;&lt; 19) /* U+3100-U+312F */
+ /* U+31A0-U+31BF */
+ /* Bit 52 Hangul Compatibility Jamo */
+#define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L &lt;&lt; 20) /* U+3130-U+318F */
+ /* Bit 53 Phags-Pa */
+#define TT_UCR_CJK_MISC (1L &lt;&lt; 21) /* U+A840-U+A87F */
+#define TT_UCR_KANBUN TT_UCR_CJK_MISC /* deprecated */
+#define TT_UCR_PHAGSPA
+ /* Bit 54 Enclosed CJK Letters and Months */
+#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L &lt;&lt; 22) /* U+3200-U+32FF */
+ /* Bit 55 CJK Compatibility */
+#define TT_UCR_CJK_COMPATIBILITY (1L &lt;&lt; 23) /* U+3300-U+33FF */
+ /* Bit 56 Hangul Syllables */
+#define TT_UCR_HANGUL (1L &lt;&lt; 24) /* U+AC00-U+D7A3 */
+ /* Bit 57 High Surrogates */
+ /* High Private Use Surrogates */
+ /* Low Surrogates */
+
+ /* According to OpenType specs v.1.3+, */
+ /* setting bit 57 implies that there is */
+ /* at least one codepoint beyond the */
+ /* Basic Multilingual Plane that is */
+ /* supported by this font. So it really */
+ /* means &gt;= U+10000. */
+#define TT_UCR_SURROGATES (1L &lt;&lt; 25) /* U+D800-U+DB7F */
+ /* U+DB80-U+DBFF */
+ /* U+DC00-U+DFFF */
+#define TT_UCR_NON_PLANE_0 TT_UCR_SURROGATES
+ /* Bit 58 Phoenician */
+#define TT_UCR_PHOENICIAN (1L &lt;&lt; 26) /*U+10900-U+1091F*/
+ /* Bit 59 CJK Unified Ideographs */
+ /* CJK Radicals Supplement */
+ /* Kangxi Radicals */
+ /* Ideographic Description Characters */
+ /* CJK Unified Ideographs Extension A */
+ /* CJK Unified Ideographs Extension B */
+ /* Kanbun */
+#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L &lt;&lt; 27) /* U+4E00-U+9FFF */
+ /* U+2E80-U+2EFF */
+ /* U+2F00-U+2FDF */
+ /* U+2FF0-U+2FFF */
+ /* U+3400-U+4DB5 */
+ /*U+20000-U+2A6DF*/
+ /* U+3190-U+319F */
+ /* Bit 60 Private Use */
+#define TT_UCR_PRIVATE_USE (1L &lt;&lt; 28) /* U+E000-U+F8FF */
+ /* Bit 61 CJK Strokes */
+ /* CJK Compatibility Ideographs */
+ /* CJK Compatibility Ideographs Supplement */
+#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L &lt;&lt; 29) /* U+31C0-U+31EF */
+ /* U+F900-U+FAFF */
+ /*U+2F800-U+2FA1F*/
+ /* Bit 62 Alphabetic Presentation Forms */
+#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L &lt;&lt; 30) /* U+FB00-U+FB4F */
+ /* Bit 63 Arabic Presentation Forms-A */
+#define TT_UCR_ARABIC_PRESENTATION_FORMS_A (1L &lt;&lt; 31) /* U+FB50-U+FDFF */
+
+ /* ulUnicodeRange3 */
+ /* --------------- */
+
+ /* Bit 64 Combining Half Marks */
+#define TT_UCR_COMBINING_HALF_MARKS (1L &lt;&lt; 0) /* U+FE20-U+FE2F */
+ /* Bit 65 Vertical forms */
+ /* CJK Compatibility Forms */
+#define TT_UCR_CJK_COMPATIBILITY_FORMS (1L &lt;&lt; 1) /* U+FE10-U+FE1F */
+ /* U+FE30-U+FE4F */
+ /* Bit 66 Small Form Variants */
+#define TT_UCR_SMALL_FORM_VARIANTS (1L &lt;&lt; 2) /* U+FE50-U+FE6F */
+ /* Bit 67 Arabic Presentation Forms-B */
+#define TT_UCR_ARABIC_PRESENTATION_FORMS_B (1L &lt;&lt; 3) /* U+FE70-U+FEFE */
+ /* Bit 68 Halfwidth and Fullwidth Forms */
+#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L &lt;&lt; 4) /* U+FF00-U+FFEF */
+ /* Bit 69 Specials */
+#define TT_UCR_SPECIALS (1L &lt;&lt; 5) /* U+FFF0-U+FFFD */
+ /* Bit 70 Tibetan */
+#define TT_UCR_TIBETAN (1L &lt;&lt; 6) /* U+0F00-U+0FFF */
+ /* Bit 71 Syriac */
+#define TT_UCR_SYRIAC (1L &lt;&lt; 7) /* U+0700-U+074F */
+ /* Bit 72 Thaana */
+#define TT_UCR_THAANA (1L &lt;&lt; 8) /* U+0780-U+07BF */
+ /* Bit 73 Sinhala */
+#define TT_UCR_SINHALA (1L &lt;&lt; 9) /* U+0D80-U+0DFF */
+ /* Bit 74 Myanmar */
+#define TT_UCR_MYANMAR (1L &lt;&lt; 10) /* U+1000-U+109F */
+ /* Bit 75 Ethiopic */
+ /* Ethiopic Supplement */
+ /* Ethiopic Extended */
+#define TT_UCR_ETHIOPIC (1L &lt;&lt; 11) /* U+1200-U+137F */
+ /* U+1380-U+139F */
+ /* U+2D80-U+2DDF */
+ /* Bit 76 Cherokee */
+#define TT_UCR_CHEROKEE (1L &lt;&lt; 12) /* U+13A0-U+13FF */
+ /* Bit 77 Unified Canadian Aboriginal Syllabics */
+#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS (1L &lt;&lt; 13) /* U+1400-U+167F */
+ /* Bit 78 Ogham */
+#define TT_UCR_OGHAM (1L &lt;&lt; 14) /* U+1680-U+169F */
+ /* Bit 79 Runic */
+#define TT_UCR_RUNIC (1L &lt;&lt; 15) /* U+16A0-U+16FF */
+ /* Bit 80 Khmer */
+ /* Khmer Symbols */
+#define TT_UCR_KHMER (1L &lt;&lt; 16) /* U+1780-U+17FF */
+ /* U+19E0-U+19FF */
+ /* Bit 81 Mongolian */
+#define TT_UCR_MONGOLIAN (1L &lt;&lt; 17) /* U+1800-U+18AF */
+ /* Bit 82 Braille Patterns */
+#define TT_UCR_BRAILLE (1L &lt;&lt; 18) /* U+2800-U+28FF */
+ /* Bit 83 Yi Syllables */
+ /* Yi Radicals */
+#define TT_UCR_YI (1L &lt;&lt; 19) /* U+A000-U+A48F */
+ /* U+A490-U+A4CF */
+ /* Bit 84 Tagalog */
+ /* Hanunoo */
+ /* Buhid */
+ /* Tagbanwa */
+#define TT_UCR_PHILIPPINE (1L &lt;&lt; 20) /* U+1700-U+171F */
+ /* U+1720-U+173F */
+ /* U+1740-U+175F */
+ /* U+1760-U+177F */
+ /* Bit 85 Old Italic */
+#define TT_UCR_OLD_ITALIC (1L &lt;&lt; 21) /*U+10300-U+1032F*/
+ /* Bit 86 Gothic */
+#define TT_UCR_GOTHIC (1L &lt;&lt; 22) /*U+10330-U+1034F*/
+ /* Bit 87 Deseret */
+#define TT_UCR_DESERET (1L &lt;&lt; 23) /*U+10400-U+1044F*/
+ /* Bit 88 Byzantine Musical Symbols */
+ /* Musical Symbols */
+ /* Ancient Greek Musical Notation */
+#define TT_UCR_MUSICAL_SYMBOLS (1L &lt;&lt; 24) /*U+1D000-U+1D0FF*/
+ /*U+1D100-U+1D1FF*/
+ /*U+1D200-U+1D24F*/
+ /* Bit 89 Mathematical Alphanumeric Symbols */
+#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1L &lt;&lt; 25) /*U+1D400-U+1D7FF*/
+ /* Bit 90 Private Use (plane 15) */
+ /* Private Use (plane 16) */
+#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1L &lt;&lt; 26) /*U+F0000-U+FFFFD*/
+ /*U+100000-U+10FFFD*/
+ /* Bit 91 Variation Selectors */
+ /* Variation Selectors Supplement */
+#define TT_UCR_VARIATION_SELECTORS (1L &lt;&lt; 27) /* U+FE00-U+FE0F */
+ /*U+E0100-U+E01EF*/
+ /* Bit 92 Tags */
+#define TT_UCR_TAGS (1L &lt;&lt; 28) /*U+E0000-U+E007F*/
+ /* Bit 93 Limbu */
+#define TT_UCR_LIMBU (1L &lt;&lt; 29) /* U+1900-U+194F */
+ /* Bit 94 Tai Le */
+#define TT_UCR_TAI_LE (1L &lt;&lt; 30) /* U+1950-U+197F */
+ /* Bit 95 New Tai Lue */
+#define TT_UCR_NEW_TAI_LUE (1L &lt;&lt; 31) /* U+1980-U+19DF */
+
+ /* ulUnicodeRange4 */
+ /* --------------- */
+
+ /* Bit 96 Buginese */
+#define TT_UCR_BUGINESE (1L &lt;&lt; 0) /* U+1A00-U+1A1F */
+ /* Bit 97 Glagolitic */
+#define TT_UCR_GLAGOLITIC (1L &lt;&lt; 1) /* U+2C00-U+2C5F */
+ /* Bit 98 Tifinagh */
+#define TT_UCR_TIFINAGH (1L &lt;&lt; 2) /* U+2D30-U+2D7F */
+ /* Bit 99 Yijing Hexagram Symbols */
+#define TT_UCR_YIJING (1L &lt;&lt; 3) /* U+4DC0-U+4DFF */
+ /* Bit 100 Syloti Nagri */
+#define TT_UCR_SYLOTI_NAGRI (1L &lt;&lt; 4) /* U+A800-U+A82F */
+ /* Bit 101 Linear B Syllabary */
+ /* Linear B Ideograms */
+ /* Aegean Numbers */
+#define TT_UCR_LINEAR_B (1L &lt;&lt; 5) /*U+10000-U+1007F*/
+ /*U+10080-U+100FF*/
+ /*U+10100-U+1013F*/
+ /* Bit 102 Ancient Greek Numbers */
+#define TT_UCR_ANCIENT_GREEK_NUMBERS (1L &lt;&lt; 6) /*U+10140-U+1018F*/
+ /* Bit 103 Ugaritic */
+#define TT_UCR_UGARITIC (1L &lt;&lt; 7) /*U+10380-U+1039F*/
+ /* Bit 104 Old Persian */
+#define TT_UCR_OLD_PERSIAN (1L &lt;&lt; 8) /*U+103A0-U+103DF*/
+ /* Bit 105 Shavian */
+#define TT_UCR_SHAVIAN (1L &lt;&lt; 9) /*U+10450-U+1047F*/
+ /* Bit 106 Osmanya */
+#define TT_UCR_OSMANYA (1L &lt;&lt; 10) /*U+10480-U+104AF*/
+ /* Bit 107 Cypriot Syllabary */
+#define TT_UCR_CYPRIOT_SYLLABARY (1L &lt;&lt; 11) /*U+10800-U+1083F*/
+ /* Bit 108 Kharoshthi */
+#define TT_UCR_KHAROSHTHI (1L &lt;&lt; 12) /*U+10A00-U+10A5F*/
+ /* Bit 109 Tai Xuan Jing Symbols */
+#define TT_UCR_TAI_XUAN_JING (1L &lt;&lt; 13) /*U+1D300-U+1D35F*/
+ /* Bit 110 Cuneiform */
+ /* Cuneiform Numbers and Punctuation */
+#define TT_UCR_CUNEIFORM (1L &lt;&lt; 14) /*U+12000-U+123FF*/
+ /*U+12400-U+1247F*/
+ /* Bit 111 Counting Rod Numerals */
+#define TT_UCR_COUNTING_ROD_NUMERALS (1L &lt;&lt; 15) /*U+1D360-U+1D37F*/
+ /* Bit 112 Sundanese */
+#define TT_UCR_SUNDANESE (1L &lt;&lt; 16) /* U+1B80-U+1BBF */
+ /* Bit 113 Lepcha */
+#define TT_UCR_LEPCHA (1L &lt;&lt; 17) /* U+1C00-U+1C4F */
+ /* Bit 114 Ol Chiki */
+#define TT_UCR_OL_CHIKI (1L &lt;&lt; 18) /* U+1C50-U+1C7F */
+ /* Bit 115 Saurashtra */
+#define TT_UCR_SAURASHTRA (1L &lt;&lt; 19) /* U+A880-U+A8DF */
+ /* Bit 116 Kayah Li */
+#define TT_UCR_KAYAH_LI (1L &lt;&lt; 20) /* U+A900-U+A92F */
+ /* Bit 117 Rejang */
+#define TT_UCR_REJANG (1L &lt;&lt; 21) /* U+A930-U+A95F */
+ /* Bit 118 Cham */
+#define TT_UCR_CHAM (1L &lt;&lt; 22) /* U+AA00-U+AA5F */
+ /* Bit 119 Ancient Symbols */
+#define TT_UCR_ANCIENT_SYMBOLS (1L &lt;&lt; 23) /*U+10190-U+101CF*/
+ /* Bit 120 Phaistos Disc */
+#define TT_UCR_PHAISTOS_DISC (1L &lt;&lt; 24) /*U+101D0-U+101FF*/
+ /* Bit 121 Carian */
+ /* Lycian */
+ /* Lydian */
+#define TT_UCR_OLD_ANATOLIAN (1L &lt;&lt; 25) /*U+102A0-U+102DF*/
+ /*U+10280-U+1029F*/
+ /*U+10920-U+1093F*/
+ /* Bit 122 Domino Tiles */
+ /* Mahjong Tiles */
+#define TT_UCR_GAME_TILES (1L &lt;&lt; 26) /*U+1F030-U+1F09F*/
+ /*U+1F000-U+1F02F*/
+ /* Bit 123-127 Reserved for process-internal usage */
+</pre>
+
+<p>Possible bit mask values for the &lsquo;ulUnicodeRangeX&rsquo; fields in an SFNT &lsquo;OS/2&rsquo; table.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
</body>
</html>
diff --git a/modules/freetype2/docs/reference/ft2-tt_driver.html b/modules/freetype2/docs/reference/ft2-tt_driver.html
index aea3aa720..cc8008ddf 100644
--- a/modules/freetype2/docs/reference/ft2-tt_driver.html
+++ b/modules/freetype2/docs/reference/ft2-tt_driver.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,17 +100,13 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="tt_driver">The TrueType driver</h1>
-<h2>Synopsis</h2>
-<table class="synopsis">
-<tr><td><a href="#interpreter-version">interpreter-version</a></td><td><a href="#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></td></tr>
-</table>
-
<p>While FreeType's TrueType driver doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. The following lists the available properties together with the necessary macros and structures.</p>
<p>The TrueType driver's module name is &lsquo;truetype&rsquo;.</p>
+<p>A single property <a href="ft2-properties.html#interpreter-version">interpreter-version</a> is available, as documented in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p>
<p>We start with a list of definitions, kindly provided by Greg Hitchcock.</p>
<p><i>Bi-Level</i> <i>Rendering</i></p>
<p>Monochromatic rendering, exclusively used in the early days of TrueType by both Apple and Microsoft. Microsoft's GDI interface supported hinting of the right-side bearing point, such that the advance width could be non-linear. Most often this was done to achieve some level of glyph symmetry. To enable reasonable performance (e.g., not having to run hinting on all glyphs just to get the widths) there was a bit in the head table indicating if the side bearing was hinted, and additional tables, &lsquo;hdmx&rsquo; and &lsquo;LTSH&rsquo;, to cache hinting widths across multiple sizes and device aspect ratios.</p>
@@ -122,137 +118,10 @@
<p>One of the earliest challenges with ClearType was allowing the implementation in GDI to be selected without requiring all UI and documents to reflow. To address this, a compatible method of rendering ClearType was added where the font hints are executed once to determine the width in bi-level rendering, and then re-run in ClearType, with the difference in widths being absorbed in the font hints for ClearType (mostly in the white space of hints); see <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec20">http://www.beatstamm.com/typography/RTRCh4.htm#Sec20</a>. Somewhat by definition, compatible width ClearType allows for non-linear widths, but only when the bi-level version has non-linear widths.</p>
<p><i>ClearType</i> <i>Subpixel</i> <i>Positioning</i></p>
<p>One of the nice benefits of ClearType is the ability to more crisply display fractional widths; unfortunately, the GDI model of integer bitmaps did not support this. However, the WPF and Direct Write frameworks do support fractional widths. DWrite calls this &lsquo;natural mode&rsquo;, not to be confused with GDI's &lsquo;natural widths&rsquo;. Subpixel positioning, in the current implementation of Direct Write, unfortunately does not support hinted advance widths, see <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec22">http://www.beatstamm.com/typography/RTRCh4.htm#Sec22</a>. Note that the TrueType interpreter fully allows the advance width to be adjusted in this mode, just the DWrite client will ignore those changes.</p>
-<p><i>ClearType</i> <i>Backwards</i> <i>Compatibility</i></p>
-<p>This is a set of exceptions made in the TrueType interpreter to minimize hinting techniques that were problematic with the extra resolution of ClearType; see <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec1">http://www.beatstamm.com/typography/RTRCh4.htm#Sec1</a> and <a href="http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>. This technique is not to be confused with ClearType compatible widths. ClearType backwards compatibility has no direct impact on changing advance widths, but there might be an indirect impact on disabling some deltas. This could be worked around in backwards compatibility mode.</p>
+<p><i>ClearType</i> <i>Backward</i> <i>Compatibility</i></p>
+<p>This is a set of exceptions made in the TrueType interpreter to minimize hinting techniques that were problematic with the extra resolution of ClearType; see <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec1">http://www.beatstamm.com/typography/RTRCh4.htm#Sec1</a> and <a href="https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>. This technique is not to be confused with ClearType compatible widths. ClearType backward compatibility has no direct impact on changing advance widths, but there might be an indirect impact on disabling some deltas. This could be worked around in backward compatibility mode.</p>
<p><i>Native</i> <i>ClearType</i> <i>Mode</i></p>
<p>(Not to be confused with &lsquo;natural widths&rsquo;.) This mode removes all the exceptions in the TrueType interpreter when running with ClearType. Any issues on widths would still apply, though.</p>
-<div class="section">
-<h3 id="interpreter-version">interpreter-version</h3>
-<p>Defined in FT_TRUETYPE_DRIVER_H (freetype/ftttdrv.h).</p>
-<pre>
- * Currently, three versions are available, two representing the
- * bytecode interpreter with subpixel hinting support (old `Infinality'
- * code and new stripped-down and higher performance `minimal' code) and
- * one without, respectively. The default is subpixel support if
- * TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support
- * otherwise (since it isn't available then).
- *
- * If subpixel hinting is on, many TrueType bytecode instructions behave
- * differently compared to B/W or grayscale rendering (except if `native
- * ClearType' is selected by the font). Microsoft's main idea is to
- * render at a much increased horizontal resolution, then sampling down
- * the created output to subpixel precision. However, many older fonts
- * are not suited to this and must be specially taken care of by
- * applying (hardcoded) tweaks in Microsoft's interpreter.
- *
- * Details on subpixel hinting and some of the necessary tweaks can be
- * found in Greg Hitchcock's whitepaper at
- * `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'.
- * Note that FreeType currently doesn't really `subpixel hint' (6x1, 6x2,
- * or 6x5 supersampling) like discussed in the paper. Depending on the
- * chosen interpreter, it simply ignores instructions on vertical stems
- * to arrive at very similar results.
- *
- * The following example code demonstrates how to deactivate subpixel
- * hinting (omitting the error handling).
- *
- * {
- * <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library;
- * <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face;
- * <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> interpreter_version = <a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_35">TT_INTERPRETER_VERSION_35</a>;
- *
- *
- * <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a>( &amp;library );
- *
- * <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a>( library, "truetype",
- * "interpreter-version",
- * &amp;interpreter_version );
- * }
- *
- * @note:
- * This property can be used with @<a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.
- *
- * This property can be set via the `FREETYPE_PROPERTIES' environment
- * variable (using values `35', `38', or `40').
- */
-</pre>
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
-<div class="section">
-<h3 id="TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</h3>
-<p>Defined in FT_TRUETYPE_DRIVER_H (freetype/ftttdrv.h).</p>
-<pre>
-#define <a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_35">TT_INTERPRETER_VERSION_35</a> 35
-#define <a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_38">TT_INTERPRETER_VERSION_38</a> 38
-#define <a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_40">TT_INTERPRETER_VERSION_40</a> 40
-</pre>
-
-<p>A list of constants used for the <a href="ft2-tt_driver.html#interpreter-version">interpreter-version</a> property to select the hinting engine for Truetype fonts.</p>
-<p>The numeric value in the constant names represents the version number as returned by the &lsquo;GETINFO&rsquo; bytecode instruction.</p>
-
-<h4>values</h4>
-<table class="fields">
-<tr><td class="val" id="TT_INTERPRETER_VERSION_35">TT_INTERPRETER_VERSION_35</td><td class="desc">
-<p>Version&nbsp;35 corresponds to MS rasterizer v.1.7 as used e.g. in Windows&nbsp;98; only grayscale and B/W rasterizing is supported.</p>
-</td></tr>
-<tr><td class="val" id="TT_INTERPRETER_VERSION_38">TT_INTERPRETER_VERSION_38</td><td class="desc">
-<p>Version&nbsp;38 corresponds to MS rasterizer v.1.9; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in the Internet Explorer&nbsp;9 running on Windows&nbsp;7). It is used in FreeType to select the &lsquo;Infinality&rsquo; subpixel hinting code. The code may be removed in a future version.</p>
-</td></tr>
-<tr><td class="val" id="TT_INTERPRETER_VERSION_40">TT_INTERPRETER_VERSION_40</td><td class="desc">
-<p>Version&nbsp;40 corresponds to MS rasterizer v.2.1; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in Microsoft's Edge Browser on Windows&nbsp;10). It is used in FreeType to select the &lsquo;minimal&rsquo; subpixel hinting code, a stripped-down and higher performance version of the &lsquo;Infinality&rsquo; code.</p>
-</td></tr>
-</table>
-
-<h4>note</h4>
-<p>This property controls the behaviour of the bytecode interpreter and thus how outlines get hinted. It does <b>not</b> control how glyph get rasterized! In particular, it does not control subpixel color filtering.</p>
-<p>If FreeType has not been compiled with the configuration option FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version&nbsp;38 or&nbsp;40 causes an &lsquo;FT_Err_Unimplemented_Feature&rsquo; error.</p>
-<p>Depending on the graphics framework, Microsoft uses different bytecode and rendering engines. As a consequence, the version numbers returned by a call to the &lsquo;GETINFO&rsquo; bytecode instruction are more convoluted than desired.</p>
-<p>Here are two tables that try to shed some light on the possible values for the MS rasterizer engine, together with the additional features introduced by it.</p>
-<pre class="colored">
- GETINFO framework version feature
- -------------------------------------------------------------------
- 3 GDI (Win 3.1), v1.0 16-bit, first version
- TrueImage
- 33 GDI (Win NT 3.1), v1.5 32-bit
- HP Laserjet
- 34 GDI (Win 95) v1.6 font smoothing,
- new SCANTYPE opcode
- 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET
- bits in composite glyphs
- 36 MGDI (Win CE 2) v1.6+ classic ClearType
- 37 GDI (XP and later), v1.8 ClearType
- GDI+ old (before Vista)
- 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType,
- WPF Y-direction ClearType,
- additional error checking
- 39 DWrite (before Win 8) v2.0 subpixel ClearType flags
- in GETINFO opcode,
- bug fixes
- 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag
- DWrite (Win 8) in GETINFO opcode,
- Gray ClearType
-</pre>
-<p>The &lsquo;version&rsquo; field gives a rough orientation only, since some applications provided certain features much earlier (as an example, Microsoft Reader used subpixel and Y-direction ClearType already in Windows 2000). Similarly, updates to a given framework might include improved hinting support.</p>
-<pre class="colored">
- version sampling rendering comment
- x y x y
- --------------------------------------------------------------
- v1.0 normal normal B/W B/W bi-level
- v1.6 high high gray gray grayscale
- v1.8 high normal color-filter B/W (GDI) ClearType
- v1.9 high high color-filter gray Color ClearType
- v2.1 high normal gray B/W Gray ClearType
- v2.1 high high gray gray Gray ClearType
-</pre>
-<p>Color and Gray ClearType are the two available variants of &lsquo;Y-direction ClearType&rsquo;, meaning grayscale rasterization along the Y-direction; the name used in the TrueType specification for this feature is &lsquo;symmetric smoothing&rsquo;. &lsquo;Classic ClearType&rsquo; is the original algorithm used before introducing a modified version in Win&nbsp;XP. Another name for v1.6's grayscale rendering is &lsquo;font smoothing&rsquo;, and &lsquo;Color ClearType&rsquo; is sometimes also called &lsquo;DWrite ClearType&rsquo;. To differentiate between today's Color ClearType and the earlier ClearType variant with B/W rendering along the vertical axis, the latter is sometimes called &lsquo;GDI ClearType&rsquo;.</p>
-<p>&lsquo;Normal&rsquo; and &lsquo;high&rsquo; sampling describe the (virtual) resolution to access the rasterized outline after the hinting process. &lsquo;Normal&rsquo; means 1 sample per grid line (i.e., B/W). In the current Microsoft implementation, &lsquo;high&rsquo; means an extra virtual resolution of 16x16 (or 16x1) grid lines per pixel for bytecode instructions like &lsquo;MIRP&rsquo;. After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid lines for color filtering if Color ClearType is activated.</p>
-<p>Note that &lsquo;Gray ClearType&rsquo; is essentially the same as v1.6's grayscale rendering. However, the GETINFO instruction handles it differently: v1.6 returns bit&nbsp;12 (hinting for grayscale), while v2.1 returns bits&nbsp;13 (hinting for ClearType), 18 (symmetrical smoothing), and&nbsp;19 (Gray ClearType). Also, this mode respects bits 2 and&nbsp;3 for the version&nbsp;1 gasp table exclusively (like Color ClearType), while v1.6 only respects the values of version&nbsp;0 (bits 0 and&nbsp;1).</p>
-<p>Keep in mind that the features of the above interpreter versions might not map exactly to FreeType features or behavior because it is a fundamentally different library with different internals.</p>
-
-<hr>
-<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-
</body>
</html>
diff --git a/modules/freetype2/docs/reference/ft2-type1_tables.html b/modules/freetype2/docs/reference/ft2-type1_tables.html
index b2088f311..b5c9c418a 100644
--- a/modules/freetype2/docs/reference/ft2-type1_tables.html
+++ b/modules/freetype2/docs/reference/ft2-type1_tables.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="type1_tables">Type 1 Tables</h1>
<h2>Synopsis</h2>
@@ -455,6 +455,9 @@
<p>IMPORTANT: Only key/value pairs read by the FreeType interpreter can be retrieved. So, for example, PostScript procedures such as NP, ND, and RD are not available. Arbitrary keys are, obviously, not be available either.</p>
<p>If the font's format is not PostScript-based, this function returns the &lsquo;FT_Err_Invalid_Argument&rsquo; error code.</p>
+<h4>since</h4>
+<p>2.4.8</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -593,6 +596,9 @@
</td></tr>
</table>
+<h4>since</h4>
+<p>2.4.8</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
@@ -803,6 +809,9 @@
</td></tr>
</table>
+<h4>since</h4>
+<p>2.4.8</p>
+
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
diff --git a/modules/freetype2/docs/reference/ft2-user_allocation.html b/modules/freetype2/docs/reference/ft2-user_allocation.html
index 183b76969..449bc0b32 100644
--- a/modules/freetype2/docs/reference/ft2-user_allocation.html
+++ b/modules/freetype2/docs/reference/ft2-user_allocation.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="user_allocation">User allocation</h1>
diff --git a/modules/freetype2/docs/reference/ft2-version.html b/modules/freetype2/docs/reference/ft2-version.html
index 28e3c4c07..a3ab9a7c4 100644
--- a/modules/freetype2/docs/reference/ft2-version.html
+++ b/modules/freetype2/docs/reference/ft2-version.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="version">FreeType Version</h1>
<h2>Synopsis</h2>
@@ -222,7 +222,7 @@
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <a href="ft2-version.html#FREETYPE_MAJOR">FREETYPE_MAJOR</a> 2
-#define <a href="ft2-version.html#FREETYPE_MINOR">FREETYPE_MINOR</a> 7
+#define <a href="ft2-version.html#FREETYPE_MINOR">FREETYPE_MINOR</a> 9
#define <a href="ft2-version.html#FREETYPE_PATCH">FREETYPE_PATCH</a> 1
</pre>
diff --git a/modules/freetype2/docs/reference/ft2-winfnt_fonts.html b/modules/freetype2/docs/reference/ft2-winfnt_fonts.html
index db8603071..26ffb1cf8 100644
--- a/modules/freetype2/docs/reference/ft2-winfnt_fonts.html
+++ b/modules/freetype2/docs/reference/ft2-winfnt_fonts.html
@@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.7.1 API Reference</title>
+<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
@@ -100,7 +100,7 @@
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.7.1 API Reference</h1>
+<h1>FreeType-2.9.1 API Reference</h1>
<h1 id="winfnt_fonts">Window FNT Files</h1>
<h2>Synopsis</h2>
@@ -151,7 +151,7 @@
<p>Mac Roman encoding.</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_OEM">FT_WinFNT_ID_OEM</td><td class="desc">
-<p>From Michael Pöttgen &lt;michael@poettgen.de&gt;:</p>
+<p>From Michael Poettgen &lt;michael@poettgen.de&gt;:</p>
<p>The &lsquo;Windows Font Mapping&rsquo; article says that FT_WinFNT_ID_OEM is used for the charset of vector fonts, like &lsquo;modern.fon&rsquo;, &lsquo;roman.fon&rsquo;, and &lsquo;script.fon&rsquo; on Windows.</p>
<p>The &lsquo;CreateFont&rsquo; documentation says: The FT_WinFNT_ID_OEM value specifies a character set that is operating-system dependent.</p>
<p>The &lsquo;IFIMETRICS&rsquo; documentation from the &lsquo;Windows Driver Development Kit&rsquo; says: This font supports an OEM-specific character set. The OEM character set is system dependent.</p>
diff --git a/modules/freetype2/docs/release b/modules/freetype2/docs/release
index fc03a50b2..44b4cb100 100644
--- a/modules/freetype2/docs/release
+++ b/modules/freetype2/docs/release
@@ -189,7 +189,7 @@ How to prepare a new release
----------------------------------------------------------------------
-Copyright 2003-2016 by
+Copyright 2003-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/include/freetype/config/ftconfig.h b/modules/freetype2/include/freetype/config/ftconfig.h
index 62b807f63..eedebf408 100644
--- a/modules/freetype2/include/freetype/config/ftconfig.h
+++ b/modules/freetype2/include/freetype/config/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* ANSI-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -73,11 +73,11 @@ FT_BEGIN_HEADER
/* The size of an `int' type. */
#if FT_UINT_MAX == 0xFFFFUL
-#define FT_SIZEOF_INT (16 / FT_CHAR_BIT)
+#define FT_SIZEOF_INT ( 16 / FT_CHAR_BIT )
#elif FT_UINT_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_INT (32 / FT_CHAR_BIT)
+#define FT_SIZEOF_INT ( 32 / FT_CHAR_BIT )
#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
-#define FT_SIZEOF_INT (64 / FT_CHAR_BIT)
+#define FT_SIZEOF_INT ( 64 / FT_CHAR_BIT )
#else
#error "Unsupported size of `int' type!"
#endif
@@ -85,11 +85,11 @@ FT_BEGIN_HEADER
/* The size of a `long' type. A five-byte `long' (as used e.g. on the */
/* DM642) is recognized but avoided. */
#if FT_ULONG_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
+#define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT )
#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
-#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
+#define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT )
#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
-#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT)
+#define FT_SIZEOF_LONG ( 64 / FT_CHAR_BIT )
#else
#error "Unsupported size of `long' type!"
#endif
@@ -236,12 +236,12 @@ FT_BEGIN_HEADER
#endif
-#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)
+#if FT_SIZEOF_INT == ( 32 / FT_CHAR_BIT )
typedef signed int FT_Int32;
typedef unsigned int FT_UInt32;
-#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)
+#elif FT_SIZEOF_LONG == ( 32 / FT_CHAR_BIT )
typedef signed long FT_Int32;
typedef unsigned long FT_UInt32;
@@ -252,12 +252,12 @@ FT_BEGIN_HEADER
/* look up an integer type that is at least 32 bits */
-#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT)
+#if FT_SIZEOF_INT >= ( 32 / FT_CHAR_BIT )
typedef int FT_Fast;
typedef unsigned int FT_UFast;
-#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT)
+#elif FT_SIZEOF_LONG >= ( 32 / FT_CHAR_BIT )
typedef long FT_Fast;
typedef unsigned long FT_UFast;
@@ -267,7 +267,7 @@ FT_BEGIN_HEADER
/* determine whether we have a 64-bit int type for platforms without */
/* Autoconf */
-#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT)
+#if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )
/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
@@ -333,6 +333,15 @@ FT_BEGIN_HEADER
#endif
+#ifdef _WIN64
+ /* only 64bit Windows uses the LLP64 data model, i.e., */
+ /* 32bit integers, 64bit pointers */
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
+#else
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
+#endif
+
+
/*************************************************************************/
/* */
/* miscellaneous */
@@ -356,6 +365,14 @@ FT_BEGIN_HEADER
#endif
+ /* Use FT_LOCAL and FT_LOCAL_DEF to declare and define, respectively, */
+ /* a function that gets used only within the scope of a module. */
+ /* Normally, both the header and source code files for such a */
+ /* function are within a single module directory. */
+ /* */
+ /* Intra-module arrays should be tagged with FT_LOCAL_ARRAY and */
+ /* FT_LOCAL_ARRAY_DEF. */
+ /* */
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
#define FT_LOCAL( x ) static x
@@ -377,6 +394,12 @@ FT_BEGIN_HEADER
#define FT_LOCAL_ARRAY_DEF( x ) const x
+ /* Use FT_BASE and FT_BASE_DEF to declare and define, respectively, */
+ /* functions that are used in more than a single module. In the */
+ /* current setup this implies that the declaration is in a header */
+ /* file in the `include/freetype/internal' directory, and the */
+ /* function body is in a file in `src/base'. */
+ /* */
#ifndef FT_BASE
#ifdef __cplusplus
@@ -399,14 +422,63 @@ FT_BEGIN_HEADER
#endif /* !FT_BASE_DEF */
+ /* When compiling FreeType as a DLL or DSO with hidden visibility */
+ /* some systems/compilers need a special attribute in front OR after */
+ /* the return type of function declarations. */
+ /* */
+ /* Two macros are used within the FreeType source code to define */
+ /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
+ /* */
+ /* FT_EXPORT( return_type ) */
+ /* */
+ /* is used in a function declaration, as in */
+ /* */
+ /* FT_EXPORT( FT_Error ) */
+ /* FT_Init_FreeType( FT_Library* alibrary ); */
+ /* */
+ /* */
+ /* FT_EXPORT_DEF( return_type ) */
+ /* */
+ /* is used in a function definition, as in */
+ /* */
+ /* FT_EXPORT_DEF( FT_Error ) */
+ /* FT_Init_FreeType( FT_Library* alibrary ) */
+ /* { */
+ /* ... some code ... */
+ /* return FT_Err_Ok; */
+ /* } */
+ /* */
+ /* You can provide your own implementation of FT_EXPORT and */
+ /* FT_EXPORT_DEF here if you want. */
+ /* */
+ /* To export a variable, use FT_EXPORT_VAR. */
+ /* */
#ifndef FT_EXPORT
-#ifdef __cplusplus
+#ifdef FT2_BUILD_LIBRARY
+
+#if defined( _WIN32 ) && ( defined( _DLL ) || defined( DLL_EXPORT ) )
+#define FT_EXPORT( x ) __declspec( dllexport ) x
+#elif defined( __GNUC__ ) && __GNUC__ >= 4
+#define FT_EXPORT( x ) __attribute__(( visibility( "default" ) )) x
+#elif defined( __cplusplus )
+#define FT_EXPORT( x ) extern "C" x
+#else
+#define FT_EXPORT( x ) extern x
+#endif
+
+#else
+
+#if defined( FT2_DLLIMPORT )
+#define FT_EXPORT( x ) __declspec( dllimport ) x
+#elif defined( __cplusplus )
#define FT_EXPORT( x ) extern "C" x
#else
#define FT_EXPORT( x ) extern x
#endif
+#endif
+
#endif /* !FT_EXPORT */
@@ -431,6 +503,7 @@ FT_BEGIN_HEADER
#endif /* !FT_EXPORT_VAR */
+
/* The following macros are needed to compile the library with a */
/* C++ compiler and with 16bit compilers. */
/* */
@@ -442,7 +515,13 @@ FT_BEGIN_HEADER
/* functions which are accessed by (global) function pointers. */
/* */
/* */
- /* FT_CALLBACK_DEF is used to _define_ a callback function. */
+ /* FT_CALLBACK_DEF is used to _define_ a callback function, */
+ /* located in the same source code file as the structure that uses */
+ /* it. */
+ /* */
+ /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare */
+ /* and define a callback function, respectively, in a similar way */
+ /* as FT_BASE and FT_BASE_DEF work. */
/* */
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
/* contains pointers to callback functions. */
@@ -462,6 +541,16 @@ FT_BEGIN_HEADER
#endif
#endif /* FT_CALLBACK_DEF */
+#ifndef FT_BASE_CALLBACK
+#ifdef __cplusplus
+#define FT_BASE_CALLBACK( x ) extern "C" x
+#define FT_BASE_CALLBACK_DEF( x ) extern "C" x
+#else
+#define FT_BASE_CALLBACK( x ) extern x
+#define FT_BASE_CALLBACK_DEF( x ) x
+#endif
+#endif /* FT_BASE_CALLBACK */
+
#ifndef FT_CALLBACK_TABLE
#ifdef __cplusplus
#define FT_CALLBACK_TABLE extern "C"
diff --git a/modules/freetype2/include/freetype/config/ftheader.h b/modules/freetype2/include/freetype/config/ftheader.h
index 68e14834d..702f77cc4 100644
--- a/modules/freetype2/include/freetype/config/ftheader.h
+++ b/modules/freetype2/include/freetype/config/ftheader.h
@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -318,14 +318,29 @@
/*************************************************************************
*
* @macro:
+ * FT_DRIVER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the driver modules.
+ *
+ */
+#define FT_DRIVER_H <freetype/ftdriver.h>
+
+
+ /*************************************************************************
+ *
+ * @macro:
* FT_AUTOHINTER_H
*
* @description:
* A macro used in #include statements to name the file containing
* structures and macros related to the auto-hinting module.
*
+ * Deprecated since version 2.9; use @FT_DRIVER_H instead.
+ *
*/
-#define FT_AUTOHINTER_H <freetype/ftautoh.h>
+#define FT_AUTOHINTER_H FT_DRIVER_H
/*************************************************************************
@@ -337,8 +352,10 @@
* A macro used in #include statements to name the file containing
* structures and macros related to the CFF driver module.
*
+ * Deprecated since version 2.9; use @FT_DRIVER_H instead.
+ *
*/
-#define FT_CFF_DRIVER_H <freetype/ftcffdrv.h>
+#define FT_CFF_DRIVER_H FT_DRIVER_H
/*************************************************************************
@@ -350,8 +367,25 @@
* A macro used in #include statements to name the file containing
* structures and macros related to the TrueType driver module.
*
+ * Deprecated since version 2.9; use @FT_DRIVER_H instead.
+ *
*/
-#define FT_TRUETYPE_DRIVER_H <freetype/ftttdrv.h>
+#define FT_TRUETYPE_DRIVER_H FT_DRIVER_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_PCF_DRIVER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the PCF driver module.
+ *
+ * Deprecated since version 2.9; use @FT_DRIVER_H instead.
+ *
+ */
+#define FT_PCF_DRIVER_H FT_DRIVER_H
/*************************************************************************
@@ -544,63 +578,6 @@
/*************************************************************************
*
* @macro:
- * FT_CACHE_IMAGE_H
- *
- * @description:
- * A macro used in #include statements to name the file containing the
- * `glyph image' API of the FreeType~2 cache sub-system.
- *
- * It is used to define a cache for @FT_Glyph elements. You can also
- * use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to
- * store small glyph bitmaps, as it will use less memory.
- *
- * This macro is deprecated. Simply include @FT_CACHE_H to have all
- * glyph image-related cache declarations.
- *
- */
-#define FT_CACHE_IMAGE_H FT_CACHE_H
-
-
- /*************************************************************************
- *
- * @macro:
- * FT_CACHE_SMALL_BITMAPS_H
- *
- * @description:
- * A macro used in #include statements to name the file containing the
- * `small bitmaps' API of the FreeType~2 cache sub-system.
- *
- * It is used to define a cache for small glyph bitmaps in a relatively
- * memory-efficient way. You can also use the API defined in
- * @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images,
- * including scalable outlines.
- *
- * This macro is deprecated. Simply include @FT_CACHE_H to have all
- * small bitmaps-related cache declarations.
- *
- */
-#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H
-
-
- /*************************************************************************
- *
- * @macro:
- * FT_CACHE_CHARMAP_H
- *
- * @description:
- * A macro used in #include statements to name the file containing the
- * `charmap' API of the FreeType~2 cache sub-system.
- *
- * This macro is deprecated. Simply include @FT_CACHE_H to have all
- * charmap-based cache declarations.
- *
- */
-#define FT_CACHE_CHARMAP_H FT_CACHE_H
-
-
- /*************************************************************************
- *
- * @macro:
* FT_MAC_H
*
* @description:
@@ -750,17 +727,6 @@
/*************************************************************************
*
* @macro:
- * FT_UNPATENTED_HINTING_H
- *
- * @description:
- * Deprecated.
- */
-#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h>
-
-
- /*************************************************************************
- *
- * @macro:
* FT_INCREMENTAL_H
*
* @description:
@@ -796,25 +762,30 @@
/* */
+ /* These header files don't need to be included by the user. */
#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h>
+#define FT_PARAMETER_TAGS_H <freetype/ftparams.h>
+ /* Deprecated macros. */
+#define FT_UNPATENTED_HINTING_H <freetype/ftparams.h>
+#define FT_TRUETYPE_UNPATENTED_H <freetype/ftparams.h>
+
+ /* FT_CACHE_H is the only header file needed for the cache subsystem. */
+#define FT_CACHE_IMAGE_H FT_CACHE_H
+#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H
+#define FT_CACHE_CHARMAP_H FT_CACHE_H
/* The internals of the cache sub-system are no longer exposed. We */
/* default to FT_CACHE_H at the moment just in case, but we know of */
/* no rogue client that uses them. */
/* */
-#define FT_CACHE_MANAGER_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h>
-
-
-#define FT_INCREMENTAL_H <freetype/ftincrem.h>
-
-#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
+#define FT_CACHE_MANAGER_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_MRU_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_MANAGER_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_CACHE_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_GLYPH_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_IMAGE_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_SBITS_H FT_CACHE_H
/*
diff --git a/modules/freetype2/include/freetype/config/ftoption.h b/modules/freetype2/include/freetype/config/ftoption.h
index 90c123ef9..4bcab2af5 100644
--- a/modules/freetype2/include/freetype/config/ftoption.h
+++ b/modules/freetype2/include/freetype/config/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -75,19 +75,21 @@ FT_BEGIN_HEADER
/*************************************************************************/
- /*************************************************************************/
+ /*#***********************************************************************/
/* */
/* If you enable this configuration option, FreeType recognizes an */
/* environment variable called `FREETYPE_PROPERTIES', which can be used */
/* to control the various font drivers and modules. The controllable */
- /* properties are listed in the section `Controlling FreeType Modules' */
- /* in the reference's table of contents; currently there are properties */
- /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */
- /* TrueType (file `ftttdrv.h'). */
+ /* properties are listed in the section @properties. */
+ /* */
+ /* You have to undefine this configuration option on platforms that lack */
+ /* the concept of environment variables (and thus don't have the */
+ /* `getenv' function), for example Windows CE. */
/* */
/* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
/* multiple lines for better readability). */
/* */
+ /* { */
/* <optional whitespace> */
/* <module-name1> ':' */
/* <property-name1> '=' <property-value1> */
@@ -95,6 +97,7 @@ FT_BEGIN_HEADER
/* <module-name2> ':' */
/* <property-name2> '=' <property-value2> */
/* ... */
+ /* } */
/* */
/* Example: */
/* */
@@ -107,20 +110,17 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* Uncomment the line below if you want to activate sub-pixel rendering */
- /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */
+ /* Uncomment the line below if you want to activate LCD rendering */
+ /* technology similar to ClearType in this build of the library. This */
+ /* technology triples the resolution in the direction color subpixels. */
+ /* To mitigate color fringes inherent to this technology, you also need */
+ /* to explicitly set up LCD filtering. */
/* */
/* Note that this feature is covered by several Microsoft patents */
/* and should not be activated in any default build of the library. */
- /* */
- /* This macro has no impact on the FreeType API, only on its */
- /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
- /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */
- /* the original size in case this macro isn't defined; however, each */
- /* triplet of subpixels has R=G=B. */
- /* */
- /* This is done to allow FreeType clients to run unmodified, forcing */
- /* them to display normal gray-level anti-aliased glyphs. */
+ /* When this macro is not defined, FreeType offers alternative LCD */
+ /* rendering technology that produces excellent output without LCD */
+ /* filtering. */
/* */
/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
@@ -214,6 +214,10 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here since the build system might define */
/* it for certain configurations only. */
/* */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
+ /* */
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
@@ -230,6 +234,10 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
+ /* */
/* #define FT_CONFIG_OPTION_USE_BZIP2 */
@@ -255,6 +263,10 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
+ /* */
/* #define FT_CONFIG_OPTION_USE_PNG */
@@ -268,49 +280,11 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
-/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
-
-
- /*************************************************************************/
- /* */
- /* DLL export compilation */
- /* */
- /* When compiling FreeType as a DLL, some systems/compilers need a */
- /* special keyword in front OR after the return type of function */
- /* declarations. */
- /* */
- /* Two macros are used within the FreeType source code to define */
- /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
- /* */
- /* FT_EXPORT( return_type ) */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
/* */
- /* is used in a function declaration, as in */
- /* */
- /* FT_EXPORT( FT_Error ) */
- /* FT_Init_FreeType( FT_Library* alibrary ); */
- /* */
- /* */
- /* FT_EXPORT_DEF( return_type ) */
- /* */
- /* is used in a function definition, as in */
- /* */
- /* FT_EXPORT_DEF( FT_Error ) */
- /* FT_Init_FreeType( FT_Library* alibrary ) */
- /* { */
- /* ... some code ... */
- /* return FT_Err_Ok; */
- /* } */
- /* */
- /* You can provide your own implementation of FT_EXPORT and */
- /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */
- /* will be later automatically defined as `extern return_type' to */
- /* allow normal compilation. */
- /* */
- /* Do not #undef these macros here since the build system might define */
- /* them for certain configurations only. */
- /* */
-/* #define FT_EXPORT(x) extern x */
-/* #define FT_EXPORT_DEF(x) x */
+/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
/*************************************************************************/
@@ -327,7 +301,7 @@ FT_BEGIN_HEADER
/* */
/* - The TrueType driver will provide its own set of glyph names, */
/* if you build it to support postscript names in the TrueType */
- /* `post' table. */
+ /* `post' table, but will not synthesize a missing Unicode charmap. */
/* */
/* - The Type 1 driver will not be able to synthesize a Unicode */
/* charmap out of the glyphs found in the fonts. */
@@ -640,17 +614,21 @@ FT_BEGIN_HEADER
/* [1] for a technical overview on what this means. See `ttinterp.h' */
/* for more details on the LEAN option. */
/* */
- /* There are three options. */
+ /* There are three possible values. */
/* */
- /* 1. This option is associated with the `Infinality' moniker. */
- /* Contributed by an individual nicknamed Infinality with the goal of */
+ /* Value 1: */
+ /* This value is associated with the `Infinality' moniker, */
+ /* contributed by an individual nicknamed Infinality with the goal of */
/* making TrueType fonts render better than on Windows. A high */
/* amount of configurability and flexibility, down to rules for */
/* single glyphs in fonts, but also very slow. Its experimental and */
/* slow nature and the original developer losing interest meant that */
/* this option was never enabled in default builds. */
/* */
- /* 2. The new default mode for the TrueType driver. The Infinality code */
+ /* The corresponding interpreter version is v38. */
+ /* */
+ /* Value 2: */
+ /* The new default mode for the TrueType driver. The Infinality code */
/* base was stripped to the bare minimum and all configurability */
/* removed in the name of speed and simplicity. The configurability */
/* was mainly aimed at legacy fonts like Arial, Times New Roman, or */
@@ -660,19 +638,24 @@ FT_BEGIN_HEADER
/* that modern and web fonts render well while legacy fonts render */
/* okay. */
/* */
- /* 3. Compile both. */
+ /* The corresponding interpreter version is v40. */
+ /* */
+ /* Value 3: */
+ /* Compile both, making both v38 and v40 available (the latter is the */
+ /* default). */
/* */
/* By undefining these, you get rendering behavior like on Windows */
/* without ClearType, i.e., Windows XP without ClearType enabled and */
/* Win9x (interpreter version v35). Or not, depending on how much */
/* hinting blood and testing tears the font designer put into a given */
/* font. If you define one or both subpixel hinting options, you can */
- /* switch between between v35 and the ones you define. */
+ /* switch between between v35 and the ones you define (using */
+ /* `FT_Property_Set'). */
/* */
/* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
/* defined. */
/* */
- /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
+ /* [1] https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
/* */
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */
#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2
@@ -692,7 +675,7 @@ FT_BEGIN_HEADER
/* composite flags array which can be used to disambiguate, but old */
/* fonts will not have them. */
/* */
- /* http://www.microsoft.com/typography/otspec/glyf.htm */
+ /* https://www.microsoft.com/typography/otspec/glyf.htm */
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */
/* */
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
@@ -790,6 +773,16 @@ FT_BEGIN_HEADER
/*************************************************************************/
+ /* */
+ /* T1_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe Type 1 */
+ /* engine gets compiled into FreeType. If defined, it is possible to */
+ /* switch between the two engines using the `hinting-engine' property of */
+ /* the type1 driver module. */
+ /* */
+/* #define T1_CONFIG_OPTION_OLD_ENGINE */
+
+
+ /*************************************************************************/
/*************************************************************************/
/**** ****/
/**** C F F D R I V E R C O N F I G U R A T I O N ****/
@@ -804,8 +797,8 @@ FT_BEGIN_HEADER
/* possible to set up the default values of the four control points that */
/* define the stem darkening behaviour of the (new) CFF engine. For */
/* more details please read the documentation of the */
- /* `darkening-parameters' property of the cff driver module (file */
- /* `ftcffdrv.h'), which allows the control at run-time. */
+ /* `darkening-parameters' property (file `ftdriver.h'), which allows the */
+ /* control at run-time. */
/* */
/* Do *not* undefine these macros! */
/* */
@@ -835,6 +828,33 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
/**** ****/
+ /**** P C F D R I V E R C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* There are many PCF fonts just called `Fixed' which look completely */
+ /* different, and which have nothing to do with each other. When */
+ /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
+ /* random, the style changes often if one changes the size and one */
+ /* cannot select some fonts at all. This option makes the PCF module */
+ /* prepend the foundry name (plus a space) to the family name. */
+ /* */
+ /* We also check whether we have `wide' characters; all put together, we */
+ /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */
+ /* */
+ /* If this option is activated, it can be controlled with the */
+ /* `no-long-family-names' property of the pcf driver module. */
+ /* */
+/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
/**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/
/**** ****/
/*************************************************************************/
@@ -850,7 +870,9 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* Compile autofit module with Indic script support. */
+ /* Compile autofit module with fallback Indic script support, covering */
+ /* some scripts that the `latin' submodule of the autofit module doesn't */
+ /* (yet) handle. */
/* */
#define AF_CONFIG_OPTION_INDIC
@@ -864,11 +886,31 @@ FT_BEGIN_HEADER
/* */
/* This experimental option is active only if the rendering mode is */
/* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the */
- /* `warping' property of the auto-hinter (see file `ftautoh.h' for more */
+ /* `warping' property of the auto-hinter (see file `ftdriver.h' for more */
/* information; by default it is switched off). */
/* */
#define AF_CONFIG_OPTION_USE_WARPER
+ /*************************************************************************/
+ /* */
+ /* Use TrueType-like size metrics for `light' auto-hinting. */
+ /* */
+ /* It is strongly recommended to avoid this option, which exists only to */
+ /* help some legacy applications retain its appearance and behaviour */
+ /* with respect to auto-hinted TrueType fonts. */
+ /* */
+ /* The very reason this option exists at all are GNU/Linux distributions */
+ /* like Fedora that did not un-patch the following change (which was */
+ /* present in FreeType between versions 2.4.6 and 2.7.1, inclusive). */
+ /* */
+ /* 2011-07-16 Steven Chu <steven.f.chu@gmail.com> */
+ /* */
+ /* [truetype] Fix metrics on size request for scalable fonts. */
+ /* */
+ /* This problematic commit is now reverted (more or less). */
+ /* */
+/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */
+
/* */
@@ -886,6 +928,7 @@ FT_BEGIN_HEADER
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#define TT_USE_BYTECODE_INTERPRETER
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1
#define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
#endif
@@ -894,6 +937,7 @@ FT_BEGIN_HEADER
#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
#endif
#endif
+#endif
/*
diff --git a/modules/freetype2/include/freetype/config/ftstdlib.h b/modules/freetype2/include/freetype/config/ftstdlib.h
index 6eefa9f86..42f9a06e4 100644
--- a/modules/freetype2/include/freetype/config/ftstdlib.h
+++ b/modules/freetype2/include/freetype/config/ftstdlib.h
@@ -5,7 +5,7 @@
/* ANSI-specific library and header configuration file (specification */
/* only). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/freetype.h b/modules/freetype2/include/freetype/freetype.h
index 08f59520c..96644046e 100644
--- a/modules/freetype2/include/freetype/freetype.h
+++ b/modules/freetype2/include/freetype/freetype.h
@@ -4,7 +4,7 @@
/* */
/* FreeType high-level API and common types (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -138,6 +138,7 @@ FT_BEGIN_HEADER
/* FT_FACE_FLAG_TRICKY */
/* FT_FACE_FLAG_KERNING */
/* FT_FACE_FLAG_MULTIPLE_MASTERS */
+ /* FT_FACE_FLAG_VARIATION */
/* FT_FACE_FLAG_GLYPH_NAMES */
/* FT_FACE_FLAG_EXTERNAL_STREAM */
/* FT_FACE_FLAG_HINTER */
@@ -147,14 +148,16 @@ FT_BEGIN_HEADER
/* FT_HAS_KERNING */
/* FT_HAS_FIXED_SIZES */
/* FT_HAS_GLYPH_NAMES */
- /* FT_HAS_MULTIPLE_MASTERS */
/* FT_HAS_COLOR */
+ /* FT_HAS_MULTIPLE_MASTERS */
/* */
/* FT_IS_SFNT */
/* FT_IS_SCALABLE */
/* FT_IS_FIXED_WIDTH */
/* FT_IS_CID_KEYED */
/* FT_IS_TRICKY */
+ /* FT_IS_NAMED_INSTANCE */
+ /* FT_IS_VARIATION */
/* */
/* FT_STYLE_FLAG_BOLD */
/* FT_STYLE_FLAG_ITALIC */
@@ -175,6 +178,7 @@ FT_BEGIN_HEADER
/* FT_Done_Face */
/* FT_Reference_Face */
/* FT_New_Memory_Face */
+ /* FT_Face_Properties */
/* FT_Open_Face */
/* FT_Open_Args */
/* FT_Parameter */
@@ -265,8 +269,8 @@ FT_BEGIN_HEADER
/* FT_Glyph_Metrics */
/* */
/* <Description> */
- /* A structure used to model the metrics of a single glyph. The */
- /* values are expressed in 26.6 fractional pixel format; if the flag */
+ /* A structure to model the metrics of a single glyph. The values */
+ /* are expressed in 26.6 fractional pixel format; if the flag */
/* @FT_LOAD_NO_SCALE has been used while loading the glyph, values */
/* are expressed in font units instead. */
/* */
@@ -305,6 +309,11 @@ FT_BEGIN_HEADER
/* `horiAdvance' or `vertAdvance'; you have to manually adjust these */
/* values to account for the added width and height. */
/* */
+ /* FreeType doesn't use the `VORG' table data for CFF fonts because */
+ /* it doesn't have an interface to quickly retrieve the glyph height. */
+ /* The y~coordinate of the vertical origin can be simply computed as */
+ /* `vertBearingY + height' after loading a glyph. */
+ /* */
typedef struct FT_Glyph_Metrics_
{
FT_Pos width;
@@ -349,10 +358,10 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* Windows FNT: */
- /* The nominal size given in a FNT font is not reliable. Thus when */
- /* the driver finds it incorrect, it sets `size' to some calculated */
- /* values and sets `x_ppem' and `y_ppem' to the pixel width and */
- /* height given in the font, respectively. */
+ /* The nominal size given in a FNT font is not reliable. If the */
+ /* driver finds it incorrect, it sets `size' to some calculated */
+ /* values, and `x_ppem' and `y_ppem' to the pixel width and height */
+ /* given in the font, respectively. */
/* */
/* TrueType embedded bitmaps: */
/* `size', `width', and `height' values are not contained in the */
@@ -421,9 +430,9 @@ FT_BEGIN_HEADER
/* FT_Module */
/* */
/* <Description> */
- /* A handle to a given FreeType module object. Each module can be a */
+ /* A handle to a given FreeType module object. A module can be a */
/* font driver, a renderer, or anything else that provides services */
- /* to the formers. */
+ /* to the former. */
/* */
typedef struct FT_ModuleRec_* FT_Module;
@@ -434,8 +443,8 @@ FT_BEGIN_HEADER
/* FT_Driver */
/* */
/* <Description> */
- /* A handle to a given FreeType font driver object. Each font driver */
- /* is a special module capable of creating faces from font files. */
+ /* A handle to a given FreeType font driver object. A font driver */
+ /* is a module capable of creating faces from font files. */
/* */
typedef struct FT_DriverRec_* FT_Driver;
@@ -446,10 +455,10 @@ FT_BEGIN_HEADER
/* FT_Renderer */
/* */
/* <Description> */
- /* A handle to a given FreeType renderer. A renderer is a special */
- /* module in charge of converting a glyph image to a bitmap, when */
- /* necessary. Each renderer supports a given glyph image format, and */
- /* one or more target surface depths. */
+ /* A handle to a given FreeType renderer. A renderer is a module in */
+ /* charge of converting a glyph's outline image to a bitmap. It */
+ /* supports a single glyph image format, and one or more target */
+ /* surface depths. */
/* */
typedef struct FT_RendererRec_* FT_Renderer;
@@ -467,15 +476,15 @@ FT_BEGIN_HEADER
/* FT_Face */
/* */
/* <Description> */
- /* A handle to a given typographic face object. A face object models */
- /* a given typeface, in a given style. */
+ /* A handle to a typographic face object. A face object models a */
+ /* given typeface, in a given style. */
/* */
/* <Note> */
- /* Each face object also owns a single @FT_GlyphSlot object, as well */
+ /* A face object also owns a single @FT_GlyphSlot object, as well */
/* as one or more @FT_Size objects. */
/* */
/* Use @FT_New_Face or @FT_Open_Face to create a new face object from */
- /* a given filepathname or a custom input stream. */
+ /* a given filepath or a custom input stream. */
/* */
/* Use @FT_Done_Face to destroy it (along with its slot and sizes). */
/* */
@@ -500,11 +509,11 @@ FT_BEGIN_HEADER
/* FT_Size */
/* */
/* <Description> */
- /* A handle to an object used to model a face scaled to a given */
+ /* A handle to an object that models a face scaled to a given */
/* character size. */
/* */
/* <Note> */
- /* Each @FT_Face has an _active_ @FT_Size object that is used by */
+ /* An @FT_Face has one _active_ @FT_Size object that is used by */
/* functions like @FT_Load_Glyph to determine the scaling */
/* transformation that in turn is used to load and hint glyphs and */
/* metrics. */
@@ -531,9 +540,8 @@ FT_BEGIN_HEADER
/* FT_GlyphSlot */
/* */
/* <Description> */
- /* A handle to a given `glyph slot'. A slot is a container where it */
- /* is possible to load any of the glyphs contained in its parent */
- /* face. */
+ /* A handle to a given `glyph slot'. A slot is a container that can */
+ /* hold any of the glyphs contained in its parent face. */
/* */
/* In other words, each time you call @FT_Load_Glyph or */
/* @FT_Load_Char, the slot's content is erased by the new glyph data, */
@@ -552,13 +560,14 @@ FT_BEGIN_HEADER
/* FT_CharMap */
/* */
/* <Description> */
- /* A handle to a given character map. A charmap is used to translate */
- /* character codes in a given encoding into glyph indexes for its */
- /* parent's face. Some font formats may provide several charmaps per */
- /* font. */
+ /* A handle to a character map (usually abbreviated to `charmap'). A */
+ /* charmap is used to translate character codes in a given encoding */
+ /* into glyph indexes for its parent's face. Some font formats may */
+ /* provide several charmaps per font. */
/* */
/* Each face object owns zero or more charmaps, but only one of them */
- /* can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char. */
+ /* can be `active', providing the data used by @FT_Get_Char_Index or */
+ /* @FT_Load_Char. */
/* */
/* The list of available charmaps in a face is available through the */
/* `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec. */
@@ -569,7 +578,8 @@ FT_BEGIN_HEADER
/* <Note> */
/* When a new face is created (either through @FT_New_Face or */
/* @FT_Open_Face), the library looks for a Unicode charmap within */
- /* the list and automatically activates it. */
+ /* the list and automatically activates it. If there is no Unicode */
+ /* charmap, FreeType doesn't set an `active' charmap. */
/* */
/* <Also> */
/* See @FT_CharMapRec for the publicly accessible fields of a given */
@@ -615,8 +625,8 @@ FT_BEGIN_HEADER
/* FT_Encoding */
/* */
/* <Description> */
- /* An enumeration used to specify character sets supported by */
- /* charmaps. Used in the @FT_Select_Charmap API function. */
+ /* An enumeration to specify character sets supported by charmaps. */
+ /* Used in the @FT_Select_Charmap API function. */
/* */
/* <Note> */
/* Despite the name, this enumeration lists specific character */
@@ -630,19 +640,18 @@ FT_BEGIN_HEADER
/* The encoding value~0 is reserved. */
/* */
/* FT_ENCODING_UNICODE :: */
- /* Corresponds to the Unicode character set. This value covers */
- /* all versions of the Unicode repertoire, including ASCII and */
- /* Latin-1. Most fonts include a Unicode charmap, but not all */
- /* of them. */
+ /* The Unicode character set. This value covers all versions of */
+ /* the Unicode repertoire, including ASCII and Latin-1. Most fonts */
+ /* include a Unicode charmap, but not all of them. */
/* */
/* For example, if you want to access Unicode value U+1F028 (and */
/* the font contains it), use value 0x1F028 as the input value for */
/* @FT_Get_Char_Index. */
/* */
/* FT_ENCODING_MS_SYMBOL :: */
- /* Corresponds to the Microsoft Symbol encoding, used to encode */
- /* mathematical symbols and wingdings. For more information, see */
- /* `http://www.microsoft.com/typography/otspec/recom.htm', */
+ /* Microsoft Symbol encoding, used to encode mathematical symbols */
+ /* and wingdings. For more information, see */
+ /* `https://www.microsoft.com/typography/otspec/recom.htm', */
/* `http://www.kostis.net/charsets/symbol.htm', and */
/* `http://www.kostis.net/charsets/wingding.htm'. */
/* */
@@ -650,60 +659,60 @@ FT_BEGIN_HEADER
/* Area) in the range U+F020-U+F0FF. */
/* */
/* FT_ENCODING_SJIS :: */
- /* Corresponds to Japanese SJIS encoding. More info at */
- /* `http://en.wikipedia.org/wiki/Shift_JIS'. */
- /* See note on multi-byte encodings below. */
+ /* Shift JIS encoding for Japanese. More info at */
+ /* `https://en.wikipedia.org/wiki/Shift_JIS'. See note on */
+ /* multi-byte encodings below. */
/* */
- /* FT_ENCODING_GB2312 :: */
- /* Corresponds to an encoding system for Simplified Chinese as */
- /* used in mainland China. */
+ /* FT_ENCODING_PRC :: */
+ /* Corresponds to encoding systems mainly for Simplified Chinese as */
+ /* used in People's Republic of China (PRC). The encoding layout */
+ /* is based on GB~2312 and its supersets GBK and GB~18030. */
/* */
/* FT_ENCODING_BIG5 :: */
/* Corresponds to an encoding system for Traditional Chinese as */
/* used in Taiwan and Hong Kong. */
/* */
/* FT_ENCODING_WANSUNG :: */
- /* Corresponds to the Korean encoding system known as Wansung. */
+ /* Corresponds to the Korean encoding system known as Extended */
+ /* Wansung (MS Windows code page 949). */
/* For more information see */
- /* `https://msdn.microsoft.com/en-US/goglobal/cc305154'. */
+ /* `https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'. */
/* */
/* FT_ENCODING_JOHAB :: */
/* The Korean standard character set (KS~C 5601-1992), which */
/* corresponds to MS Windows code page 1361. This character set */
- /* includes all possible Hangeul character combinations. */
+ /* includes all possible Hangul character combinations. */
/* */
/* FT_ENCODING_ADOBE_LATIN_1 :: */
/* Corresponds to a Latin-1 encoding as defined in a Type~1 */
/* PostScript font. It is limited to 256 character codes. */
/* */
/* FT_ENCODING_ADOBE_STANDARD :: */
- /* Corresponds to the Adobe Standard encoding, as found in Type~1, */
- /* CFF, and OpenType/CFF fonts. It is limited to 256 character */
- /* codes. */
+ /* Adobe Standard encoding, as found in Type~1, CFF, and */
+ /* OpenType/CFF fonts. It is limited to 256 character codes. */
/* */
/* FT_ENCODING_ADOBE_EXPERT :: */
- /* Corresponds to the Adobe Expert encoding, as found in Type~1, */
- /* CFF, and OpenType/CFF fonts. It is limited to 256 character */
- /* codes. */
+ /* Adobe Expert encoding, as found in Type~1, CFF, and OpenType/CFF */
+ /* fonts. It is limited to 256 character codes. */
/* */
/* FT_ENCODING_ADOBE_CUSTOM :: */
/* Corresponds to a custom encoding, as found in Type~1, CFF, and */
/* OpenType/CFF fonts. It is limited to 256 character codes. */
/* */
/* FT_ENCODING_APPLE_ROMAN :: */
- /* Corresponds to the 8-bit Apple roman encoding. Many TrueType */
- /* and OpenType fonts contain a charmap for this encoding, since */
- /* older versions of Mac OS are able to use it. */
+ /* Apple roman encoding. Many TrueType and OpenType fonts contain */
+ /* a charmap for this 8-bit encoding, since older versions of Mac */
+ /* OS are able to use it. */
/* */
/* FT_ENCODING_OLD_LATIN_2 :: */
- /* This value is deprecated and was never used nor reported by */
+ /* This value is deprecated and was neither used nor reported by */
/* FreeType. Don't use or test for it. */
/* */
/* FT_ENCODING_MS_SJIS :: */
/* Same as FT_ENCODING_SJIS. Deprecated. */
/* */
/* FT_ENCODING_MS_GB2312 :: */
- /* Same as FT_ENCODING_GB2312. Deprecated. */
+ /* Same as FT_ENCODING_PRC. Deprecated. */
/* */
/* FT_ENCODING_MS_BIG5 :: */
/* Same as FT_ENCODING_BIG5. Deprecated. */
@@ -715,11 +724,12 @@ FT_BEGIN_HEADER
/* Same as FT_ENCODING_JOHAB. Deprecated. */
/* */
/* <Note> */
- /* By default, FreeType automatically synthesizes a Unicode charmap */
- /* for PostScript fonts, using their glyph names dictionaries. */
- /* However, it also reports the encodings defined explicitly in the */
- /* font file, for the cases when they are needed, with the Adobe */
- /* values as well. */
+ /* By default, FreeType enables a Unicode charmap and tags it with */
+ /* FT_ENCODING_UNICODE when it is either provided or can be generated */
+ /* from PostScript glyph name dictionaries in the font file. */
+ /* All other encodings are considered legacy and tagged only if */
+ /* explicitly defined in the font file. Otherwise, FT_ENCODING_NONE */
+ /* is used. */
/* */
/* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */
/* is neither Unicode nor ISO-8859-1 (otherwise it is set to */
@@ -736,21 +746,21 @@ FT_BEGIN_HEADER
/* Russian). */
/* */
/* FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */
- /* and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to */
+ /* and `encoding_id' is not `TT_MAC_ID_ROMAN' (otherwise it is set to */
/* FT_ENCODING_APPLE_ROMAN). */
/* */
/* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */
/* @FT_Get_CMap_Language_ID to query the Mac language ID that may */
/* be needed to be able to distinguish Apple encoding variants. See */
/* */
- /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */
+ /* https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */
/* */
/* to get an idea how to do that. Basically, if the language ID */
/* is~0, don't use it, otherwise subtract 1 from the language ID. */
/* Then examine `encoding_id'. If, for example, `encoding_id' is */
- /* @TT_MAC_ID_ROMAN and the language ID (minus~1) is */
+ /* `TT_MAC_ID_ROMAN' and the language ID (minus~1) is */
/* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */
- /* @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi */
+ /* `TT_MAC_ID_ARABIC' with `TT_MAC_LANGID_FARSI' means the Farsi */
/* variant the Arabic encoding. */
/* */
typedef enum FT_Encoding_
@@ -761,14 +771,15 @@ FT_BEGIN_HEADER
FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ),
FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ),
- FT_ENC_TAG( FT_ENCODING_GB2312, 'g', 'b', ' ', ' ' ),
+ FT_ENC_TAG( FT_ENCODING_PRC, 'g', 'b', ' ', ' ' ),
FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ),
FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ),
- /* for backwards compatibility */
+ /* for backward compatibility */
+ FT_ENCODING_GB2312 = FT_ENCODING_PRC,
FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS,
- FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312,
+ FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC,
FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5,
FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB,
@@ -793,7 +804,7 @@ FT_BEGIN_HEADER
#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1
#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2
#define ft_encoding_sjis FT_ENCODING_SJIS
-#define ft_encoding_gb2312 FT_ENCODING_GB2312
+#define ft_encoding_gb2312 FT_ENCODING_PRC
#define ft_encoding_big5 FT_ENCODING_BIG5
#define ft_encoding_wansung FT_ENCODING_WANSUNG
#define ft_encoding_johab FT_ENCODING_JOHAB
@@ -820,11 +831,11 @@ FT_BEGIN_HEADER
/* */
/* platform_id :: An ID number describing the platform for the */
/* following encoding ID. This comes directly from */
- /* the TrueType specification and should be emulated */
- /* for other formats. */
+ /* the TrueType specification and gets emulated for */
+ /* other formats. */
/* */
/* encoding_id :: A platform specific encoding number. This also */
- /* comes from the TrueType specification and should be */
+ /* comes from the TrueType specification and gets */
/* emulated similarly. */
/* */
typedef struct FT_CharMapRec_
@@ -852,8 +863,8 @@ FT_BEGIN_HEADER
/* FT_Face_Internal */
/* */
/* <Description> */
- /* An opaque handle to an `FT_Face_InternalRec' structure, used to */
- /* model private data of a given @FT_Face object. */
+ /* An opaque handle to an `FT_Face_InternalRec' structure that models */
+ /* the private data of a given @FT_Face object. */
/* */
/* This structure might change between releases of FreeType~2 and is */
/* not generally available to client applications. */
@@ -873,7 +884,7 @@ FT_BEGIN_HEADER
/* <Fields> */
/* num_faces :: The number of faces in the font file. Some */
/* font formats can have multiple faces in */
- /* a font file. */
+ /* a single font file. */
/* */
/* face_index :: This field holds two different values. */
/* Bits 0-15 are the index of the face in the */
@@ -881,38 +892,50 @@ FT_BEGIN_HEADER
/* are set to~0 if there is only one face in */
/* the font file. */
/* */
- /* Bits 16-30 are relevant to GX variation */
- /* fonts only, holding the named instance */
- /* index for the current face index (starting */
- /* with value~1; value~0 indicates font access */
- /* without GX variation data). For non-GX */
- /* fonts, bits 16-30 are ignored. If we have */
- /* the third named instance of face~4, say, */
- /* `face_index' is set to 0x00030004. */
+ /* [Since 2.6.1] Bits 16-30 are relevant to GX */
+ /* and OpenType variation fonts only, holding */
+ /* the named instance index for the current */
+ /* face index (starting with value~1; value~0 */
+ /* indicates font access without a named */
+ /* instance). For non-variation fonts, bits */
+ /* 16-30 are ignored. If we have the third */
+ /* named instance of face~4, say, `face_index' */
+ /* is set to 0x00030004. */
/* */
/* Bit 31 is always zero (this is, */
/* `face_index' is always a positive value). */
/* */
+ /* [Since 2.9] Changing the design coordinates */
+ /* with @FT_Set_Var_Design_Coordinates or */
+ /* @FT_Set_Var_Blend_Coordinates does not */
+ /* influence the named instance index value */
+ /* (only @FT_Set_Named_Instance does that). */
+ /* */
/* face_flags :: A set of bit flags that give important */
/* information about the face; see */
/* @FT_FACE_FLAG_XXX for the details. */
/* */
/* style_flags :: The lower 16~bits contain a set of bit */
/* flags indicating the style of the face; see */
- /* @FT_STYLE_FLAG_XXX for the details. Bits */
- /* 16-30 hold the number of named instances */
- /* available for the current face if we have a */
- /* GX variation (sub)font. Bit 31 is always */
- /* zero (this is, `style_flags' is always a */
- /* positive value). */
+ /* @FT_STYLE_FLAG_XXX for the details. */
+ /* */
+ /* [Since 2.6.1] Bits 16-30 hold the number */
+ /* of named instances available for the */
+ /* current face if we have a GX or OpenType */
+ /* variation (sub)font. Bit 31 is always zero */
+ /* (this is, `style_flags' is always a */
+ /* positive value). Note that a variation */
+ /* font has always at least one named */
+ /* instance, namely the default instance. */
/* */
/* num_glyphs :: The number of glyphs in the face. If the */
/* face is scalable and has sbits (see */
/* `num_fixed_sizes'), it is set to the number */
/* of outline glyphs. */
/* */
- /* For CID-keyed fonts, this value gives the */
- /* highest CID used in the font. */
+ /* For CID-keyed fonts (not in an SFNT */
+ /* wrapper) this value gives the highest CID */
+ /* used in the font. */
/* */
/* family_name :: The face's family name. This is an ASCII */
/* string, usually in English, that describes */
@@ -990,8 +1013,8 @@ FT_BEGIN_HEADER
/* expressed in font units. For font formats */
/* not having this information, it is set to */
/* `bbox.yMin'. Note that this field is */
- /* usually negative. Only relevant for */
- /* scalable formats. */
+ /* negative for values below the baseline. */
+ /* Only relevant for scalable formats. */
/* */
/* height :: This value is the vertical distance */
/* between two consecutive baselines, */
@@ -1034,6 +1057,15 @@ FT_BEGIN_HEADER
/* Fields may be changed after a call to @FT_Attach_File or */
/* @FT_Attach_Stream. */
/* */
+ /* For an OpenType variation font, the values of the following fields */
+ /* can change after a call to @FT_Set_Var_Design_Coordinates (and */
+ /* friends) if the font contains an `MVAR' table: `ascender', */
+ /* `descender', `height', `underline_position', and */
+ /* `underline_thickness'. */
+ /* */
+ /* Especially for TrueType fonts see also the documentation for */
+ /* @FT_Size_Metrics. */
+ /* */
typedef struct FT_FaceRec_
{
FT_Long num_faces;
@@ -1105,49 +1137,51 @@ FT_BEGIN_HEADER
/* */
/* <Values> */
/* FT_FACE_FLAG_SCALABLE :: */
- /* Indicates that the face contains outline glyphs. This doesn't */
- /* prevent bitmap strikes, i.e., a face can have both this and */
+ /* The face contains outline glyphs. Note that a face can contain */
+ /* bitmap strikes also, i.e., a face can have both this flag and */
/* @FT_FACE_FLAG_FIXED_SIZES set. */
/* */
/* FT_FACE_FLAG_FIXED_SIZES :: */
- /* Indicates that the face contains bitmap strikes. See also the */
+ /* The face contains bitmap strikes. See also the */
/* `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec. */
/* */
/* FT_FACE_FLAG_FIXED_WIDTH :: */
- /* Indicates that the face contains fixed-width characters (like */
- /* Courier, Lucido, MonoType, etc.). */
+ /* The face contains fixed-width characters (like Courier, Lucida, */
+ /* MonoType, etc.). */
/* */
/* FT_FACE_FLAG_SFNT :: */
- /* Indicates that the face uses the `sfnt' storage scheme. For */
- /* now, this means TrueType and OpenType. */
+ /* The face uses the SFNT storage scheme. For now, this means */
+ /* TrueType and OpenType. */
/* */
/* FT_FACE_FLAG_HORIZONTAL :: */
- /* Indicates that the face contains horizontal glyph metrics. This */
- /* should be set for all common formats. */
+ /* The face contains horizontal glyph metrics. This should be set */
+ /* for all common formats. */
/* */
/* FT_FACE_FLAG_VERTICAL :: */
- /* Indicates that the face contains vertical glyph metrics. This */
- /* is only available in some formats, not all of them. */
+ /* The face contains vertical glyph metrics. This is only */
+ /* available in some formats, not all of them. */
/* */
/* FT_FACE_FLAG_KERNING :: */
- /* Indicates that the face contains kerning information. If set, */
- /* the kerning distance can be retrieved through the function */
- /* @FT_Get_Kerning. Otherwise the function always return the */
- /* vector (0,0). Note that FreeType doesn't handle kerning data */
- /* from the `GPOS' table (as present in some OpenType fonts). */
+ /* The face contains kerning information. If set, the kerning */
+ /* distance can be retrieved using the function @FT_Get_Kerning. */
+ /* Otherwise the function always return the vector (0,0). Note */
+ /* that FreeType doesn't handle kerning data from the SFNT `GPOS' */
+ /* table (as present in many OpenType fonts). */
/* */
/* FT_FACE_FLAG_FAST_GLYPHS :: */
/* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */
/* */
/* FT_FACE_FLAG_MULTIPLE_MASTERS :: */
- /* Indicates that the font contains multiple masters and is capable */
- /* of interpolating between them. See the multiple-masters */
- /* specific API for details. */
+ /* The face contains multiple masters and is capable of */
+ /* interpolating between them. Supported formats are Adobe MM, */
+ /* TrueType GX, and OpenType variation fonts. */
+ /* */
+ /* See section @multiple_masters for API details. */
/* */
/* FT_FACE_FLAG_GLYPH_NAMES :: */
- /* Indicates that the font contains glyph names that can be */
- /* retrieved through @FT_Get_Glyph_Name. Note that some TrueType */
- /* fonts contain broken glyph name tables. Use the function */
+ /* The face contains glyph names, which can be retrieved using */
+ /* @FT_Get_Glyph_Name. Note that some TrueType fonts contain */
+ /* broken glyph name tables. Use the function */
/* @FT_Has_PS_Glyph_Names when needed. */
/* */
/* FT_FACE_FLAG_EXTERNAL_STREAM :: */
@@ -1156,31 +1190,31 @@ FT_BEGIN_HEADER
/* when @FT_Done_Face is called. Don't read or test this flag. */
/* */
/* FT_FACE_FLAG_HINTER :: */
- /* Set if the font driver has a hinting machine of its own. For */
- /* example, with TrueType fonts, it makes sense to use data from */
- /* the SFNT `gasp' table only if the native TrueType hinting engine */
- /* (with the bytecode interpreter) is available and active. */
+ /* The font driver has a hinting machine of its own. For example, */
+ /* with TrueType fonts, it makes sense to use data from the SFNT */
+ /* `gasp' table only if the native TrueType hinting engine (with */
+ /* the bytecode interpreter) is available and active. */
/* */
/* FT_FACE_FLAG_CID_KEYED :: */
- /* Set if the font is CID-keyed. In that case, the font is not */
- /* accessed by glyph indices but by CID values. For subsetted */
- /* CID-keyed fonts this has the consequence that not all index */
- /* values are a valid argument to FT_Load_Glyph. Only the CID */
- /* values for which corresponding glyphs in the subsetted font */
- /* exist make FT_Load_Glyph return successfully; in all other cases */
- /* you get an `FT_Err_Invalid_Argument' error. */
- /* */
- /* Note that CID-keyed fonts that are in an SFNT wrapper don't */
- /* have this flag set since the glyphs are accessed in the normal */
- /* way (using contiguous indices); the `CID-ness' isn't visible to */
- /* the application. */
+ /* The face is CID-keyed. In that case, the face is not accessed */
+ /* by glyph indices but by CID values. For subsetted CID-keyed */
+ /* fonts this has the consequence that not all index values are a */
+ /* valid argument to @FT_Load_Glyph. Only the CID values for which */
+ /* corresponding glyphs in the subsetted font exist make */
+ /* `FT_Load_Glyph' return successfully; in all other cases you get */
+ /* an `FT_Err_Invalid_Argument' error. */
+ /* */
+ /* Note that CID-keyed fonts that are in an SFNT wrapper (this is, */
+ /* all OpenType/CFF fonts) don't have this flag set since the */
+ /* glyphs are accessed in the normal way (using contiguous */
+ /* indices); the `CID-ness' isn't visible to the application. */
/* */
/* FT_FACE_FLAG_TRICKY :: */
- /* Set if the font is `tricky', this is, it always needs the */
- /* font format's native hinting engine to get a reasonable result. */
- /* A typical example is the Chinese font `mingli.ttf' that uses */
- /* TrueType bytecode instructions to move and scale all of its */
- /* subglyphs. */
+ /* The face is `tricky', this is, it always needs the font format's */
+ /* native hinting engine to get a reasonable result. A typical */
+ /* example is the old Chinese font `mingli.ttf' (but not */
+ /* `mingliu.ttc') that uses TrueType bytecode instructions to move */
+ /* and scale all of its subglyphs. */
/* */
/* It is not possible to auto-hint such fonts using */
/* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */
@@ -1192,8 +1226,15 @@ FT_BEGIN_HEADER
/* tricky fonts; they are hard-coded in file `ttobjs.c'. */
/* */
/* FT_FACE_FLAG_COLOR :: */
- /* Set if the font has color glyph tables. To access color glyphs */
- /* use @FT_LOAD_COLOR. */
+ /* [Since 2.5.1] The face has color glyph tables. To access color */
+ /* glyphs use @FT_LOAD_COLOR. */
+ /* */
+ /* FT_FACE_FLAG_VARIATION :: */
+ /* [Since 2.9] Set if the current face (or named instance) has been */
+ /* altered with @FT_Set_MM_Design_Coordinates, */
+ /* @FT_Set_Var_Design_Coordinates, or */
+ /* @FT_Set_Var_Blend_Coordinates. This flag is unset by a call to */
+ /* @FT_Set_Named_Instance. */
/* */
#define FT_FACE_FLAG_SCALABLE ( 1L << 0 )
#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 )
@@ -1210,6 +1251,7 @@ FT_BEGIN_HEADER
#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 )
#define FT_FACE_FLAG_TRICKY ( 1L << 13 )
#define FT_FACE_FLAG_COLOR ( 1L << 14 )
+#define FT_FACE_FLAG_VARIATION ( 1L << 15 )
/*************************************************************************
@@ -1265,7 +1307,7 @@ FT_BEGIN_HEADER
* @description:
* A macro that returns true whenever a face object contains a scalable
* font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF,
- * and PFR font formats.
+ * and PFR font formats).
*
*/
#define FT_IS_SCALABLE( face ) \
@@ -1369,7 +1411,15 @@ FT_BEGIN_HEADER
*
* @description:
* A macro that returns true whenever a face object is a named instance
- * of a GX variation font.
+ * of a GX or OpenType variation font.
+ *
+ * [Since 2.9] Changing the design coordinates with
+ * @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does
+ * not influence the return value of this macro (only
+ * @FT_Set_Named_Instance does that).
+ *
+ * @since:
+ * 2.7
*
*/
#define FT_IS_NAMED_INSTANCE( face ) \
@@ -1379,6 +1429,24 @@ FT_BEGIN_HEADER
/*************************************************************************
*
* @macro:
+ * FT_IS_VARIATION( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object has been altered
+ * by @FT_Set_MM_Design_Coordinates, @FT_Set_Var_Design_Coordinates, or
+ * @FT_Set_Var_Blend_Coordinates.
+ *
+ * @since:
+ * 2.9
+ *
+ */
+#define FT_IS_VARIATION( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_VARIATION )
+
+
+ /*************************************************************************
+ *
+ * @macro:
* FT_IS_CID_KEYED( face )
*
* @description:
@@ -1417,6 +1485,9 @@ FT_BEGIN_HEADER
* A macro that returns true whenever a face object contains
* tables for color glyphs.
*
+ * @since:
+ * 2.5.1
+ *
*/
#define FT_HAS_COLOR( face ) \
( (face)->face_flags & FT_FACE_FLAG_COLOR )
@@ -1428,15 +1499,15 @@ FT_BEGIN_HEADER
/* FT_STYLE_FLAG_XXX */
/* */
/* <Description> */
- /* A list of bit flags used to indicate the style of a given face. */
- /* These are used in the `style_flags' field of @FT_FaceRec. */
+ /* A list of bit flags to indicate the style of a given face. These */
+ /* are used in the `style_flags' field of @FT_FaceRec. */
/* */
/* <Values> */
/* FT_STYLE_FLAG_ITALIC :: */
- /* Indicates that a given face style is italic or oblique. */
+ /* The face style is italic or oblique. */
/* */
/* FT_STYLE_FLAG_BOLD :: */
- /* Indicates that a given face is bold. */
+ /* The face is bold. */
/* */
/* <Note> */
/* The style information as provided by FreeType is very basic. More */
@@ -1477,43 +1548,93 @@ FT_BEGIN_HEADER
/* hence the term `ppem' (pixels per EM). It is also */
/* referred to as `nominal height'. */
/* */
- /* x_scale :: A 16.16 fractional scaling value used to convert */
+ /* x_scale :: A 16.16 fractional scaling value to convert */
/* horizontal metrics from font units to 26.6 */
/* fractional pixels. Only relevant for scalable */
/* font formats. */
/* */
- /* y_scale :: A 16.16 fractional scaling value used to convert */
+ /* y_scale :: A 16.16 fractional scaling value to convert */
/* vertical metrics from font units to 26.6 */
/* fractional pixels. Only relevant for scalable */
/* font formats. */
/* */
- /* ascender :: The ascender in 26.6 fractional pixels. See */
- /* @FT_FaceRec for the details. */
+ /* ascender :: The ascender in 26.6 fractional pixels, rounded up */
+ /* to an integer value. See @FT_FaceRec for the */
+ /* details. */
/* */
- /* descender :: The descender in 26.6 fractional pixels. See */
- /* @FT_FaceRec for the details. */
+ /* descender :: The descender in 26.6 fractional pixels, rounded */
+ /* down to an integer value. See @FT_FaceRec for the */
+ /* details. */
/* */
- /* height :: The height in 26.6 fractional pixels. See */
- /* @FT_FaceRec for the details. */
+ /* height :: The height in 26.6 fractional pixels, rounded to */
+ /* an integer value. See @FT_FaceRec for the */
+ /* details. */
/* */
/* max_advance :: The maximum advance width in 26.6 fractional */
- /* pixels. See @FT_FaceRec for the details. */
+ /* pixels, rounded to an integer value. See */
+ /* @FT_FaceRec for the details. */
/* */
/* <Note> */
/* The scaling values, if relevant, are determined first during a */
/* size changing operation. The remaining fields are then set by the */
/* driver. For scalable formats, they are usually set to scaled */
- /* values of the corresponding fields in @FT_FaceRec. */
+ /* values of the corresponding fields in @FT_FaceRec. Some values */
+ /* like ascender or descender are rounded for historical reasons; */
+ /* more precise values (for outline fonts) can be derived by scaling */
+ /* the corresponding @FT_FaceRec values manually, with code similar */
+ /* to the following. */
+ /* */
+ /* { */
+ /* scaled_ascender = FT_MulFix( face->ascender, */
+ /* size_metrics->y_scale ); */
+ /* } */
/* */
- /* Note that due to glyph hinting, these values might not be exact */
- /* for certain fonts. Thus they must be treated as unreliable */
- /* with an error margin of at least one pixel! */
+ /* Note that due to glyph hinting and the selected rendering mode */
+ /* these values are usually not exact; consequently, they must be */
+ /* treated as unreliable with an error margin of at least one pixel! */
/* */
/* Indeed, the only way to get the exact metrics is to render _all_ */
/* glyphs. As this would be a definite performance hit, it is up to */
/* client applications to perform such computations. */
/* */
- /* The FT_Size_Metrics structure is valid for bitmap fonts also. */
+ /* The `FT_Size_Metrics' structure is valid for bitmap fonts also. */
+ /* */
+ /* */
+ /* *TrueType* *fonts* *with* *native* *bytecode* *hinting* */
+ /* */
+ /* All applications that handle TrueType fonts with native hinting */
+ /* must be aware that TTFs expect different rounding of vertical font */
+ /* dimensions. The application has to cater for this, especially if */
+ /* it wants to rely on a TTF's vertical data (for example, to */
+ /* properly align box characters vertically). */
+ /* */
+ /* Only the application knows _in_ _advance_ that it is going to use */
+ /* native hinting for TTFs! FreeType, on the other hand, selects the */
+ /* hinting mode not at the time of creating an @FT_Size object but */
+ /* much later, namely while calling @FT_Load_Glyph. */
+ /* */
+ /* Here is some pseudo code that illustrates a possible solution. */
+ /* */
+ /* { */
+ /* font_format = FT_Get_Font_Format( face ); */
+ /* */
+ /* if ( !strcmp( font_format, "TrueType" ) && */
+ /* do_native_bytecode_hinting ) */
+ /* { */
+ /* ascender = ROUND( FT_MulFix( face->ascender, */
+ /* size_metrics->y_scale ) ); */
+ /* descender = ROUND( FT_MulFix( face->descender, */
+ /* size_metrics->y_scale ) ); */
+ /* } */
+ /* else */
+ /* { */
+ /* ascender = size_metrics->ascender; */
+ /* descender = size_metrics->descender; */
+ /* } */
+ /* */
+ /* height = size_metrics->height; */
+ /* max_advance = size_metrics->max_advance; */
+ /* } */
/* */
typedef struct FT_Size_Metrics_
{
@@ -1653,32 +1774,27 @@ FT_BEGIN_HEADER
/* contained in the glyph slot. Typically */
/* @FT_GLYPH_FORMAT_BITMAP, */
/* @FT_GLYPH_FORMAT_OUTLINE, or */
- /* @FT_GLYPH_FORMAT_COMPOSITE, but others are */
- /* possible. */
+ /* @FT_GLYPH_FORMAT_COMPOSITE, but other values */
+ /* are possible. */
/* */
- /* bitmap :: This field is used as a bitmap descriptor */
- /* when the slot format is */
- /* @FT_GLYPH_FORMAT_BITMAP. Note that the */
- /* address and content of the bitmap buffer can */
- /* change between calls of @FT_Load_Glyph and a */
- /* few other functions. */
+ /* bitmap :: This field is used as a bitmap descriptor. */
+ /* Note that the address and content of the */
+ /* bitmap buffer can change between calls of */
+ /* @FT_Load_Glyph and a few other functions. */
/* */
/* bitmap_left :: The bitmap's left bearing expressed in */
- /* integer pixels. Only valid if the format is */
- /* @FT_GLYPH_FORMAT_BITMAP, this is, if the */
- /* glyph slot contains a bitmap. */
+ /* integer pixels. */
/* */
/* bitmap_top :: The bitmap's top bearing expressed in integer */
- /* pixels. Remember that this is the distance */
- /* from the baseline to the top-most glyph */
- /* scanline, upwards y~coordinates being */
- /* *positive*. */
+ /* pixels. This is the distance from the */
+ /* baseline to the top-most glyph scanline, */
+ /* upwards y~coordinates being *positive*. */
/* */
/* outline :: The outline descriptor for the current glyph */
/* image if its format is */
/* @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */
/* loaded, `outline' can be transformed, */
- /* distorted, embolded, etc. However, it must */
+ /* distorted, emboldened, etc. However, it must */
/* not be freed. */
/* */
/* num_subglyphs :: The number of subglyphs in a composite glyph. */
@@ -1694,15 +1810,13 @@ FT_BEGIN_HEADER
/* control_data :: Certain font drivers can also return the */
/* control data for a given glyph image (e.g. */
/* TrueType bytecode, Type~1 charstrings, etc.). */
- /* This field is a pointer to such data. */
+ /* This field is a pointer to such data; it is */
+ /* currently internal to FreeType. */
/* */
/* control_len :: This is the length in bytes of the control */
- /* data. */
+ /* data. Currently internal to FreeType. */
/* */
- /* other :: Really wicked formats can use this pointer to */
- /* present their own glyph image to client */
- /* applications. Note that the application */
- /* needs to know about the image format. */
+ /* other :: Reserved. */
/* */
/* lsb_delta :: The difference between hinted and unhinted */
/* left side bearing while auto-hinting is */
@@ -1716,10 +1830,12 @@ FT_BEGIN_HEADER
/* If @FT_Load_Glyph is called with default flags (see */
/* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */
/* its native format (e.g., an outline glyph for TrueType and Type~1 */
- /* formats). */
+ /* formats). [Since 2.9] The prospective bitmap metrics are */
+ /* calculated according to @FT_LOAD_TARGET_XXX and other flags even */
+ /* for the outline glyph, even if @FT_LOAD_RENDER is not set. */
/* */
/* This image can later be converted into a bitmap by calling */
- /* @FT_Render_Glyph. This function finds the current renderer for */
+ /* @FT_Render_Glyph. This function searches the current renderer for */
/* the native image's format, then invokes it. */
/* */
/* The renderer is in charge of transforming the native image through */
@@ -1732,29 +1848,55 @@ FT_BEGIN_HEADER
/* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */
/* */
/* Here is a small pseudo code fragment that shows how to use */
- /* `lsb_delta' and `rsb_delta': */
+ /* `lsb_delta' and `rsb_delta' to do fractional positioning of */
+ /* glyphs: */
+ /* */
+ /* { */
+ /* FT_GlyphSlot slot = face->glyph; */
+ /* FT_Pos origin_x = 0; */
+ /* */
+ /* */
+ /* for all glyphs do */
+ /* <load glyph with `FT_Load_Glyph'> */
+ /* */
+ /* FT_Outline_Translate( slot->outline, origin_x & 63, 0 ); */
+ /* */
+ /* <save glyph image, or render glyph, or ...> */
+ /* */
+ /* <compute kern between current and next glyph */
+ /* and add it to `origin_x'> */
+ /* */
+ /* origin_x += slot->advance.x; */
+ /* origin_x += slot->rsb_delta - slot->lsb_delta; */
+ /* endfor */
+ /* } */
+ /* */
+ /* Here is another small pseudo code fragment that shows how to use */
+ /* `lsb_delta' and `rsb_delta' to improve integer positioning of */
+ /* glyphs: */
/* */
/* { */
- /* FT_Pos origin_x = 0; */
- /* FT_Pos prev_rsb_delta = 0; */
+ /* FT_GlyphSlot slot = face->glyph; */
+ /* FT_Pos origin_x = 0; */
+ /* FT_Pos prev_rsb_delta = 0; */
/* */
/* */
/* for all glyphs do */
- /* <compute kern between current and previous glyph and add it to */
- /* `origin_x'> */
+ /* <compute kern between current and previous glyph */
+ /* and add it to `origin_x'> */
/* */
/* <load glyph with `FT_Load_Glyph'> */
/* */
- /* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */
+ /* if ( prev_rsb_delta - slot->lsb_delta > 32 ) */
/* origin_x -= 64; */
- /* else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */
+ /* else if ( prev_rsb_delta - slot->lsb_delta < -31 ) */
/* origin_x += 64; */
/* */
- /* prev_rsb_delta = face->glyph->rsb_delta; */
+ /* prev_rsb_delta = slot->rsb_delta; */
/* */
/* <save glyph image, or render glyph, or ...> */
/* */
- /* origin_x += face->glyph->advance.x; */
+ /* origin_x += slot->advance.x; */
/* endfor */
/* } */
/* */
@@ -1828,7 +1970,8 @@ FT_BEGIN_HEADER
/* <Note> */
/* In case you want to provide your own memory allocating routines, */
/* use @FT_New_Library instead, followed by a call to */
- /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */
+ /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module) */
+ /* and @FT_Set_Default_Properties. */
/* */
/* See the documentation of @FT_Library and @FT_Face for */
/* multi-threading issues. */
@@ -1836,6 +1979,11 @@ FT_BEGIN_HEADER
/* If you need reference-counting (cf. @FT_Reference_Library), use */
/* @FT_New_Library and @FT_Done_Library. */
/* */
+ /* If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is */
+ /* set, this function reads the `FREETYPE_PROPERTIES' environment */
+ /* variable to control driver properties. See section @properties */
+ /* for more. */
+ /* */
FT_EXPORT( FT_Error )
FT_Init_FreeType( FT_Library *alibrary );
@@ -1906,8 +2054,8 @@ FT_BEGIN_HEADER
/* FT_Parameter */
/* */
/* <Description> */
- /* A simple structure used to pass more or less generic parameters to */
- /* @FT_Open_Face. */
+ /* A simple structure to pass more or less generic parameters to */
+ /* @FT_Open_Face and @FT_Face_Properties. */
/* */
/* <Fields> */
/* tag :: A four-byte identification tag. */
@@ -1915,8 +2063,8 @@ FT_BEGIN_HEADER
/* data :: A pointer to the parameter data. */
/* */
/* <Note> */
- /* The ID and function of parameters are driver-specific. See the */
- /* various FT_PARAM_TAG_XXX flags for more information. */
+ /* The ID and function of parameters are driver-specific. See */
+ /* section @parameter_tags for more information. */
/* */
typedef struct FT_Parameter_
{
@@ -1932,9 +2080,9 @@ FT_BEGIN_HEADER
/* FT_Open_Args */
/* */
/* <Description> */
- /* A structure used to indicate how to open a new font file or */
- /* stream. A pointer to such a structure can be used as a parameter */
- /* for the functions @FT_Open_Face and @FT_Attach_Stream. */
+ /* A structure to indicate how to open a new font file or stream. A */
+ /* pointer to such a structure can be used as a parameter for the */
+ /* functions @FT_Open_Face and @FT_Attach_Stream. */
/* */
/* <Fields> */
/* flags :: A set of bit flags indicating how to use the */
@@ -1949,9 +2097,10 @@ FT_BEGIN_HEADER
/* stream :: A handle to a source stream object. */
/* */
/* driver :: This field is exclusively used by @FT_Open_Face; */
- /* it simply specifies the font driver to use to open */
- /* the face. If set to~0, FreeType tries to load the */
- /* face with each one of the drivers in its list. */
+ /* it simply specifies the font driver to use for */
+ /* opening the face. If set to NULL, FreeType tries */
+ /* to load the face with each one of the drivers in */
+ /* its list. */
/* */
/* num_params :: The number of extra parameters. */
/* */
@@ -1981,7 +2130,7 @@ FT_BEGIN_HEADER
/* `num_params' and `params' is used. They are ignored otherwise. */
/* */
/* Ideally, both the `pathname' and `params' fields should be tagged */
- /* as `const'; this is missing for API backwards compatibility. In */
+ /* as `const'; this is missing for API backward compatibility. In */
/* other words, applications should treat them as read-only. */
/* */
typedef struct FT_Open_Args_
@@ -2004,7 +2153,7 @@ FT_BEGIN_HEADER
/* FT_New_Face */
/* */
/* <Description> */
- /* This function calls @FT_Open_Face to open a font by its pathname. */
+ /* Call @FT_Open_Face to open a font by its pathname. */
/* */
/* <InOut> */
/* library :: A handle to the library resource. */
@@ -2039,8 +2188,8 @@ FT_BEGIN_HEADER
/* FT_New_Memory_Face */
/* */
/* <Description> */
- /* This function calls @FT_Open_Face to open a font that has been */
- /* loaded into memory. */
+ /* Call @FT_Open_Face to open a font that has been loaded into */
+ /* memory. */
/* */
/* <InOut> */
/* library :: A handle to the library resource. */
@@ -2092,20 +2241,21 @@ FT_BEGIN_HEADER
/* with value~0). Set it to~0 if there is only one */
/* face in the font file. */
/* */
- /* Bits 16-30 are relevant to GX variation fonts only, */
- /* specifying the named instance index for the current */
- /* face index (starting with value~1; value~0 makes */
- /* FreeType ignore named instances). For non-GX fonts, */
- /* bits 16-30 are ignored. Assuming that you want to */
- /* access the third named instance in face~4, */
- /* `face_index' should be set to 0x00030004. If you */
- /* want to access face~4 without GX variation handling, */
- /* simply set `face_index' to value~4. */
- /* */
- /* FT_Open_Face and its siblings can be used to quickly */
- /* check whether the font format of a given font */
- /* resource is supported by FreeType. In general, if */
- /* the `face_index' argument is negative, the */
+ /* [Since 2.6.1] Bits 16-30 are relevant to GX and */
+ /* OpenType variation fonts only, specifying the named */
+ /* instance index for the current face index (starting */
+ /* with value~1; value~0 makes FreeType ignore named */
+ /* instances). For non-variation fonts, bits 16-30 are */
+ /* ignored. Assuming that you want to access the third */
+ /* named instance in face~4, `face_index' should be set */
+ /* to 0x00030004. If you want to access face~4 without */
+ /* variation handling, simply set `face_index' to */
+ /* value~4. */
+ /* */
+ /* `FT_Open_Face' and its siblings can be used to */
+ /* quickly check whether the font format of a given */
+ /* font resource is supported by FreeType. In general, */
+ /* if the `face_index' argument is negative, the */
/* function's return value is~0 if the font format is */
/* recognized, or non-zero otherwise. The function */
/* allocates a more or less empty face handle in */
@@ -2114,10 +2264,10 @@ FT_BEGIN_HEADER
/* `face->num_faces' and `face->style_flags'. For any */
/* negative value of `face_index', `face->num_faces' */
/* gives the number of faces within the font file. For */
- /* the negative value `-(N+1)' (with `N' a 16-bit */
- /* value), bits 16-30 in `face->style_flags' give the */
- /* number of named instances in face `N' if we have a */
- /* GX variation font (or zero otherwise). After */
+ /* the negative value `-(N+1)' (with `N' a non-negative */
+ /* 16-bit value), bits 16-30 in `face->style_flags' */
+ /* give the number of named instances in face `N' if we */
+ /* have a variation font (or zero otherwise). After */
/* examination, the returned @FT_Face structure should */
/* be deallocated with a call to @FT_Done_Face. */
/* */
@@ -2224,7 +2374,7 @@ FT_BEGIN_HEADER
/* FT_Attach_File */
/* */
/* <Description> */
- /* This function calls @FT_Attach_Stream to attach a file. */
+ /* Call @FT_Attach_Stream to attach a file. */
/* */
/* <InOut> */
/* face :: The target face object. */
@@ -2268,7 +2418,7 @@ FT_BEGIN_HEADER
/* */
/* Client applications are expected to know what they are doing */
/* when invoking this function. Most drivers simply do not implement */
- /* file attachments. */
+ /* file or stream attachments. */
/* */
FT_EXPORT( FT_Error )
FT_Attach_Stream( FT_Face face,
@@ -2352,11 +2502,11 @@ FT_BEGIN_HEADER
/* FreeType silently uses outlines if there is no bitmap for a given */
/* glyph index. */
/* */
- /* For GX variation fonts, a bitmap strike makes sense only if the */
- /* default instance is active (this is, no glyph variation takes */
- /* place); otherwise, FreeType simply ignores bitmap strikes. The */
- /* same is true for all named instances that are different from the */
- /* default instance. */
+ /* For GX and OpenType variation fonts, a bitmap strike makes sense */
+ /* only if the default instance is active (this is, no glyph */
+ /* variation takes place); otherwise, FreeType simply ignores bitmap */
+ /* strikes. The same is true for all named instances that are */
+ /* different from the default instance. */
/* */
/* Don't use this function if you are using the FreeType cache API. */
/* */
@@ -2389,7 +2539,7 @@ FT_BEGIN_HEADER
/* */
/* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */
/* The real dimension. The sum of the `ascender' and (minus of) */
- /* the `descender' fields of @FT_FaceRec are used to determine both */
+ /* the `descender' fields of @FT_FaceRec is used to determine both */
/* scaling values. */
/* */
/* FT_SIZE_REQUEST_TYPE_BBOX :: */
@@ -2435,7 +2585,7 @@ FT_BEGIN_HEADER
/* FT_Size_RequestRec */
/* */
/* <Description> */
- /* A structure used to model a size request. */
+ /* A structure to model a size request. */
/* */
/* <Fields> */
/* type :: See @FT_Size_Request_Type. */
@@ -2448,14 +2598,16 @@ FT_BEGIN_HEADER
/* */
/* horiResolution :: The horizontal resolution (dpi, i.e., pixels per */
/* inch). If set to zero, `width' is treated as a */
- /* 26.6 fractional *pixel* value. */
+ /* 26.6 fractional *pixel* value, which gets */
+ /* internally rounded to an integer. */
/* */
/* vertResolution :: The vertical resolution (dpi, i.e., pixels per */
/* inch). If set to zero, `height' is treated as a */
- /* 26.6 fractional *pixel* value. */
+ /* 26.6 fractional *pixel* value, which gets */
+ /* internally rounded to an integer. */
/* */
/* <Note> */
- /* If `width' is zero, then the horizontal scaling value is set equal */
+ /* If `width' is zero, the horizontal scaling value is set equal */
/* to the vertical scaling value, and vice versa. */
/* */
/* If `type' is FT_SIZE_REQUEST_TYPE_SCALES, `width' and `height' are */
@@ -2512,7 +2664,11 @@ FT_BEGIN_HEADER
/* size is dependent entirely on how the size is defined in the */
/* source face. The font designer chooses the final size of each */
/* glyph relative to this size. For more information refer to */
- /* `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html' */
+ /* `https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'. */
+ /* */
+ /* Contrary to @FT_Set_Char_Size, this function doesn't have special */
+ /* code to normalize zero-valued widths, heights, or resolutions */
+ /* (which lead to errors in most cases). */
/* */
/* Don't use this function if you are using the FreeType cache API. */
/* */
@@ -2527,8 +2683,7 @@ FT_BEGIN_HEADER
/* FT_Set_Char_Size */
/* */
/* <Description> */
- /* This function calls @FT_Request_Size to request the nominal size */
- /* (in points). */
+ /* Call @FT_Request_Size to request the nominal size (in points). */
/* */
/* <InOut> */
/* face :: A handle to a target face object. */
@@ -2546,6 +2701,10 @@ FT_BEGIN_HEADER
/* FreeType error code. 0~means success. */
/* */
/* <Note> */
+ /* While this function allows fractional points as input values, the */
+ /* resulting ppem value for the given resolution is always rounded to */
+ /* the nearest integer. */
+ /* */
/* If either the character width or height is zero, it is set equal */
/* to the other value. */
/* */
@@ -2571,8 +2730,7 @@ FT_BEGIN_HEADER
/* FT_Set_Pixel_Sizes */
/* */
/* <Description> */
- /* This function calls @FT_Request_Size to request the nominal size */
- /* (in pixels). */
+ /* Call @FT_Request_Size to request the nominal size (in pixels). */
/* */
/* <InOut> */
/* face :: A handle to the target face object. */
@@ -2586,8 +2744,8 @@ FT_BEGIN_HEADER
/* FreeType error code. 0~means success. */
/* */
/* <Note> */
- /* You should not rely on the resulting glyphs matching, or being */
- /* constrained, to this pixel size. Refer to @FT_Request_Size to */
+ /* You should not rely on the resulting glyphs matching or being */
+ /* constrained to this pixel size. Refer to @FT_Request_Size to */
/* understand how requested sizes relate to actual sizes. */
/* */
/* Don't use this function if you are using the FreeType cache API. */
@@ -2604,8 +2762,7 @@ FT_BEGIN_HEADER
/* FT_Load_Glyph */
/* */
/* <Description> */
- /* A function used to load a single glyph into the glyph slot of a */
- /* face object. */
+ /* Load a glyph into the glyph slot of a face object. */
/* */
/* <InOut> */
/* face :: A handle to the target face object where the glyph */
@@ -2650,8 +2807,8 @@ FT_BEGIN_HEADER
/* FT_Load_Char */
/* */
/* <Description> */
- /* A function used to load a single glyph into the glyph slot of a */
- /* face object, according to its character code. */
+ /* Load a glyph into the glyph slot of a face object, accessed by its */
+ /* character code. */
/* */
/* <InOut> */
/* face :: A handle to a target face object where the glyph */
@@ -2673,6 +2830,14 @@ FT_BEGIN_HEADER
/* <Note> */
/* This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph. */
/* */
+ /* Many fonts contain glyphs that can't be loaded by this function */
+ /* since its glyph indices are not listed in any of the font's */
+ /* charmaps. */
+ /* */
+ /* If no active cmap is set up (i.e., `face->charmap' is zero), the */
+ /* call to @FT_Get_Char_Index is omitted, and the function behaves */
+ /* identically to @FT_Load_Glyph. */
+ /* */
FT_EXPORT( FT_Error )
FT_Load_Char( FT_Face face,
FT_ULong char_code,
@@ -2685,8 +2850,8 @@ FT_BEGIN_HEADER
* FT_LOAD_XXX
*
* @description:
- * A list of bit field constants used with @FT_Load_Glyph to indicate
- * what kind of operations to perform during glyph loading.
+ * A list of bit field constants for @FT_Load_Glyph to indicate what
+ * kind of operations to perform during glyph loading.
*
* @values:
* FT_LOAD_DEFAULT ::
@@ -2698,13 +2863,13 @@ FT_BEGIN_HEADER
* The bitmap data can be accessed from the glyph slot (see note
* below).
*
- * 2. If no embedded bitmap is searched or found, FreeType looks for a
- * scalable outline. If one is found, it is loaded from the font
- * file, scaled to device pixels, then `hinted' to the pixel grid
- * in order to optimize it. The outline data can be accessed from
- * the glyph slot (see note below).
+ * 2. If no embedded bitmap is searched for or found, FreeType looks
+ * for a scalable outline. If one is found, it is loaded from
+ * the font file, scaled to device pixels, then `hinted' to the
+ * pixel grid in order to optimize it. The outline data can be
+ * accessed from the glyph slot (see note below).
*
- * Note that by default, the glyph loader doesn't render outlines into
+ * Note that by default the glyph loader doesn't render outlines into
* bitmaps. The following flags are used to modify this default
* behaviour to more specific and useful cases.
*
@@ -2751,13 +2916,13 @@ FT_BEGIN_HEADER
* various font formats.
*
* FT_LOAD_FORCE_AUTOHINT ::
- * Indicates that the auto-hinter is preferred over the font's native
- * hinter. See also the note below.
+ * Prefer the auto-hinter over the font's native hinter. See also
+ * the note below.
*
* FT_LOAD_PEDANTIC ::
- * Indicates that the font driver should perform pedantic verifications
- * during glyph loading. This is mostly used to detect broken glyphs
- * in fonts. By default, FreeType tries to handle broken fonts also.
+ * Make the font driver perform pedantic verifications during glyph
+ * loading. This is mostly used to detect broken glyphs in fonts.
+ * By default, FreeType tries to handle broken fonts also.
*
* In particular, errors from the TrueType bytecode engine are not
* passed to the application if this flag is not set; this might
@@ -2765,17 +2930,16 @@ FT_BEGIN_HEADER
* bytecode is buggy.
*
* FT_LOAD_NO_RECURSE ::
- * Indicate that the font driver should not load composite glyphs
- * recursively. Instead, it should set the `num_subglyph' and
- * `subglyphs' values of the glyph slot accordingly, and set
- * `glyph->format' to @FT_GLYPH_FORMAT_COMPOSITE. The description of
- * subglyphs can then be accessed with @FT_Get_SubGlyph_Info.
+ * Don't load composite glyphs recursively. Instead, the font
+ * driver should set the `num_subglyph' and `subglyphs' values of
+ * the glyph slot accordingly, and set `glyph->format' to
+ * @FT_GLYPH_FORMAT_COMPOSITE. The description of subglyphs can
+ * then be accessed with @FT_Get_SubGlyph_Info.
*
* This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.
*
* FT_LOAD_IGNORE_TRANSFORM ::
- * Indicates that the transform matrix set by @FT_Set_Transform should
- * be ignored.
+ * Ignore the transform matrix set by @FT_Set_Transform.
*
* FT_LOAD_MONOCHROME ::
* This flag is used with @FT_LOAD_RENDER to indicate that you want to
@@ -2787,34 +2951,32 @@ FT_BEGIN_HEADER
* monochrome-optimized hinting algorithm is used.
*
* FT_LOAD_LINEAR_DESIGN ::
- * Indicates that the `linearHoriAdvance' and `linearVertAdvance'
- * fields of @FT_GlyphSlotRec should be kept in font units. See
- * @FT_GlyphSlotRec for details.
+ * Keep `linearHoriAdvance' and `linearVertAdvance' fields of
+ * @FT_GlyphSlotRec in font units. See @FT_GlyphSlotRec for
+ * details.
*
* FT_LOAD_NO_AUTOHINT ::
- * Disable auto-hinter. See also the note below.
+ * Disable the auto-hinter. See also the note below.
*
* FT_LOAD_COLOR ::
- * This flag is used to request loading of color embedded-bitmap
- * images. The resulting color bitmaps, if available, will have the
- * @FT_PIXEL_MODE_BGRA format. When the flag is not used and color
- * bitmaps are found, they will be converted to 256-level gray
- * bitmaps transparently. Those bitmaps will be in the
+ * [Since 2.5] Load embedded color bitmap images. The resulting color
+ * bitmaps, if available, will have the @FT_PIXEL_MODE_BGRA format.
+ * If the flag is not set and color bitmaps are found, they are
+ * converted to 256-level gray bitmaps transparently, using the
* @FT_PIXEL_MODE_GRAY format.
*
* FT_LOAD_COMPUTE_METRICS ::
- * This flag sets computing glyph metrics without the use of bundled
- * metrics tables (for example, the `hdmx' table in TrueType fonts).
- * Well-behaving fonts have optimized bundled metrics and these should
- * be used. This flag is mainly used by font validating or font
- * editing applications, which need to ignore, verify, or edit those
- * tables.
+ * [Since 2.6.1] Compute glyph metrics from the glyph data, without
+ * the use of bundled metrics tables (for example, the `hdmx' table in
+ * TrueType fonts). This flag is mainly used by font validating or
+ * font editing applications, which need to ignore, verify, or edit
+ * those tables.
*
* Currently, this flag is only implemented for TrueType fonts.
*
* FT_LOAD_BITMAP_METRICS_ONLY ::
- * This flag is used to request loading of the metrics and bitmap
- * image information of a (possibly embedded) bitmap glyph without
+ * [Since 2.7.1] Request loading of the metrics and bitmap image
+ * information of a (possibly embedded) bitmap glyph without
* allocating or copying the bitmap image data itself. No effect if
* the target glyph is not a bitmap image.
*
@@ -2863,14 +3025,14 @@ FT_BEGIN_HEADER
#define FT_LOAD_MONOCHROME ( 1L << 12 )
#define FT_LOAD_LINEAR_DESIGN ( 1L << 13 )
#define FT_LOAD_NO_AUTOHINT ( 1L << 15 )
- /* Bits 16..19 are used by `FT_LOAD_TARGET_' */
+ /* Bits 16-19 are used by `FT_LOAD_TARGET_' */
#define FT_LOAD_COLOR ( 1L << 20 )
#define FT_LOAD_COMPUTE_METRICS ( 1L << 21 )
#define FT_LOAD_BITMAP_METRICS_ONLY ( 1L << 22 )
/* */
- /* used internally only by certain font drivers! */
+ /* used internally only by certain font drivers */
#define FT_LOAD_ADVANCE_ONLY ( 1L << 8 )
#define FT_LOAD_SBITS_ONLY ( 1L << 14 )
@@ -2881,37 +3043,48 @@ FT_BEGIN_HEADER
* FT_LOAD_TARGET_XXX
*
* @description:
- * A list of values that are used to select a specific hinting algorithm
- * to use by the hinter. You should OR one of these values to your
- * `load_flags' when calling @FT_Load_Glyph.
+ * A list of values to select a specific hinting algorithm for the
+ * hinter. You should OR one of these values to your `load_flags'
+ * when calling @FT_Load_Glyph.
*
- * Note that font's native hinters may ignore the hinting algorithm you
- * have specified (e.g., the TrueType bytecode interpreter). You can set
- * @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
+ * Note that a font's native hinters may ignore the hinting algorithm
+ * you have specified (e.g., the TrueType bytecode interpreter). You
+ * can set @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is
+ * used.
*
* @values:
* FT_LOAD_TARGET_NORMAL ::
- * This corresponds to the default hinting algorithm, optimized for
- * standard gray-level rendering. For monochrome output, use
- * @FT_LOAD_TARGET_MONO instead.
+ * The default hinting algorithm, optimized for standard gray-level
+ * rendering. For monochrome output, use @FT_LOAD_TARGET_MONO
+ * instead.
*
* FT_LOAD_TARGET_LIGHT ::
* A lighter hinting algorithm for gray-level modes. Many generated
* glyphs are fuzzier but better resemble their original shape. This
* is achieved by snapping glyphs to the pixel grid only vertically
- * (Y-axis), as is done by Microsoft's ClearType and Adobe's
- * proprietary font renderer. This preserves inter-glyph spacing in
+ * (Y-axis), as is done by FreeType's new CFF engine or Microsoft's
+ * ClearType font renderer. This preserves inter-glyph spacing in
* horizontal text. The snapping is done either by the native font
- * driver if the driver itself and the font support it or by the
+ * driver, if the driver itself and the font support it, or by the
* auto-hinter.
*
+ * Advance widths are rounded to integer values; however, using the
+ * `lsb_delta' and `rsb_delta' fields of @FT_GlyphSlotRec, it is
+ * possible to get fractional advance widths for subpixel positioning
+ * (which is recommended to use).
+ *
+ * If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active,
+ * TrueType-like metrics are used to make this mode behave similarly
+ * as in unpatched FreeType versions between 2.4.6 and 2.7.1
+ * (inclusive).
+ *
* FT_LOAD_TARGET_MONO ::
* Strong hinting algorithm that should only be used for monochrome
* output. The result is probably unpleasant if the glyph is rendered
* in non-monochrome modes.
*
* FT_LOAD_TARGET_LCD ::
- * A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally
+ * A variant of @FT_LOAD_TARGET_LIGHT optimized for horizontally
* decimated LCD displays.
*
* FT_LOAD_TARGET_LCD_V ::
@@ -2939,6 +3112,13 @@ FT_BEGIN_HEADER
* FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
* }
*
+ * In general, you should stick with one rendering mode. For example,
+ * switching between @FT_LOAD_TARGET_NORMAL and @FT_LOAD_TARGET_MONO
+ * enforces a lot of recomputation for TrueType fonts, which is slow.
+ * Another reason is caching: Selecting a different mode usually causes
+ * changes in both the outlines and the rasterized bitmaps; it is thus
+ * necessary to empty the cache after a mode switch to avoid false hits.
+ *
*/
#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 )
@@ -2968,18 +3148,17 @@ FT_BEGIN_HEADER
/* FT_Set_Transform */
/* */
/* <Description> */
- /* A function used to set the transformation that is applied to glyph */
- /* images when they are loaded into a glyph slot through */
- /* @FT_Load_Glyph. */
+ /* Set the transformation that is applied to glyph images when they */
+ /* are loaded into a glyph slot through @FT_Load_Glyph. */
/* */
/* <InOut> */
/* face :: A handle to the source face object. */
/* */
/* <Input> */
- /* matrix :: A pointer to the transformation's 2x2 matrix. Use~0 for */
- /* the identity matrix. */
- /* delta :: A pointer to the translation vector. Use~0 for the null */
- /* vector. */
+ /* matrix :: A pointer to the transformation's 2x2 matrix. Use NULL */
+ /* for the identity matrix. */
+ /* delta :: A pointer to the translation vector. Use NULL for the */
+ /* null vector. */
/* */
/* <Note> */
/* The transformation is only applied to scalable image formats after */
@@ -3002,9 +3181,8 @@ FT_BEGIN_HEADER
/* FT_Render_Mode */
/* */
/* <Description> */
- /* An enumeration type that lists the render modes supported by */
- /* FreeType~2. Each mode corresponds to a specific type of scanline */
- /* conversion performed on the outline. */
+ /* Render modes supported by FreeType~2. Each mode corresponds to a */
+ /* specific type of scanline conversion performed on the outline. */
/* */
/* For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode' */
/* field in the @FT_GlyphSlotRec structure gives the format of the */
@@ -3017,8 +3195,8 @@ FT_BEGIN_HEADER
/* */
/* <Values> */
/* FT_RENDER_MODE_NORMAL :: */
- /* This is the default render mode; it corresponds to 8-bit */
- /* anti-aliased bitmaps. */
+ /* Default render mode; it corresponds to 8-bit anti-aliased */
+ /* bitmaps. */
/* */
/* FT_RENDER_MODE_LIGHT :: */
/* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only */
@@ -3031,23 +3209,25 @@ FT_BEGIN_HEADER
/* opacity). */
/* */
/* FT_RENDER_MODE_LCD :: */
- /* This mode corresponds to horizontal RGB and BGR sub-pixel */
+ /* This mode corresponds to horizontal RGB and BGR subpixel */
/* displays like LCD screens. It produces 8-bit bitmaps that are */
/* 3~times the width of the original glyph outline in pixels, and */
/* which use the @FT_PIXEL_MODE_LCD mode. */
/* */
/* FT_RENDER_MODE_LCD_V :: */
- /* This mode corresponds to vertical RGB and BGR sub-pixel displays */
+ /* This mode corresponds to vertical RGB and BGR subpixel displays */
/* (like PDA screens, rotated LCD displays, etc.). It produces */
/* 8-bit bitmaps that are 3~times the height of the original */
/* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */
/* */
/* <Note> */
- /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */
- /* filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */
- /* (not active in the default builds). It is up to the caller to */
- /* either call @FT_Library_SetLcdFilter (if available) or do the */
- /* filtering itself. */
+ /* Should you define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your */
+ /* `ftoption.h', which enables patented ClearType-style rendering, */
+ /* the LCD-optimized glyph bitmaps should be filtered to reduce color */
+ /* fringes inherent to this technology. You can either set up LCD */
+ /* filtering with @FT_Library_SetLcdFilter or @FT_Face_Properties, */
+ /* or do the filtering yourself. The default FreeType LCD rendering */
+ /* technology does not require filtering. */
/* */
/* The selected render mode only affects vector glyphs of a font. */
/* Embedded bitmaps often have a different pixel mode like */
@@ -3088,16 +3268,16 @@ FT_BEGIN_HEADER
/* convert. */
/* */
/* <Input> */
- /* render_mode :: This is the render mode used to render the glyph */
- /* image into a bitmap. See @FT_Render_Mode for a */
- /* list of possible values. */
+ /* render_mode :: The render mode used to render the glyph image into */
+ /* a bitmap. See @FT_Render_Mode for a list of */
+ /* possible values. */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
/* <Note> */
/* To get meaningful results, font scaling values must be set with */
- /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */
+ /* functions like @FT_Set_Char_Size before calling `FT_Render_Glyph'. */
/* */
/* When FreeType outputs a bitmap of a glyph, it really outputs an */
/* alpha coverage map. If a pixel is completely covered by a */
@@ -3123,7 +3303,7 @@ FT_BEGIN_HEADER
/* this does not translate to 50% brightness for that pixel on our */
/* sRGB and gamma~2.2 screens. Due to their non-linearity, they */
/* dwell longer in the darks and only a pixel value of about 186 */
- /* results in 50% brightness – 128 ends up too dark on both bright */
+ /* results in 50% brightness -- 128 ends up too dark on both bright */
/* and dark backgrounds. The net result is that dark text looks */
/* burnt-out, pixely and blotchy on bright background, bright text */
/* too frail on dark backgrounds, and colored text on colored */
@@ -3187,17 +3367,15 @@ FT_BEGIN_HEADER
/* FT_Kerning_Mode */
/* */
/* <Description> */
- /* An enumeration used to specify which kerning values to return in */
+ /* An enumeration to specify the format of kerning values returned by */
/* @FT_Get_Kerning. */
/* */
/* <Values> */
/* FT_KERNING_DEFAULT :: Return grid-fitted kerning distances in */
- /* pixels (value is~0). Whether they are */
- /* scaled depends on @FT_LOAD_NO_SCALE. */
+ /* 26.6 fractional pixels. */
/* */
/* FT_KERNING_UNFITTED :: Return un-grid-fitted kerning distances in */
- /* 26.6 fractional pixels. Whether they are */
- /* scaled depends on @FT_LOAD_NO_SCALE. */
+ /* 26.6 fractional pixels. */
/* */
/* FT_KERNING_UNSCALED :: Return the kerning vector in original font */
/* units. */
@@ -3207,9 +3385,13 @@ FT_BEGIN_HEADER
/* FreeType heuristically scale down kerning distances at small ppem */
/* values so that they don't become too big. */
/* */
+ /* Both FT_KERNING_DEFAULT and FT_KERNING_UNFITTED use the current */
+ /* horizontal scaling factor (as set e.g. with @FT_Set_Char_Size) to */
+ /* convert font units to pixels. */
+ /* */
typedef enum FT_Kerning_Mode_
{
- FT_KERNING_DEFAULT = 0,
+ FT_KERNING_DEFAULT = 0,
FT_KERNING_UNFITTED,
FT_KERNING_UNSCALED
@@ -3229,7 +3411,7 @@ FT_BEGIN_HEADER
/* FT_Get_Kerning */
/* */
/* <Description> */
- /* Return the kerning vector between two glyphs of a same face. */
+ /* Return the kerning vector between two glyphs of the same face. */
/* */
/* <Input> */
/* face :: A handle to a source face object. */
@@ -3257,6 +3439,10 @@ FT_BEGIN_HEADER
/* kernings, are out of the scope of this API function -- they can be */
/* implemented through format-specific interfaces. */
/* */
+ /* Kerning for OpenType fonts implemented in a `GPOS' table is not */
+ /* supported; use @FT_HAS_KERNING to find out whether a font has data */
+ /* that can be extracted with `FT_Get_Kerning'. */
+ /* */
FT_EXPORT( FT_Error )
FT_Get_Kerning( FT_Face face,
FT_UInt left_glyph,
@@ -3296,7 +3482,7 @@ FT_BEGIN_HEADER
/* @FT_Attach_Stream). */
/* */
/* Only very few AFM files come with track kerning data; please refer */
- /* to the Adobe's AFM specification for more details. */
+ /* to Adobe's AFM specification for more details. */
/* */
FT_EXPORT( FT_Error )
FT_Get_Track_Kerning( FT_Face face,
@@ -3358,7 +3544,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Retrieve the ASCII PostScript name of a given face, if available. */
- /* This only works with PostScript and TrueType fonts. */
+ /* This only works with PostScript, TrueType, and OpenType fonts. */
/* */
/* <Input> */
/* face :: A handle to the source face object. */
@@ -3370,6 +3556,20 @@ FT_BEGIN_HEADER
/* The returned pointer is owned by the face and is destroyed with */
/* it. */
/* */
+ /* For variation fonts, this string changes if you select a different */
+ /* instance, and you have to call `FT_Get_PostScript_Name' again to */
+ /* retrieve it. FreeType follows Adobe TechNote #5902, `Generating */
+ /* PostScript Names for Fonts Using OpenType Font Variations'. */
+ /* */
+ /* https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html */
+ /* */
+ /* [Since 2.9] Special PostScript names for named instances are only */
+ /* returned if the named instance is set with @FT_Set_Named_Instance */
+ /* (and the font has corresponding entries in its `fvar' table). If */
+ /* @FT_IS_VARIATION returns true, the algorithmically derived */
+ /* PostScript name is provided, not looking up special entries for */
+ /* named instances. */
+ /* */
FT_EXPORT( const char* )
FT_Get_Postscript_Name( FT_Face face );
@@ -3429,7 +3629,8 @@ FT_BEGIN_HEADER
/* the face (i.e., if it is not listed in the `face->charmaps' */
/* table). */
/* */
- /* It also fails if a type~14 charmap is selected. */
+ /* It also fails if an OpenType type~14 charmap is selected (which */
+ /* doesn't map character codes to glyph indices at all). */
/* */
FT_EXPORT( FT_Error )
FT_Set_Charmap( FT_Face face,
@@ -3464,7 +3665,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Return the glyph index of a given character code. This function */
- /* uses a charmap object to do the mapping. */
+ /* uses the currently selected charmap to do the mapping. */
/* */
/* <Input> */
/* face :: A handle to the source face object. */
@@ -3498,9 +3699,8 @@ FT_BEGIN_HEADER
/* FT_Get_First_Char */
/* */
/* <Description> */
- /* This function is used to return the first character code in the */
- /* current charmap of a given face. It also returns the */
- /* corresponding glyph index. */
+ /* Return the first character code in the current charmap of a given */
+ /* face, together with its corresponding glyph index. */
/* */
/* <Input> */
/* face :: A handle to the source face object. */
@@ -3513,7 +3713,7 @@ FT_BEGIN_HEADER
/* The charmap's first character code. */
/* */
/* <Note> */
- /* You should use this function with @FT_Get_Next_Char to be able to */
+ /* You should use this function together with @FT_Get_Next_Char to */
/* parse all character codes available in a given charmap. The code */
/* should look like this: */
/* */
@@ -3553,12 +3753,13 @@ FT_BEGIN_HEADER
/* FT_Get_Next_Char */
/* */
/* <Description> */
- /* This function is used to return the next character code in the */
- /* current charmap of a given face following the value `char_code', */
- /* as well as the corresponding glyph index. */
+ /* Return the next character code in the current charmap of a given */
+ /* face following the value `char_code', as well as the corresponding */
+ /* glyph index. */
/* */
/* <Input> */
/* face :: A handle to the source face object. */
+ /* */
/* char_code :: The starting character code. */
/* */
/* <Output> */
@@ -3571,7 +3772,7 @@ FT_BEGIN_HEADER
/* <Note> */
/* You should use this function with @FT_Get_First_Char to walk */
/* over all character codes available in a given charmap. See the */
- /* note for this function for a simple code example. */
+ /* note for that function for a simple code example. */
/* */
/* Note that `*agindex' is set to~0 when there are no more codes in */
/* the charmap. */
@@ -3582,14 +3783,112 @@ FT_BEGIN_HEADER
FT_UInt *agindex );
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Face_Properties
+ *
+ * @description:
+ * Set or override certain (library or module-wide) properties on a
+ * face-by-face basis. Useful for finer-grained control and avoiding
+ * locks on shared structures (threads can modify their own faces as
+ * they see fit).
+ *
+ * Contrary to @FT_Property_Set, this function uses @FT_Parameter so
+ * that you can pass multiple properties to the target face in one call.
+ * Note that only a subset of the available properties can be
+ * controlled.
+ *
+ * * @FT_PARAM_TAG_STEM_DARKENING (stem darkening, corresponding to the
+ * property `no-stem-darkening' provided by the `autofit', `cff',
+ * `type1', and `t1cid' modules; see @no-stem-darkening).
+ *
+ * * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (LCD filter weights, corresponding
+ * to function @FT_Library_SetLcdFilterWeights).
+ *
+ * * @FT_PARAM_TAG_RANDOM_SEED (seed value for the CFF, Type~1, and CID
+ * `random' operator, corresponding to the `random-seed' property
+ * provided by the `cff', `type1', and `t1cid' modules; see
+ * @random-seed).
+ *
+ * Pass NULL as `data' in @FT_Parameter for a given tag to reset the
+ * option and use the library or module default again.
+ *
+ * @input:
+ * face ::
+ * A handle to the source face object.
+ *
+ * num_properties ::
+ * The number of properties that follow.
+ *
+ * properties ::
+ * A handle to an @FT_Parameter array with `num_properties' elements.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * Here an example that sets three properties. You must define
+ * FT_CONFIG_OPTION_SUBPIXEL_RENDERING to make the LCD filter examples
+ * work.
+ *
+ * {
+ * FT_Parameter property1;
+ * FT_Bool darken_stems = 1;
+ *
+ * FT_Parameter property2;
+ * FT_LcdFiveTapFilter custom_weight =
+ * { 0x11, 0x44, 0x56, 0x44, 0x11 };
+ *
+ * FT_Parameter property3;
+ * FT_Int32 random_seed = 314159265;
+ *
+ * FT_Parameter properties[3] = { property1,
+ * property2,
+ * property3 };
+ *
+ *
+ * property1.tag = FT_PARAM_TAG_STEM_DARKENING;
+ * property1.data = &darken_stems;
+ *
+ * property2.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
+ * property2.data = custom_weight;
+ *
+ * property3.tag = FT_PARAM_TAG_RANDOM_SEED;
+ * property3.data = &random_seed;
+ *
+ * FT_Face_Properties( face, 3, properties );
+ * }
+ *
+ * The next example resets a single property to its default value.
+ *
+ * {
+ * FT_Parameter property;
+ *
+ *
+ * property.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
+ * property.data = NULL;
+ *
+ * FT_Face_Properties( face, 1, &property );
+ * }
+ *
+ * @since:
+ * 2.8
+ *
+ */
+ FT_EXPORT( FT_Error )
+ FT_Face_Properties( FT_Face face,
+ FT_UInt num_properties,
+ FT_Parameter* properties );
+
+
/*************************************************************************/
/* */
/* <Function> */
/* FT_Get_Name_Index */
/* */
/* <Description> */
- /* Return the glyph index of a given glyph name. This function uses */
- /* driver specific objects to do the translation. */
+ /* Return the glyph index of a given glyph name. */
/* */
/* <Input> */
/* face :: A handle to the source face object. */
@@ -3610,8 +3909,10 @@ FT_BEGIN_HEADER
* FT_SUBGLYPH_FLAG_XXX
*
* @description:
- * A list of constants used to describe subglyphs. Please refer to the
- * TrueType specification for the meaning of the various flags.
+ * A list of constants describing subglyphs. Please refer to the
+ * `glyf' table description in the OpenType specification for the
+ * meaning of the various flags (which get synthesized for
+ * non-OpenType subglyphs).
*
* @values:
* FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS ::
@@ -3672,7 +3973,7 @@ FT_BEGIN_HEADER
* @note:
* The values of `*p_arg1', `*p_arg2', and `*p_transform' must be
* interpreted depending on the flags returned in `*p_flags'. See the
- * TrueType specification for details.
+ * OpenType specification for details.
*
*/
FT_EXPORT( FT_Error )
@@ -3698,7 +3999,7 @@ FT_BEGIN_HEADER
/* and subsetting restrictions associated with a font. */
/* */
/* See */
- /* http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf */
+ /* https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf */
/* for more details. */
/* */
/* <Values> */
@@ -3712,33 +4013,31 @@ FT_BEGIN_HEADER
/* the font software copyright owner. */
/* */
/* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: */
- /* If this bit is set, the font may be embedded and temporarily */
- /* loaded on the remote system. Documents containing Preview & */
- /* Print fonts must be opened `read-only'; no edits can be applied */
- /* to the document. */
+ /* The font may be embedded and temporarily loaded on the remote */
+ /* system. Documents containing Preview & Print fonts must be */
+ /* opened `read-only'; no edits can be applied to the document. */
/* */
/* FT_FSTYPE_EDITABLE_EMBEDDING :: */
- /* If this bit is set, the font may be embedded but must only be */
- /* installed temporarily on other systems. In contrast to Preview */
- /* & Print fonts, documents containing editable fonts may be opened */
- /* for reading, editing is permitted, and changes may be saved. */
+ /* The font may be embedded but must only be installed temporarily */
+ /* on other systems. In contrast to Preview & Print fonts, */
+ /* documents containing editable fonts may be opened for reading, */
+ /* editing is permitted, and changes may be saved. */
/* */
/* FT_FSTYPE_NO_SUBSETTING :: */
- /* If this bit is set, the font may not be subsetted prior to */
- /* embedding. */
+ /* The font may not be subsetted prior to embedding. */
/* */
/* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */
- /* If this bit is set, only bitmaps contained in the font may be */
- /* embedded; no outline data may be embedded. If there are no */
- /* bitmaps available in the font, then the font is unembeddable. */
+ /* Only bitmaps contained in the font may be embedded; no outline */
+ /* data may be embedded. If there are no bitmaps available in the */
+ /* font, then the font is unembeddable. */
/* */
/* <Note> */
/* The flags are ORed together, thus more than a single value can be */
/* returned. */
/* */
- /* While the fsType flags can indicate that a font may be embedded, a */
- /* license with the font vendor may be separately required to use the */
- /* font in this way. */
+ /* While the `fsType' flags can indicate that a font may be embedded, */
+ /* a license with the font vendor may be separately required to use */
+ /* the font in this way. */
/* */
#define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000
#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002
@@ -3754,13 +4053,13 @@ FT_BEGIN_HEADER
/* FT_Get_FSType_Flags */
/* */
/* <Description> */
- /* Return the fsType flags for a font. */
+ /* Return the `fsType' flags for a font. */
/* */
/* <Input> */
/* face :: A handle to the source face object. */
/* */
/* <Return> */
- /* The fsType flags, @FT_FSTYPE_XXX. */
+ /* The `fsType' flags, see @FT_FSTYPE_XXX. */
/* */
/* <Note> */
/* Use this function rather than directly reading the `fs_type' field */
@@ -3780,39 +4079,51 @@ FT_BEGIN_HEADER
/* glyph_variants */
/* */
/* <Title> */
- /* Glyph Variants */
+ /* Unicode Variation Sequences */
/* */
/* <Abstract> */
- /* The FreeType~2 interface to Unicode Ideographic Variation */
- /* Sequences (IVS), using the SFNT cmap format~14. */
+ /* The FreeType~2 interface to Unicode Variation Sequences (UVS), */
+ /* using the SFNT cmap format~14. */
/* */
/* <Description> */
- /* Many CJK characters have variant forms. They are a sort of grey */
- /* area somewhere between being totally irrelevant and semantically */
- /* distinct; for this reason, the Unicode consortium decided to */
- /* introduce Ideographic Variation Sequences (IVS), consisting of a */
- /* Unicode base character and one of 240 variant selectors */
- /* (U+E0100-U+E01EF), instead of further extending the already huge */
- /* code range for CJK characters. */
- /* */
- /* An IVS is registered and unique; for further details please refer */
- /* to Unicode Technical Standard #37, the Ideographic Variation */
- /* Database: */
- /* */
- /* http://www.unicode.org/reports/tr37/ */
- /* */
- /* To date (November 2014), the character with the most variants is */
- /* U+9089, having 32 such IVS. */
- /* */
- /* Adobe and MS decided to support IVS with a new cmap subtable */
- /* (format~14). It is an odd subtable because it is not a mapping of */
- /* input code points to glyphs, but contains lists of all variants */
- /* supported by the font. */
- /* */
- /* A variant may be either `default' or `non-default'. A default */
- /* variant is the one you will get for that code point if you look it */
- /* up in the standard Unicode cmap. A non-default variant is a */
- /* different glyph. */
+ /* Many characters, especially for CJK scripts, have variant forms. */
+ /* They are a sort of grey area somewhere between being totally */
+ /* irrelevant and semantically distinct; for this reason, the Unicode */
+ /* consortium decided to introduce Variation Sequences (VS), */
+ /* consisting of a Unicode base character and a variation selector */
+ /* instead of further extending the already huge number of */
+ /* characters. */
+ /* */
+ /* Unicode maintains two different sets, namely `Standardized */
+ /* Variation Sequences' and registered `Ideographic Variation */
+ /* Sequences' (IVS), collected in the `Ideographic Variation */
+ /* Database' (IVD). */
+ /* */
+ /* https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt */
+ /* https://unicode.org/reports/tr37/ */
+ /* https://unicode.org/ivd/ */
+ /* */
+ /* To date (January 2017), the character with the most ideographic */
+ /* variations is U+9089, having 32 such IVS. */
+ /* */
+ /* Three Mongolian Variation Selectors have the values U+180B-U+180D; */
+ /* 256 generic Variation Selectors are encoded in the ranges */
+ /* U+FE00-U+FE0F and U+E0100-U+E01EF. IVS currently use Variation */
+ /* Selectors from the range U+E0100-U+E01EF only. */
+ /* */
+ /* A VS consists of the base character value followed by a single */
+ /* Variation Selector. For example, to get the first variation of */
+ /* U+9089, you have to write the character sequence `U+9089 U+E0100'. */
+ /* */
+ /* Adobe and MS decided to support both standardized and ideographic */
+ /* VS with a new cmap subtable (format~14). It is an odd subtable */
+ /* because it is not a mapping of input code points to glyphs, but */
+ /* contains lists of all variations supported by the font. */
+ /* */
+ /* A variation may be either `default' or `non-default' for a given */
+ /* font. A default variation is the one you will get for that code */
+ /* point if you look it up in the standard Unicode cmap. A */
+ /* non-default variation is a different glyph. */
/* */
/*************************************************************************/
@@ -3868,8 +4179,8 @@ FT_BEGIN_HEADER
/* FT_Face_GetCharVariantIsDefault */
/* */
/* <Description> */
- /* Check whether this variant of this Unicode character is the one to */
- /* be found in the `cmap'. */
+ /* Check whether this variation of this Unicode character is the one */
+ /* to be found in the `cmap'. */
/* */
/* <Input> */
/* face :: */
@@ -3883,7 +4194,7 @@ FT_BEGIN_HEADER
/* */
/* <Return> */
/* 1~if found in the standard (Unicode) cmap, 0~if found in the */
- /* variation selector cmap, or -1 if it is not a variant. */
+ /* variation selector cmap, or -1 if it is not a variation. */
/* */
/* <Note> */
/* This function is only meaningful if the font has a variation */
@@ -3904,7 +4215,7 @@ FT_BEGIN_HEADER
/* FT_Face_GetVariantSelectors */
/* */
/* <Description> */
- /* Return a zero-terminated list of Unicode variant selectors found */
+ /* Return a zero-terminated list of Unicode variation selectors found */
/* in the font. */
/* */
/* <Input> */
@@ -3913,7 +4224,7 @@ FT_BEGIN_HEADER
/* */
/* <Return> */
/* A pointer to an array of selector code points, or NULL if there is */
- /* no valid variant selector cmap subtable. */
+ /* no valid variation selector cmap subtable. */
/* */
/* <Note> */
/* The last item in the array is~0; the array is owned by the */
@@ -3933,7 +4244,7 @@ FT_BEGIN_HEADER
/* FT_Face_GetVariantsOfChar */
/* */
/* <Description> */
- /* Return a zero-terminated list of Unicode variant selectors found */
+ /* Return a zero-terminated list of Unicode variation selectors found */
/* for the specified character code. */
/* */
/* <Input> */
@@ -3944,7 +4255,7 @@ FT_BEGIN_HEADER
/* The character codepoint in Unicode. */
/* */
/* <Return> */
- /* A pointer to an array of variant selector code points that are */
+ /* A pointer to an array of variation selector code points that are */
/* active for the given character, or NULL if the corresponding list */
/* is empty. */
/* */
@@ -3968,19 +4279,19 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Return a zero-terminated list of Unicode character codes found for */
- /* the specified variant selector. */
+ /* the specified variation selector. */
/* */
/* <Input> */
/* face :: */
/* A handle to the source face object. */
/* */
/* variantSelector :: */
- /* The variant selector code point in Unicode. */
+ /* The variation selector code point in Unicode. */
/* */
/* <Return> */
/* A list of all the code points that are specified by this selector */
/* (both default and non-default codes are returned) or NULL if there */
- /* is no valid cmap or the variant selector is invalid. */
+ /* is no valid cmap or the variation selector is invalid. */
/* */
/* <Note> */
/* The last item in the array is~0; the array is owned by the */
@@ -4030,16 +4341,17 @@ FT_BEGIN_HEADER
/* FT_MulDiv */
/* */
/* <Description> */
- /* A very simple function used to perform the computation `(a*b)/c' */
- /* with maximum accuracy (it uses a 64-bit intermediate integer */
- /* whenever necessary). */
+ /* Compute `(a*b)/c' with maximum accuracy, using a 64-bit */
+ /* intermediate integer whenever necessary. */
/* */
/* This function isn't necessarily as fast as some processor specific */
/* operations, but is at least completely portable. */
/* */
/* <Input> */
/* a :: The first multiplier. */
+ /* */
/* b :: The second multiplier. */
+ /* */
/* c :: The divisor. */
/* */
/* <Return> */
@@ -4059,12 +4371,12 @@ FT_BEGIN_HEADER
/* FT_MulFix */
/* */
/* <Description> */
- /* A very simple function used to perform the computation */
- /* `(a*b)/0x10000' with maximum accuracy. Most of the time this is */
- /* used to multiply a given value by a 16.16 fixed-point factor. */
+ /* Compute `(a*b)/0x10000' with maximum accuracy. Its main use is to */
+ /* multiply a given value by a 16.16 fixed-point factor. */
/* */
/* <Input> */
/* a :: The first multiplier. */
+ /* */
/* b :: The second multiplier. Use a 16.16 factor here whenever */
/* possible (see note below). */
/* */
@@ -4093,12 +4405,12 @@ FT_BEGIN_HEADER
/* FT_DivFix */
/* */
/* <Description> */
- /* A very simple function used to perform the computation */
- /* `(a*0x10000)/b' with maximum accuracy. Most of the time, this is */
- /* used to divide a given value by a 16.16 fixed-point factor. */
+ /* Compute `(a*0x10000)/b' with maximum accuracy. Its main use is to */
+ /* divide a given value by a 16.16 fixed-point factor. */
/* */
/* <Input> */
/* a :: The numerator. */
+ /* */
/* b :: The denominator. Use a 16.16 factor here. */
/* */
/* <Return> */
@@ -4115,15 +4427,18 @@ FT_BEGIN_HEADER
/* FT_RoundFix */
/* */
/* <Description> */
- /* A very simple function used to round a 16.16 fixed number. */
+ /* Round a 16.16 fixed number. */
/* */
/* <Input> */
/* a :: The number to be rounded. */
/* */
/* <Return> */
- /* `a' rounded to nearest 16.16 fixed integer, halfway cases away */
+ /* `a' rounded to the nearest 16.16 fixed integer, halfway cases away */
/* from zero. */
/* */
+ /* <Note> */
+ /* The function uses wrap-around arithmetic. */
+ /* */
FT_EXPORT( FT_Fixed )
FT_RoundFix( FT_Fixed a );
@@ -4134,8 +4449,7 @@ FT_BEGIN_HEADER
/* FT_CeilFix */
/* */
/* <Description> */
- /* A very simple function used to compute the ceiling function of a */
- /* 16.16 fixed number. */
+ /* Compute the smallest following integer of a 16.16 fixed number. */
/* */
/* <Input> */
/* a :: The number for which the ceiling function is to be computed. */
@@ -4143,6 +4457,9 @@ FT_BEGIN_HEADER
/* <Return> */
/* `a' rounded towards plus infinity. */
/* */
+ /* <Note> */
+ /* The function uses wrap-around arithmetic. */
+ /* */
FT_EXPORT( FT_Fixed )
FT_CeilFix( FT_Fixed a );
@@ -4153,8 +4470,7 @@ FT_BEGIN_HEADER
/* FT_FloorFix */
/* */
/* <Description> */
- /* A very simple function used to compute the floor function of a */
- /* 16.16 fixed number. */
+ /* Compute the largest previous integer of a 16.16 fixed number. */
/* */
/* <Input> */
/* a :: The number for which the floor function is to be computed. */
@@ -4240,7 +4556,7 @@ FT_BEGIN_HEADER
*
*/
#define FREETYPE_MAJOR 2
-#define FREETYPE_MINOR 7
+#define FREETYPE_MINOR 9
#define FREETYPE_PATCH 1
diff --git a/modules/freetype2/include/freetype/ftadvanc.h b/modules/freetype2/include/freetype/ftadvanc.h
index 023dd84b7..f78e8b1a9 100644
--- a/modules/freetype2/include/freetype/ftadvanc.h
+++ b/modules/freetype2/include/freetype/ftadvanc.h
@@ -4,7 +4,7 @@
/* */
/* Quick computation of advance widths (specification only). */
/* */
-/* Copyright 2008-2016 by */
+/* Copyright 2008-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/ftautoh.h b/modules/freetype2/include/freetype/ftautoh.h
deleted file mode 100644
index 48ff1aa26..000000000
--- a/modules/freetype2/include/freetype/ftautoh.h
+++ /dev/null
@@ -1,511 +0,0 @@
-/***************************************************************************/
-/* */
-/* ftautoh.h */
-/* */
-/* FreeType API for controlling the auto-hinter (specification only). */
-/* */
-/* Copyright 2012-2016 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
-
-
-#ifndef FTAUTOH_H_
-#define FTAUTOH_H_
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * @section:
- * auto_hinter
- *
- * @title:
- * The auto-hinter
- *
- * @abstract:
- * Controlling the auto-hinting module.
- *
- * @description:
- * While FreeType's auto-hinter doesn't expose API functions by itself,
- * it is possible to control its behaviour with @FT_Property_Set and
- * @FT_Property_Get. The following lists the available properties
- * together with the necessary macros and structures.
- *
- * Note that the auto-hinter's module name is `autofitter' for
- * historical reasons.
- *
- */
-
-
- /**************************************************************************
- *
- * @property:
- * glyph-to-script-map
- *
- * @description:
- * *Experimental* *only*
- *
- * The auto-hinter provides various script modules to hint glyphs.
- * Examples of supported scripts are Latin or CJK. Before a glyph is
- * auto-hinted, the Unicode character map of the font gets examined, and
- * the script is then determined based on Unicode character ranges, see
- * below.
- *
- * OpenType fonts, however, often provide much more glyphs than
- * character codes (small caps, superscripts, ligatures, swashes, etc.),
- * to be controlled by so-called `features'. Handling OpenType features
- * can be quite complicated and thus needs a separate library on top of
- * FreeType.
- *
- * The mapping between glyph indices and scripts (in the auto-hinter
- * sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an
- * array with `num_glyphs' elements, as found in the font's @FT_Face
- * structure. The `glyph-to-script-map' property returns a pointer to
- * this array, which can be modified as needed. Note that the
- * modification should happen before the first glyph gets processed by
- * the auto-hinter so that the global analysis of the font shapes
- * actually uses the modified mapping.
- *
- * The following example code demonstrates how to access it (omitting
- * the error handling).
- *
- * {
- * FT_Library library;
- * FT_Face face;
- * FT_Prop_GlyphToScriptMap prop;
- *
- *
- * FT_Init_FreeType( &library );
- * FT_New_Face( library, "foo.ttf", 0, &face );
- *
- * prop.face = face;
- *
- * FT_Property_Get( library, "autofitter",
- * "glyph-to-script-map", &prop );
- *
- * // adjust `prop.map' as needed right here
- *
- * FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
- * }
- *
- */
-
-
- /**************************************************************************
- *
- * @enum:
- * FT_AUTOHINTER_SCRIPT_XXX
- *
- * @description:
- * *Experimental* *only*
- *
- * A list of constants used for the @glyph-to-script-map property to
- * specify the script submodule the auto-hinter should use for hinting a
- * particular glyph.
- *
- * @values:
- * FT_AUTOHINTER_SCRIPT_NONE ::
- * Don't auto-hint this glyph.
- *
- * FT_AUTOHINTER_SCRIPT_LATIN ::
- * Apply the latin auto-hinter. For the auto-hinter, `latin' is a
- * very broad term, including Cyrillic and Greek also since characters
- * from those scripts share the same design constraints.
- *
- * By default, characters from the following Unicode ranges are
- * assigned to this submodule.
- *
- * {
- * U+0020 - U+007F // Basic Latin (no control characters)
- * U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
- * U+0100 - U+017F // Latin Extended-A
- * U+0180 - U+024F // Latin Extended-B
- * U+0250 - U+02AF // IPA Extensions
- * U+02B0 - U+02FF // Spacing Modifier Letters
- * U+0300 - U+036F // Combining Diacritical Marks
- * U+0370 - U+03FF // Greek and Coptic
- * U+0400 - U+04FF // Cyrillic
- * U+0500 - U+052F // Cyrillic Supplement
- * U+1D00 - U+1D7F // Phonetic Extensions
- * U+1D80 - U+1DBF // Phonetic Extensions Supplement
- * U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
- * U+1E00 - U+1EFF // Latin Extended Additional
- * U+1F00 - U+1FFF // Greek Extended
- * U+2000 - U+206F // General Punctuation
- * U+2070 - U+209F // Superscripts and Subscripts
- * U+20A0 - U+20CF // Currency Symbols
- * U+2150 - U+218F // Number Forms
- * U+2460 - U+24FF // Enclosed Alphanumerics
- * U+2C60 - U+2C7F // Latin Extended-C
- * U+2DE0 - U+2DFF // Cyrillic Extended-A
- * U+2E00 - U+2E7F // Supplemental Punctuation
- * U+A640 - U+A69F // Cyrillic Extended-B
- * U+A720 - U+A7FF // Latin Extended-D
- * U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
- * U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
- * U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
- * }
- *
- * FT_AUTOHINTER_SCRIPT_CJK ::
- * Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old
- * Vietnamese, and some other scripts.
- *
- * By default, characters from the following Unicode ranges are
- * assigned to this submodule.
- *
- * {
- * U+1100 - U+11FF // Hangul Jamo
- * U+2E80 - U+2EFF // CJK Radicals Supplement
- * U+2F00 - U+2FDF // Kangxi Radicals
- * U+2FF0 - U+2FFF // Ideographic Description Characters
- * U+3000 - U+303F // CJK Symbols and Punctuation
- * U+3040 - U+309F // Hiragana
- * U+30A0 - U+30FF // Katakana
- * U+3100 - U+312F // Bopomofo
- * U+3130 - U+318F // Hangul Compatibility Jamo
- * U+3190 - U+319F // Kanbun
- * U+31A0 - U+31BF // Bopomofo Extended
- * U+31C0 - U+31EF // CJK Strokes
- * U+31F0 - U+31FF // Katakana Phonetic Extensions
- * U+3200 - U+32FF // Enclosed CJK Letters and Months
- * U+3300 - U+33FF // CJK Compatibility
- * U+3400 - U+4DBF // CJK Unified Ideographs Extension A
- * U+4DC0 - U+4DFF // Yijing Hexagram Symbols
- * U+4E00 - U+9FFF // CJK Unified Ideographs
- * U+A960 - U+A97F // Hangul Jamo Extended-A
- * U+AC00 - U+D7AF // Hangul Syllables
- * U+D7B0 - U+D7FF // Hangul Jamo Extended-B
- * U+F900 - U+FAFF // CJK Compatibility Ideographs
- * U+FE10 - U+FE1F // Vertical forms
- * U+FE30 - U+FE4F // CJK Compatibility Forms
- * U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
- * U+1B000 - U+1B0FF // Kana Supplement
- * U+1D300 - U+1D35F // Tai Xuan Hing Symbols
- * U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
- * U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
- * U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
- * U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
- * U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
- * }
- *
- * FT_AUTOHINTER_SCRIPT_INDIC ::
- * Apply the indic auto-hinter, covering all major scripts from the
- * Indian sub-continent and some other related scripts like Thai, Lao,
- * or Tibetan.
- *
- * By default, characters from the following Unicode ranges are
- * assigned to this submodule.
- *
- * {
- * U+0900 - U+0DFF // Indic Range
- * U+0F00 - U+0FFF // Tibetan
- * U+1900 - U+194F // Limbu
- * U+1B80 - U+1BBF // Sundanese
- * U+A800 - U+A82F // Syloti Nagri
- * U+ABC0 - U+ABFF // Meetei Mayek
- * U+11800 - U+118DF // Sharada
- * }
- *
- * Note that currently Indic support is rudimentary only, missing blue
- * zone support.
- *
- */
-#define FT_AUTOHINTER_SCRIPT_NONE 0
-#define FT_AUTOHINTER_SCRIPT_LATIN 1
-#define FT_AUTOHINTER_SCRIPT_CJK 2
-#define FT_AUTOHINTER_SCRIPT_INDIC 3
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_Prop_GlyphToScriptMap
- *
- * @description:
- * *Experimental* *only*
- *
- * The data exchange structure for the @glyph-to-script-map property.
- *
- */
- typedef struct FT_Prop_GlyphToScriptMap_
- {
- FT_Face face;
- FT_UShort* map;
-
- } FT_Prop_GlyphToScriptMap;
-
-
- /**************************************************************************
- *
- * @property:
- * fallback-script
- *
- * @description:
- * *Experimental* *only*
- *
- * If no auto-hinter script module can be assigned to a glyph, a
- * fallback script gets assigned to it (see also the
- * @glyph-to-script-map property). By default, this is
- * @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property,
- * this fallback value can be changed.
- *
- * {
- * FT_Library library;
- * FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
- *
- *
- * FT_Init_FreeType( &library );
- *
- * FT_Property_Set( library, "autofitter",
- * "fallback-script", &fallback_script );
- * }
- *
- * @note:
- * This property can be used with @FT_Property_Get also.
- *
- * It's important to use the right timing for changing this value: The
- * creation of the glyph-to-script map that eventually uses the
- * fallback script value gets triggered either by setting or reading a
- * face-specific property like @glyph-to-script-map, or by auto-hinting
- * any glyph from that face. In particular, if you have already created
- * an @FT_Face structure but not loaded any glyph (using the
- * auto-hinter), a change of the fallback script will affect this face.
- *
- */
-
-
- /**************************************************************************
- *
- * @property:
- * default-script
- *
- * @description:
- * *Experimental* *only*
- *
- * If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make
- * the HarfBuzz library access OpenType features for getting better
- * glyph coverages, this property sets the (auto-fitter) script to be
- * used for the default (OpenType) script data of a font's GSUB table.
- * Features for the default script are intended for all scripts not
- * explicitly handled in GSUB; an example is a `dlig' feature,
- * containing the combination of the characters `T', `E', and `L' to
- * form a `TEL' ligature.
- *
- * By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the
- * `default-script' property, this default value can be changed.
- *
- * {
- * FT_Library library;
- * FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE;
- *
- *
- * FT_Init_FreeType( &library );
- *
- * FT_Property_Set( library, "autofitter",
- * "default-script", &default_script );
- * }
- *
- * @note:
- * This property can be used with @FT_Property_Get also.
- *
- * It's important to use the right timing for changing this value: The
- * creation of the glyph-to-script map that eventually uses the
- * default script value gets triggered either by setting or reading a
- * face-specific property like @glyph-to-script-map, or by auto-hinting
- * any glyph from that face. In particular, if you have already created
- * an @FT_Face structure but not loaded any glyph (using the
- * auto-hinter), a change of the default script will affect this face.
- *
- */
-
-
- /**************************************************************************
- *
- * @property:
- * increase-x-height
- *
- * @description:
- * For ppem values in the range 6~<= ppem <= `increase-x-height', round
- * up the font's x~height much more often than normally. If the value
- * is set to~0, which is the default, this feature is switched off. Use
- * this property to improve the legibility of small font sizes if
- * necessary.
- *
- * {
- * FT_Library library;
- * FT_Face face;
- * FT_Prop_IncreaseXHeight prop;
- *
- *
- * FT_Init_FreeType( &library );
- * FT_New_Face( library, "foo.ttf", 0, &face );
- * FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
- *
- * prop.face = face;
- * prop.limit = 14;
- *
- * FT_Property_Set( library, "autofitter",
- * "increase-x-height", &prop );
- * }
- *
- * @note:
- * This property can be used with @FT_Property_Get also.
- *
- * Set this value right after calling @FT_Set_Char_Size, but before
- * loading any glyph (using the auto-hinter).
- *
- */
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_Prop_IncreaseXHeight
- *
- * @description:
- * The data exchange structure for the @increase-x-height property.
- *
- */
- typedef struct FT_Prop_IncreaseXHeight_
- {
- FT_Face face;
- FT_UInt limit;
-
- } FT_Prop_IncreaseXHeight;
-
-
- /**************************************************************************
- *
- * @property:
- * warping
- *
- * @description:
- * *Experimental* *only*
- *
- * If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to
- * activate the warp hinting code in the auto-hinter, this property
- * switches warping on and off.
- *
- * Warping only works in `light' auto-hinting mode. The idea of the
- * code is to slightly scale and shift a glyph along the non-hinted
- * dimension (which is usually the horizontal axis) so that as much of
- * its segments are aligned (more or less) to the grid. To find out a
- * glyph's optimal scaling and shifting value, various parameter
- * combinations are tried and scored.
- *
- * By default, warping is off. The example below shows how to switch on
- * warping (omitting the error handling).
- *
- * {
- * FT_Library library;
- * FT_Bool warping = 1;
- *
- *
- * FT_Init_FreeType( &library );
- *
- * FT_Property_Set( library, "autofitter",
- * "warping", &warping );
- * }
- *
- * @note:
- * This property can be used with @FT_Property_Get also.
- *
- * This property can be set via the `FREETYPE_PROPERTIES' environment
- * variable (using values 1 and 0 for `on' and `off', respectively).
- *
- * The warping code can also change advance widths. Have a look at the
- * `lsb_delta' and `rsb_delta' fields in the @FT_GlyphSlotRec structure
- * for details on improving inter-glyph distances while rendering.
- *
- * Since warping is a global property of the auto-hinter it is best to
- * change its value before rendering any face. Otherwise, you should
- * reload all faces that get auto-hinted in `light' hinting mode.
- *
- */
-
-
- /**************************************************************************
- *
- * @property:
- * no-stem-darkening[autofit]
- *
- * @description:
- * *Experimental* *only,* *requires* *linear* *alpha* *blending* *and*
- * *gamma* *correction*
- *
- * Stem darkening emboldens glyphs at smaller sizes to make them more
- * readable on common low-DPI screens when using linear alpha blending
- * and gamma correction, see @FT_Render_Glyph. When not using linear
- * alpha blending and gamma correction, glyphs will appear heavy and
- * fuzzy!
- *
- * Gamma correction essentially lightens fonts since shades of grey are
- * shifted to higher pixel values (=~higher brightness) to match the
- * original intention to the reality of our screens. The side-effect is
- * that glyphs `thin out'. Mac OS~X and Adobe's proprietary font
- * rendering library implement a counter-measure: stem darkening at
- * smaller sizes where shades of gray dominate. By emboldening a glyph
- * slightly in relation to its pixel size, individual pixels get higher
- * coverage of filled-in outlines and are therefore `blacker'. This
- * counteracts the `thinning out' of glyphs, making text remain readable
- * at smaller sizes. All glyphs that pass through the auto-hinter will
- * be emboldened unless this property is set to TRUE.
- *
- * See the description of the CFF driver for algorithmic details. Total
- * consistency with the CFF driver is currently not achieved because the
- * emboldening method differs and glyphs must be scaled down on the
- * Y-axis to keep outline points inside their precomputed blue zones.
- * The smaller the size (especially 9ppem and down), the higher the loss
- * of emboldening versus the CFF driver.
- *
- * This property can be set via the `FREETYPE_PROPERTIES' environment
- * variable similar to the CFF driver.
- *
- */
-
-
- /**************************************************************************
- *
- * @property:
- * darkening-parameters[autofit]
- *
- * @description:
- * *Experimental* *only*
- *
- * See the description of the CFF driver for details. This
- * implementation appropriates the
- * CFF_CONFIG_OPTION_DARKENING_PARAMETER_* #defines for consistency.
- * Note the differences described in @no-stem-darkening[autofit].
- *
- * This property can be set via the `FREETYPE_PROPERTIES' environment
- * variable similar to the CFF driver.
- */
-
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* FTAUTOH_H_ */
-
-
-/* END */
diff --git a/modules/freetype2/include/freetype/ftbbox.h b/modules/freetype2/include/freetype/ftbbox.h
index 2a4d21441..f9eb70b13 100644
--- a/modules/freetype2/include/freetype/ftbbox.h
+++ b/modules/freetype2/include/freetype/ftbbox.h
@@ -4,7 +4,7 @@
/* */
/* FreeType exact bbox computation (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -61,7 +61,7 @@ FT_BEGIN_HEADER
/* Compute the exact bounding box of an outline. This is slower */
/* than computing the control box. However, it uses an advanced */
/* algorithm that returns _very_ quickly when the two boxes */
- /* coincide. Otherwise, the outline Bézier arcs are traversed to */
+ /* coincide. Otherwise, the outline Bezier arcs are traversed to */
/* extract their extrema. */
/* */
/* <Input> */
diff --git a/modules/freetype2/include/freetype/ftbdf.h b/modules/freetype2/include/freetype/ftbdf.h
index 016dba086..1b6dea658 100644
--- a/modules/freetype2/include/freetype/ftbdf.h
+++ b/modules/freetype2/include/freetype/ftbdf.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing BDF-specific strings (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/ftbitmap.h b/modules/freetype2/include/freetype/ftbitmap.h
index 0eac7b9d7..a43187cad 100644
--- a/modules/freetype2/include/freetype/ftbitmap.h
+++ b/modules/freetype2/include/freetype/ftbitmap.h
@@ -4,7 +4,7 @@
/* */
/* FreeType utility functions for bitmaps (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -97,7 +97,7 @@ FT_BEGIN_HEADER
FT_EXPORT( FT_Error )
FT_Bitmap_Copy( FT_Library library,
const FT_Bitmap *source,
- FT_Bitmap *target);
+ FT_Bitmap *target );
/*************************************************************************/
diff --git a/modules/freetype2/include/freetype/ftbzip2.h b/modules/freetype2/include/freetype/ftbzip2.h
index b7f2eee87..6edfa031b 100644
--- a/modules/freetype2/include/freetype/ftbzip2.h
+++ b/modules/freetype2/include/freetype/ftbzip2.h
@@ -4,7 +4,7 @@
/* */
/* Bzip2-compressed stream support. */
/* */
-/* Copyright 2010-2016 by */
+/* Copyright 2010-2018 by */
/* Joel Klinghed. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/ftcache.h b/modules/freetype2/include/freetype/ftcache.h
index 883c88d5d..52d5f00e0 100644
--- a/modules/freetype2/include/freetype/ftcache.h
+++ b/modules/freetype2/include/freetype/ftcache.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache subsystem (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -540,13 +540,6 @@ FT_BEGIN_HEADER
FTC_FaceID face_id );
- /*************************************************************************/
- /* */
- /* <Section> */
- /* cache_subsystem */
- /* */
- /*************************************************************************/
-
/*************************************************************************
*
* @type:
@@ -624,14 +617,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
- /* */
- /* <Section> */
- /* cache_subsystem */
- /* */
- /*************************************************************************/
-
-
- /*************************************************************************/
/*************************************************************************/
/*************************************************************************/
/***** *****/
diff --git a/modules/freetype2/include/freetype/ftcffdrv.h b/modules/freetype2/include/freetype/ftcffdrv.h
deleted file mode 100644
index 8f88cc48f..000000000
--- a/modules/freetype2/include/freetype/ftcffdrv.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/***************************************************************************/
-/* */
-/* ftcffdrv.h */
-/* */
-/* FreeType API for controlling the CFF driver (specification only). */
-/* */
-/* Copyright 2013-2016 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
-
-
-#ifndef FTCFFDRV_H_
-#define FTCFFDRV_H_
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * @section:
- * cff_driver
- *
- * @title:
- * The CFF driver
- *
- * @abstract:
- * Controlling the CFF driver module.
- *
- * @description:
- * While FreeType's CFF driver doesn't expose API functions by itself,
- * it is possible to control its behaviour with @FT_Property_Set and
- * @FT_Property_Get. The list below gives the available properties
- * together with the necessary macros and structures.
- *
- * The CFF driver's module name is `cff'.
- *
- * *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine*
- *
- * The rasterizer is positioning horizontal features (e.g., ascender
- * height & x-height, or crossbars) on the pixel grid and minimizing the
- * amount of antialiasing applied to them, while placing vertical
- * features (vertical stems) on the pixel grid without hinting, thus
- * representing the stem position and weight accurately. Sometimes the
- * vertical stems may be only partially black. In this context,
- * `antialiasing' means that stems are not positioned exactly on pixel
- * borders, causing a fuzzy appearance.
- *
- * There are two principles behind this approach.
- *
- * 1) No hinting in the horizontal direction: Unlike `superhinted'
- * TrueType, which changes glyph widths to accommodate regular
- * inter-glyph spacing, Adobe's approach is `faithful to the design' in
- * representing both the glyph width and the inter-glyph spacing
- * designed for the font. This makes the screen display as close as it
- * can be to the result one would get with infinite resolution, while
- * preserving what is considered the key characteristics of each glyph.
- * Note that the distances between unhinted and grid-fitted positions at
- * small sizes are comparable to kerning values and thus would be
- * noticeable (and distracting) while reading if hinting were applied.
- *
- * One of the reasons to not hint horizontally is antialiasing for LCD
- * screens: The pixel geometry of modern displays supplies three
- * vertical sub-pixels as the eye moves horizontally across each visible
- * pixel. On devices where we can be certain this characteristic is
- * present a rasterizer can take advantage of the sub-pixels to add
- * increments of weight. In Western writing systems this turns out to
- * be the more critical direction anyway; the weights and spacing of
- * vertical stems (see above) are central to Armenian, Cyrillic, Greek,
- * and Latin type designs. Even when the rasterizer uses greyscale
- * antialiasing instead of color (a necessary compromise when one
- * doesn't know the screen characteristics), the unhinted vertical
- * features preserve the design's weight and spacing much better than
- * aliased type would.
- *
- * 2) Alignment in the vertical direction: Weights and spacing along the
- * y~axis are less critical; what is much more important is the visual
- * alignment of related features (like cap-height and x-height). The
- * sense of alignment for these is enhanced by the sharpness of grid-fit
- * edges, while the cruder vertical resolution (full pixels instead of
- * 1/3 pixels) is less of a problem.
- *
- * On the technical side, horizontal alignment zones for ascender,
- * x-height, and other important height values (traditionally called
- * `blue zones') as defined in the font are positioned independently,
- * each being rounded to the nearest pixel edge, taking care of
- * overshoot suppression at small sizes, stem darkening, and scaling.
- *
- * Hstems (this is, hint values defined in the font to help align
- * horizontal features) that fall within a blue zone are said to be
- * `captured' and are aligned to that zone. Uncaptured stems are moved
- * in one of four ways, top edge up or down, bottom edge up or down.
- * Unless there are conflicting hstems, the smallest movement is taken
- * to minimize distortion.
- *
- * @order:
- * hinting-engine[cff]
- * no-stem-darkening[cff]
- * darkening-parameters[cff]
- *
- */
-
-
- /**************************************************************************
- *
- * @property:
- * hinting-engine[cff]
- *
- * @description:
- * Thanks to Adobe, which contributed a new hinting (and parsing)
- * engine, an application can select between `freetype' and `adobe' if
- * compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration
- * macro isn't defined, `hinting-engine' does nothing.
- *
- * The default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is
- * defined, and `adobe' otherwise.
- *
- * The following example code demonstrates how to select Adobe's hinting
- * engine (omitting the error handling).
- *
- * {
- * FT_Library library;
- * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
- *
- *
- * FT_Init_FreeType( &library );
- *
- * FT_Property_Set( library, "cff",
- * "hinting-engine", &hinting_engine );
- * }
- *
- * @note:
- * This property can be used with @FT_Property_Get also.
- *
- * This property can be set via the `FREETYPE_PROPERTIES' environment
- * variable (using values `adobe' or `freetype').
- */
-
-
- /**************************************************************************
- *
- * @enum:
- * FT_CFF_HINTING_XXX
- *
- * @description:
- * A list of constants used for the @hinting-engine[cff] property to
- * select the hinting engine for CFF fonts.
- *
- * @values:
- * FT_CFF_HINTING_FREETYPE ::
- * Use the old FreeType hinting engine.
- *
- * FT_CFF_HINTING_ADOBE ::
- * Use the hinting engine contributed by Adobe.
- *
- */
-#define FT_CFF_HINTING_FREETYPE 0
-#define FT_CFF_HINTING_ADOBE 1
-
-
- /**************************************************************************
- *
- * @property:
- * no-stem-darkening[cff]
- *
- * @description:
- * By default, the Adobe CFF engine darkens stems at smaller sizes,
- * regardless of hinting, to enhance contrast. This feature requires
- * a rendering system with proper gamma correction. Setting this
- * property, stem darkening gets switched off.
- *
- * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
- *
- * {
- * FT_Library library;
- * FT_Bool no_stem_darkening = TRUE;
- *
- *
- * FT_Init_FreeType( &library );
- *
- * FT_Property_Set( library, "cff",
- * "no-stem-darkening", &no_stem_darkening );
- * }
- *
- * @note:
- * This property can be used with @FT_Property_Get also.
- *
- * This property can be set via the `FREETYPE_PROPERTIES' environment
- * variable (using values 1 and 0 for `on' and `off', respectively).
- *
- */
-
-
- /**************************************************************************
- *
- * @property:
- * darkening-parameters[cff]
- *
- * @description:
- * By default, the Adobe CFF engine darkens stems as follows (if the
- * `no-stem-darkening' property isn't set):
- *
- * {
- * stem width <= 0.5px: darkening amount = 0.4px
- * stem width = 1px: darkening amount = 0.275px
- * stem width = 1.667px: darkening amount = 0.275px
- * stem width >= 2.333px: darkening amount = 0px
- * }
- *
- * and piecewise linear in-between. At configuration time, these four
- * control points can be set with the macro
- * `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'. At runtime, the control
- * points can be changed using the `darkening-parameters' property, as
- * the following example demonstrates.
- *
- * {
- * FT_Library library;
- * FT_Int darken_params[8] = { 500, 300, // x1, y1
- * 1000, 200, // x2, y2
- * 1500, 100, // x3, y3
- * 2000, 0 }; // x4, y4
- *
- *
- * FT_Init_FreeType( &library );
- *
- * FT_Property_Set( library, "cff",
- * "darkening-parameters", darken_params );
- * }
- *
- * The x~values give the stem width, and the y~values the darkening
- * amount. The unit is 1000th of pixels. All coordinate values must be
- * positive; the x~values must be monotonically increasing; the
- * y~values must be monotonically decreasing and smaller than or
- * equal to 500 (corresponding to half a pixel); the slope of each
- * linear piece must be shallower than -1 (e.g., -.4).
- *
- * @note:
- * This property can be used with @FT_Property_Get also.
- *
- * This property can be set via the `FREETYPE_PROPERTIES' environment
- * variable, using eight comma-separated integers without spaces. Here
- * the above example, using `\' to break the line for readability.
- *
- * {
- * FREETYPE_PROPERTIES=\
- * cff:darkening-parameters=500,300,1000,200,1500,100,2000,0
- * }
- */
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* FTCFFDRV_H_ */
-
-
-/* END */
diff --git a/modules/freetype2/include/freetype/ftchapters.h b/modules/freetype2/include/freetype/ftchapters.h
index ab4389530..51257bb7c 100644
--- a/modules/freetype2/include/freetype/ftchapters.h
+++ b/modules/freetype2/include/freetype/ftchapters.h
@@ -76,7 +76,11 @@
/* <Sections> */
/* auto_hinter */
/* cff_driver */
+/* t1_cid_driver */
/* tt_driver */
+/* pcf_driver */
+/* properties */
+/* parameter_tags */
/* */
/***************************************************************************/
diff --git a/modules/freetype2/include/freetype/ftcid.h b/modules/freetype2/include/freetype/ftcid.h
index e1bc9fe01..5e9100a67 100644
--- a/modules/freetype2/include/freetype/ftcid.h
+++ b/modules/freetype2/include/freetype/ftcid.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing CID font information (specification). */
/* */
-/* Copyright 2007-2016 by */
+/* Copyright 2007-2018 by */
/* Dereg Clegg and Michael Toftdal. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -87,7 +87,7 @@ FT_BEGIN_HEADER
FT_Get_CID_Registry_Ordering_Supplement( FT_Face face,
const char* *registry,
const char* *ordering,
- FT_Int *supplement);
+ FT_Int *supplement );
/**********************************************************************
diff --git a/modules/freetype2/include/freetype/ftdriver.h b/modules/freetype2/include/freetype/ftdriver.h
new file mode 100644
index 000000000..e90475b2a
--- /dev/null
+++ b/modules/freetype2/include/freetype/ftdriver.h
@@ -0,0 +1,1225 @@
+/***************************************************************************/
+/* */
+/* ftdriver.h */
+/* */
+/* FreeType API for controlling driver modules (specification only). */
+/* */
+/* Copyright 2017-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef FTDRIVER_H_
+#define FTDRIVER_H_
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * auto_hinter
+ *
+ * @title:
+ * The auto-hinter
+ *
+ * @abstract:
+ * Controlling the auto-hinting module.
+ *
+ * @description:
+ * While FreeType's auto-hinter doesn't expose API functions by itself,
+ * it is possible to control its behaviour with @FT_Property_Set and
+ * @FT_Property_Get. The following lists the available properties
+ * together with the necessary macros and structures.
+ *
+ * Note that the auto-hinter's module name is `autofitter' for
+ * historical reasons.
+ *
+ * Available properties are @increase-x-height, @no-stem-darkening
+ * (experimental), @darkening-parameters (experimental), @warping
+ * (experimental), @glyph-to-script-map (experimental), @fallback-script
+ * (experimental), and @default-script (experimental), as documented in
+ * the @properties section.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * cff_driver
+ *
+ * @title:
+ * The CFF driver
+ *
+ * @abstract:
+ * Controlling the CFF driver module.
+ *
+ * @description:
+ * While FreeType's CFF driver doesn't expose API functions by itself,
+ * it is possible to control its behaviour with @FT_Property_Set and
+ * @FT_Property_Get.
+ *
+ * The CFF driver's module name is `cff'.
+ *
+ * Available properties are @hinting-engine, @no-stem-darkening,
+ * @darkening-parameters, and @random-seed, as documented in the
+ * @properties section.
+ *
+ *
+ * *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine*
+ *
+ * The rasterizer is positioning horizontal features (e.g., ascender
+ * height & x-height, or crossbars) on the pixel grid and minimizing the
+ * amount of antialiasing applied to them, while placing vertical
+ * features (vertical stems) on the pixel grid without hinting, thus
+ * representing the stem position and weight accurately. Sometimes the
+ * vertical stems may be only partially black. In this context,
+ * `antialiasing' means that stems are not positioned exactly on pixel
+ * borders, causing a fuzzy appearance.
+ *
+ * There are two principles behind this approach.
+ *
+ * 1) No hinting in the horizontal direction: Unlike `superhinted'
+ * TrueType, which changes glyph widths to accommodate regular
+ * inter-glyph spacing, Adobe's approach is `faithful to the design' in
+ * representing both the glyph width and the inter-glyph spacing
+ * designed for the font. This makes the screen display as close as it
+ * can be to the result one would get with infinite resolution, while
+ * preserving what is considered the key characteristics of each glyph.
+ * Note that the distances between unhinted and grid-fitted positions at
+ * small sizes are comparable to kerning values and thus would be
+ * noticeable (and distracting) while reading if hinting were applied.
+ *
+ * One of the reasons to not hint horizontally is antialiasing for LCD
+ * screens: The pixel geometry of modern displays supplies three
+ * vertical subpixels as the eye moves horizontally across each visible
+ * pixel. On devices where we can be certain this characteristic is
+ * present a rasterizer can take advantage of the subpixels to add
+ * increments of weight. In Western writing systems this turns out to
+ * be the more critical direction anyway; the weights and spacing of
+ * vertical stems (see above) are central to Armenian, Cyrillic, Greek,
+ * and Latin type designs. Even when the rasterizer uses greyscale
+ * antialiasing instead of color (a necessary compromise when one
+ * doesn't know the screen characteristics), the unhinted vertical
+ * features preserve the design's weight and spacing much better than
+ * aliased type would.
+ *
+ * 2) Alignment in the vertical direction: Weights and spacing along the
+ * y~axis are less critical; what is much more important is the visual
+ * alignment of related features (like cap-height and x-height). The
+ * sense of alignment for these is enhanced by the sharpness of grid-fit
+ * edges, while the cruder vertical resolution (full pixels instead of
+ * 1/3 pixels) is less of a problem.
+ *
+ * On the technical side, horizontal alignment zones for ascender,
+ * x-height, and other important height values (traditionally called
+ * `blue zones') as defined in the font are positioned independently,
+ * each being rounded to the nearest pixel edge, taking care of
+ * overshoot suppression at small sizes, stem darkening, and scaling.
+ *
+ * Hstems (this is, hint values defined in the font to help align
+ * horizontal features) that fall within a blue zone are said to be
+ * `captured' and are aligned to that zone. Uncaptured stems are moved
+ * in one of four ways, top edge up or down, bottom edge up or down.
+ * Unless there are conflicting hstems, the smallest movement is taken
+ * to minimize distortion.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * pcf_driver
+ *
+ * @title:
+ * The PCF driver
+ *
+ * @abstract:
+ * Controlling the PCF driver module.
+ *
+ * @description:
+ * While FreeType's PCF driver doesn't expose API functions by itself,
+ * it is possible to control its behaviour with @FT_Property_Set and
+ * @FT_Property_Get. Right now, there is a single property
+ * @no-long-family-names available if FreeType is compiled with
+ * PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
+ *
+ * The PCF driver's module name is `pcf'.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * t1_cid_driver
+ *
+ * @title:
+ * The Type 1 and CID drivers
+ *
+ * @abstract:
+ * Controlling the Type~1 and CID driver modules.
+ *
+ * @description:
+ * It is possible to control the behaviour of FreeType's Type~1 and
+ * Type~1 CID drivers with @FT_Property_Set and @FT_Property_Get.
+ *
+ * Behind the scenes, both drivers use the Adobe CFF engine for hinting;
+ * however, the used properties must be specified separately.
+ *
+ * The Type~1 driver's module name is `type1'; the CID driver's module
+ * name is `t1cid'.
+ *
+ * Available properties are @hinting-engine, @no-stem-darkening,
+ * @darkening-parameters, and @random-seed, as documented in the
+ * @properties section.
+ *
+ * Please see the @cff_driver section for more details on the new
+ * hinting engine.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * tt_driver
+ *
+ * @title:
+ * The TrueType driver
+ *
+ * @abstract:
+ * Controlling the TrueType driver module.
+ *
+ * @description:
+ * While FreeType's TrueType driver doesn't expose API functions by
+ * itself, it is possible to control its behaviour with @FT_Property_Set
+ * and @FT_Property_Get. The following lists the available properties
+ * together with the necessary macros and structures.
+ *
+ * The TrueType driver's module name is `truetype'.
+ *
+ * A single property @interpreter-version is available, as documented in
+ * the @properties section.
+ *
+ * We start with a list of definitions, kindly provided by Greg
+ * Hitchcock.
+ *
+ * _Bi-Level_ _Rendering_
+ *
+ * Monochromatic rendering, exclusively used in the early days of
+ * TrueType by both Apple and Microsoft. Microsoft's GDI interface
+ * supported hinting of the right-side bearing point, such that the
+ * advance width could be non-linear. Most often this was done to
+ * achieve some level of glyph symmetry. To enable reasonable
+ * performance (e.g., not having to run hinting on all glyphs just to
+ * get the widths) there was a bit in the head table indicating if the
+ * side bearing was hinted, and additional tables, `hdmx' and `LTSH', to
+ * cache hinting widths across multiple sizes and device aspect ratios.
+ *
+ * _Font_ _Smoothing_
+ *
+ * Microsoft's GDI implementation of anti-aliasing. Not traditional
+ * anti-aliasing as the outlines were hinted before the sampling. The
+ * widths matched the bi-level rendering.
+ *
+ * _ClearType_ _Rendering_
+ *
+ * Technique that uses physical subpixels to improve rendering on LCD
+ * (and other) displays. Because of the higher resolution, many methods
+ * of improving symmetry in glyphs through hinting the right-side
+ * bearing were no longer necessary. This lead to what GDI calls
+ * `natural widths' ClearType, see
+ * http://www.beatstamm.com/typography/RTRCh4.htm#Sec21. Since hinting
+ * has extra resolution, most non-linearity went away, but it is still
+ * possible for hints to change the advance widths in this mode.
+ *
+ * _ClearType_ _Compatible_ _Widths_
+ *
+ * One of the earliest challenges with ClearType was allowing the
+ * implementation in GDI to be selected without requiring all UI and
+ * documents to reflow. To address this, a compatible method of
+ * rendering ClearType was added where the font hints are executed once
+ * to determine the width in bi-level rendering, and then re-run in
+ * ClearType, with the difference in widths being absorbed in the font
+ * hints for ClearType (mostly in the white space of hints); see
+ * http://www.beatstamm.com/typography/RTRCh4.htm#Sec20. Somewhat by
+ * definition, compatible width ClearType allows for non-linear widths,
+ * but only when the bi-level version has non-linear widths.
+ *
+ * _ClearType_ _Subpixel_ _Positioning_
+ *
+ * One of the nice benefits of ClearType is the ability to more crisply
+ * display fractional widths; unfortunately, the GDI model of integer
+ * bitmaps did not support this. However, the WPF and Direct Write
+ * frameworks do support fractional widths. DWrite calls this `natural
+ * mode', not to be confused with GDI's `natural widths'. Subpixel
+ * positioning, in the current implementation of Direct Write,
+ * unfortunately does not support hinted advance widths, see
+ * http://www.beatstamm.com/typography/RTRCh4.htm#Sec22. Note that the
+ * TrueType interpreter fully allows the advance width to be adjusted in
+ * this mode, just the DWrite client will ignore those changes.
+ *
+ * _ClearType_ _Backward_ _Compatibility_
+ *
+ * This is a set of exceptions made in the TrueType interpreter to
+ * minimize hinting techniques that were problematic with the extra
+ * resolution of ClearType; see
+ * http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and
+ * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx.
+ * This technique is not to be confused with ClearType compatible
+ * widths. ClearType backward compatibility has no direct impact on
+ * changing advance widths, but there might be an indirect impact on
+ * disabling some deltas. This could be worked around in backward
+ * compatibility mode.
+ *
+ * _Native_ _ClearType_ _Mode_
+ *
+ * (Not to be confused with `natural widths'.) This mode removes all
+ * the exceptions in the TrueType interpreter when running with
+ * ClearType. Any issues on widths would still apply, though.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * properties
+ *
+ * @title:
+ * Driver properties
+ *
+ * @abstract:
+ * Controlling driver modules.
+ *
+ * @description:
+ * Driver modules can be controlled by setting and unsetting properties,
+ * using the functions @FT_Property_Set and @FT_Property_Get. This
+ * section documents the available properties, together with auxiliary
+ * macros and structures.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * FT_HINTING_XXX
+ *
+ * @description:
+ * A list of constants used for the @hinting-engine property to
+ * select the hinting engine for CFF, Type~1, and CID fonts.
+ *
+ * @values:
+ * FT_HINTING_FREETYPE ::
+ * Use the old FreeType hinting engine.
+ *
+ * FT_HINTING_ADOBE ::
+ * Use the hinting engine contributed by Adobe.
+ *
+ * @since:
+ * 2.9
+ *
+ */
+#define FT_HINTING_FREETYPE 0
+#define FT_HINTING_ADOBE 1
+
+ /* these constants (introduced in 2.4.12) are deprecated */
+#define FT_CFF_HINTING_FREETYPE FT_HINTING_FREETYPE
+#define FT_CFF_HINTING_ADOBE FT_HINTING_ADOBE
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * hinting-engine
+ *
+ * @description:
+ * Thanks to Adobe, which contributed a new hinting (and parsing)
+ * engine, an application can select between `freetype' and `adobe' if
+ * compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration
+ * macro isn't defined, `hinting-engine' does nothing.
+ *
+ * The same holds for the Type~1 and CID modules if compiled with
+ * T1_CONFIG_OPTION_OLD_ENGINE.
+ *
+ * For the `cff' module, the default engine is `freetype' if
+ * CFF_CONFIG_OPTION_OLD_ENGINE is defined, and `adobe' otherwise.
+ *
+ * For both the `type1' and `t1cid' modules, the default engine is
+ * `freetype' if T1_CONFIG_OPTION_OLD_ENGINE is defined, and `adobe'
+ * otherwise.
+ *
+ * The following example code demonstrates how to select Adobe's hinting
+ * engine for the `cff' module (omitting the error handling).
+ *
+ * {
+ * FT_Library library;
+ * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "cff",
+ * "hinting-engine", &hinting_engine );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * This property can be set via the `FREETYPE_PROPERTIES' environment
+ * variable (using values `adobe' or `freetype').
+ *
+ * @since:
+ * 2.4.12 (for `cff' module)
+ *
+ * 2.9 (for `type1' and `t1cid' modules)
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * no-stem-darkening
+ *
+ * @description:
+ * All glyphs that pass through the auto-hinter will be emboldened
+ * unless this property is set to TRUE. The same is true for the CFF,
+ * Type~1, and CID font modules if the `Adobe' engine is selected (which
+ * is the default).
+ *
+ * Stem darkening emboldens glyphs at smaller sizes to make them more
+ * readable on common low-DPI screens when using linear alpha blending
+ * and gamma correction, see @FT_Render_Glyph. When not using linear
+ * alpha blending and gamma correction, glyphs will appear heavy and
+ * fuzzy!
+ *
+ * Gamma correction essentially lightens fonts since shades of grey are
+ * shifted to higher pixel values (=~higher brightness) to match the
+ * original intention to the reality of our screens. The side-effect is
+ * that glyphs `thin out'. Mac OS~X and Adobe's proprietary font
+ * rendering library implement a counter-measure: stem darkening at
+ * smaller sizes where shades of gray dominate. By emboldening a glyph
+ * slightly in relation to its pixel size, individual pixels get higher
+ * coverage of filled-in outlines and are therefore `blacker'. This
+ * counteracts the `thinning out' of glyphs, making text remain readable
+ * at smaller sizes.
+ *
+ * By default, the Adobe engines for CFF, Type~1, and CID fonts darken
+ * stems at smaller sizes, regardless of hinting, to enhance contrast.
+ * Setting this property, stem darkening gets switched off.
+ *
+ * For the auto-hinter, stem-darkening is experimental currently and
+ * thus switched off by default (this is, `no-stem-darkening' is set to
+ * TRUE by default). Total consistency with the CFF driver is not
+ * achieved right now because the emboldening method differs and glyphs
+ * must be scaled down on the Y-axis to keep outline points inside their
+ * precomputed blue zones. The smaller the size (especially 9ppem and
+ * down), the higher the loss of emboldening versus the CFF driver.
+ *
+ * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is
+ * set.
+ *
+ * {
+ * FT_Library library;
+ * FT_Bool no_stem_darkening = TRUE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "cff",
+ * "no-stem-darkening", &no_stem_darkening );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * This property can be set via the `FREETYPE_PROPERTIES' environment
+ * variable (using values 1 and 0 for `on' and `off', respectively).
+ * It can also be set per face using @FT_Face_Properties with
+ * @FT_PARAM_TAG_STEM_DARKENING.
+ *
+ * @since:
+ * 2.4.12 (for `cff' module)
+ *
+ * 2.6.2 (for `autofitter' module)
+ *
+ * 2.9 (for `type1' and `t1cid' modules)
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * darkening-parameters
+ *
+ * @description:
+ * By default, the Adobe hinting engine, as used by the CFF, Type~1, and
+ * CID font drivers, darkens stems as follows (if the
+ * `no-stem-darkening' property isn't set):
+ *
+ * {
+ * stem width <= 0.5px: darkening amount = 0.4px
+ * stem width = 1px: darkening amount = 0.275px
+ * stem width = 1.667px: darkening amount = 0.275px
+ * stem width >= 2.333px: darkening amount = 0px
+ * }
+ *
+ * and piecewise linear in-between. At configuration time, these four
+ * control points can be set with the macro
+ * `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'; the CFF, Type~1, and CID
+ * drivers share these values. At runtime, the control points can be
+ * changed using the `darkening-parameters' property, as the following
+ * example demonstrates for the Type~1 driver.
+ *
+ * {
+ * FT_Library library;
+ * FT_Int darken_params[8] = { 500, 300, // x1, y1
+ * 1000, 200, // x2, y2
+ * 1500, 100, // x3, y3
+ * 2000, 0 }; // x4, y4
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "type1",
+ * "darkening-parameters", darken_params );
+ * }
+ *
+ * The x~values give the stem width, and the y~values the darkening
+ * amount. The unit is 1000th of pixels. All coordinate values must be
+ * positive; the x~values must be monotonically increasing; the
+ * y~values must be monotonically decreasing and smaller than or
+ * equal to 500 (corresponding to half a pixel); the slope of each
+ * linear piece must be shallower than -1 (e.g., -.4).
+ *
+ * The auto-hinter provides this property, too, as an experimental
+ * feature. See @no-stem-darkening for more.
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * This property can be set via the `FREETYPE_PROPERTIES' environment
+ * variable, using eight comma-separated integers without spaces. Here
+ * the above example, using `\' to break the line for readability.
+ *
+ * {
+ * FREETYPE_PROPERTIES=\
+ * type1:darkening-parameters=500,300,1000,200,1500,100,2000,0
+ * }
+ *
+ * @since:
+ * 2.5.1 (for `cff' module)
+ *
+ * 2.6.2 (for `autofitter' module)
+ *
+ * 2.9 (for `type1' and `t1cid' modules)
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * random-seed
+ *
+ * @description:
+ * By default, the seed value for the CFF `random' operator and the
+ * similar `0 28 callothersubr pop' command for the Type~1 and CID
+ * drivers is set to a random value. However, mainly for debugging
+ * purposes, it is often necessary to use a known value as a seed so
+ * that the pseudo-random number sequences generated by `random' are
+ * repeatable.
+ *
+ * The `random-seed' property does that. Its argument is a signed 32bit
+ * integer; if the value is zero or negative, the seed given by the
+ * `intitialRandomSeed' private DICT operator in a CFF file gets used
+ * (or a default value if there is no such operator). If the value is
+ * positive, use it instead of `initialRandomSeed', which is
+ * consequently ignored.
+ *
+ * @note:
+ * This property can be set via the `FREETYPE_PROPERTIES' environment
+ * variable. It can also be set per face using @FT_Face_Properties with
+ * @FT_PARAM_TAG_RANDOM_SEED.
+ *
+ * @since:
+ * 2.8 (for `cff' module)
+ *
+ * 2.9 (for `type1' and `t1cid' modules)
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * no-long-family-names
+ *
+ * @description:
+ * If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling
+ * FreeType, the PCF driver constructs long family names.
+ *
+ * There are many PCF fonts just called `Fixed' which look completely
+ * different, and which have nothing to do with each other. When
+ * selecting `Fixed' in KDE or Gnome one gets results that appear rather
+ * random, the style changes often if one changes the size and one
+ * cannot select some fonts at all. The improve this situation, the PCF
+ * module prepends the foundry name (plus a space) to the family name.
+ * It also checks whether there are `wide' characters; all put together,
+ * family names like `Sony Fixed' or `Misc Fixed Wide' are constructed.
+ *
+ * If `no-long-family-names' is set, this feature gets switched off.
+ *
+ * {
+ * FT_Library library;
+ * FT_Bool no_long_family_names = TRUE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "pcf",
+ * "no-long-family-names",
+ * &no_long_family_names );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * This property can be set via the `FREETYPE_PROPERTIES' environment
+ * variable (using values 1 and 0 for `on' and `off', respectively).
+ *
+ * @since:
+ * 2.8
+ */
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * TT_INTERPRETER_VERSION_XXX
+ *
+ * @description:
+ * A list of constants used for the @interpreter-version property to
+ * select the hinting engine for Truetype fonts.
+ *
+ * The numeric value in the constant names represents the version
+ * number as returned by the `GETINFO' bytecode instruction.
+ *
+ * @values:
+ * TT_INTERPRETER_VERSION_35 ::
+ * Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in
+ * Windows~98; only grayscale and B/W rasterizing is supported.
+ *
+ * TT_INTERPRETER_VERSION_38 ::
+ * Version~38 corresponds to MS rasterizer v.1.9; it is roughly
+ * equivalent to the hinting provided by DirectWrite ClearType (as can
+ * be found, for example, in the Internet Explorer~9 running on
+ * Windows~7). It is used in FreeType to select the `Infinality'
+ * subpixel hinting code. The code may be removed in a future
+ * version.
+ *
+ * TT_INTERPRETER_VERSION_40 ::
+ * Version~40 corresponds to MS rasterizer v.2.1; it is roughly
+ * equivalent to the hinting provided by DirectWrite ClearType (as can
+ * be found, for example, in Microsoft's Edge Browser on Windows~10).
+ * It is used in FreeType to select the `minimal' subpixel hinting
+ * code, a stripped-down and higher performance version of the
+ * `Infinality' code.
+ *
+ * @note:
+ * This property controls the behaviour of the bytecode interpreter
+ * and thus how outlines get hinted. It does *not* control how glyph
+ * get rasterized! In particular, it does not control subpixel color
+ * filtering.
+ *
+ * If FreeType has not been compiled with the configuration option
+ * TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes
+ * an `FT_Err_Unimplemented_Feature' error.
+ *
+ * Depending on the graphics framework, Microsoft uses different
+ * bytecode and rendering engines. As a consequence, the version
+ * numbers returned by a call to the `GETINFO' bytecode instruction are
+ * more convoluted than desired.
+ *
+ * Here are two tables that try to shed some light on the possible
+ * values for the MS rasterizer engine, together with the additional
+ * features introduced by it.
+ *
+ * {
+ * GETINFO framework version feature
+ * -------------------------------------------------------------------
+ * 3 GDI (Win 3.1), v1.0 16-bit, first version
+ * TrueImage
+ * 33 GDI (Win NT 3.1), v1.5 32-bit
+ * HP Laserjet
+ * 34 GDI (Win 95) v1.6 font smoothing,
+ * new SCANTYPE opcode
+ * 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET
+ * bits in composite glyphs
+ * 36 MGDI (Win CE 2) v1.6+ classic ClearType
+ * 37 GDI (XP and later), v1.8 ClearType
+ * GDI+ old (before Vista)
+ * 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType,
+ * WPF Y-direction ClearType,
+ * additional error checking
+ * 39 DWrite (before Win 8) v2.0 subpixel ClearType flags
+ * in GETINFO opcode,
+ * bug fixes
+ * 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag
+ * DWrite (Win 8) in GETINFO opcode,
+ * Gray ClearType
+ * }
+ *
+ * The `version' field gives a rough orientation only, since some
+ * applications provided certain features much earlier (as an example,
+ * Microsoft Reader used subpixel and Y-direction ClearType already in
+ * Windows 2000). Similarly, updates to a given framework might include
+ * improved hinting support.
+ *
+ * {
+ * version sampling rendering comment
+ * x y x y
+ * --------------------------------------------------------------
+ * v1.0 normal normal B/W B/W bi-level
+ * v1.6 high high gray gray grayscale
+ * v1.8 high normal color-filter B/W (GDI) ClearType
+ * v1.9 high high color-filter gray Color ClearType
+ * v2.1 high normal gray B/W Gray ClearType
+ * v2.1 high high gray gray Gray ClearType
+ * }
+ *
+ * Color and Gray ClearType are the two available variants of
+ * `Y-direction ClearType', meaning grayscale rasterization along the
+ * Y-direction; the name used in the TrueType specification for this
+ * feature is `symmetric smoothing'. `Classic ClearType' is the
+ * original algorithm used before introducing a modified version in
+ * Win~XP. Another name for v1.6's grayscale rendering is `font
+ * smoothing', and `Color ClearType' is sometimes also called `DWrite
+ * ClearType'. To differentiate between today's Color ClearType and the
+ * earlier ClearType variant with B/W rendering along the vertical axis,
+ * the latter is sometimes called `GDI ClearType'.
+ *
+ * `Normal' and `high' sampling describe the (virtual) resolution to
+ * access the rasterized outline after the hinting process. `Normal'
+ * means 1 sample per grid line (i.e., B/W). In the current Microsoft
+ * implementation, `high' means an extra virtual resolution of 16x16 (or
+ * 16x1) grid lines per pixel for bytecode instructions like `MIRP'.
+ * After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid
+ * lines for color filtering if Color ClearType is activated.
+ *
+ * Note that `Gray ClearType' is essentially the same as v1.6's
+ * grayscale rendering. However, the GETINFO instruction handles it
+ * differently: v1.6 returns bit~12 (hinting for grayscale), while v2.1
+ * returns bits~13 (hinting for ClearType), 18 (symmetrical smoothing),
+ * and~19 (Gray ClearType). Also, this mode respects bits 2 and~3 for
+ * the version~1 gasp table exclusively (like Color ClearType), while
+ * v1.6 only respects the values of version~0 (bits 0 and~1).
+ *
+ * Keep in mind that the features of the above interpreter versions
+ * might not map exactly to FreeType features or behavior because it is
+ * a fundamentally different library with different internals.
+ *
+ */
+#define TT_INTERPRETER_VERSION_35 35
+#define TT_INTERPRETER_VERSION_38 38
+#define TT_INTERPRETER_VERSION_40 40
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * interpreter-version
+ *
+ * @description:
+ * Currently, three versions are available, two representing the
+ * bytecode interpreter with subpixel hinting support (old `Infinality'
+ * code and new stripped-down and higher performance `minimal' code) and
+ * one without, respectively. The default is subpixel support if
+ * TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support
+ * otherwise (since it isn't available then).
+ *
+ * If subpixel hinting is on, many TrueType bytecode instructions behave
+ * differently compared to B/W or grayscale rendering (except if `native
+ * ClearType' is selected by the font). Microsoft's main idea is to
+ * render at a much increased horizontal resolution, then sampling down
+ * the created output to subpixel precision. However, many older fonts
+ * are not suited to this and must be specially taken care of by
+ * applying (hardcoded) tweaks in Microsoft's interpreter.
+ *
+ * Details on subpixel hinting and some of the necessary tweaks can be
+ * found in Greg Hitchcock's whitepaper at
+ * `https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'.
+ * Note that FreeType currently doesn't really `subpixel hint' (6x1, 6x2,
+ * or 6x5 supersampling) like discussed in the paper. Depending on the
+ * chosen interpreter, it simply ignores instructions on vertical stems
+ * to arrive at very similar results.
+ *
+ * The following example code demonstrates how to deactivate subpixel
+ * hinting (omitting the error handling).
+ *
+ * {
+ * FT_Library library;
+ * FT_Face face;
+ * FT_UInt interpreter_version = TT_INTERPRETER_VERSION_35;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "truetype",
+ * "interpreter-version",
+ * &interpreter_version );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * This property can be set via the `FREETYPE_PROPERTIES' environment
+ * variable (using values `35', `38', or `40').
+ *
+ * @since:
+ * 2.5
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * glyph-to-script-map
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * The auto-hinter provides various script modules to hint glyphs.
+ * Examples of supported scripts are Latin or CJK. Before a glyph is
+ * auto-hinted, the Unicode character map of the font gets examined, and
+ * the script is then determined based on Unicode character ranges, see
+ * below.
+ *
+ * OpenType fonts, however, often provide much more glyphs than
+ * character codes (small caps, superscripts, ligatures, swashes, etc.),
+ * to be controlled by so-called `features'. Handling OpenType features
+ * can be quite complicated and thus needs a separate library on top of
+ * FreeType.
+ *
+ * The mapping between glyph indices and scripts (in the auto-hinter
+ * sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an
+ * array with `num_glyphs' elements, as found in the font's @FT_Face
+ * structure. The `glyph-to-script-map' property returns a pointer to
+ * this array, which can be modified as needed. Note that the
+ * modification should happen before the first glyph gets processed by
+ * the auto-hinter so that the global analysis of the font shapes
+ * actually uses the modified mapping.
+ *
+ * The following example code demonstrates how to access it (omitting
+ * the error handling).
+ *
+ * {
+ * FT_Library library;
+ * FT_Face face;
+ * FT_Prop_GlyphToScriptMap prop;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ * FT_New_Face( library, "foo.ttf", 0, &face );
+ *
+ * prop.face = face;
+ *
+ * FT_Property_Get( library, "autofitter",
+ * "glyph-to-script-map", &prop );
+ *
+ * // adjust `prop.map' as needed right here
+ *
+ * FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
+ * }
+ *
+ * @since:
+ * 2.4.11
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * FT_AUTOHINTER_SCRIPT_XXX
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * A list of constants used for the @glyph-to-script-map property to
+ * specify the script submodule the auto-hinter should use for hinting a
+ * particular glyph.
+ *
+ * @values:
+ * FT_AUTOHINTER_SCRIPT_NONE ::
+ * Don't auto-hint this glyph.
+ *
+ * FT_AUTOHINTER_SCRIPT_LATIN ::
+ * Apply the latin auto-hinter. For the auto-hinter, `latin' is a
+ * very broad term, including Cyrillic and Greek also since characters
+ * from those scripts share the same design constraints.
+ *
+ * By default, characters from the following Unicode ranges are
+ * assigned to this submodule.
+ *
+ * {
+ * U+0020 - U+007F // Basic Latin (no control characters)
+ * U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
+ * U+0100 - U+017F // Latin Extended-A
+ * U+0180 - U+024F // Latin Extended-B
+ * U+0250 - U+02AF // IPA Extensions
+ * U+02B0 - U+02FF // Spacing Modifier Letters
+ * U+0300 - U+036F // Combining Diacritical Marks
+ * U+0370 - U+03FF // Greek and Coptic
+ * U+0400 - U+04FF // Cyrillic
+ * U+0500 - U+052F // Cyrillic Supplement
+ * U+1D00 - U+1D7F // Phonetic Extensions
+ * U+1D80 - U+1DBF // Phonetic Extensions Supplement
+ * U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
+ * U+1E00 - U+1EFF // Latin Extended Additional
+ * U+1F00 - U+1FFF // Greek Extended
+ * U+2000 - U+206F // General Punctuation
+ * U+2070 - U+209F // Superscripts and Subscripts
+ * U+20A0 - U+20CF // Currency Symbols
+ * U+2150 - U+218F // Number Forms
+ * U+2460 - U+24FF // Enclosed Alphanumerics
+ * U+2C60 - U+2C7F // Latin Extended-C
+ * U+2DE0 - U+2DFF // Cyrillic Extended-A
+ * U+2E00 - U+2E7F // Supplemental Punctuation
+ * U+A640 - U+A69F // Cyrillic Extended-B
+ * U+A720 - U+A7FF // Latin Extended-D
+ * U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
+ * U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
+ * U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
+ * }
+ *
+ * FT_AUTOHINTER_SCRIPT_CJK ::
+ * Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old
+ * Vietnamese, and some other scripts.
+ *
+ * By default, characters from the following Unicode ranges are
+ * assigned to this submodule.
+ *
+ * {
+ * U+1100 - U+11FF // Hangul Jamo
+ * U+2E80 - U+2EFF // CJK Radicals Supplement
+ * U+2F00 - U+2FDF // Kangxi Radicals
+ * U+2FF0 - U+2FFF // Ideographic Description Characters
+ * U+3000 - U+303F // CJK Symbols and Punctuation
+ * U+3040 - U+309F // Hiragana
+ * U+30A0 - U+30FF // Katakana
+ * U+3100 - U+312F // Bopomofo
+ * U+3130 - U+318F // Hangul Compatibility Jamo
+ * U+3190 - U+319F // Kanbun
+ * U+31A0 - U+31BF // Bopomofo Extended
+ * U+31C0 - U+31EF // CJK Strokes
+ * U+31F0 - U+31FF // Katakana Phonetic Extensions
+ * U+3200 - U+32FF // Enclosed CJK Letters and Months
+ * U+3300 - U+33FF // CJK Compatibility
+ * U+3400 - U+4DBF // CJK Unified Ideographs Extension A
+ * U+4DC0 - U+4DFF // Yijing Hexagram Symbols
+ * U+4E00 - U+9FFF // CJK Unified Ideographs
+ * U+A960 - U+A97F // Hangul Jamo Extended-A
+ * U+AC00 - U+D7AF // Hangul Syllables
+ * U+D7B0 - U+D7FF // Hangul Jamo Extended-B
+ * U+F900 - U+FAFF // CJK Compatibility Ideographs
+ * U+FE10 - U+FE1F // Vertical forms
+ * U+FE30 - U+FE4F // CJK Compatibility Forms
+ * U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
+ * U+1B000 - U+1B0FF // Kana Supplement
+ * U+1D300 - U+1D35F // Tai Xuan Hing Symbols
+ * U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
+ * U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
+ * U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
+ * U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
+ * U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
+ * }
+ *
+ * FT_AUTOHINTER_SCRIPT_INDIC ::
+ * Apply the indic auto-hinter, covering all major scripts from the
+ * Indian sub-continent and some other related scripts like Thai, Lao,
+ * or Tibetan.
+ *
+ * By default, characters from the following Unicode ranges are
+ * assigned to this submodule.
+ *
+ * {
+ * U+0900 - U+0DFF // Indic Range
+ * U+0F00 - U+0FFF // Tibetan
+ * U+1900 - U+194F // Limbu
+ * U+1B80 - U+1BBF // Sundanese
+ * U+A800 - U+A82F // Syloti Nagri
+ * U+ABC0 - U+ABFF // Meetei Mayek
+ * U+11800 - U+118DF // Sharada
+ * }
+ *
+ * Note that currently Indic support is rudimentary only, missing blue
+ * zone support.
+ *
+ * @since:
+ * 2.4.11
+ *
+ */
+#define FT_AUTOHINTER_SCRIPT_NONE 0
+#define FT_AUTOHINTER_SCRIPT_LATIN 1
+#define FT_AUTOHINTER_SCRIPT_CJK 2
+#define FT_AUTOHINTER_SCRIPT_INDIC 3
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_Prop_GlyphToScriptMap
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * The data exchange structure for the @glyph-to-script-map property.
+ *
+ * @since:
+ * 2.4.11
+ *
+ */
+ typedef struct FT_Prop_GlyphToScriptMap_
+ {
+ FT_Face face;
+ FT_UShort* map;
+
+ } FT_Prop_GlyphToScriptMap;
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * fallback-script
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * If no auto-hinter script module can be assigned to a glyph, a
+ * fallback script gets assigned to it (see also the
+ * @glyph-to-script-map property). By default, this is
+ * @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property,
+ * this fallback value can be changed.
+ *
+ * {
+ * FT_Library library;
+ * FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "autofitter",
+ * "fallback-script", &fallback_script );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * It's important to use the right timing for changing this value: The
+ * creation of the glyph-to-script map that eventually uses the
+ * fallback script value gets triggered either by setting or reading a
+ * face-specific property like @glyph-to-script-map, or by auto-hinting
+ * any glyph from that face. In particular, if you have already created
+ * an @FT_Face structure but not loaded any glyph (using the
+ * auto-hinter), a change of the fallback script will affect this face.
+ *
+ * @since:
+ * 2.4.11
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * default-script
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make
+ * the HarfBuzz library access OpenType features for getting better
+ * glyph coverages, this property sets the (auto-fitter) script to be
+ * used for the default (OpenType) script data of a font's GSUB table.
+ * Features for the default script are intended for all scripts not
+ * explicitly handled in GSUB; an example is a `dlig' feature,
+ * containing the combination of the characters `T', `E', and `L' to
+ * form a `TEL' ligature.
+ *
+ * By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the
+ * `default-script' property, this default value can be changed.
+ *
+ * {
+ * FT_Library library;
+ * FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "autofitter",
+ * "default-script", &default_script );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * It's important to use the right timing for changing this value: The
+ * creation of the glyph-to-script map that eventually uses the
+ * default script value gets triggered either by setting or reading a
+ * face-specific property like @glyph-to-script-map, or by auto-hinting
+ * any glyph from that face. In particular, if you have already created
+ * an @FT_Face structure but not loaded any glyph (using the
+ * auto-hinter), a change of the default script will affect this face.
+ *
+ * @since:
+ * 2.5.3
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * increase-x-height
+ *
+ * @description:
+ * For ppem values in the range 6~<= ppem <= `increase-x-height', round
+ * up the font's x~height much more often than normally. If the value
+ * is set to~0, which is the default, this feature is switched off. Use
+ * this property to improve the legibility of small font sizes if
+ * necessary.
+ *
+ * {
+ * FT_Library library;
+ * FT_Face face;
+ * FT_Prop_IncreaseXHeight prop;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ * FT_New_Face( library, "foo.ttf", 0, &face );
+ * FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
+ *
+ * prop.face = face;
+ * prop.limit = 14;
+ *
+ * FT_Property_Set( library, "autofitter",
+ * "increase-x-height", &prop );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * Set this value right after calling @FT_Set_Char_Size, but before
+ * loading any glyph (using the auto-hinter).
+ *
+ * @since:
+ * 2.4.11
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_Prop_IncreaseXHeight
+ *
+ * @description:
+ * The data exchange structure for the @increase-x-height property.
+ *
+ */
+ typedef struct FT_Prop_IncreaseXHeight_
+ {
+ FT_Face face;
+ FT_UInt limit;
+
+ } FT_Prop_IncreaseXHeight;
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * warping
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to
+ * activate the warp hinting code in the auto-hinter, this property
+ * switches warping on and off.
+ *
+ * Warping only works in `normal' auto-hinting mode replacing it.
+ * The idea of the code is to slightly scale and shift a glyph along
+ * the non-hinted dimension (which is usually the horizontal axis) so
+ * that as much of its segments are aligned (more or less) to the grid.
+ * To find out a glyph's optimal scaling and shifting value, various
+ * parameter combinations are tried and scored.
+ *
+ * By default, warping is off. The example below shows how to switch on
+ * warping (omitting the error handling).
+ *
+ * {
+ * FT_Library library;
+ * FT_Bool warping = 1;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "autofitter",
+ * "warping", &warping );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * This property can be set via the `FREETYPE_PROPERTIES' environment
+ * variable (using values 1 and 0 for `on' and `off', respectively).
+ *
+ * The warping code can also change advance widths. Have a look at the
+ * `lsb_delta' and `rsb_delta' fields in the @FT_GlyphSlotRec structure
+ * for details on improving inter-glyph distances while rendering.
+ *
+ * Since warping is a global property of the auto-hinter it is best to
+ * change its value before rendering any face. Otherwise, you should
+ * reload all faces that get auto-hinted in `normal' hinting mode.
+ *
+ * @since:
+ * 2.6
+ *
+ */
+
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* FTDRIVER_H_ */
+
+
+/* END */
diff --git a/modules/freetype2/include/freetype/fterrdef.h b/modules/freetype2/include/freetype/fterrdef.h
index 3f53dd582..8ffd346ca 100644
--- a/modules/freetype2/include/freetype/fterrdef.h
+++ b/modules/freetype2/include/freetype/fterrdef.h
@@ -4,7 +4,7 @@
/* */
/* FreeType error codes (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -231,6 +231,10 @@
"invalid PostScript (post) table format" )
FT_ERRORDEF_( Invalid_Post_Table, 0x9B,
"invalid PostScript (post) table" )
+ FT_ERRORDEF_( DEF_In_Glyf_Bytecode, 0x9C,
+ "found FDEF or IDEF opcode in glyf bytecode" )
+ FT_ERRORDEF_( Missing_Bitmap, 0x9D,
+ "missing bitmap in strike" )
/* CFF, CID, and Type 1 errors */
diff --git a/modules/freetype2/include/freetype/fterrors.h b/modules/freetype2/include/freetype/fterrors.h
index e15bfb001..f6ee5c24e 100644
--- a/modules/freetype2/include/freetype/fterrors.h
+++ b/modules/freetype2/include/freetype/fterrors.h
@@ -4,7 +4,7 @@
/* */
/* FreeType error code handling (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -38,15 +38,15 @@
/* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */
/* defined in `ftoption.h' in order to make the higher byte indicate */
/* the module where the error has happened (this is not compatible */
- /* with standard builds of FreeType&nbsp;2, however). See the file */
+ /* with standard builds of FreeType~2, however). See the file */
/* `ftmoderr.h' for more details. */
/* */
/* *Error* *Message* *Strings* */
/* */
/* Error definitions are set up with special macros that allow client */
/* applications to build a table of error message strings. The */
- /* strings are not included in a normal build of FreeType&nbsp;2 to */
- /* save space (most client applications do not use them). */
+ /* strings are not included in a normal build of FreeType~2 to save */
+ /* space (most client applications do not use them). */
/* */
/* To do so, you have to define the following macros before including */
/* this file. */
@@ -106,7 +106,7 @@
/* */
/* #undefine __FTERRORS_H__ */
/* */
- /* work for backwards compatibility. */
+ /* work for backward compatibility. */
/* */
#if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) )
#define FTERRORS_H_
diff --git a/modules/freetype2/include/freetype/ftfntfmt.h b/modules/freetype2/include/freetype/ftfntfmt.h
index bd423247b..cc86efac2 100644
--- a/modules/freetype2/include/freetype/ftfntfmt.h
+++ b/modules/freetype2/include/freetype/ftfntfmt.h
@@ -4,7 +4,7 @@
/* */
/* Support functions for font formats. */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/ftgasp.h b/modules/freetype2/include/freetype/ftgasp.h
index 3f5b3bc69..fc1248ff4 100644
--- a/modules/freetype2/include/freetype/ftgasp.h
+++ b/modules/freetype2/include/freetype/ftgasp.h
@@ -4,7 +4,7 @@
/* */
/* Access of TrueType's `gasp' table (specification). */
/* */
-/* Copyright 2007-2016 by */
+/* Copyright 2007-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,6 +29,9 @@
#endif
+FT_BEGIN_HEADER
+
+
/***************************************************************************
*
* @section:
@@ -92,8 +95,8 @@
#define FT_GASP_NO_TABLE -1
#define FT_GASP_DO_GRIDFIT 0x01
#define FT_GASP_DO_GRAY 0x02
+#define FT_GASP_SYMMETRIC_GRIDFIT 0x04
#define FT_GASP_SYMMETRIC_SMOOTHING 0x08
-#define FT_GASP_SYMMETRIC_GRIDFIT 0x10
/*************************************************************************
@@ -102,17 +105,25 @@
* FT_Get_Gasp
*
* @description:
- * Read the `gasp' table from a TrueType or OpenType font file and
- * return the entry corresponding to a given character pixel size.
+ * For a TrueType or OpenType font file, return the rasterizer behaviour
+ * flags from the font's `gasp' table corresponding to a given
+ * character pixel size.
*
* @input:
* face :: The source face handle.
+ *
* ppem :: The vertical character pixel size.
*
* @return:
* Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
* `gasp' table in the face.
*
+ * @note:
+ * If you want to use the MM functionality of OpenType variation fonts
+ * (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this
+ * function *after* setting an instance since the return values can
+ * change.
+ *
* @since:
* 2.3.0
*/
@@ -123,6 +134,8 @@
/* */
+FT_END_HEADER
+
#endif /* FTGASP_H_ */
diff --git a/modules/freetype2/include/freetype/ftglyph.h b/modules/freetype2/include/freetype/ftglyph.h
index d9840a81f..5f3fc009c 100644
--- a/modules/freetype2/include/freetype/ftglyph.h
+++ b/modules/freetype2/include/freetype/ftglyph.h
@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -231,6 +231,12 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* Because `*aglyph->advance.x' and '*aglyph->advance.y' are 16.16 */
+ /* fixed-point numbers, `slot->advance.x' and `slot->advance.y' */
+ /* (which are in 26.6 fixed-point format) must be in the range */
+ /* ]-32768;32768[. */
+ /* */
FT_EXPORT( FT_Error )
FT_Get_Glyph( FT_GlyphSlot slot,
FT_Glyph *aglyph );
@@ -341,10 +347,10 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Return a glyph's `control box'. The control box encloses all the */
- /* outline's points, including Bézier control points. Though it */
+ /* outline's points, including Bezier control points. Though it */
/* coincides with the exact bounding box for most glyphs, it can be */
/* slightly larger in some situations (like when rotating an outline */
- /* that contains Bézier outside arcs). */
+ /* that contains Bezier outside arcs). */
/* */
/* Computing the control box is very fast, while getting the bounding */
/* box can take much more time as it needs to walk over all segments */
@@ -453,7 +459,7 @@ FT_BEGIN_HEADER
/* */
/* */
/* // load glyph */
- /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */
+ /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT ); */
/* */
/* // extract glyph image */
/* error = FT_Get_Glyph( face->glyph, &glyph ); */
@@ -566,6 +572,9 @@ FT_BEGIN_HEADER
/* <Note> */
/* The result is undefined if either `a' or `b' is zero. */
/* */
+ /* Since the function uses wrap-around arithmetic, results become */
+ /* meaningless if the arguments are very large. */
+ /* */
FT_EXPORT( void )
FT_Matrix_Multiply( const FT_Matrix* a,
FT_Matrix* b );
diff --git a/modules/freetype2/include/freetype/ftgxval.h b/modules/freetype2/include/freetype/ftgxval.h
index a58e86a04..8382d5995 100644
--- a/modules/freetype2/include/freetype/ftgxval.h
+++ b/modules/freetype2/include/freetype/ftgxval.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating TrueTypeGX/AAT tables (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* Masatake YAMATO, Redhat K.K, */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -101,15 +101,15 @@ FT_BEGIN_HEADER
* The number of tables checked in this module. Use it as a parameter
* for the `table-length' argument of function @FT_TrueTypeGX_Validate.
*/
-#define FT_VALIDATE_GX_LENGTH (FT_VALIDATE_GX_LAST_INDEX + 1)
+#define FT_VALIDATE_GX_LENGTH ( FT_VALIDATE_GX_LAST_INDEX + 1 )
/* */
/* Up to 0x1000 is used by otvalid.
Ox2xxx is reserved for feature OT extension. */
-#define FT_VALIDATE_GX_START 0x4000
-#define FT_VALIDATE_GX_BITFIELD( tag ) \
- ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )
+#define FT_VALIDATE_GX_START 0x4000
+#define FT_VALIDATE_GX_BITFIELD( tag ) \
+ ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )
/**********************************************************************
diff --git a/modules/freetype2/include/freetype/ftgzip.h b/modules/freetype2/include/freetype/ftgzip.h
index 3932ce688..db033da0e 100644
--- a/modules/freetype2/include/freetype/ftgzip.h
+++ b/modules/freetype2/include/freetype/ftgzip.h
@@ -4,7 +4,7 @@
/* */
/* Gzip-compressed stream support. */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -129,6 +129,9 @@ FT_BEGIN_HEADER
* @note:
* This function may return `FT_Err_Unimplemented_Feature' if your build
* of FreeType was not compiled with zlib support.
+ *
+ * @since:
+ * 2.5.1
*/
FT_EXPORT( FT_Error )
FT_Gzip_Uncompress( FT_Memory memory,
diff --git a/modules/freetype2/include/freetype/ftimage.h b/modules/freetype2/include/freetype/ftimage.h
index 7b461550c..79ede1959 100644
--- a/modules/freetype2/include/freetype/ftimage.h
+++ b/modules/freetype2/include/freetype/ftimage.h
@@ -5,7 +5,7 @@
/* FreeType glyph image formats and default raster interface */
/* (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -169,13 +169,13 @@ FT_BEGIN_HEADER
/* @FT_RENDER_MODE_LCD_V. */
/* */
/* FT_PIXEL_MODE_BGRA :: */
- /* An image with four 8-bit channels per pixel, representing a */
- /* color image (such as emoticons) with alpha channel. For each */
- /* pixel, the format is BGRA, which means, the blue channel comes */
- /* first in memory. The color channels are pre-multiplied and in */
- /* the sRGB colorspace. For example, full red at half-translucent */
- /* opacity will be represented as `00,00,80,80', not `00,00,FF,80'. */
- /* See also @FT_LOAD_COLOR. */
+ /* [Since 2.5] An image with four 8-bit channels per pixel, */
+ /* representing a color image (such as emoticons) with alpha */
+ /* channel. For each pixel, the format is BGRA, which means, the */
+ /* blue channel comes first in memory. The color channels are */
+ /* pre-multiplied and in the sRGB colorspace. For example, full */
+ /* red at half-translucent opacity will be represented as */
+ /* `00,00,80,80', not `00,00,FF,80'. See also @FT_LOAD_COLOR. */
/* */
typedef enum FT_Pixel_Mode_
{
@@ -301,11 +301,11 @@ FT_BEGIN_HEADER
/* each outline point's type. */
/* */
/* If bit~0 is unset, the point is `off' the curve, */
- /* i.e., a Bézier control point, while it is `on' if */
+ /* i.e., a Bezier control point, while it is `on' if */
/* set. */
/* */
/* Bit~1 is meaningful for `off' points only. If set, */
- /* it indicates a third-order Bézier arc control point; */
+ /* it indicates a third-order Bezier arc control point; */
/* and a second-order control point if unset. */
/* */
/* If bit~2 is set, bits 5-7 contain the drop-out mode */
@@ -532,7 +532,7 @@ FT_BEGIN_HEADER
/* A function pointer type used to describe the signature of a `conic */
/* to' function during outline walking or decomposition. */
/* */
- /* A `conic to' is emitted to indicate a second-order Bézier arc in */
+ /* A `conic to' is emitted to indicate a second-order Bezier arc in */
/* the outline. */
/* */
/* <Input> */
@@ -564,12 +564,12 @@ FT_BEGIN_HEADER
/* A function pointer type used to describe the signature of a `cubic */
/* to' function during outline walking or decomposition. */
/* */
- /* A `cubic to' is emitted to indicate a third-order Bézier arc. */
+ /* A `cubic to' is emitted to indicate a third-order Bezier arc. */
/* */
/* <Input> */
- /* control1 :: A pointer to the first Bézier control point. */
+ /* control1 :: A pointer to the first Bezier control point. */
/* */
- /* control2 :: A pointer to the second Bézier control point. */
+ /* control2 :: A pointer to the second Bezier control point. */
/* */
/* to :: A pointer to the target end point. */
/* */
@@ -595,16 +595,16 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A structure to hold various function pointers used during outline */
- /* decomposition in order to emit segments, conic, and cubic Béziers. */
+ /* decomposition in order to emit segments, conic, and cubic Beziers. */
/* */
/* <Fields> */
/* move_to :: The `move to' emitter. */
/* */
/* line_to :: The segment emitter. */
/* */
- /* conic_to :: The second-order Bézier arc emitter. */
+ /* conic_to :: The second-order Bezier arc emitter. */
/* */
- /* cubic_to :: The third-order Bézier arc emitter. */
+ /* cubic_to :: The third-order Bezier arc emitter. */
/* */
/* shift :: The shift that is applied to coordinates before they */
/* are sent to the emitter. */
@@ -619,7 +619,7 @@ FT_BEGIN_HEADER
/* */
/* { */
/* x' = (x << shift) - delta */
- /* y' = (x << shift) - delta */
+ /* y' = (y << shift) - delta */
/* } */
/* */
/* Set the values of `shift' and `delta' to~0 to get the original */
@@ -701,7 +701,7 @@ FT_BEGIN_HEADER
/* */
/* FT_GLYPH_FORMAT_OUTLINE :: */
/* The glyph image is a vectorial outline made of line segments */
- /* and Bézier arcs; it can be described as an @FT_Outline; you */
+ /* and Bezier arcs; it can be described as an @FT_Outline; you */
/* generally want to access the `outline' field of the */
/* @FT_GlyphSlotRec structure to read it. */
/* */
@@ -1064,24 +1064,24 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* FreeType used to provide an area of memory called the `render */
- /* pool' available to all registered rasters. This was not thread */
- /* safe however and now FreeType never allocates this pool. NULL */
- /* is always passed in as pool_base. */
+ /* pool' available to all registered rasterizers. This was not */
+ /* thread safe, however, and now FreeType never allocates this pool. */
/* */
- /* This function is called each time the render pool changes, or just */
- /* after a new raster object is created. */
+ /* This function is called after a new raster object is created. */
/* */
/* <Input> */
/* raster :: A handle to the new raster object. */
/* */
- /* pool_base :: The address in memory of the render pool. */
+ /* pool_base :: Previously, the address in memory of the render pool. */
+ /* Set this to NULL. */
/* */
- /* pool_size :: The size in bytes of the render pool. */
+ /* pool_size :: Previously, the size in bytes of the render pool. */
+ /* Set this to 0. */
/* */
/* <Note> */
- /* Rasters should ignore the render pool and rely on dynamic or stack */
- /* allocation if they want to (a handle to the memory allocator is */
- /* passed to the raster constructor). */
+ /* Rasterizers should rely on dynamic or stack allocation if they */
+ /* want to (a handle to the memory allocator is passed to the */
+ /* rasterizer constructor). */
/* */
typedef void
(*FT_Raster_ResetFunc)( FT_Raster raster,
diff --git a/modules/freetype2/include/freetype/ftincrem.h b/modules/freetype2/include/freetype/ftincrem.h
index 46b58b791..44619f941 100644
--- a/modules/freetype2/include/freetype/ftincrem.h
+++ b/modules/freetype2/include/freetype/ftincrem.h
@@ -4,7 +4,7 @@
/* */
/* FreeType incremental loading (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,6 +21,7 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -331,18 +332,6 @@ FT_BEGIN_HEADER
typedef FT_Incremental_InterfaceRec* FT_Incremental_Interface;
- /***************************************************************************
- *
- * @constant:
- * FT_PARAM_TAG_INCREMENTAL
- *
- * @description:
- * A constant used as the tag of @FT_Parameter structures to indicate
- * an incremental loading object to be used by FreeType.
- *
- */
-#define FT_PARAM_TAG_INCREMENTAL FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
-
/* */
diff --git a/modules/freetype2/include/freetype/ftlcdfil.h b/modules/freetype2/include/freetype/ftlcdfil.h
index e06a8957f..2a27196cb 100644
--- a/modules/freetype2/include/freetype/ftlcdfil.h
+++ b/modules/freetype2/include/freetype/ftlcdfil.h
@@ -5,7 +5,7 @@
/* FreeType API for color filtering of subpixel bitmap glyphs */
/* (specification). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,7 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -44,9 +45,16 @@ FT_BEGIN_HEADER
* Reduce color fringes of subpixel-rendered bitmaps.
*
* @description:
- * Subpixel rendering exploits the color-striped structure of LCD
- * pixels, increasing the available resolution in the direction of the
- * stripe (usually horizontal RGB) by a factor of~3. Since these
+ * Should you #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your
+ * `ftoption.h', which enables patented ClearType-style rendering,
+ * the LCD-optimized glyph bitmaps should be filtered to reduce color
+ * fringes inherent to this technology. The default FreeType LCD
+ * rendering uses different technology, and API described below,
+ * although available, does nothing.
+ *
+ * ClearType-style LCD rendering exploits the color-striped structure of
+ * LCD pixels, increasing the available resolution in the direction of
+ * the stripe (usually horizontal RGB) by a factor of~3. Since these
* subpixels are color pixels, using them unfiltered creates severe
* color fringes. Use the @FT_Library_SetLcdFilter API to specify a
* low-pass filter, which is then applied to subpixel-rendered bitmaps
@@ -54,12 +62,6 @@ FT_BEGIN_HEADER
* the higher resolution to reduce color fringes, making the glyph image
* slightly blurrier. Positional improvements will remain.
*
- * Note that no filter is active by default, and that this function is
- * *not* implemented in default builds of the library. You need to
- * #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
- * in order to activate it and explicitly call @FT_Library_SetLcdFilter
- * to enable it.
- *
* A filter should have two properties:
*
* 1) It should be normalized, meaning the sum of the 5~components
@@ -268,6 +270,9 @@ FT_BEGIN_HEADER
* defined in your build of the library, which should correspond to all
* default builds of FreeType.
*
+ * LCD filter weights can also be set per face using @FT_Face_Properties
+ * with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS.
+ *
* @since:
* 2.4.0
*/
@@ -275,6 +280,24 @@ FT_BEGIN_HEADER
FT_Library_SetLcdFilterWeights( FT_Library library,
unsigned char *weights );
+
+ /*
+ * @type:
+ * FT_LcdFiveTapFilter
+ *
+ * @description:
+ * A typedef for passing the five LCD filter weights to
+ * @FT_Face_Properties within an @FT_Parameter structure.
+ *
+ * @since:
+ * 2.8
+ *
+ */
+#define FT_LCD_FILTER_FIVE_TAPS 5
+
+ typedef FT_Byte FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS];
+
+
/* */
diff --git a/modules/freetype2/include/freetype/ftlist.h b/modules/freetype2/include/freetype/ftlist.h
index 82f437ac6..117473b96 100644
--- a/modules/freetype2/include/freetype/ftlist.h
+++ b/modules/freetype2/include/freetype/ftlist.h
@@ -4,7 +4,7 @@
/* */
/* Generic list support for FreeType (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/ftlzw.h b/modules/freetype2/include/freetype/ftlzw.h
index 582e2c146..1615912d6 100644
--- a/modules/freetype2/include/freetype/ftlzw.h
+++ b/modules/freetype2/include/freetype/ftlzw.h
@@ -4,7 +4,7 @@
/* */
/* LZW-compressed stream support. */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/ftmac.h b/modules/freetype2/include/freetype/ftmac.h
index adb15cadf..c1e497ca2 100644
--- a/modules/freetype2/include/freetype/ftmac.h
+++ b/modules/freetype2/include/freetype/ftmac.h
@@ -4,7 +4,7 @@
/* */
/* Additional Mac-specific API. */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -35,11 +35,12 @@
FT_BEGIN_HEADER
-/* gcc-3.4.1 and later can warn about functions tagged as deprecated */
+ /* gcc-3.1 and later can warn about functions tagged as deprecated */
#ifndef FT_DEPRECATED_ATTRIBUTE
-#if defined(__GNUC__) && \
- ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
-#define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
+#if defined( __GNUC__ ) && \
+ ( ( __GNUC__ >= 4 ) || \
+ ( ( __GNUC__ == 3 ) && ( __GNUC_MINOR__ >= 1 ) ) )
+#define FT_DEPRECATED_ATTRIBUTE __attribute__(( deprecated ))
#else
#define FT_DEPRECATED_ATTRIBUTE
#endif
diff --git a/modules/freetype2/include/freetype/ftmm.h b/modules/freetype2/include/freetype/ftmm.h
index a0238c5d2..9948102c1 100644
--- a/modules/freetype2/include/freetype/ftmm.h
+++ b/modules/freetype2/include/freetype/ftmm.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Multiple Master font interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -43,11 +43,10 @@ FT_BEGIN_HEADER
/* Master fonts, i.e., the selection of specific design instances by */
/* setting design axis coordinates. */
/* */
- /* George Williams has extended this interface to make it work with */
- /* both Type~1 Multiple Masters fonts and GX distortable (var) */
- /* fonts. Some of these routines only work with MM fonts, others */
- /* will work with both types. They are similar enough that a */
- /* consistent interface makes sense. */
+ /* Besides Adobe MM fonts, the interface supports Apple's TrueType GX */
+ /* and OpenType variation fonts. Some of the routines only work with */
+ /* Adobe MM fonts, others will work with all three types. They are */
+ /* similar enough that a consistent interface makes sense. */
/* */
/*************************************************************************/
@@ -58,10 +57,11 @@ FT_BEGIN_HEADER
/* FT_MM_Axis */
/* */
/* <Description> */
- /* A simple structure used to model a given axis in design space for */
- /* Multiple Masters fonts. */
+ /* A structure to model a given axis in design space for Multiple */
+ /* Masters fonts. */
/* */
- /* This structure can't be used for GX var fonts. */
+ /* This structure can't be used for TrueType GX or OpenType variation */
+ /* fonts. */
/* */
/* <Fields> */
/* name :: The axis's name. */
@@ -85,10 +85,11 @@ FT_BEGIN_HEADER
/* FT_Multi_Master */
/* */
/* <Description> */
- /* A structure used to model the axes and space of a Multiple Masters */
+ /* A structure to model the axes and space of a Multiple Masters */
/* font. */
/* */
- /* This structure can't be used for GX var fonts. */
+ /* This structure can't be used for TrueType GX or OpenType variation */
+ /* fonts. */
/* */
/* <Fields> */
/* num_axis :: Number of axes. Cannot exceed~4. */
@@ -115,27 +116,35 @@ FT_BEGIN_HEADER
/* FT_Var_Axis */
/* */
/* <Description> */
- /* A simple structure used to model a given axis in design space for */
- /* Multiple Masters and GX var fonts. */
+ /* A structure to model a given axis in design space for Multiple */
+ /* Masters, TrueType GX, and OpenType variation fonts. */
/* */
/* <Fields> */
/* name :: The axis's name. */
- /* Not always meaningful for GX. */
+ /* Not always meaningful for TrueType GX or OpenType */
+ /* variation fonts. */
/* */
/* minimum :: The axis's minimum design coordinate. */
/* */
/* def :: The axis's default design coordinate. */
- /* FreeType computes meaningful default values for MM; it */
- /* is then an integer value, not in 16.16 format. */
+ /* FreeType computes meaningful default values for Adobe */
+ /* MM fonts. */
/* */
/* maximum :: The axis's maximum design coordinate. */
/* */
- /* tag :: The axis's tag (the GX equivalent to `name'). */
- /* FreeType provides default values for MM if possible. */
+ /* tag :: The axis's tag (the equivalent to `name' for TrueType */
+ /* GX and OpenType variation fonts). FreeType provides */
+ /* default values for Adobe MM fonts if possible. */
/* */
- /* strid :: The entry in `name' table (another GX version of */
- /* `name'). */
- /* Not meaningful for MM. */
+ /* strid :: The axis name entry in the font's `name' table. This */
+ /* is another (and often better) version of the `name' */
+ /* field for TrueType GX or OpenType variation fonts. Not */
+ /* meaningful for Adobe MM fonts. */
+ /* */
+ /* <Note> */
+ /* The fields `minimum', `def', and `maximum' are 16.16 fractional */
+ /* values for TrueType GX and OpenType variation fonts. For Adobe MM */
+ /* fonts, the values are integers. */
/* */
typedef struct FT_Var_Axis_
{
@@ -157,15 +166,20 @@ FT_BEGIN_HEADER
/* FT_Var_Named_Style */
/* */
/* <Description> */
- /* A simple structure used to model a named style in a GX var font. */
+ /* A structure to model a named instance in a TrueType GX or OpenType */
+ /* variation font. */
/* */
- /* This structure can't be used for MM fonts. */
+ /* This structure can't be used for Adobe MM fonts. */
/* */
/* <Fields> */
- /* coords :: The design coordinates for this style. */
+ /* coords :: The design coordinates for this instance. */
/* This is an array with one entry for each axis. */
/* */
- /* strid :: The entry in `name' table identifying this style. */
+ /* strid :: The entry in `name' table identifying this instance. */
+ /* */
+ /* psid :: The entry in `name' table identifying a PostScript name */
+ /* for this instance. Value 0xFFFF indicates a missing */
+ /* entry. */
/* */
typedef struct FT_Var_Named_Style_
{
@@ -182,17 +196,19 @@ FT_BEGIN_HEADER
/* FT_MM_Var */
/* */
/* <Description> */
- /* A structure used to model the axes and space of a Multiple Masters */
- /* or GX var distortable font. */
+ /* A structure to model the axes and space of an Adobe MM, TrueType */
+ /* GX, or OpenType variation font. */
/* */
- /* Some fields are specific to one format and not to the other. */
+ /* Some fields are specific to one format and not to the others. */
/* */
/* <Fields> */
/* num_axis :: The number of axes. The maximum value is~4 for */
- /* MM; no limit in GX. */
+ /* Adobe MM fonts; no limit in TrueType GX or */
+ /* OpenType variation fonts. */
/* */
/* num_designs :: The number of designs; should be normally */
- /* 2^num_axis for MM fonts. Not meaningful for GX */
+ /* 2^num_axis for Adobe MM fonts. Not meaningful */
+ /* for TrueType GX or OpenType variation fonts */
/* (where every glyph could have a different */
/* number of designs). */
/* */
@@ -200,21 +216,23 @@ FT_BEGIN_HEADER
/* a tuple of design coordinates that has a string */
/* ID (in the `name' table) associated with it. */
/* The font can tell the user that, for example, */
- /* [Weight=1.5,Width=1.1] is `Bold'. */
+ /* [Weight=1.5,Width=1.1] is `Bold'. Another name */
+ /* for `named style' is `named instance'. */
/* */
- /* For Type 1 Multiple Masters fonts, this value */
- /* is always zero because the format does not */
- /* support named styles. */
+ /* For Adobe Multiple Masters fonts, this value is */
+ /* always zero because the format does not support */
+ /* named styles. */
/* */
/* axis :: An axis descriptor table. */
- /* GX fonts contain slightly more data than MM. */
+ /* TrueType GX and OpenType variation fonts */
+ /* contain slightly more data than Adobe MM fonts. */
/* Memory management of this pointer is done */
/* internally by FreeType. */
/* */
- /* namedstyle :: A named style table. */
- /* Only meaningful with GX. */
- /* Memory management of this pointer is done */
- /* internally by FreeType. */
+ /* namedstyle :: A named style (instance) table. */
+ /* Only meaningful for TrueType GX and OpenType */
+ /* variation fonts. Memory management of this */
+ /* pointer is done internally by FreeType. */
/* */
typedef struct FT_MM_Var_
{
@@ -233,9 +251,10 @@ FT_BEGIN_HEADER
/* FT_Get_Multi_Master */
/* */
/* <Description> */
- /* Retrieve the Multiple Master descriptor of a given font. */
+ /* Retrieve a variation descriptor of a given Adobe MM font. */
/* */
- /* This function can't be used with GX fonts. */
+ /* This function can't be used with TrueType GX or OpenType variation */
+ /* fonts. */
/* */
/* <Input> */
/* face :: A handle to the source face. */
@@ -257,15 +276,17 @@ FT_BEGIN_HEADER
/* FT_Get_MM_Var */
/* */
/* <Description> */
- /* Retrieve the Multiple Master/GX var descriptor of a given font. */
+ /* Retrieve a variation descriptor for a given font. */
+ /* */
+ /* This function works with all supported variation formats. */
/* */
/* <Input> */
/* face :: A handle to the source face. */
/* */
/* <Output> */
- /* amaster :: The Multiple Masters/GX var descriptor. */
+ /* amaster :: The variation descriptor. */
/* Allocates a data structure, which the user must */
- /* deallocate with `free' after use. */
+ /* deallocate with a call to @FT_Done_MM_Var after use. */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
@@ -278,13 +299,34 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
+ /* FT_Done_MM_Var */
+ /* */
+ /* <Description> */
+ /* Free the memory allocated by @FT_Get_MM_Var. */
+ /* */
+ /* <Input> */
+ /* library :: A handle of the face's parent library object that was */
+ /* used in the call to @FT_Get_MM_Var to create `amaster'. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0~means success. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Done_MM_Var( FT_Library library,
+ FT_MM_Var *amaster );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
/* FT_Set_MM_Design_Coordinates */
/* */
/* <Description> */
- /* For Multiple Masters fonts, choose an interpolated font design */
- /* through design coordinates. */
+ /* For Adobe MM fonts, choose an interpolated font design through */
+ /* design coordinates. */
/* */
- /* This function can't be used with GX fonts. */
+ /* This function can't be used with TrueType GX or OpenType variation */
+ /* fonts. */
/* */
/* <InOut> */
/* face :: A handle to the source face. */
@@ -300,6 +342,15 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* [Since 2.8.1] To reset all axes to the default values, call the */
+ /* function with `num_coords' set to zero and `coords' set to NULL. */
+ /* */
+ /* [Since 2.9] If `num_coords' is larger than zero, this function */
+ /* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */
+ /* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */
+ /* is zero, this bit flag gets unset. */
+ /* */
FT_EXPORT( FT_Error )
FT_Set_MM_Design_Coordinates( FT_Face face,
FT_UInt num_coords,
@@ -312,8 +363,9 @@ FT_BEGIN_HEADER
/* FT_Set_Var_Design_Coordinates */
/* */
/* <Description> */
- /* For Multiple Master or GX Var fonts, choose an interpolated font */
- /* design through design coordinates. */
+ /* Choose an interpolated font design through design coordinates. */
+ /* */
+ /* This function works with all supported variation formats. */
/* */
/* <InOut> */
/* face :: A handle to the source face. */
@@ -329,6 +381,17 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* [Since 2.8.1] To reset all axes to the default values, call the */
+ /* function with `num_coords' set to zero and `coords' set to NULL. */
+ /* [Since 2.9] `Default values' means the currently selected named */
+ /* instance (or the base font if no named instance is selected). */
+ /* */
+ /* [Since 2.9] If `num_coords' is larger than zero, this function */
+ /* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */
+ /* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */
+ /* is zero, this bit flag gets unset. */
+ /* */
FT_EXPORT( FT_Error )
FT_Set_Var_Design_Coordinates( FT_Face face,
FT_UInt num_coords,
@@ -341,8 +404,10 @@ FT_BEGIN_HEADER
/* FT_Get_Var_Design_Coordinates */
/* */
/* <Description> */
- /* For Multiple Master and GX Var fonts, get the design coordinates */
- /* of the currently selected interpolated font. */
+ /* Get the design coordinates of the currently selected interpolated */
+ /* font. */
+ /* */
+ /* This function works with all supported variation formats. */
/* */
/* <Input> */
/* face :: A handle to the source face. */
@@ -357,6 +422,9 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Since> */
+ /* 2.7.1 */
+ /* */
FT_EXPORT( FT_Error )
FT_Get_Var_Design_Coordinates( FT_Face face,
FT_UInt num_coords,
@@ -369,8 +437,10 @@ FT_BEGIN_HEADER
/* FT_Set_MM_Blend_Coordinates */
/* */
/* <Description> */
- /* For Multiple Masters and GX var fonts, choose an interpolated font */
- /* design through normalized blend coordinates. */
+ /* Choose an interpolated font design through normalized blend */
+ /* coordinates. */
+ /* */
+ /* This function works with all supported variation formats. */
/* */
/* <InOut> */
/* face :: A handle to the source face. */
@@ -382,12 +452,24 @@ FT_BEGIN_HEADER
/* use default values for the remaining axes. */
/* */
/* coords :: The design coordinates array (each element must be */
- /* between 0 and 1.0 for MM fonts, and between -1.0 and */
- /* 1.0 for GX var fonts). */
+ /* between 0 and 1.0 for Adobe MM fonts, and between */
+ /* -1.0 and 1.0 for TrueType GX and OpenType variation */
+ /* fonts). */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* [Since 2.8.1] To reset all axes to the default values, call the */
+ /* function with `num_coords' set to zero and `coords' set to NULL. */
+ /* [Since 2.9] `Default values' means the currently selected named */
+ /* instance (or the base font if no named instance is selected). */
+ /* */
+ /* [Since 2.9] If `num_coords' is larger than zero, this function */
+ /* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */
+ /* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */
+ /* is zero, this bit flag gets unset. */
+ /* */
FT_EXPORT( FT_Error )
FT_Set_MM_Blend_Coordinates( FT_Face face,
FT_UInt num_coords,
@@ -400,16 +482,18 @@ FT_BEGIN_HEADER
/* FT_Get_MM_Blend_Coordinates */
/* */
/* <Description> */
- /* For Multiple Masters and GX var fonts, get the normalized blend */
- /* coordinates of the currently selected interpolated font. */
+ /* Get the normalized blend coordinates of the currently selected */
+ /* interpolated font. */
+ /* */
+ /* This function works with all supported variation formats. */
/* */
/* <Input> */
/* face :: A handle to the source face. */
/* */
/* num_coords :: The number of normalized blend coordinates to */
/* retrieve. If it is larger than the number of axes, */
- /* set the excess values to~0.5 for MM fonts, and to~0 */
- /* for GX var fonts. */
+ /* set the excess values to~0.5 for Adobe MM fonts, and */
+ /* to~0 for TrueType GX and OpenType variation fonts. */
/* */
/* <Output> */
/* coords :: The normalized blend coordinates array. */
@@ -417,6 +501,9 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Since> */
+ /* 2.7.1 */
+ /* */
FT_EXPORT( FT_Error )
FT_Get_MM_Blend_Coordinates( FT_Face face,
FT_UInt num_coords,
@@ -445,11 +532,101 @@ FT_BEGIN_HEADER
/* <Description> */
/* This is another name of @FT_Get_MM_Blend_Coordinates. */
/* */
+ /* <Since> */
+ /* 2.7.1 */
+ /* */
FT_EXPORT( FT_Error )
FT_Get_Var_Blend_Coordinates( FT_Face face,
FT_UInt num_coords,
FT_Fixed* coords );
+
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
+ /* FT_VAR_AXIS_FLAG_XXX */
+ /* */
+ /* <Description> */
+ /* A list of bit flags used in the return value of */
+ /* @FT_Get_Var_Axis_Flags. */
+ /* */
+ /* <Values> */
+ /* FT_VAR_AXIS_FLAG_HIDDEN :: */
+ /* The variation axis should not be exposed to user interfaces. */
+ /* */
+ /* <Since> */
+ /* 2.8.1 */
+ /* */
+#define FT_VAR_AXIS_FLAG_HIDDEN 1
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Get_Var_Axis_Flags */
+ /* */
+ /* <Description> */
+ /* Get the `flags' field of an OpenType Variation Axis Record. */
+ /* */
+ /* Not meaningful for Adobe MM fonts (`*flags' is always zero). */
+ /* */
+ /* <Input> */
+ /* master :: The variation descriptor. */
+ /* */
+ /* axis_index :: The index of the requested variation axis. */
+ /* */
+ /* <Output> */
+ /* flags :: The `flags' field. See @FT_VAR_AXIS_FLAG_XXX for */
+ /* possible values. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0~means success. */
+ /* */
+ /* <Since> */
+ /* 2.8.1 */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Get_Var_Axis_Flags( FT_MM_Var* master,
+ FT_UInt axis_index,
+ FT_UInt* flags );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Set_Named_Instance */
+ /* */
+ /* <Description> */
+ /* Set or change the current named instance. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to the source face. */
+ /* */
+ /* instance_index :: The index of the requested instance, starting */
+ /* with value 1. If set to value 0, FreeType */
+ /* switches to font access without a named */
+ /* instance. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0~means success. */
+ /* */
+ /* <Note> */
+ /* The function uses the value of `instance_index' to set bits 16-30 */
+ /* of the face's `face_index' field. It also resets any variation */
+ /* applied to the font, and the @FT_FACE_FLAG_VARIATION bit of the */
+ /* face's `face_flags' field gets reset to zero (i.e., */
+ /* @FT_IS_VARIATION will return false). */
+ /* */
+ /* For Adobe MM fonts (which don't have named instances) this */
+ /* function simply resets the current face to the default instance. */
+ /* */
+ /* <Since> */
+ /* 2.9 */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Set_Named_Instance( FT_Face face,
+ FT_UInt instance_index );
+
/* */
diff --git a/modules/freetype2/include/freetype/ftmodapi.h b/modules/freetype2/include/freetype/ftmodapi.h
index b4d2758ef..a6eb876eb 100644
--- a/modules/freetype2/include/freetype/ftmodapi.h
+++ b/modules/freetype2/include/freetype/ftmodapi.h
@@ -4,7 +4,7 @@
/* */
/* FreeType modules public interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -89,6 +89,7 @@ FT_BEGIN_HEADER
/* */
/* FT_Property_Set */
/* FT_Property_Get */
+ /* FT_Set_Default_Properties */
/* */
/* FT_New_Library */
/* FT_Done_Library */
@@ -322,16 +323,15 @@ FT_BEGIN_HEADER
* The module name.
*
* property_name ::
- * The property name. Properties are described in the `Synopsis'
- * subsection of the module's documentation.
+ * The property name. Properties are described in section
+ * @properties.
*
* Note that only a few modules have properties.
*
* value ::
* A generic pointer to a variable or structure that gives the new
* value of the property. The exact definition of `value' is
- * dependent on the property; see the `Synopsis' subsection of the
- * module's documentation.
+ * dependent on the property; see section @properties.
*
* @return:
* FreeType error code. 0~means success.
@@ -389,15 +389,14 @@ FT_BEGIN_HEADER
* The module name.
*
* property_name ::
- * The property name. Properties are described in the `Synopsis'
- * subsection of the module's documentation.
+ * The property name. Properties are described in section
+ * @properties.
*
* @inout:
* value ::
* A generic pointer to a variable or structure that gives the
* value of the property. The exact definition of `value' is
- * dependent on the property; see the `Synopsis' subsection of the
- * module's documentation.
+ * dependent on the property; see section @properties.
*
* @return:
* FreeType error code. 0~means success.
@@ -440,6 +439,50 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
+ /* FT_Set_Default_Properties */
+ /* */
+ /* <Description> */
+ /* If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is */
+ /* set, this function reads the `FREETYPE_PROPERTIES' environment */
+ /* variable to control driver properties. See section @properties */
+ /* for more. */
+ /* */
+ /* If the compilation option is not set, this function does nothing. */
+ /* */
+ /* `FREETYPE_PROPERTIES' has the following syntax form (broken here */
+ /* into multiple lines for better readability). */
+ /* */
+ /* { */
+ /* <optional whitespace> */
+ /* <module-name1> ':' */
+ /* <property-name1> '=' <property-value1> */
+ /* <whitespace> */
+ /* <module-name2> ':' */
+ /* <property-name2> '=' <property-value2> */
+ /* ... */
+ /* } */
+ /* */
+ /* Example: */
+ /* */
+ /* { */
+ /* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ */
+ /* cff:no-stem-darkening=1 \ */
+ /* autofitter:warping=1 */
+ /* } */
+ /* */
+ /* <InOut> */
+ /* library :: A handle to a new library object. */
+ /* */
+ /* <Since> */
+ /* 2.8 */
+ /* */
+ FT_EXPORT( void )
+ FT_Set_Default_Properties( FT_Library library );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
/* FT_Reference_Library */
/* */
/* <Description> */
@@ -477,8 +520,9 @@ FT_BEGIN_HEADER
/* valid for the life of the @FT_Library object. */
/* */
/* Normally, you would call this function (followed by a call to */
- /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */
- /* instead of @FT_Init_FreeType to initialize the FreeType library. */
+ /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module, */
+ /* and a call to @FT_Set_Default_Properties) instead of */
+ /* @FT_Init_FreeType to initialize the FreeType library. */
/* */
/* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */
/* library instance. */
diff --git a/modules/freetype2/include/freetype/ftmoderr.h b/modules/freetype2/include/freetype/ftmoderr.h
index 2a7671c81..e0fc1312b 100644
--- a/modules/freetype2/include/freetype/ftmoderr.h
+++ b/modules/freetype2/include/freetype/ftmoderr.h
@@ -4,7 +4,7 @@
/* */
/* FreeType module error offsets (specification). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/ftotval.h b/modules/freetype2/include/freetype/ftotval.h
index 3e6e18d8a..26731c2b9 100644
--- a/modules/freetype2/include/freetype/ftotval.h
+++ b/modules/freetype2/include/freetype/ftotval.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating OpenType tables (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/ftoutln.h b/modules/freetype2/include/freetype/ftoutln.h
index ef66d48c8..89389a49b 100644
--- a/modules/freetype2/include/freetype/ftoutln.h
+++ b/modules/freetype2/include/freetype/ftoutln.h
@@ -5,7 +5,7 @@
/* Support for the FT_Outline type used to store glyph shapes of */
/* most scalable font formats (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -89,7 +89,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Walk over an outline's structure to decompose it into individual */
- /* segments and Bézier arcs. This function also emits `move to' */
+ /* segments and Bezier arcs. This function also emits `move to' */
/* operations to indicate the start of new contours in the outline. */
/* */
/* <Input> */
@@ -190,9 +190,6 @@ FT_BEGIN_HEADER
/* If the outline's `owner' field is not set, only the outline */
/* descriptor will be released. */
/* */
- /* The reason why this function takes an `library' parameter is */
- /* simply to use ft_mem_free(). */
- /* */
FT_EXPORT( FT_Error )
FT_Outline_Done( FT_Library library,
FT_Outline* outline );
@@ -232,10 +229,10 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Return an outline's `control box'. The control box encloses all */
- /* the outline's points, including Bézier control points. Though it */
+ /* the outline's points, including Bezier control points. Though it */
/* coincides with the exact bounding box for most glyphs, it can be */
/* slightly larger in some situations (like when rotating an outline */
- /* that contains Bézier outside arcs). */
+ /* that contains Bezier outside arcs). */
/* */
/* Computing the control box is very fast, while getting the bounding */
/* box can take much more time as it needs to walk over all segments */
@@ -385,6 +382,9 @@ FT_BEGIN_HEADER
/* @FT_Outline_Embolden, which uses the same strength in both */
/* directions. */
/* */
+ /* <Since> */
+ /* 2.4.10 */
+ /* */
FT_EXPORT( FT_Error )
FT_Outline_EmboldenXY( FT_Outline* outline,
FT_Pos xstrength,
diff --git a/modules/freetype2/include/freetype/ftparams.h b/modules/freetype2/include/freetype/ftparams.h
new file mode 100644
index 000000000..5a9006c50
--- /dev/null
+++ b/modules/freetype2/include/freetype/ftparams.h
@@ -0,0 +1,205 @@
+/***************************************************************************/
+/* */
+/* ftparams.h */
+/* */
+/* FreeType API for possible FT_Parameter tags (specification only). */
+/* */
+/* Copyright 2017-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef FTPARAMS_H_
+#define FTPARAMS_H_
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * parameter_tags
+ *
+ * @title:
+ * Parameter Tags
+ *
+ * @abstract:
+ * Macros for driver property and font loading parameter tags.
+ *
+ * @description:
+ * This section contains macros for the @FT_Parameter structure that are
+ * used with various functions to activate some special functionality or
+ * different behaviour of various components of FreeType.
+ *
+ */
+
+
+ /***************************************************************************
+ *
+ * @constant:
+ * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
+ *
+ * @description:
+ * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
+ * family names in the `name' table (introduced in OpenType version
+ * 1.4). Use this for backward compatibility with legacy systems that
+ * have a four-faces-per-family restriction.
+ *
+ * @since:
+ * 2.8
+ *
+ */
+#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \
+ FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
+
+
+ /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
+ FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
+
+
+ /***************************************************************************
+ *
+ * @constant:
+ * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
+ *
+ * @description:
+ * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
+ * subfamily names in the `name' table (introduced in OpenType version
+ * 1.4). Use this for backward compatibility with legacy systems that
+ * have a four-faces-per-family restriction.
+ *
+ * @since:
+ * 2.8
+ *
+ */
+#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \
+ FT_MAKE_TAG( 'i', 'g', 'p', 's' )
+
+
+ /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
+ FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
+
+
+ /***************************************************************************
+ *
+ * @constant:
+ * FT_PARAM_TAG_INCREMENTAL
+ *
+ * @description:
+ * An @FT_Parameter tag to be used with @FT_Open_Face to indicate
+ * incremental glyph loading.
+ *
+ */
+#define FT_PARAM_TAG_INCREMENTAL \
+ FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
+
+
+ /**************************************************************************
+ *
+ * @constant:
+ * FT_PARAM_TAG_LCD_FILTER_WEIGHTS
+ *
+ * @description:
+ * An @FT_Parameter tag to be used with @FT_Face_Properties. The
+ * corresponding argument specifies the five LCD filter weights for a
+ * given face (if using @FT_LOAD_TARGET_LCD, for example), overriding
+ * the global default values or the values set up with
+ * @FT_Library_SetLcdFilterWeights.
+ *
+ * @since:
+ * 2.8
+ *
+ */
+#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \
+ FT_MAKE_TAG( 'l', 'c', 'd', 'f' )
+
+
+ /**************************************************************************
+ *
+ * @constant:
+ * FT_PARAM_TAG_RANDOM_SEED
+ *
+ * @description:
+ * An @FT_Parameter tag to be used with @FT_Face_Properties. The
+ * corresponding 32bit signed integer argument overrides the font
+ * driver's random seed value with a face-specific one; see
+ * @random-seed.
+ *
+ * @since:
+ * 2.8
+ *
+ */
+#define FT_PARAM_TAG_RANDOM_SEED \
+ FT_MAKE_TAG( 's', 'e', 'e', 'd' )
+
+
+ /**************************************************************************
+ *
+ * @constant:
+ * FT_PARAM_TAG_STEM_DARKENING
+ *
+ * @description:
+ * An @FT_Parameter tag to be used with @FT_Face_Properties. The
+ * corresponding Boolean argument specifies whether to apply stem
+ * darkening, overriding the global default values or the values set up
+ * with @FT_Property_Set (see @no-stem-darkening).
+ *
+ * This is a passive setting that only takes effect if the font driver
+ * or autohinter honors it, which the CFF, Type~1, and CID drivers
+ * always do, but the autohinter only in `light' hinting mode (as of
+ * version 2.9).
+ *
+ * @since:
+ * 2.8
+ *
+ */
+#define FT_PARAM_TAG_STEM_DARKENING \
+ FT_MAKE_TAG( 'd', 'a', 'r', 'k' )
+
+
+ /***************************************************************************
+ *
+ * @constant:
+ * FT_PARAM_TAG_UNPATENTED_HINTING
+ *
+ * @description:
+ * Deprecated, no effect.
+ *
+ * Previously: A constant used as the tag of an @FT_Parameter structure to
+ * indicate that unpatented methods only should be used by the TrueType
+ * bytecode interpreter for a typeface opened by @FT_Open_Face.
+ *
+ */
+#define FT_PARAM_TAG_UNPATENTED_HINTING \
+ FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
+
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* FTPARAMS_H_ */
+
+
+/* END */
diff --git a/modules/freetype2/include/freetype/ftpfr.h b/modules/freetype2/include/freetype/ftpfr.h
index 2e1bff2f6..a69cc482d 100644
--- a/modules/freetype2/include/freetype/ftpfr.h
+++ b/modules/freetype2/include/freetype/ftpfr.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing PFR-specific data (specification only). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -71,7 +71,7 @@ FT_BEGIN_HEADER
*
* ametrics_x_scale ::
* A 16.16 fixed-point number used to scale distance expressed
- * in metrics units to device sub-pixels. This is equivalent to
+ * in metrics units to device subpixels. This is equivalent to
* `face->size->x_scale', but for metrics only. Optional (parameter
* can be NULL).
*
@@ -123,7 +123,7 @@ FT_BEGIN_HEADER
* mode, which always returns distances converted to outline units.
*
* You can use the value of the `x_scale' and `y_scale' parameters
- * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels.
+ * returned by @FT_Get_PFR_Metrics to scale these to device subpixels.
*/
FT_EXPORT( FT_Error )
FT_Get_PFR_Kerning( FT_Face face,
@@ -154,7 +154,7 @@ FT_BEGIN_HEADER
*
* @note:
* You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics
- * to convert the advance to device sub-pixels (i.e., 1/64th of pixels).
+ * to convert the advance to device subpixels (i.e., 1/64th of pixels).
*/
FT_EXPORT( FT_Error )
FT_Get_PFR_Advance( FT_Face face,
diff --git a/modules/freetype2/include/freetype/ftrender.h b/modules/freetype2/include/freetype/ftrender.h
index 278d24a31..fa8ad22b9 100644
--- a/modules/freetype2/include/freetype/ftrender.h
+++ b/modules/freetype2/include/freetype/ftrender.h
@@ -4,7 +4,7 @@
/* */
/* FreeType renderer modules public interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -88,7 +88,7 @@ FT_BEGIN_HEADER
typedef FT_Error
(*FT_Renderer_RenderFunc)( FT_Renderer renderer,
FT_GlyphSlot slot,
- FT_UInt mode,
+ FT_Render_Mode mode,
const FT_Vector* origin );
typedef FT_Error
diff --git a/modules/freetype2/include/freetype/ftsizes.h b/modules/freetype2/include/freetype/ftsizes.h
index 55e0d5ccf..72cb08bf2 100644
--- a/modules/freetype2/include/freetype/ftsizes.h
+++ b/modules/freetype2/include/freetype/ftsizes.h
@@ -4,7 +4,7 @@
/* */
/* FreeType size objects management (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/ftsnames.h b/modules/freetype2/include/freetype/ftsnames.h
index a7b51c2cb..8eb8d70ff 100644
--- a/modules/freetype2/include/freetype/ftsnames.h
+++ b/modules/freetype2/include/freetype/ftsnames.h
@@ -2,12 +2,12 @@
/* */
/* ftsnames.h */
/* */
-/* Simple interface to access SFNT name tables (which are used */
+/* Simple interface to access SFNT `name' tables (which are used */
/* to hold font names, copyright info, notices, etc.) (specification). */
/* */
/* This is _not_ used to retrieve glyph names! */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -25,6 +25,7 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -49,7 +50,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* The TrueType and OpenType specifications allow the inclusion of */
- /* a special `names table' in font files. This table contains */
+ /* a special names table (`name') in font files. This table contains */
/* textual (and internationalized) information regarding the font, */
/* like family name, copyright, version, etc. */
/* */
@@ -70,30 +71,37 @@ FT_BEGIN_HEADER
/* */
/* <Fields> */
/* platform_id :: The platform ID for `string'. */
+ /* See @TT_PLATFORM_XXX for possible values. */
/* */
/* encoding_id :: The encoding ID for `string'. */
+ /* See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */
+ /* @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX */
+ /* for possible values. */
/* */
/* language_id :: The language ID for `string'. */
+ /* See @TT_MAC_LANGID_XXX and @TT_MS_LANGID_XXX for */
+ /* possible values. */
+ /* */
+ /* Registered OpenType values for `language_id' are */
+ /* always smaller than 0x8000; values equal or larger */
+ /* than 0x8000 usually indicate a language tag string */
+ /* (introduced in OpenType version 1.6). Use function */
+ /* @FT_Get_Sfnt_LangTag with `language_id' as its */
+ /* argument to retrieve the associated language tag. */
/* */
/* name_id :: An identifier for `string'. */
+ /* See @TT_NAME_ID_XXX for possible values. */
/* */
/* string :: The `name' string. Note that its format differs */
- /* depending on the (platform,encoding) pair. It can */
- /* be a Pascal String, a UTF-16 one, etc. */
- /* */
- /* Generally speaking, the string is not */
- /* zero-terminated. Please refer to the TrueType */
- /* specification for details. */
+ /* depending on the (platform,encoding) pair, being */
+ /* either a string of bytes (without a terminating */
+ /* NULL byte) or containing UTF-16BE entities. */
/* */
/* string_len :: The length of `string' in bytes. */
/* */
/* <Note> */
- /* Possible values for `platform_id', `encoding_id', `language_id', */
- /* and `name_id' are given in the file `ttnameid.h'. For details */
- /* please refer to the TrueType or OpenType specification. */
- /* */
- /* See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */
- /* @TT_ISO_ID_XXX, and @TT_MS_ID_XXX. */
+ /* Please refer to the TrueType or OpenType specification for more */
+ /* details. */
/* */
typedef struct FT_SfntName_
{
@@ -103,7 +111,7 @@ FT_BEGIN_HEADER
FT_UShort name_id;
FT_Byte* string; /* this string is *not* null-terminated! */
- FT_UInt string_len; /* in bytes */
+ FT_UInt string_len; /* in bytes */
} FT_SfntName;
@@ -147,47 +155,92 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* The `string' array returned in the `aname' structure is not */
- /* null-terminated. The application should deallocate it if it is no */
- /* longer in use. */
+ /* null-terminated. Note that you don't have to deallocate `string' */
+ /* by yourself; FreeType takes care of it if you call @FT_Done_Face. */
/* */
/* Use @FT_Get_Sfnt_Name_Count to get the total number of available */
/* `name' table entries, then do a loop until you get the right */
/* platform, encoding, and name ID. */
/* */
+ /* `name' table format~1 entries can use language tags also, see */
+ /* @FT_Get_Sfnt_LangTag. */
+ /* */
FT_EXPORT( FT_Error )
FT_Get_Sfnt_Name( FT_Face face,
FT_UInt idx,
FT_SfntName *aname );
- /***************************************************************************
- *
- * @constant:
- * FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
- *
- * @description:
- * A constant used as the tag of @FT_Parameter structures to make
- * FT_Open_Face() ignore preferred family subfamily names in `name'
- * table since OpenType version 1.4. For backwards compatibility with
- * legacy systems that have a 4-face-per-family restriction.
- *
- */
-#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
-
-
- /***************************************************************************
- *
- * @constant:
- * FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY
- *
- * @description:
- * A constant used as the tag of @FT_Parameter structures to make
- * FT_Open_Face() ignore preferred subfamily names in `name' table since
- * OpenType version 1.4. For backwards compatibility with legacy
- * systems that have a 4-face-per-family restriction.
- *
- */
-#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' )
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* FT_SfntLangTag */
+ /* */
+ /* <Description> */
+ /* A structure to model a language tag entry from an SFNT `name' */
+ /* table. */
+ /* */
+ /* <Fields> */
+ /* string :: The language tag string, encoded in UTF-16BE */
+ /* (without trailing NULL bytes). */
+ /* */
+ /* string_len :: The length of `string' in *bytes*. */
+ /* */
+ /* <Note> */
+ /* Please refer to the TrueType or OpenType specification for more */
+ /* details. */
+ /* */
+ /* <Since> */
+ /* 2.8 */
+ /* */
+ typedef struct FT_SfntLangTag_
+ {
+ FT_Byte* string; /* this string is *not* null-terminated! */
+ FT_UInt string_len; /* in bytes */
+
+ } FT_SfntLangTag;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Get_Sfnt_LangTag */
+ /* */
+ /* <Description> */
+ /* Retrieve the language tag associated with a language ID of an SFNT */
+ /* `name' table entry. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to the source face. */
+ /* */
+ /* langID :: The language ID, as returned by @FT_Get_Sfnt_Name. */
+ /* This is always a value larger than 0x8000. */
+ /* */
+ /* <Output> */
+ /* alangTag :: The language tag associated with the `name' table */
+ /* entry's language ID. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0~means success. */
+ /* */
+ /* <Note> */
+ /* The `string' array returned in the `alangTag' structure is not */
+ /* null-terminated. Note that you don't have to deallocate `string' */
+ /* by yourself; FreeType takes care of it if you call @FT_Done_Face. */
+ /* */
+ /* Only `name' table format~1 supports language tags. For format~0 */
+ /* tables, this function always returns FT_Err_Invalid_Table. For */
+ /* invalid format~1 language ID values, FT_Err_Invalid_Argument is */
+ /* returned. */
+ /* */
+ /* <Since> */
+ /* 2.8 */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Get_Sfnt_LangTag( FT_Face face,
+ FT_UInt langID,
+ FT_SfntLangTag *alangTag );
+
/* */
diff --git a/modules/freetype2/include/freetype/ftstroke.h b/modules/freetype2/include/freetype/ftstroke.h
index b3b9922da..44b6fbe19 100644
--- a/modules/freetype2/include/freetype/ftstroke.h
+++ b/modules/freetype2/include/freetype/ftstroke.h
@@ -4,7 +4,7 @@
/* */
/* FreeType path stroker (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -136,7 +136,7 @@ FT_BEGIN_HEADER
* FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line
* join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias
* for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for
- * backwards compatibility.
+ * backward compatibility.
*/
typedef enum FT_Stroker_LineJoin_
{
@@ -466,7 +466,7 @@ FT_BEGIN_HEADER
* FT_Stroker_ConicTo
*
* @description:
- * `Draw' a single quadratic Bézier in the stroker's current sub-path,
+ * `Draw' a single quadratic Bezier in the stroker's current sub-path,
* from the last position.
*
* @input:
@@ -474,7 +474,7 @@ FT_BEGIN_HEADER
* The target stroker handle.
*
* control ::
- * A pointer to a Bézier control point.
+ * A pointer to a Bezier control point.
*
* to ::
* A pointer to the destination point.
@@ -498,7 +498,7 @@ FT_BEGIN_HEADER
* FT_Stroker_CubicTo
*
* @description:
- * `Draw' a single cubic Bézier in the stroker's current sub-path,
+ * `Draw' a single cubic Bezier in the stroker's current sub-path,
* from the last position.
*
* @input:
@@ -506,10 +506,10 @@ FT_BEGIN_HEADER
* The target stroker handle.
*
* control1 ::
- * A pointer to the first Bézier control point.
+ * A pointer to the first Bezier control point.
*
* control2 ::
- * A pointer to second Bézier control point.
+ * A pointer to second Bezier control point.
*
* to ::
* A pointer to the destination point.
diff --git a/modules/freetype2/include/freetype/ftsynth.h b/modules/freetype2/include/freetype/ftsynth.h
index fdfcb6912..ff9fb43d9 100644
--- a/modules/freetype2/include/freetype/ftsynth.h
+++ b/modules/freetype2/include/freetype/ftsynth.h
@@ -5,7 +5,7 @@
/* FreeType synthesizing code for emboldening and slanting */
/* (specification). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/ftsystem.h b/modules/freetype2/include/freetype/ftsystem.h
index a75f95802..f6b1629ef 100644
--- a/modules/freetype2/include/freetype/ftsystem.h
+++ b/modules/freetype2/include/freetype/ftsystem.h
@@ -4,7 +4,7 @@
/* */
/* FreeType low-level system interface definition (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/fttrigon.h b/modules/freetype2/include/freetype/fttrigon.h
index f789b524c..2e3f3f1f7 100644
--- a/modules/freetype2/include/freetype/fttrigon.h
+++ b/modules/freetype2/include/freetype/fttrigon.h
@@ -4,7 +4,7 @@
/* */
/* FreeType trigonometric functions (specification). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/ftttdrv.h b/modules/freetype2/include/freetype/ftttdrv.h
deleted file mode 100644
index 22186ee4a..000000000
--- a/modules/freetype2/include/freetype/ftttdrv.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/***************************************************************************/
-/* */
-/* ftttdrv.h */
-/* */
-/* FreeType API for controlling the TrueType driver */
-/* (specification only). */
-/* */
-/* Copyright 2013-2016 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
-
-
-#ifndef FTTTDRV_H_
-#define FTTTDRV_H_
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * @section:
- * tt_driver
- *
- * @title:
- * The TrueType driver
- *
- * @abstract:
- * Controlling the TrueType driver module.
- *
- * @description:
- * While FreeType's TrueType driver doesn't expose API functions by
- * itself, it is possible to control its behaviour with @FT_Property_Set
- * and @FT_Property_Get. The following lists the available properties
- * together with the necessary macros and structures.
- *
- * The TrueType driver's module name is `truetype'.
- *
- * We start with a list of definitions, kindly provided by Greg
- * Hitchcock.
- *
- * _Bi-Level_ _Rendering_
- *
- * Monochromatic rendering, exclusively used in the early days of
- * TrueType by both Apple and Microsoft. Microsoft's GDI interface
- * supported hinting of the right-side bearing point, such that the
- * advance width could be non-linear. Most often this was done to
- * achieve some level of glyph symmetry. To enable reasonable
- * performance (e.g., not having to run hinting on all glyphs just to
- * get the widths) there was a bit in the head table indicating if the
- * side bearing was hinted, and additional tables, `hdmx' and `LTSH', to
- * cache hinting widths across multiple sizes and device aspect ratios.
- *
- * _Font_ _Smoothing_
- *
- * Microsoft's GDI implementation of anti-aliasing. Not traditional
- * anti-aliasing as the outlines were hinted before the sampling. The
- * widths matched the bi-level rendering.
- *
- * _ClearType_ _Rendering_
- *
- * Technique that uses physical subpixels to improve rendering on LCD
- * (and other) displays. Because of the higher resolution, many methods
- * of improving symmetry in glyphs through hinting the right-side
- * bearing were no longer necessary. This lead to what GDI calls
- * `natural widths' ClearType, see
- * http://www.beatstamm.com/typography/RTRCh4.htm#Sec21. Since hinting
- * has extra resolution, most non-linearity went away, but it is still
- * possible for hints to change the advance widths in this mode.
- *
- * _ClearType_ _Compatible_ _Widths_
- *
- * One of the earliest challenges with ClearType was allowing the
- * implementation in GDI to be selected without requiring all UI and
- * documents to reflow. To address this, a compatible method of
- * rendering ClearType was added where the font hints are executed once
- * to determine the width in bi-level rendering, and then re-run in
- * ClearType, with the difference in widths being absorbed in the font
- * hints for ClearType (mostly in the white space of hints); see
- * http://www.beatstamm.com/typography/RTRCh4.htm#Sec20. Somewhat by
- * definition, compatible width ClearType allows for non-linear widths,
- * but only when the bi-level version has non-linear widths.
- *
- * _ClearType_ _Subpixel_ _Positioning_
- *
- * One of the nice benefits of ClearType is the ability to more crisply
- * display fractional widths; unfortunately, the GDI model of integer
- * bitmaps did not support this. However, the WPF and Direct Write
- * frameworks do support fractional widths. DWrite calls this `natural
- * mode', not to be confused with GDI's `natural widths'. Subpixel
- * positioning, in the current implementation of Direct Write,
- * unfortunately does not support hinted advance widths, see
- * http://www.beatstamm.com/typography/RTRCh4.htm#Sec22. Note that the
- * TrueType interpreter fully allows the advance width to be adjusted in
- * this mode, just the DWrite client will ignore those changes.
- *
- * _ClearType_ _Backwards_ _Compatibility_
- *
- * This is a set of exceptions made in the TrueType interpreter to
- * minimize hinting techniques that were problematic with the extra
- * resolution of ClearType; see
- * http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and
- * http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx.
- * This technique is not to be confused with ClearType compatible
- * widths. ClearType backwards compatibility has no direct impact on
- * changing advance widths, but there might be an indirect impact on
- * disabling some deltas. This could be worked around in backwards
- * compatibility mode.
- *
- * _Native_ _ClearType_ _Mode_
- *
- * (Not to be confused with `natural widths'.) This mode removes all
- * the exceptions in the TrueType interpreter when running with
- * ClearType. Any issues on widths would still apply, though.
- *
- */
-
-
- /**************************************************************************
- *
- * @property:
- * interpreter-version
- *
- * @description:
-
- * Currently, three versions are available, two representing the
- * bytecode interpreter with subpixel hinting support (old `Infinality'
- * code and new stripped-down and higher performance `minimal' code) and
- * one without, respectively. The default is subpixel support if
- * TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support
- * otherwise (since it isn't available then).
- *
- * If subpixel hinting is on, many TrueType bytecode instructions behave
- * differently compared to B/W or grayscale rendering (except if `native
- * ClearType' is selected by the font). Microsoft's main idea is to
- * render at a much increased horizontal resolution, then sampling down
- * the created output to subpixel precision. However, many older fonts
- * are not suited to this and must be specially taken care of by
- * applying (hardcoded) tweaks in Microsoft's interpreter.
- *
- * Details on subpixel hinting and some of the necessary tweaks can be
- * found in Greg Hitchcock's whitepaper at
- * `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'.
- * Note that FreeType currently doesn't really `subpixel hint' (6x1, 6x2,
- * or 6x5 supersampling) like discussed in the paper. Depending on the
- * chosen interpreter, it simply ignores instructions on vertical stems
- * to arrive at very similar results.
- *
- * The following example code demonstrates how to deactivate subpixel
- * hinting (omitting the error handling).
- *
- * {
- * FT_Library library;
- * FT_Face face;
- * FT_UInt interpreter_version = TT_INTERPRETER_VERSION_35;
- *
- *
- * FT_Init_FreeType( &library );
- *
- * FT_Property_Set( library, "truetype",
- * "interpreter-version",
- * &interpreter_version );
- * }
- *
- * @note:
- * This property can be used with @FT_Property_Get also.
- *
- * This property can be set via the `FREETYPE_PROPERTIES' environment
- * variable (using values `35', `38', or `40').
- */
-
-
- /**************************************************************************
- *
- * @enum:
- * TT_INTERPRETER_VERSION_XXX
- *
- * @description:
- * A list of constants used for the @interpreter-version property to
- * select the hinting engine for Truetype fonts.
- *
- * The numeric value in the constant names represents the version
- * number as returned by the `GETINFO' bytecode instruction.
- *
- * @values:
- * TT_INTERPRETER_VERSION_35 ::
- * Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in
- * Windows~98; only grayscale and B/W rasterizing is supported.
- *
- * TT_INTERPRETER_VERSION_38 ::
- * Version~38 corresponds to MS rasterizer v.1.9; it is roughly
- * equivalent to the hinting provided by DirectWrite ClearType (as can
- * be found, for example, in the Internet Explorer~9 running on
- * Windows~7). It is used in FreeType to select the `Infinality'
- * subpixel hinting code. The code may be removed in a future
- * version.
- *
- * TT_INTERPRETER_VERSION_40 ::
- * Version~40 corresponds to MS rasterizer v.2.1; it is roughly
- * equivalent to the hinting provided by DirectWrite ClearType (as can
- * be found, for example, in Microsoft's Edge Browser on Windows~10).
- * It is used in FreeType to select the `minimal' subpixel hinting
- * code, a stripped-down and higher performance version of the
- * `Infinality' code.
- *
- * @note:
- * This property controls the behaviour of the bytecode interpreter
- * and thus how outlines get hinted. It does *not* control how glyph
- * get rasterized! In particular, it does not control subpixel color
- * filtering.
- *
- * If FreeType has not been compiled with the configuration option
- * FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes
- * an `FT_Err_Unimplemented_Feature' error.
- *
- * Depending on the graphics framework, Microsoft uses different
- * bytecode and rendering engines. As a consequence, the version
- * numbers returned by a call to the `GETINFO' bytecode instruction are
- * more convoluted than desired.
- *
- * Here are two tables that try to shed some light on the possible
- * values for the MS rasterizer engine, together with the additional
- * features introduced by it.
- *
- * {
- * GETINFO framework version feature
- * -------------------------------------------------------------------
- * 3 GDI (Win 3.1), v1.0 16-bit, first version
- * TrueImage
- * 33 GDI (Win NT 3.1), v1.5 32-bit
- * HP Laserjet
- * 34 GDI (Win 95) v1.6 font smoothing,
- * new SCANTYPE opcode
- * 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET
- * bits in composite glyphs
- * 36 MGDI (Win CE 2) v1.6+ classic ClearType
- * 37 GDI (XP and later), v1.8 ClearType
- * GDI+ old (before Vista)
- * 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType,
- * WPF Y-direction ClearType,
- * additional error checking
- * 39 DWrite (before Win 8) v2.0 subpixel ClearType flags
- * in GETINFO opcode,
- * bug fixes
- * 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag
- * DWrite (Win 8) in GETINFO opcode,
- * Gray ClearType
- * }
- *
- * The `version' field gives a rough orientation only, since some
- * applications provided certain features much earlier (as an example,
- * Microsoft Reader used subpixel and Y-direction ClearType already in
- * Windows 2000). Similarly, updates to a given framework might include
- * improved hinting support.
- *
- * {
- * version sampling rendering comment
- * x y x y
- * --------------------------------------------------------------
- * v1.0 normal normal B/W B/W bi-level
- * v1.6 high high gray gray grayscale
- * v1.8 high normal color-filter B/W (GDI) ClearType
- * v1.9 high high color-filter gray Color ClearType
- * v2.1 high normal gray B/W Gray ClearType
- * v2.1 high high gray gray Gray ClearType
- * }
- *
- * Color and Gray ClearType are the two available variants of
- * `Y-direction ClearType', meaning grayscale rasterization along the
- * Y-direction; the name used in the TrueType specification for this
- * feature is `symmetric smoothing'. `Classic ClearType' is the
- * original algorithm used before introducing a modified version in
- * Win~XP. Another name for v1.6's grayscale rendering is `font
- * smoothing', and `Color ClearType' is sometimes also called `DWrite
- * ClearType'. To differentiate between today's Color ClearType and the
- * earlier ClearType variant with B/W rendering along the vertical axis,
- * the latter is sometimes called `GDI ClearType'.
- *
- * `Normal' and `high' sampling describe the (virtual) resolution to
- * access the rasterized outline after the hinting process. `Normal'
- * means 1 sample per grid line (i.e., B/W). In the current Microsoft
- * implementation, `high' means an extra virtual resolution of 16x16 (or
- * 16x1) grid lines per pixel for bytecode instructions like `MIRP'.
- * After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid
- * lines for color filtering if Color ClearType is activated.
- *
- * Note that `Gray ClearType' is essentially the same as v1.6's
- * grayscale rendering. However, the GETINFO instruction handles it
- * differently: v1.6 returns bit~12 (hinting for grayscale), while v2.1
- * returns bits~13 (hinting for ClearType), 18 (symmetrical smoothing),
- * and~19 (Gray ClearType). Also, this mode respects bits 2 and~3 for
- * the version~1 gasp table exclusively (like Color ClearType), while
- * v1.6 only respects the values of version~0 (bits 0 and~1).
- *
- * Keep in mind that the features of the above interpreter versions
- * might not map exactly to FreeType features or behavior because it is
- * a fundamentally different library with different internals.
- *
- */
-#define TT_INTERPRETER_VERSION_35 35
-#define TT_INTERPRETER_VERSION_38 38
-#define TT_INTERPRETER_VERSION_40 40
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* FTTTDRV_H_ */
-
-
-/* END */
diff --git a/modules/freetype2/include/freetype/fttypes.h b/modules/freetype2/include/freetype/fttypes.h
index 2673e79c3..f638c2e54 100644
--- a/modules/freetype2/include/freetype/fttypes.h
+++ b/modules/freetype2/include/freetype/fttypes.h
@@ -4,7 +4,7 @@
/* */
/* FreeType simple types definitions (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -425,7 +425,7 @@ FT_BEGIN_HEADER
/* The address of the FreeType object that is under finalization. */
/* Its client data is accessed through its `generic' field. */
/* */
- typedef void (*FT_Generic_Finalizer)(void* object);
+ typedef void (*FT_Generic_Finalizer)( void* object );
/*************************************************************************/
diff --git a/modules/freetype2/include/freetype/ftwinfnt.h b/modules/freetype2/include/freetype/ftwinfnt.h
index a1a715baa..461c65b77 100644
--- a/modules/freetype2/include/freetype/ftwinfnt.h
+++ b/modules/freetype2/include/freetype/ftwinfnt.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing Windows fnt-specific data. */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -78,7 +78,7 @@ FT_BEGIN_HEADER
* Mac Roman encoding.
*
* FT_WinFNT_ID_OEM ::
- * From Michael Pöttgen <michael@poettgen.de>:
+ * From Michael Poettgen <michael@poettgen.de>:
*
* The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
* is used for the charset of vector fonts, like `modern.fon',
diff --git a/modules/freetype2/include/freetype/internal/autohint.h b/modules/freetype2/include/freetype/internal/autohint.h
index 7ef82b8f3..f4d308f68 100644
--- a/modules/freetype2/include/freetype/internal/autohint.h
+++ b/modules/freetype2/include/freetype/internal/autohint.h
@@ -4,7 +4,7 @@
/* */
/* High-level `autohint' module-specific interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/cffotypes.h b/modules/freetype2/include/freetype/internal/cffotypes.h
new file mode 100644
index 000000000..57e7591d4
--- /dev/null
+++ b/modules/freetype2/include/freetype/internal/cffotypes.h
@@ -0,0 +1,108 @@
+/***************************************************************************/
+/* */
+/* cffotypes.h */
+/* */
+/* Basic OpenType/CFF object type definitions (specification). */
+/* */
+/* Copyright 2017-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef CFFOTYPES_H_
+#define CFFOTYPES_H_
+
+#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_CFF_TYPES_H
+#include FT_INTERNAL_TRUETYPE_TYPES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+
+
+FT_BEGIN_HEADER
+
+
+ typedef TT_Face CFF_Face;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* CFF_Size */
+ /* */
+ /* <Description> */
+ /* A handle to an OpenType size object. */
+ /* */
+ typedef struct CFF_SizeRec_
+ {
+ FT_SizeRec root;
+ FT_ULong strike_index; /* 0xFFFFFFFF to indicate invalid */
+
+ } CFF_SizeRec, *CFF_Size;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* CFF_GlyphSlot */
+ /* */
+ /* <Description> */
+ /* A handle to an OpenType glyph slot object. */
+ /* */
+ typedef struct CFF_GlyphSlotRec_
+ {
+ FT_GlyphSlotRec root;
+
+ FT_Bool hint;
+ FT_Bool scaled;
+
+ FT_Fixed x_scale;
+ FT_Fixed y_scale;
+
+ } CFF_GlyphSlotRec, *CFF_GlyphSlot;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* CFF_Internal */
+ /* */
+ /* <Description> */
+ /* The interface to the `internal' field of `FT_Size'. */
+ /* */
+ typedef struct CFF_InternalRec_
+ {
+ PSH_Globals topfont;
+ PSH_Globals subfonts[CFF_MAX_CID_FONTS];
+
+ } CFF_InternalRec, *CFF_Internal;
+
+
+ /*************************************************************************/
+ /* */
+ /* Subglyph transformation record. */
+ /* */
+ typedef struct CFF_Transform_
+ {
+ FT_Fixed xx, xy; /* transformation matrix coefficients */
+ FT_Fixed yx, yy;
+ FT_F26Dot6 ox, oy; /* offsets */
+
+ } CFF_Transform;
+
+
+FT_END_HEADER
+
+
+#endif /* CFFOTYPES_H_ */
+
+
+/* END */
diff --git a/modules/freetype2/src/cff/cfftypes.h b/modules/freetype2/include/freetype/internal/cfftypes.h
index 4dae0f281..7c07e1a37 100644
--- a/modules/freetype2/src/cff/cfftypes.h
+++ b/modules/freetype2/include/freetype/internal/cfftypes.h
@@ -5,7 +5,7 @@
/* Basic OpenType/CFF type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,6 +27,7 @@
#include FT_INTERNAL_SERVICE_H
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+#include FT_INTERNAL_TYPE1_TYPES_H
FT_BEGIN_HEADER
@@ -112,8 +113,8 @@ FT_BEGIN_HEADER
FT_UInt shortDeltaCount; /* not used; always zero */
#endif
- FT_UInt regionIdxCount; /* number of regions in this var data */
- FT_UInt* regionIndices; /* array of `regionCount' indices; */
+ FT_UInt regionIdxCount; /* number of region indexes */
+ FT_UInt* regionIndices; /* array of `regionIdxCount' indices; */
/* these index `varRegionList' */
} CFF_VarData;
@@ -321,6 +322,8 @@ FT_BEGIN_HEADER
FT_Byte** local_subrs; /* array of pointers */
/* into Local Subrs INDEX data */
+ FT_UInt32 random;
+
} CFF_SubFontRec;
@@ -379,6 +382,9 @@ FT_BEGIN_HEADER
/* interface to Postscript Names service */
FT_Service_PsCMaps psnames;
+ /* interface to CFFLoad service */
+ const void* cffload;
+
/* since version 2.3.0 */
PS_FontInfoRec* font_info; /* font info dictionary */
@@ -389,8 +395,12 @@ FT_BEGIN_HEADER
/* since version 2.4.12 */
FT_Generic cf2_instance;
+ /* since version 2.7.1 */
CFF_VStoreRec vstore; /* parsed vstore structure */
+ /* since version 2.9 */
+ PS_FontExtraRec* font_extra;
+
} CFF_FontRec;
diff --git a/modules/freetype2/include/freetype/internal/ftcalc.h b/modules/freetype2/include/freetype/internal/ftcalc.h
index 8a884f680..818a81235 100644
--- a/modules/freetype2/include/freetype/internal/ftcalc.h
+++ b/modules/freetype2/include/freetype/internal/ftcalc.h
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -399,16 +399,42 @@ FT_BEGIN_HEADER
#endif /* 0 */
-#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 )
-#define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 )
-#define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 )
-#define F2DOT14_TO_FIXED( x ) ( (FT_Long)(x) << 2 )
-#define FLOAT_TO_FIXED( x ) ( (FT_Long)( x * 65536.0 ) )
+#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) * 64 ) /* << 6 */
+#define INT_TO_F2DOT14( x ) ( (FT_Long)(x) * 16384 ) /* << 14 */
+#define INT_TO_FIXED( x ) ( (FT_Long)(x) * 65536 ) /* << 16 */
+#define F2DOT14_TO_FIXED( x ) ( (FT_Long)(x) * 4 ) /* << 2 */
#define FIXED_TO_INT( x ) ( FT_RoundFix( x ) >> 16 )
#define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \
: ( -( ( 32 - (x) ) & -64 ) ) )
+ /*
+ * The following macros have two purposes.
+ *
+ * . Tag places where overflow is expected and harmless.
+ *
+ * . Avoid run-time sanitizer errors.
+ *
+ * Use with care!
+ */
+#define ADD_LONG( a, b ) \
+ (FT_Long)( (FT_ULong)(a) + (FT_ULong)(b) )
+#define SUB_LONG( a, b ) \
+ (FT_Long)( (FT_ULong)(a) - (FT_ULong)(b) )
+#define MUL_LONG( a, b ) \
+ (FT_Long)( (FT_ULong)(a) * (FT_ULong)(b) )
+#define NEG_LONG( a ) \
+ (FT_Long)( (FT_ULong)0 - (FT_ULong)(a) )
+
+#define ADD_INT32( a, b ) \
+ (FT_Int32)( (FT_UInt32)(a) + (FT_UInt32)(b) )
+#define SUB_INT32( a, b ) \
+ (FT_Int32)( (FT_UInt32)(a) - (FT_UInt32)(b) )
+#define MUL_INT32( a, b ) \
+ (FT_Int32)( (FT_UInt32)(a) * (FT_UInt32)(b) )
+#define NEG_INT32( a ) \
+ (FT_Int32)( (FT_UInt32)0 - (FT_UInt32)(a) )
+
FT_END_HEADER
diff --git a/modules/freetype2/include/freetype/internal/ftdebug.h b/modules/freetype2/include/freetype/internal/ftdebug.h
index d11045715..292a4eedb 100644
--- a/modules/freetype2/include/freetype/internal/ftdebug.h
+++ b/modules/freetype2/include/freetype/internal/ftdebug.h
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/ftdriver.h b/modules/freetype2/include/freetype/internal/ftdrv.h
index 902f02fd9..58dd35a93 100644
--- a/modules/freetype2/include/freetype/internal/ftdriver.h
+++ b/modules/freetype2/include/freetype/internal/ftdrv.h
@@ -1,10 +1,10 @@
/***************************************************************************/
/* */
-/* ftdriver.h */
+/* ftdrv.h */
/* */
-/* FreeType font driver interface (specification). */
+/* FreeType internal font driver interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,8 +16,8 @@
/***************************************************************************/
-#ifndef FTDRIVER_H_
-#define FTDRIVER_H_
+#ifndef FTDRV_H_
+#define FTDRV_H_
#include <ft2build.h>
@@ -394,7 +394,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* FTDRIVER_H_ */
+#endif /* FTDRV_H_ */
/* END */
diff --git a/modules/freetype2/include/freetype/internal/ftgloadr.h b/modules/freetype2/include/freetype/internal/ftgloadr.h
index bebf5dbba..a002fdbfc 100644
--- a/modules/freetype2/include/freetype/internal/ftgloadr.h
+++ b/modules/freetype2/include/freetype/internal/ftgloadr.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph loader (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/ftmemory.h b/modules/freetype2/include/freetype/internal/ftmemory.h
index fc33b2f50..054eaec31 100644
--- a/modules/freetype2/include/freetype/internal/ftmemory.h
+++ b/modules/freetype2/include/freetype/internal/ftmemory.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -210,7 +210,7 @@ extern "C++"
NULL, \
&error ) )
-#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz) \
+#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \
FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
(FT_Long)(itmsz), \
(FT_Long)(oldcnt), \
diff --git a/modules/freetype2/include/freetype/internal/ftobjs.h b/modules/freetype2/include/freetype/internal/ftobjs.h
index 25b18a53e..1c3c6ad45 100644
--- a/modules/freetype2/include/freetype/internal/ftobjs.h
+++ b/modules/freetype2/include/freetype/internal/ftobjs.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -36,6 +36,7 @@
#include FT_INTERNAL_AUTOHINT_H
#include FT_INTERNAL_SERVICE_H
#include FT_INTERNAL_PIC_H
+#include FT_INTERNAL_CALC_H
#ifdef FT_CONFIG_OPTION_INCREMENTAL
#include FT_INCREMENTAL_H
@@ -84,14 +85,30 @@ FT_BEGIN_HEADER
: y + ( 3 * x >> 3 ) )
/* we use FT_TYPEOF to suppress signedness compilation warnings */
-#define FT_PAD_FLOOR( x, n ) ( (x) & ~FT_TYPEOF( x )( (n)-1 ) )
-#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n )
-#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + ((n)-1), n )
+#define FT_PAD_FLOOR( x, n ) ( (x) & ~FT_TYPEOF( x )( (n) - 1 ) )
+#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + (n) / 2, n )
+#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + (n) - 1, n )
#define FT_PIX_FLOOR( x ) ( (x) & ~FT_TYPEOF( x )63 )
#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 )
#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
+ /* specialized versions (for signed values) */
+ /* that don't produce run-time errors due to integer overflow */
+#define FT_PAD_ROUND_LONG( x, n ) FT_PAD_FLOOR( ADD_LONG( (x), (n) / 2 ), \
+ n )
+#define FT_PAD_CEIL_LONG( x, n ) FT_PAD_FLOOR( ADD_LONG( (x), (n) - 1 ), \
+ n )
+#define FT_PIX_ROUND_LONG( x ) FT_PIX_FLOOR( ADD_LONG( (x), 32 ) )
+#define FT_PIX_CEIL_LONG( x ) FT_PIX_FLOOR( ADD_LONG( (x), 63 ) )
+
+#define FT_PAD_ROUND_INT32( x, n ) FT_PAD_FLOOR( ADD_INT32( (x), (n) / 2 ), \
+ n )
+#define FT_PAD_CEIL_INT32( x, n ) FT_PAD_FLOOR( ADD_INT32( (x), (n) - 1 ), \
+ n )
+#define FT_PIX_ROUND_INT32( x ) FT_PIX_FLOOR( ADD_INT32( (x), 32 ) )
+#define FT_PIX_CEIL_INT32( x ) FT_PIX_FLOOR( ADD_INT32( (x), 63 ) )
+
/*
* character classification functions -- since these are used to parse
@@ -138,8 +155,8 @@ FT_BEGIN_HEADER
} FT_CMapRec;
- /* typecase any pointer to a charmap handle */
-#define FT_CMAP( x ) ((FT_CMap)( x ))
+ /* typecast any pointer to a charmap handle */
+#define FT_CMAP( x ) ( (FT_CMap)( x ) )
/* obvious macros */
#define FT_CMAP_PLATFORM_ID( x ) FT_CMAP( x )->charmap.platform_id
@@ -295,6 +312,27 @@ FT_BEGIN_HEADER
FT_CMap_Done( FT_CMap cmap );
+ /* adds LCD padding to Min and Max boundaries */
+ FT_BASE( void )
+ ft_lcd_padding( FT_Pos* Min,
+ FT_Pos* Max,
+ FT_GlyphSlot slot );
+
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+ typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap,
+ FT_Render_Mode render_mode,
+ FT_Byte* weights );
+
+
+ /* This is the default LCD filter, an in-place, 5-tap FIR filter. */
+ FT_BASE( void )
+ ft_lcd_filter_fir( FT_Bitmap* bitmap,
+ FT_Render_Mode mode,
+ FT_LcdFiveTapFilter weights );
+
+#endif /* FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+
/*************************************************************************/
/* */
/* <Struct> */
@@ -342,6 +380,21 @@ FT_BEGIN_HEADER
/* this data when first opened. This field exists only if */
/* @FT_CONFIG_OPTION_INCREMENTAL is defined. */
/* */
+ /* no_stem_darkening :: */
+ /* Overrides the module-level default, see @stem-darkening[cff], */
+ /* for example. FALSE and TRUE toggle stem darkening on and off, */
+ /* respectively, value~-1 means to use the module/driver default. */
+ /* */
+ /* random_seed :: */
+ /* If positive, override the seed value for the CFF `random' */
+ /* operator. Value~0 means to use the font's value. Value~-1 */
+ /* means to use the CFF driver's default. */
+ /* */
+ /* lcd_weights :: */
+ /* lcd_filter_func :: */
+ /* If subpixel rendering is activated, the LCD filtering weights */
+ /* and callback function. */
+ /* */
/* refcount :: */
/* A counter initialized to~1 at the time an @FT_Face structure is */
/* created. @FT_Reference_Face increments this counter, and */
@@ -350,9 +403,9 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Face_InternalRec_
{
- FT_Matrix transform_matrix;
- FT_Vector transform_delta;
- FT_Int transform_flags;
+ FT_Matrix transform_matrix;
+ FT_Vector transform_delta;
+ FT_Int transform_flags;
FT_ServiceCacheRec services;
@@ -360,7 +413,15 @@ FT_BEGIN_HEADER
FT_Incremental_InterfaceRec* incremental_interface;
#endif
- FT_Int refcount;
+ FT_Char no_stem_darkening;
+ FT_Int32 random_seed;
+
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */
+ FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */
+#endif
+
+ FT_Int refcount;
} FT_Face_InternalRec;
@@ -413,8 +474,6 @@ FT_BEGIN_HEADER
} FT_GlyphSlot_InternalRec;
-#if 0
-
/*************************************************************************/
/* */
/* <Struct> */
@@ -422,17 +481,25 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* This structure contains the internal fields of each FT_Size */
- /* object. Currently, it's empty. */
+ /* object. */
+ /* */
+ /* <Fields> */
+ /* module_data :: Data specific to a driver module. */
+ /* */
+ /* autohint_mode :: The used auto-hinting mode. */
+ /* */
+ /* autohint_metrics :: Metrics used by the auto-hinter. */
/* */
/*************************************************************************/
typedef struct FT_Size_InternalRec_
{
- /* empty */
+ void* module_data;
- } FT_Size_InternalRec;
+ FT_Render_Mode autohint_mode;
+ FT_Size_Metrics autohint_metrics;
-#endif
+ } FT_Size_InternalRec;
/*************************************************************************/
@@ -473,7 +540,8 @@ FT_BEGIN_HEADER
/* typecast an object to an FT_Module */
-#define FT_MODULE( x ) ((FT_Module)( x ))
+#define FT_MODULE( x ) ( (FT_Module)(x) )
+
#define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz
#define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library
#define FT_MODULE_MEMORY( x ) FT_MODULE( x )->memory
@@ -559,9 +627,9 @@ FT_BEGIN_HEADER
/* a few macros used to perform easy typecasts with minimal brain damage */
-#define FT_FACE( x ) ((FT_Face)(x))
-#define FT_SIZE( x ) ((FT_Size)(x))
-#define FT_SLOT( x ) ((FT_GlyphSlot)(x))
+#define FT_FACE( x ) ( (FT_Face)(x) )
+#define FT_SIZE( x ) ( (FT_Size)(x) )
+#define FT_SLOT( x ) ( (FT_GlyphSlot)(x) )
#define FT_FACE_DRIVER( x ) FT_FACE( x )->driver
#define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library
@@ -662,6 +730,12 @@ FT_BEGIN_HEADER
ft_glyphslot_free_bitmap( FT_GlyphSlot slot );
+ /* Preset bitmap metrics of an outline glyphslot prior to rendering. */
+ FT_BASE( void )
+ ft_glyphslot_preset_bitmap( FT_GlyphSlot slot,
+ FT_Render_Mode mode,
+ const FT_Vector* origin );
+
/* Allocate a new bitmap buffer in a glyph slot. */
FT_BASE( FT_Error )
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
@@ -688,10 +762,10 @@ FT_BEGIN_HEADER
/*************************************************************************/
-#define FT_RENDERER( x ) ((FT_Renderer)( x ))
-#define FT_GLYPH( x ) ((FT_Glyph)( x ))
-#define FT_BITMAP_GLYPH( x ) ((FT_BitmapGlyph)( x ))
-#define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x ))
+#define FT_RENDERER( x ) ( (FT_Renderer)(x) )
+#define FT_GLYPH( x ) ( (FT_Glyph)(x) )
+#define FT_BITMAP_GLYPH( x ) ( (FT_BitmapGlyph)(x) )
+#define FT_OUTLINE_GLYPH( x ) ( (FT_OutlineGlyph)(x) )
typedef struct FT_RendererRec_
@@ -722,7 +796,7 @@ FT_BEGIN_HEADER
/* typecast a module into a driver easily */
-#define FT_DRIVER( x ) ((FT_Driver)(x))
+#define FT_DRIVER( x ) ( (FT_Driver)(x) )
/* typecast a module as a driver, and get its driver class */
#define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz
@@ -775,12 +849,7 @@ FT_BEGIN_HEADER
/* This hook is used by the TrueType debugger. It must be set to an */
/* alternate truetype bytecode interpreter function. */
-#define FT_DEBUG_HOOK_TRUETYPE 0
-
-
- typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap,
- FT_Render_Mode render_mode,
- FT_Library library );
+#define FT_DEBUG_HOOK_TRUETYPE 0
/*************************************************************************/
@@ -821,20 +890,12 @@ FT_BEGIN_HEADER
/* handle to the current renderer for the */
/* FT_GLYPH_FORMAT_OUTLINE format. */
/* */
- /* auto_hinter :: XXX */
+ /* auto_hinter :: The auto-hinter module interface. */
/* */
- /* raster_pool :: The raster object's render pool. This can */
- /* ideally be changed dynamically at run-time. */
- /* */
- /* raster_pool_size :: The size of the render pool in bytes. */
- /* */
- /* debug_hooks :: XXX */
- /* */
- /* lcd_filter :: If subpixel rendering is activated, the */
- /* selected LCD filter mode. */
- /* */
- /* lcd_extra :: If subpixel rendering is activated, the number */
- /* of extra pixels needed for the LCD filter. */
+ /* debug_hooks :: An array of four function pointers that allow */
+ /* debuggers to hook into a font format's */
+ /* interpreter. Currently, only the TrueType */
+ /* bytecode debugger uses this. */
/* */
/* lcd_weights :: If subpixel rendering is activated, the LCD */
/* filter weights, if any. */
@@ -867,16 +928,10 @@ FT_BEGIN_HEADER
FT_Renderer cur_renderer; /* current outline renderer */
FT_Module auto_hinter;
- FT_Byte* raster_pool; /* scan-line conversion */
- /* render pool */
- FT_ULong raster_pool_size; /* size of render pool in bytes */
-
FT_DebugHook_Func debug_hooks[4];
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
- FT_LcdFilter lcd_filter;
- FT_Int lcd_extra; /* number of extra pixels */
- FT_Byte lcd_weights[5]; /* filter weights, if any */
+ FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */
FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */
#endif
diff --git a/modules/freetype2/include/freetype/internal/ftpic.h b/modules/freetype2/include/freetype/internal/ftpic.h
index 6d800a08a..5214f0598 100644
--- a/modules/freetype2/include/freetype/internal/ftpic.h
+++ b/modules/freetype2/include/freetype/internal/ftpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services (declaration). */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/ftpsprop.h b/modules/freetype2/include/freetype/internal/ftpsprop.h
new file mode 100644
index 000000000..abbb62862
--- /dev/null
+++ b/modules/freetype2/include/freetype/internal/ftpsprop.h
@@ -0,0 +1,48 @@
+/***************************************************************************/
+/* */
+/* ftpsprop.h */
+/* */
+/* Get and set properties of PostScript drivers (specification). */
+/* */
+/* Copyright 2017-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef FTPSPROP_H_
+#define FTPSPROP_H_
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+
+ FT_BASE_CALLBACK( FT_Error )
+ ps_property_set( FT_Module module, /* PS_Driver */
+ const char* property_name,
+ const void* value,
+ FT_Bool value_is_string );
+
+ FT_BASE_CALLBACK( FT_Error )
+ ps_property_get( FT_Module module, /* PS_Driver */
+ const char* property_name,
+ void* value );
+
+
+FT_END_HEADER
+
+
+#endif /* FTPSPROP_H_ */
+
+
+/* END */
diff --git a/modules/freetype2/include/freetype/internal/ftrfork.h b/modules/freetype2/include/freetype/internal/ftrfork.h
index 718fa6268..1aca48a0e 100644
--- a/modules/freetype2/include/freetype/internal/ftrfork.h
+++ b/modules/freetype2/include/freetype/internal/ftrfork.h
@@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/ftserv.h b/modules/freetype2/include/freetype/internal/ftserv.h
index 663722f84..e01c1679b 100644
--- a/modules/freetype2/include/freetype/internal/ftserv.h
+++ b/modules/freetype2/include/freetype/internal/ftserv.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType services (specification only). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -306,6 +306,56 @@ FT_BEGIN_HEADER
{ NULL, NULL } \
};
+#define FT_DEFINE_SERVICEDESCREC9( class_, \
+ serv_id_1, serv_data_1, \
+ serv_id_2, serv_data_2, \
+ serv_id_3, serv_data_3, \
+ serv_id_4, serv_data_4, \
+ serv_id_5, serv_data_5, \
+ serv_id_6, serv_data_6, \
+ serv_id_7, serv_data_7, \
+ serv_id_8, serv_data_8, \
+ serv_id_9, serv_data_9 ) \
+ static const FT_ServiceDescRec class_[] = \
+ { \
+ { serv_id_1, serv_data_1 }, \
+ { serv_id_2, serv_data_2 }, \
+ { serv_id_3, serv_data_3 }, \
+ { serv_id_4, serv_data_4 }, \
+ { serv_id_5, serv_data_5 }, \
+ { serv_id_6, serv_data_6 }, \
+ { serv_id_7, serv_data_7 }, \
+ { serv_id_8, serv_data_8 }, \
+ { serv_id_9, serv_data_9 }, \
+ { NULL, NULL } \
+ };
+
+#define FT_DEFINE_SERVICEDESCREC10( class_, \
+ serv_id_1, serv_data_1, \
+ serv_id_2, serv_data_2, \
+ serv_id_3, serv_data_3, \
+ serv_id_4, serv_data_4, \
+ serv_id_5, serv_data_5, \
+ serv_id_6, serv_data_6, \
+ serv_id_7, serv_data_7, \
+ serv_id_8, serv_data_8, \
+ serv_id_9, serv_data_9, \
+ serv_id_10, serv_data_10 ) \
+ static const FT_ServiceDescRec class_[] = \
+ { \
+ { serv_id_1, serv_data_1 }, \
+ { serv_id_2, serv_data_2 }, \
+ { serv_id_3, serv_data_3 }, \
+ { serv_id_4, serv_data_4 }, \
+ { serv_id_5, serv_data_5 }, \
+ { serv_id_6, serv_data_6 }, \
+ { serv_id_7, serv_data_7 }, \
+ { serv_id_8, serv_data_8 }, \
+ { serv_id_9, serv_data_9 }, \
+ { serv_id_10, serv_data_10 }, \
+ { NULL, NULL } \
+ };
+
#else /* FT_CONFIG_OPTION_PIC */
#define FT_DEFINE_SERVICEDESCREC1( class_, \
@@ -533,7 +583,7 @@ FT_BEGIN_HEADER
\
FT_Error \
FT_Create_Class_ ## class_( FT_Library library, \
- FT_ServiceDescRec** output_class) \
+ FT_ServiceDescRec** output_class ) \
{ \
FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
@@ -584,7 +634,7 @@ FT_BEGIN_HEADER
\
FT_Error \
FT_Create_Class_ ## class_( FT_Library library, \
- FT_ServiceDescRec** output_class) \
+ FT_ServiceDescRec** output_class ) \
{ \
FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
@@ -638,7 +688,7 @@ FT_BEGIN_HEADER
\
FT_Error \
FT_Create_Class_ ## class_( FT_Library library, \
- FT_ServiceDescRec** output_class) \
+ FT_ServiceDescRec** output_class ) \
{ \
FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
@@ -672,6 +722,127 @@ FT_BEGIN_HEADER
return FT_Err_Ok; \
}
+#define FT_DEFINE_SERVICEDESCREC9( class_, \
+ serv_id_1, serv_data_1, \
+ serv_id_2, serv_data_2, \
+ serv_id_3, serv_data_3, \
+ serv_id_4, serv_data_4, \
+ serv_id_5, serv_data_5, \
+ serv_id_6, serv_data_6, \
+ serv_id_7, serv_data_7, \
+ serv_id_8, serv_data_8, \
+ serv_id_9, serv_data_9 ) \
+ void \
+ FT_Destroy_Class_ ## class_( FT_Library library, \
+ FT_ServiceDescRec* clazz ) \
+ { \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ if ( clazz ) \
+ FT_FREE( clazz ); \
+ } \
+ \
+ FT_Error \
+ FT_Create_Class_ ## class_( FT_Library library, \
+ FT_ServiceDescRec** output_class ) \
+ { \
+ FT_ServiceDescRec* clazz = NULL; \
+ FT_Error error; \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 10 ) ) \
+ return error; \
+ \
+ clazz[0].serv_id = serv_id_1; \
+ clazz[0].serv_data = serv_data_1; \
+ clazz[1].serv_id = serv_id_2; \
+ clazz[1].serv_data = serv_data_2; \
+ clazz[2].serv_id = serv_id_3; \
+ clazz[2].serv_data = serv_data_3; \
+ clazz[3].serv_id = serv_id_4; \
+ clazz[3].serv_data = serv_data_4; \
+ clazz[4].serv_id = serv_id_5; \
+ clazz[4].serv_data = serv_data_5; \
+ clazz[5].serv_id = serv_id_6; \
+ clazz[5].serv_data = serv_data_6; \
+ clazz[6].serv_id = serv_id_7; \
+ clazz[6].serv_data = serv_data_7; \
+ clazz[7].serv_id = serv_id_8; \
+ clazz[7].serv_data = serv_data_8; \
+ clazz[8].serv_id = serv_id_9; \
+ clazz[8].serv_data = serv_data_9; \
+ clazz[9].serv_id = NULL; \
+ clazz[9].serv_data = NULL; \
+ \
+ *output_class = clazz; \
+ \
+ return FT_Err_Ok; \
+ }
+
+#define FT_DEFINE_SERVICEDESCREC10( class_, \
+ serv_id_1, serv_data_1, \
+ serv_id_2, serv_data_2, \
+ serv_id_3, serv_data_3, \
+ serv_id_4, serv_data_4, \
+ serv_id_5, serv_data_5, \
+ serv_id_6, serv_data_6, \
+ serv_id_7, serv_data_7, \
+ serv_id_8, serv_data_8, \
+ serv_id_9, serv_data_9, \
+ serv_id_10, serv_data_10 ) \
+ void \
+ FT_Destroy_Class_ ## class_( FT_Library library, \
+ FT_ServiceDescRec* clazz ) \
+ { \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ if ( clazz ) \
+ FT_FREE( clazz ); \
+ } \
+ \
+ FT_Error \
+ FT_Create_Class_ ## class_( FT_Library library, \
+ FT_ServiceDescRec** output_class ) \
+ { \
+ FT_ServiceDescRec* clazz = NULL; \
+ FT_Error error; \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 11 ) ) \
+ return error; \
+ \
+ clazz[ 0].serv_id = serv_id_1; \
+ clazz[ 0].serv_data = serv_data_1; \
+ clazz[ 1].serv_id = serv_id_2; \
+ clazz[ 1].serv_data = serv_data_2; \
+ clazz[ 2].serv_id = serv_id_3; \
+ clazz[ 2].serv_data = serv_data_3; \
+ clazz[ 3].serv_id = serv_id_4; \
+ clazz[ 3].serv_data = serv_data_4; \
+ clazz[ 4].serv_id = serv_id_5; \
+ clazz[ 4].serv_data = serv_data_5; \
+ clazz[ 5].serv_id = serv_id_6; \
+ clazz[ 5].serv_data = serv_data_6; \
+ clazz[ 6].serv_id = serv_id_7; \
+ clazz[ 6].serv_data = serv_data_7; \
+ clazz[ 7].serv_id = serv_id_8; \
+ clazz[ 7].serv_data = serv_data_8; \
+ clazz[ 8].serv_id = serv_id_9; \
+ clazz[ 8].serv_data = serv_data_9; \
+ clazz[ 9].serv_id = serv_id_10; \
+ clazz[ 9].serv_data = serv_data_10; \
+ clazz[10].serv_id = NULL; \
+ clazz[10].serv_data = NULL; \
+ \
+ *output_class = clazz; \
+ \
+ return FT_Err_Ok; \
+ }
+
#endif /* FT_CONFIG_OPTION_PIC */
@@ -714,6 +885,7 @@ FT_BEGIN_HEADER
{
FT_Pointer service_POSTSCRIPT_FONT_NAME;
FT_Pointer service_MULTI_MASTERS;
+ FT_Pointer service_METRICS_VARIATIONS;
FT_Pointer service_GLYPH_DICT;
FT_Pointer service_PFR_METRICS;
FT_Pointer service_WINFNT;
@@ -734,7 +906,7 @@ FT_BEGIN_HEADER
* FT_FACE_LOOKUP_SERVICE
*
* @description:
- * This macro is used to lookup a service from a face's driver module
+ * This macro is used to look up a service from a face's driver module
* using its cache.
*
* @input:
@@ -814,7 +986,9 @@ FT_BEGIN_HEADER
*/
#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
+#define FT_SERVICE_CFF_TABLE_LOAD_H <freetype/internal/services/svcfftl.h>
#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h>
+#define FT_SERVICE_FONT_FORMAT_H <freetype/internal/services/svfntfmt.h>
#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h>
#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h>
@@ -828,10 +1002,9 @@ FT_BEGIN_HEADER
#define FT_SERVICE_PROPERTIES_H <freetype/internal/services/svprop.h>
#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h>
#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h>
+#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h>
#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h>
#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
-#define FT_SERVICE_FONT_FORMAT_H <freetype/internal/services/svfntfmt.h>
-#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h>
/* */
diff --git a/modules/freetype2/include/freetype/internal/ftstream.h b/modules/freetype2/include/freetype/internal/ftstream.h
index 6d0487565..f90002fe7 100644
--- a/modules/freetype2/include/freetype/internal/ftstream.h
+++ b/modules/freetype2/include/freetype/internal/ftstream.h
@@ -4,7 +4,7 @@
/* */
/* Stream handling (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -165,8 +165,8 @@ FT_BEGIN_HEADER
#define FT_BYTE_U32( p, i, s ) ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) )
-#define FT_PEEK_SHORT( p ) FT_INT16( FT_BYTE_U16( p, 0, 8) | \
- FT_BYTE_U16( p, 1, 0) )
+#define FT_PEEK_SHORT( p ) FT_INT16( FT_BYTE_U16( p, 0, 8 ) | \
+ FT_BYTE_U16( p, 1, 0 ) )
#define FT_PEEK_USHORT( p ) FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \
FT_BYTE_U16( p, 1, 0 ) )
@@ -502,7 +502,7 @@ FT_BEGIN_HEADER
#define FT_STREAM_READ_AT( position, buffer, count ) \
FT_SET_ERROR( FT_Stream_ReadAt( stream, \
(FT_ULong)(position), \
- (FT_Byte*)buffer, \
+ (FT_Byte*)(buffer), \
(FT_ULong)(count) ) )
#define FT_STREAM_READ_FIELDS( fields, object ) \
diff --git a/modules/freetype2/include/freetype/internal/fttrace.h b/modules/freetype2/include/freetype/internal/fttrace.h
index efb335595..8092e41fd 100644
--- a/modules/freetype2/include/freetype/internal/fttrace.h
+++ b/modules/freetype2/include/freetype/internal/fttrace.h
@@ -4,7 +4,7 @@
/* */
/* Tracing handling (specification only). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -39,6 +39,7 @@ FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */
FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */
FT_TRACE_DEF( synth ) /* bold/slant synthesizer (ftsynth.c) */
FT_TRACE_DEF( bitmap ) /* bitmap checksum (ftobjs.c) */
+FT_TRACE_DEF( psprops ) /* PS driver properties (ftpsprop.c) */
/* Cache sub-system */
FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
@@ -66,20 +67,19 @@ FT_TRACE_DEF( ttgxvar ) /* TrueType GX var handler (ttgxvar.c) */
FT_TRACE_DEF( t1afm )
FT_TRACE_DEF( t1driver )
FT_TRACE_DEF( t1gload )
-FT_TRACE_DEF( t1hint )
FT_TRACE_DEF( t1load )
FT_TRACE_DEF( t1objs )
FT_TRACE_DEF( t1parse )
/* PostScript helper module `psaux' */
FT_TRACE_DEF( t1decode )
+FT_TRACE_DEF( cffdecode )
FT_TRACE_DEF( psobjs )
FT_TRACE_DEF( psconv )
/* PostScript hinting module `pshinter' */
FT_TRACE_DEF( pshrec )
-FT_TRACE_DEF( pshalgo1 )
-FT_TRACE_DEF( pshalgo2 )
+FT_TRACE_DEF( pshalgo )
/* Type 2 driver components */
FT_TRACE_DEF( cffdriver )
@@ -96,7 +96,6 @@ FT_TRACE_DEF( cf2interp )
FT_TRACE_DEF( t42 )
/* CID driver components */
-FT_TRACE_DEF( cidafm )
FT_TRACE_DEF( ciddriver )
FT_TRACE_DEF( cidgload )
FT_TRACE_DEF( cidload )
diff --git a/modules/freetype2/include/freetype/internal/ftvalid.h b/modules/freetype2/include/freetype/internal/ftvalid.h
index aac92c9af..cad47a556 100644
--- a/modules/freetype2/include/freetype/internal/ftvalid.h
+++ b/modules/freetype2/include/freetype/internal/ftvalid.h
@@ -4,7 +4,7 @@
/* */
/* FreeType validation support (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/internal.h b/modules/freetype2/include/freetype/internal/internal.h
index 8c3c14c12..8f546e443 100644
--- a/modules/freetype2/include/freetype/internal/internal.h
+++ b/modules/freetype2/include/freetype/internal/internal.h
@@ -4,7 +4,7 @@
/* */
/* Internal header files (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,7 +31,7 @@
#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h>
#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h>
#define FT_INTERNAL_HASH_H <freetype/internal/fthash.h>
-#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h>
+#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdrv.h>
#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h>
#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h>
#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h>
@@ -44,9 +44,13 @@
#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h>
+#define FT_INTERNAL_POSTSCRIPT_PROPS_H <freetype/internal/ftpsprop.h>
#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h>
+#define FT_INTERNAL_CFF_TYPES_H <freetype/internal/cfftypes.h>
+#define FT_INTERNAL_CFF_OBJECTS_TYPES_H <freetype/internal/cffotypes.h>
+
#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
diff --git a/modules/freetype2/include/freetype/internal/psaux.h b/modules/freetype2/include/freetype/internal/psaux.h
index 15dedfd28..f77380d25 100644
--- a/modules/freetype2/include/freetype/internal/psaux.h
+++ b/modules/freetype2/include/freetype/internal/psaux.h
@@ -5,7 +5,7 @@
/* Auxiliary functions and data structures related to PostScript fonts */
/* (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -25,12 +25,32 @@
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_TYPE1_TYPES_H
#include FT_INTERNAL_HASH_H
+#include FT_INTERNAL_TRUETYPE_TYPES_H
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include FT_INTERNAL_CFF_TYPES_H
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
+
FT_BEGIN_HEADER
+ /***********************************************************************/
+ /* */
+ /* PostScript modules driver class. */
+ /* */
+ typedef struct PS_DriverRec_
+ {
+ FT_DriverRec root;
+
+ FT_UInt hinting_engine;
+ FT_Bool no_stem_darkening;
+ FT_Int darken_params[8];
+ FT_Int32 random_seed;
+
+ } PS_DriverRec, *PS_Driver;
+
+
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -442,6 +462,202 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
/***** *****/
+ /***** PS BUILDER *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ typedef struct PS_Builder_ PS_Builder;
+ typedef const struct PS_Builder_FuncsRec_* PS_Builder_Funcs;
+
+ typedef struct PS_Builder_FuncsRec_
+ {
+ void
+ (*init)( PS_Builder* ps_builder,
+ void* builder,
+ FT_Bool is_t1 );
+
+ void
+ (*done)( PS_Builder* builder );
+
+ } PS_Builder_FuncsRec;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Structure> */
+ /* PS_Builder */
+ /* */
+ /* <Description> */
+ /* A structure used during glyph loading to store its outline. */
+ /* */
+ /* <Fields> */
+ /* memory :: The current memory object. */
+ /* */
+ /* face :: The current face object. */
+ /* */
+ /* glyph :: The current glyph slot. */
+ /* */
+ /* loader :: XXX */
+ /* */
+ /* base :: The base glyph outline. */
+ /* */
+ /* current :: The current glyph outline. */
+ /* */
+ /* pos_x :: The horizontal translation (if composite glyph). */
+ /* */
+ /* pos_y :: The vertical translation (if composite glyph). */
+ /* */
+ /* left_bearing :: The left side bearing point. */
+ /* */
+ /* advance :: The horizontal advance vector. */
+ /* */
+ /* bbox :: Unused. */
+ /* */
+ /* path_begun :: A flag which indicates that a new path has begun. */
+ /* */
+ /* load_points :: If this flag is not set, no points are loaded. */
+ /* */
+ /* no_recurse :: Set but not used. */
+ /* */
+ /* metrics_only :: A boolean indicating that we only want to compute */
+ /* the metrics of a given glyph, not load all of its */
+ /* points. */
+ /* */
+ /* is_t1 :: Set if current font type is Type 1. */
+ /* */
+ /* funcs :: An array of function pointers for the builder. */
+ /* */
+ struct PS_Builder_
+ {
+ FT_Memory memory;
+ FT_Face face;
+ CFF_GlyphSlot glyph;
+ FT_GlyphLoader loader;
+ FT_Outline* base;
+ FT_Outline* current;
+
+ FT_Pos* pos_x;
+ FT_Pos* pos_y;
+
+ FT_Vector* left_bearing;
+ FT_Vector* advance;
+
+ FT_BBox* bbox; /* bounding box */
+ FT_Bool path_begun;
+ FT_Bool load_points;
+ FT_Bool no_recurse;
+
+ FT_Bool metrics_only;
+ FT_Bool is_t1;
+
+ PS_Builder_FuncsRec funcs;
+
+ };
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** PS DECODER *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+#define PS_MAX_OPERANDS 48
+#define PS_MAX_SUBRS_CALLS 16 /* maximum subroutine nesting; */
+ /* only 10 are allowed but there exist */
+ /* fonts like `HiraKakuProN-W3.ttf' */
+ /* (Hiragino Kaku Gothic ProN W3; */
+ /* 8.2d6e1; 2014-12-19) that exceed */
+ /* this limit */
+
+ /* execution context charstring zone */
+
+ typedef struct PS_Decoder_Zone_
+ {
+ FT_Byte* base;
+ FT_Byte* limit;
+ FT_Byte* cursor;
+
+ } PS_Decoder_Zone;
+
+
+ typedef FT_Error
+ (*CFF_Decoder_Get_Glyph_Callback)( TT_Face face,
+ FT_UInt glyph_index,
+ FT_Byte** pointer,
+ FT_ULong* length );
+
+ typedef void
+ (*CFF_Decoder_Free_Glyph_Callback)( TT_Face face,
+ FT_Byte** pointer,
+ FT_ULong length );
+
+
+ typedef struct PS_Decoder_
+ {
+ PS_Builder builder;
+
+ FT_Fixed stack[PS_MAX_OPERANDS + 1];
+ FT_Fixed* top;
+
+ PS_Decoder_Zone zones[PS_MAX_SUBRS_CALLS + 1];
+ PS_Decoder_Zone* zone;
+
+ FT_Int flex_state;
+ FT_Int num_flex_vectors;
+ FT_Vector flex_vectors[7];
+
+ CFF_Font cff;
+ CFF_SubFont current_subfont; /* for current glyph_index */
+ FT_Generic* cf2_instance;
+
+ FT_Pos* glyph_width;
+ FT_Bool width_only;
+ FT_Int num_hints;
+
+ FT_UInt num_locals;
+ FT_UInt num_globals;
+
+ FT_Int locals_bias;
+ FT_Int globals_bias;
+
+ FT_Byte** locals;
+ FT_Byte** globals;
+
+ FT_Byte** glyph_names; /* for pure CFF fonts only */
+ FT_UInt num_glyphs; /* number of glyphs in font */
+
+ FT_Render_Mode hint_mode;
+
+ FT_Bool seac;
+
+ CFF_Decoder_Get_Glyph_Callback get_glyph_callback;
+ CFF_Decoder_Free_Glyph_Callback free_glyph_callback;
+
+ /* Type 1 stuff */
+ FT_Service_PsCMaps psnames; /* for seac */
+
+ FT_Int lenIV; /* internal for sub routine calls */
+ FT_UInt* locals_len; /* array of subrs length (optional) */
+ FT_Hash locals_hash; /* used if `num_subrs' was massaged */
+
+ FT_Matrix font_matrix;
+ FT_Vector font_offset;
+
+ PS_Blend blend; /* for multiple master support */
+
+ FT_Long* buildchar;
+ FT_UInt len_buildchar;
+
+ } PS_Decoder;
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
/***** T1 BUILDER *****/
/***** *****/
/*************************************************************************/
@@ -653,10 +869,23 @@ FT_BEGIN_HEADER
void
(*done)( T1_Decoder decoder );
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+ FT_Error
+ (*parse_charstrings_old)( T1_Decoder decoder,
+ FT_Byte* base,
+ FT_UInt len );
+#else
+ FT_Error
+ (*parse_metrics)( T1_Decoder decoder,
+ FT_Byte* base,
+ FT_UInt len );
+#endif
+
FT_Error
- (*parse_charstrings)( T1_Decoder decoder,
- FT_Byte* base,
- FT_UInt len );
+ (*parse_charstrings)( PS_Decoder* decoder,
+ FT_Byte* charstring_base,
+ FT_ULong charstring_len );
+
} T1_Decoder_FuncsRec;
@@ -700,12 +929,261 @@ FT_BEGIN_HEADER
FT_Bool seac;
+ FT_Generic cf2_instance;
+
} T1_DecoderRec;
/*************************************************************************/
/*************************************************************************/
/***** *****/
+ /***** CFF BUILDER *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ typedef struct CFF_Builder_ CFF_Builder;
+
+
+ typedef FT_Error
+ (*CFF_Builder_Check_Points_Func)( CFF_Builder* builder,
+ FT_Int count );
+
+ typedef void
+ (*CFF_Builder_Add_Point_Func)( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y,
+ FT_Byte flag );
+ typedef FT_Error
+ (*CFF_Builder_Add_Point1_Func)( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y );
+ typedef FT_Error
+ (*CFF_Builder_Start_Point_Func)( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y );
+ typedef void
+ (*CFF_Builder_Close_Contour_Func)( CFF_Builder* builder );
+
+ typedef FT_Error
+ (*CFF_Builder_Add_Contour_Func)( CFF_Builder* builder );
+
+ typedef const struct CFF_Builder_FuncsRec_* CFF_Builder_Funcs;
+
+ typedef struct CFF_Builder_FuncsRec_
+ {
+ void
+ (*init)( CFF_Builder* builder,
+ TT_Face face,
+ CFF_Size size,
+ CFF_GlyphSlot glyph,
+ FT_Bool hinting );
+
+ void
+ (*done)( CFF_Builder* builder );
+
+ CFF_Builder_Check_Points_Func check_points;
+ CFF_Builder_Add_Point_Func add_point;
+ CFF_Builder_Add_Point1_Func add_point1;
+ CFF_Builder_Add_Contour_Func add_contour;
+ CFF_Builder_Start_Point_Func start_point;
+ CFF_Builder_Close_Contour_Func close_contour;
+
+ } CFF_Builder_FuncsRec;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Structure> */
+ /* CFF_Builder */
+ /* */
+ /* <Description> */
+ /* A structure used during glyph loading to store its outline. */
+ /* */
+ /* <Fields> */
+ /* memory :: The current memory object. */
+ /* */
+ /* face :: The current face object. */
+ /* */
+ /* glyph :: The current glyph slot. */
+ /* */
+ /* loader :: The current glyph loader. */
+ /* */
+ /* base :: The base glyph outline. */
+ /* */
+ /* current :: The current glyph outline. */
+ /* */
+ /* pos_x :: The horizontal translation (if composite glyph). */
+ /* */
+ /* pos_y :: The vertical translation (if composite glyph). */
+ /* */
+ /* left_bearing :: The left side bearing point. */
+ /* */
+ /* advance :: The horizontal advance vector. */
+ /* */
+ /* bbox :: Unused. */
+ /* */
+ /* path_begun :: A flag which indicates that a new path has begun. */
+ /* */
+ /* load_points :: If this flag is not set, no points are loaded. */
+ /* */
+ /* no_recurse :: Set but not used. */
+ /* */
+ /* metrics_only :: A boolean indicating that we only want to compute */
+ /* the metrics of a given glyph, not load all of its */
+ /* points. */
+ /* */
+ /* hints_funcs :: Auxiliary pointer for hinting. */
+ /* */
+ /* hints_globals :: Auxiliary pointer for hinting. */
+ /* */
+ /* funcs :: A table of method pointers for this object. */
+ /* */
+ struct CFF_Builder_
+ {
+ FT_Memory memory;
+ TT_Face face;
+ CFF_GlyphSlot glyph;
+ FT_GlyphLoader loader;
+ FT_Outline* base;
+ FT_Outline* current;
+
+ FT_Pos pos_x;
+ FT_Pos pos_y;
+
+ FT_Vector left_bearing;
+ FT_Vector advance;
+
+ FT_BBox bbox; /* bounding box */
+
+ FT_Bool path_begun;
+ FT_Bool load_points;
+ FT_Bool no_recurse;
+
+ FT_Bool metrics_only;
+
+ void* hints_funcs; /* hinter-specific */
+ void* hints_globals; /* hinter-specific */
+
+ CFF_Builder_FuncsRec funcs;
+ };
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** CFF DECODER *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+#define CFF_MAX_OPERANDS 48
+#define CFF_MAX_SUBRS_CALLS 16 /* maximum subroutine nesting; */
+ /* only 10 are allowed but there exist */
+ /* fonts like `HiraKakuProN-W3.ttf' */
+ /* (Hiragino Kaku Gothic ProN W3; */
+ /* 8.2d6e1; 2014-12-19) that exceed */
+ /* this limit */
+#define CFF_MAX_TRANS_ELEMENTS 32
+
+ /* execution context charstring zone */
+
+ typedef struct CFF_Decoder_Zone_
+ {
+ FT_Byte* base;
+ FT_Byte* limit;
+ FT_Byte* cursor;
+
+ } CFF_Decoder_Zone;
+
+
+ typedef struct CFF_Decoder_
+ {
+ CFF_Builder builder;
+ CFF_Font cff;
+
+ FT_Fixed stack[CFF_MAX_OPERANDS + 1];
+ FT_Fixed* top;
+
+ CFF_Decoder_Zone zones[CFF_MAX_SUBRS_CALLS + 1];
+ CFF_Decoder_Zone* zone;
+
+ FT_Int flex_state;
+ FT_Int num_flex_vectors;
+ FT_Vector flex_vectors[7];
+
+ FT_Pos glyph_width;
+ FT_Pos nominal_width;
+
+ FT_Bool read_width;
+ FT_Bool width_only;
+ FT_Int num_hints;
+ FT_Fixed buildchar[CFF_MAX_TRANS_ELEMENTS];
+
+ FT_UInt num_locals;
+ FT_UInt num_globals;
+
+ FT_Int locals_bias;
+ FT_Int globals_bias;
+
+ FT_Byte** locals;
+ FT_Byte** globals;
+
+ FT_Byte** glyph_names; /* for pure CFF fonts only */
+ FT_UInt num_glyphs; /* number of glyphs in font */
+
+ FT_Render_Mode hint_mode;
+
+ FT_Bool seac;
+
+ CFF_SubFont current_subfont; /* for current glyph_index */
+
+ CFF_Decoder_Get_Glyph_Callback get_glyph_callback;
+ CFF_Decoder_Free_Glyph_Callback free_glyph_callback;
+
+ } CFF_Decoder;
+
+
+ typedef const struct CFF_Decoder_FuncsRec_* CFF_Decoder_Funcs;
+
+ typedef struct CFF_Decoder_FuncsRec_
+ {
+ void
+ (*init)( CFF_Decoder* decoder,
+ TT_Face face,
+ CFF_Size size,
+ CFF_GlyphSlot slot,
+ FT_Bool hinting,
+ FT_Render_Mode hint_mode,
+ CFF_Decoder_Get_Glyph_Callback get_callback,
+ CFF_Decoder_Free_Glyph_Callback free_callback );
+
+ FT_Error
+ (*prepare)( CFF_Decoder* decoder,
+ CFF_Size size,
+ FT_UInt glyph_index );
+
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ FT_Error
+ (*parse_charstrings_old)( CFF_Decoder* decoder,
+ FT_Byte* charstring_base,
+ FT_ULong charstring_len,
+ FT_Bool in_dict );
+#endif
+
+ FT_Error
+ (*parse_charstrings)( PS_Decoder* decoder,
+ FT_Byte* charstring_base,
+ FT_ULong charstring_len );
+
+ } CFF_Decoder_FuncsRec;
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
/***** AFM PARSER *****/
/***** *****/
/*************************************************************************/
@@ -810,14 +1288,29 @@ FT_BEGIN_HEADER
FT_Offset length,
FT_UShort seed );
+ FT_UInt32
+ (*cff_random)( FT_UInt32 r );
+
+ void
+ (*ps_decoder_init)( PS_Decoder* ps_decoder,
+ void* decoder,
+ FT_Bool is_t1 );
+
+ void
+ (*t1_make_subfont)( FT_Face face,
+ PS_Private priv,
+ CFF_SubFont subfont );
+
T1_CMap_Classes t1_cmap_classes;
/* fields after this comment line were added after version 2.1.10 */
const AFM_Parser_FuncsRec* afm_parser_funcs;
+ const CFF_Decoder_FuncsRec* cff_decoder_funcs;
+
} PSAux_ServiceRec, *PSAux_Service;
- /* backwards-compatible type definition */
+ /* backward compatible type definition */
typedef PSAux_ServiceRec PSAux_Interface;
diff --git a/modules/freetype2/include/freetype/internal/pshints.h b/modules/freetype2/include/freetype/internal/pshints.h
index e60dc9cd5..d29314ec2 100644
--- a/modules/freetype2/include/freetype/internal/pshints.h
+++ b/modules/freetype2/include/freetype/internal/pshints.h
@@ -6,7 +6,7 @@
/* recorders (specification only). These are used to support native */
/* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svbdf.h b/modules/freetype2/include/freetype/internal/services/svbdf.h
index c24475fc2..4a9ec2007 100644
--- a/modules/freetype2/include/freetype/internal/services/svbdf.h
+++ b/modules/freetype2/include/freetype/internal/services/svbdf.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType BDF services (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svcfftl.h b/modules/freetype2/include/freetype/internal/services/svcfftl.h
new file mode 100644
index 000000000..db623e684
--- /dev/null
+++ b/modules/freetype2/include/freetype/internal/services/svcfftl.h
@@ -0,0 +1,112 @@
+/***************************************************************************/
+/* */
+/* svcfftl.h */
+/* */
+/* The FreeType CFF tables loader service (specification). */
+/* */
+/* Copyright 2017-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef SVCFFTL_H_
+#define SVCFFTL_H_
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_INTERNAL_CFF_TYPES_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_CFF_LOAD "cff-load"
+
+
+ typedef FT_UShort
+ (*FT_Get_Standard_Encoding_Func)( FT_UInt charcode );
+
+ typedef FT_Error
+ (*FT_Load_Private_Dict_Func)( CFF_Font font,
+ CFF_SubFont subfont,
+ FT_UInt lenNDV,
+ FT_Fixed* NDV );
+
+ typedef FT_Byte
+ (*FT_FD_Select_Get_Func)( CFF_FDSelect fdselect,
+ FT_UInt glyph_index );
+
+ typedef FT_Bool
+ (*FT_Blend_Check_Vector_Func)( CFF_Blend blend,
+ FT_UInt vsindex,
+ FT_UInt lenNDV,
+ FT_Fixed* NDV );
+
+ typedef FT_Error
+ (*FT_Blend_Build_Vector_Func)( CFF_Blend blend,
+ FT_UInt vsindex,
+ FT_UInt lenNDV,
+ FT_Fixed* NDV );
+
+
+ FT_DEFINE_SERVICE( CFFLoad )
+ {
+ FT_Get_Standard_Encoding_Func get_standard_encoding;
+ FT_Load_Private_Dict_Func load_private_dict;
+ FT_FD_Select_Get_Func fd_select_get;
+ FT_Blend_Check_Vector_Func blend_check_vector;
+ FT_Blend_Build_Vector_Func blend_build_vector;
+ };
+
+
+#ifndef FT_CONFIG_OPTION_PIC
+
+#define FT_DEFINE_SERVICE_CFFLOADREC( class_, \
+ get_standard_encoding_, \
+ load_private_dict_, \
+ fd_select_get_, \
+ blend_check_vector_, \
+ blend_build_vector_ ) \
+ static const FT_Service_CFFLoadRec class_ = \
+ { \
+ get_standard_encoding_, \
+ load_private_dict_, \
+ fd_select_get_, \
+ blend_check_vector_, \
+ blend_build_vector_ \
+ };
+
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_CFFLOADREC( class_, \
+ get_standard_encoding_, \
+ load_private_dict_, \
+ fd_select_get_, \
+ blend_check_vector_, \
+ blend_build_vector_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Service_CFFLoadRec* clazz ) \
+ { \
+ clazz->get_standard_encoding = get_standard_encoding_; \
+ clazz->load_private_dict = load_private_dict_; \
+ clazz->fd_select_get = fd_select_get_; \
+ clazz->blend_check_vector = blend_check_vector_; \
+ clazz->blend_build_vector = blend_build_vector_; \
+ }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
+
+FT_END_HEADER
+
+
+#endif
+
+
+/* END */
diff --git a/modules/freetype2/include/freetype/internal/services/svcid.h b/modules/freetype2/include/freetype/internal/services/svcid.h
index dbbe6044a..cb59ac6a2 100644
--- a/modules/freetype2/include/freetype/internal/services/svcid.h
+++ b/modules/freetype2/include/freetype/internal/services/svcid.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType CID font services (specification). */
/* */
-/* Copyright 2007-2016 by */
+/* Copyright 2007-2018 by */
/* Derek Clegg and Michael Toftdal. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svfntfmt.h b/modules/freetype2/include/freetype/internal/services/svfntfmt.h
index bd295c9c6..3b732be1a 100644
--- a/modules/freetype2/include/freetype/internal/services/svfntfmt.h
+++ b/modules/freetype2/include/freetype/internal/services/svfntfmt.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType font format service (specification only). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svgldict.h b/modules/freetype2/include/freetype/internal/services/svgldict.h
index fff29bc40..f1a68e311 100644
--- a/modules/freetype2/include/freetype/internal/services/svgldict.h
+++ b/modules/freetype2/include/freetype/internal/services/svgldict.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph dictionary services (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -56,7 +56,7 @@ FT_BEGIN_HEADER
#define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \
get_name_, \
- name_index_) \
+ name_index_ ) \
static const FT_Service_GlyphDictRec class_ = \
{ \
get_name_, name_index_ \
@@ -66,7 +66,7 @@ FT_BEGIN_HEADER
#define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \
get_name_, \
- name_index_) \
+ name_index_ ) \
void \
FT_Init_Class_ ## class_( FT_Library library, \
FT_Service_GlyphDictRec* clazz ) \
diff --git a/modules/freetype2/include/freetype/internal/services/svgxval.h b/modules/freetype2/include/freetype/internal/services/svgxval.h
index fb8ffba83..ed79ebeaa 100644
--- a/modules/freetype2/include/freetype/internal/services/svgxval.h
+++ b/modules/freetype2/include/freetype/internal/services/svgxval.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating TrueTypeGX/AAT tables (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/include/freetype/internal/services/svkern.h b/modules/freetype2/include/freetype/internal/services/svkern.h
index a636f1af1..c7e8f6ef2 100644
--- a/modules/freetype2/include/freetype/internal/services/svkern.h
+++ b/modules/freetype2/include/freetype/internal/services/svkern.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType Kerning service (specification). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svmetric.h b/modules/freetype2/include/freetype/internal/services/svmetric.h
index 7a4fed423..abaacddbb 100644
--- a/modules/freetype2/include/freetype/internal/services/svmetric.h
+++ b/modules/freetype2/include/freetype/internal/services/svmetric.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType services for metrics variations (specification). */
/* */
-/* Copyright 2016 by */
+/* Copyright 2016-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -74,10 +74,8 @@ FT_BEGIN_HEADER
/* MVAR */
- typedef FT_Error
- (*FT_Metrics_Adjust_Func)( FT_Face face,
- FT_ULong tag,
- FT_Int *avalue );
+ typedef void
+ (*FT_Metrics_Adjust_Func)( FT_Face face );
FT_DEFINE_SERVICE( MetricsVariations )
@@ -140,7 +138,7 @@ FT_BEGIN_HEADER
clazz->bsb_adjust = bsb_adjust_; \
clazz->vorg_adjust = vorg_adjust_; \
clazz->metrics_adjust = metrics_adjust_; \
- };
+ }
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/modules/freetype2/include/freetype/internal/services/svmm.h b/modules/freetype2/include/freetype/internal/services/svmm.h
index e54845a54..bcbb38e2c 100644
--- a/modules/freetype2/include/freetype/internal/services/svmm.h
+++ b/modules/freetype2/include/freetype/internal/services/svmm.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType Multiple Masters and GX var services (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -48,11 +48,15 @@ FT_BEGIN_HEADER
FT_UInt num_coords,
FT_Long* coords );
+ /* use return value -1 to indicate that the new coordinates */
+ /* are equal to the current ones; no changes are thus needed */
typedef FT_Error
(*FT_Set_Var_Design_Func)( FT_Face face,
FT_UInt num_coords,
FT_Fixed* coords );
+ /* use return value -1 to indicate that the new coordinates */
+ /* are equal to the current ones; no changes are thus needed */
typedef FT_Error
(*FT_Set_MM_Blend_Func)( FT_Face face,
FT_UInt num_coords,
@@ -64,6 +68,10 @@ FT_BEGIN_HEADER
FT_Fixed* coords );
typedef FT_Error
+ (*FT_Set_Instance_Func)( FT_Face face,
+ FT_UInt instance_index );
+
+ typedef FT_Error
(*FT_Get_MM_Blend_Func)( FT_Face face,
FT_UInt num_coords,
FT_Long* coords );
@@ -72,6 +80,7 @@ FT_BEGIN_HEADER
(*FT_Get_Var_Blend_Func)( FT_Face face,
FT_UInt *num_coords,
FT_Fixed* *coords,
+ FT_Fixed* *normalizedcoords,
FT_MM_Var* *mm_var );
typedef void
@@ -87,6 +96,7 @@ FT_BEGIN_HEADER
FT_Get_MM_Var_Func get_mm_var;
FT_Set_Var_Design_Func set_var_design;
FT_Get_Var_Design_Func get_var_design;
+ FT_Set_Instance_Func set_instance;
/* for internal use; only needed for code sharing between modules */
FT_Get_Var_Blend_Func get_var_blend;
@@ -96,27 +106,29 @@ FT_BEGIN_HEADER
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \
- get_mm_, \
- set_mm_design_, \
- set_mm_blend_, \
- get_mm_blend_, \
- get_mm_var_, \
- set_var_design_, \
- get_var_design_, \
- get_var_blend_, \
- done_blend_ ) \
- static const FT_Service_MultiMastersRec class_ = \
- { \
- get_mm_, \
- set_mm_design_, \
- set_mm_blend_, \
- get_mm_blend_, \
- get_mm_var_, \
- set_var_design_, \
- get_var_design_, \
- get_var_blend_, \
- done_blend_ \
+#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \
+ get_mm_, \
+ set_mm_design_, \
+ set_mm_blend_, \
+ get_mm_blend_, \
+ get_mm_var_, \
+ set_var_design_, \
+ get_var_design_, \
+ set_instance_, \
+ get_var_blend_, \
+ done_blend_ ) \
+ static const FT_Service_MultiMastersRec class_ = \
+ { \
+ get_mm_, \
+ set_mm_design_, \
+ set_mm_blend_, \
+ get_mm_blend_, \
+ get_mm_var_, \
+ set_var_design_, \
+ get_var_design_, \
+ set_instance_, \
+ get_var_blend_, \
+ done_blend_ \
};
#else /* FT_CONFIG_OPTION_PIC */
@@ -129,6 +141,7 @@ FT_BEGIN_HEADER
get_mm_var_, \
set_var_design_, \
get_var_design_, \
+ set_instance_, \
get_var_blend_, \
done_blend_ ) \
void \
@@ -141,6 +154,7 @@ FT_BEGIN_HEADER
clazz->get_mm_var = get_mm_var_; \
clazz->set_var_design = set_var_design_; \
clazz->get_var_design = get_var_design_; \
+ clazz->set_instance = set_instance_; \
clazz->get_var_blend = get_var_blend_; \
clazz->done_blend = done_blend_; \
}
diff --git a/modules/freetype2/include/freetype/internal/services/svotval.h b/modules/freetype2/include/freetype/internal/services/svotval.h
index bc929d4bd..31294296a 100644
--- a/modules/freetype2/include/freetype/internal/services/svotval.h
+++ b/modules/freetype2/include/freetype/internal/services/svotval.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType OpenType validation service (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svpfr.h b/modules/freetype2/include/freetype/internal/services/svpfr.h
index d0f7c4df9..e65d57e91 100644
--- a/modules/freetype2/include/freetype/internal/services/svpfr.h
+++ b/modules/freetype2/include/freetype/internal/services/svpfr.h
@@ -4,7 +4,7 @@
/* */
/* Internal PFR service functions (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svpostnm.h b/modules/freetype2/include/freetype/internal/services/svpostnm.h
index f12438005..4a49d8b05 100644
--- a/modules/freetype2/include/freetype/internal/services/svpostnm.h
+++ b/modules/freetype2/include/freetype/internal/services/svpostnm.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType PostScript name services (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svprop.h b/modules/freetype2/include/freetype/internal/services/svprop.h
index 75e62446b..adc0bcf43 100644
--- a/modules/freetype2/include/freetype/internal/services/svprop.h
+++ b/modules/freetype2/include/freetype/internal/services/svprop.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType property service (specification). */
/* */
-/* Copyright 2012-2016 by */
+/* Copyright 2012-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svpscmap.h b/modules/freetype2/include/freetype/internal/services/svpscmap.h
index 9acc21690..5589575b9 100644
--- a/modules/freetype2/include/freetype/internal/services/svpscmap.h
+++ b/modules/freetype2/include/freetype/internal/services/svpscmap.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType PostScript charmap service (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svpsinfo.h b/modules/freetype2/include/freetype/internal/services/svpsinfo.h
index f2c806044..408f406df 100644
--- a/modules/freetype2/include/freetype/internal/services/svpsinfo.h
+++ b/modules/freetype2/include/freetype/internal/services/svpsinfo.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType PostScript info service (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svsfnt.h b/modules/freetype2/include/freetype/internal/services/svsfnt.h
index 0f38cf195..e8b37bc47 100644
--- a/modules/freetype2/include/freetype/internal/services/svsfnt.h
+++ b/modules/freetype2/include/freetype/internal/services/svsfnt.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType SFNT table loading service (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svttcmap.h b/modules/freetype2/include/freetype/internal/services/svttcmap.h
index 772c72189..cd0e6fda6 100644
--- a/modules/freetype2/include/freetype/internal/services/svttcmap.h
+++ b/modules/freetype2/include/freetype/internal/services/svttcmap.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType TrueType/sfnt cmap extra information service. */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* Masatake YAMATO, Redhat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/include/freetype/internal/services/svtteng.h b/modules/freetype2/include/freetype/internal/services/svtteng.h
index c55061a03..92e3c541f 100644
--- a/modules/freetype2/include/freetype/internal/services/svtteng.h
+++ b/modules/freetype2/include/freetype/internal/services/svtteng.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType TrueType engine query service (specification). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svttglyf.h b/modules/freetype2/include/freetype/internal/services/svttglyf.h
index c33edd46d..16fac1ca1 100644
--- a/modules/freetype2/include/freetype/internal/services/svttglyf.h
+++ b/modules/freetype2/include/freetype/internal/services/svttglyf.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType TrueType glyph service. */
/* */
-/* Copyright 2007-2016 by */
+/* Copyright 2007-2018 by */
/* David Turner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/services/svwinfnt.h b/modules/freetype2/include/freetype/internal/services/svwinfnt.h
index c2f6d4c6d..80d481cbd 100644
--- a/modules/freetype2/include/freetype/internal/services/svwinfnt.h
+++ b/modules/freetype2/include/freetype/internal/services/svwinfnt.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType Windows FNT/FONT service (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/sfnt.h b/modules/freetype2/include/freetype/internal/sfnt.h
index e139315a1..fb1e327ae 100644
--- a/modules/freetype2/include/freetype/internal/sfnt.h
+++ b/modules/freetype2/include/freetype/internal/sfnt.h
@@ -4,7 +4,7 @@
/* */
/* High-level `sfnt' driver interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -458,6 +458,37 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <FuncType> */
+ /* TT_Get_Name_ID_Func */
+ /* */
+ /* <Description> */
+ /* Search whether an ENGLISH version for a given name ID is in the */
+ /* `name' table. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to the source face object. */
+ /* */
+ /* nameid :: The name id of the name record to return. */
+ /* */
+ /* <Out> */
+ /* win :: If non-negative, an index into the `name' table with */
+ /* the corresponding (3,1) or (3,0) Windows entry. */
+ /* */
+ /* apple :: If non-negative, an index into the `name' table with */
+ /* the corresponding (1,0) Apple entry. */
+ /* */
+ /* <Return> */
+ /* 1 if there is either a win or apple entry (or both), 0 otheriwse. */
+ /* */
+ typedef FT_Bool
+ (*TT_Get_Name_ID_Func)( TT_Face face,
+ FT_UShort nameid,
+ FT_Int *win,
+ FT_Int *apple );
+
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
/* TT_Load_Table_Func */
/* */
/* <Description> */
@@ -588,6 +619,7 @@ FT_BEGIN_HEADER
TT_Get_Metrics_Func get_metrics;
TT_Get_Name_Func get_name;
+ TT_Get_Name_ID_Func get_name_id;
} SFNT_Interface;
@@ -628,7 +660,8 @@ FT_BEGIN_HEADER
set_sbit_strike_, \
load_strike_metrics_, \
get_metrics_, \
- get_name_ ) \
+ get_name_, \
+ get_name_id_ ) \
static const SFNT_Interface class_ = \
{ \
goto_table_, \
@@ -661,6 +694,7 @@ FT_BEGIN_HEADER
load_strike_metrics_, \
get_metrics_, \
get_name_, \
+ get_name_id_ \
};
#else /* FT_CONFIG_OPTION_PIC */
@@ -699,7 +733,8 @@ FT_BEGIN_HEADER
set_sbit_strike_, \
load_strike_metrics_, \
get_metrics_, \
- get_name_ ) \
+ get_name_, \
+ get_name_id_ ) \
void \
FT_Init_Class_ ## class_( FT_Library library, \
SFNT_Interface* clazz ) \
@@ -736,6 +771,7 @@ FT_BEGIN_HEADER
clazz->load_strike_metrics = load_strike_metrics_; \
clazz->get_metrics = get_metrics_; \
clazz->get_name = get_name_; \
+ clazz->get_name_id = get_name_id_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/modules/freetype2/include/freetype/internal/t1types.h b/modules/freetype2/include/freetype/internal/t1types.h
index 494c011fc..2118e3367 100644
--- a/modules/freetype2/include/freetype/internal/t1types.h
+++ b/modules/freetype2/include/freetype/internal/t1types.h
@@ -5,7 +5,7 @@
/* Basic Type1/Type2 type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/include/freetype/internal/tttypes.h b/modules/freetype2/include/freetype/internal/tttypes.h
index eef3b108c..10dd336a8 100644
--- a/modules/freetype2/include/freetype/internal/tttypes.h
+++ b/modules/freetype2/include/freetype/internal/tttypes.h
@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -148,7 +148,7 @@ FT_BEGIN_HEADER
/* <Fields> */
/* See */
/* */
- /* http://www.w3.org/TR/WOFF/#WOFFHeader */
+ /* https://www.w3.org/TR/WOFF/#WOFFHeader */
/* */
typedef struct WOFF_HeaderRec_
{
@@ -243,7 +243,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
- /* TT_NameEntryRec */
+ /* TT_NameRec */
/* */
/* <Description> */
/* A structure modeling TrueType name records. Name records are used */
@@ -267,7 +267,7 @@ FT_BEGIN_HEADER
/* string :: A pointer to the string's bytes. Note that these */
/* are usually UTF-16 encoded characters. */
/* */
- typedef struct TT_NameEntryRec_
+ typedef struct TT_NameRec_
{
FT_UShort platformID;
FT_UShort encodingID;
@@ -279,9 +279,39 @@ FT_BEGIN_HEADER
/* this last field is not defined in the spec */
/* but used by the FreeType engine */
- FT_Byte* string;
+ FT_Byte* string;
- } TT_NameEntryRec, *TT_NameEntry;
+ } TT_NameRec, *TT_Name;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* TT_LangTagRec */
+ /* */
+ /* <Description> */
+ /* A structure modeling language tag records in SFNT `name' tables, */
+ /* introduced in OpenType version 1.6. */
+ /* */
+ /* <Fields> */
+ /* stringLength :: The length of the string in bytes. */
+ /* */
+ /* stringOffset :: The offset to the string in the `name' table. */
+ /* */
+ /* string :: A pointer to the string's bytes. Note that these */
+ /* are UTF-16BE encoded characters. */
+ /* */
+ typedef struct TT_LangTagRec_
+ {
+ FT_UShort stringLength;
+ FT_ULong stringOffset;
+
+ /* this last field is not defined in the spec */
+ /* but used by the FreeType engine */
+
+ FT_Byte* string;
+
+ } TT_LangTagRec, *TT_LangTag;
/*************************************************************************/
@@ -293,24 +323,30 @@ FT_BEGIN_HEADER
/* A structure modeling the TrueType name table. */
/* */
/* <Fields> */
- /* format :: The format of the name table. */
+ /* format :: The format of the name table. */
+ /* */
+ /* numNameRecords :: The number of names in table. */
/* */
- /* numNameRecords :: The number of names in table. */
+ /* storageOffset :: The offset of the name table in the `name' */
+ /* TrueType table. */
/* */
- /* storageOffset :: The offset of the name table in the `name' */
- /* TrueType table. */
+ /* names :: An array of name records. */
/* */
- /* names :: An array of name records. */
+ /* numLangTagRecords :: The number of language tags in table. */
/* */
- /* stream :: the file's input stream. */
+ /* langTags :: An array of language tag records. */
+ /* */
+ /* stream :: The file's input stream. */
/* */
typedef struct TT_NameTableRec_
{
- FT_UShort format;
- FT_UInt numNameRecords;
- FT_UInt storageOffset;
- TT_NameEntryRec* names;
- FT_Stream stream;
+ FT_UShort format;
+ FT_UInt numNameRecords;
+ FT_UInt storageOffset;
+ TT_NameRec* names;
+ FT_UInt numLangTagRecords;
+ TT_LangTagRec* langTags;
+ FT_Stream stream;
} TT_NameTableRec, *TT_NameTable;
@@ -1084,49 +1120,8 @@ FT_BEGIN_HEADER
#define TT_FACE_FLAG_VAR_BSB ( 1 << 6 )
#define TT_FACE_FLAG_VAR_VORG ( 1 << 7 )
- /* MVAR gasp data */
-#define TT_FACE_FLAG_VAR_GASP_0 ( 1 << 20 )
-#define TT_FACE_FLAG_VAR_GASP_1 ( 1 << 21 )
-#define TT_FACE_FLAG_VAR_GASP_2 ( 1 << 22 )
-#define TT_FACE_FLAG_VAR_GASP_3 ( 1 << 23 )
-#define TT_FACE_FLAG_VAR_GASP_4 ( 1 << 24 )
-#define TT_FACE_FLAG_VAR_GASP_5 ( 1 << 25 )
-#define TT_FACE_FLAG_VAR_GASP_6 ( 1 << 26 )
-#define TT_FACE_FLAG_VAR_GASP_7 ( 1 << 27 )
-#define TT_FACE_FLAG_VAR_GASP_8 ( 1 << 28 )
-#define TT_FACE_FLAG_VAR_GASP_9 ( 1 << 29 )
-
- /* The following flag macros are for the field `mvar_support'. */
-
- /* remaining MVAR data */
-#define TT_FACE_FLAG_VAR_CPHT ( 1 << 0 )
-#define TT_FACE_FLAG_VAR_HASC ( 1 << 1 )
-#define TT_FACE_FLAG_VAR_HCLA ( 1 << 2 )
-#define TT_FACE_FLAG_VAR_HCLD ( 1 << 3 )
-#define TT_FACE_FLAG_VAR_HCOF ( 1 << 4 )
-#define TT_FACE_FLAG_VAR_HCRN ( 1 << 5 )
-#define TT_FACE_FLAG_VAR_HCRS ( 1 << 6 )
-#define TT_FACE_FLAG_VAR_HDSC ( 1 << 7 )
-#define TT_FACE_FLAG_VAR_HLGP ( 1 << 8 )
-#define TT_FACE_FLAG_VAR_SBXO ( 1 << 9 )
-#define TT_FACE_FLAG_VAR_SBXS ( 1 << 10 )
-#define TT_FACE_FLAG_VAR_SBYO ( 1 << 11 )
-#define TT_FACE_FLAG_VAR_SBYS ( 1 << 12 )
-#define TT_FACE_FLAG_VAR_SPXO ( 1 << 13 )
-#define TT_FACE_FLAG_VAR_SPXS ( 1 << 14 )
-#define TT_FACE_FLAG_VAR_SPYO ( 1 << 15 )
-#define TT_FACE_FLAG_VAR_SPYS ( 1 << 16 )
-#define TT_FACE_FLAG_VAR_STRO ( 1 << 17 )
-#define TT_FACE_FLAG_VAR_STRS ( 1 << 18 )
-#define TT_FACE_FLAG_VAR_UNDO ( 1 << 19 )
-#define TT_FACE_FLAG_VAR_UNDS ( 1 << 20 )
-#define TT_FACE_FLAG_VAR_VASC ( 1 << 21 )
-#define TT_FACE_FLAG_VAR_VCOF ( 1 << 22 )
-#define TT_FACE_FLAG_VAR_VCRN ( 1 << 23 )
-#define TT_FACE_FLAG_VAR_VCRS ( 1 << 24 )
-#define TT_FACE_FLAG_VAR_VDSC ( 1 << 25 )
-#define TT_FACE_FLAG_VAR_VLGP ( 1 << 26 )
-#define TT_FACE_FLAG_VAR_XHGT ( 1 << 27 )
+ /* MVAR */
+#define TT_FACE_FLAG_VAR_MVAR ( 1 << 8 )
/*************************************************************************/
@@ -1295,6 +1290,8 @@ FT_BEGIN_HEADER
/* */
/* glyf_offset :: The file offset of the `glyf' table. */
/* */
+ /* is_cff2 :: Set if the font format is CFF2. */
+ /* */
/* doblend :: A boolean which is set if the font should */
/* be blended (this is for GX var). */
/* */
@@ -1302,18 +1299,20 @@ FT_BEGIN_HEADER
/* variation tables (rather like Multiple */
/* Master data). */
/* */
- /* is_default_instance :: Set if the glyph outlines can be used */
- /* unmodified (i.e., without applying glyph */
- /* variation deltas). */
- /* */
/* variation_support :: Flags that indicate which OpenType */
/* functionality related to font variation */
/* support is present, valid, and usable. */
/* For example, TT_FACE_FLAG_VAR_FVAR is only */
/* set if we have at least one design axis. */
/* */
- /* mvar_support :: Flags that indicate which metrics */
- /* variations are supported. */
+ /* var_postscript_prefix :: */
+ /* The PostScript name prefix needed for */
+ /* constructing a variation font instance's */
+ /* PS name . */
+ /* */
+ /* var_postscript_prefix_len :: */
+ /* The length of the `var_postscript_prefix' */
+ /* string. */
/* */
/* horz_metrics_size :: The size of the `hmtx' table. */
/* */
@@ -1344,7 +1343,7 @@ FT_BEGIN_HEADER
/* */
/* sbit_table_size :: The size of `sbit_table'. */
/* */
- /* sbit_table_type :: The sbit table type (CBLC, SBIX, etc.). */
+ /* sbit_table_type :: The sbit table type (CBLC, sbix, etc.). */
/* */
/* sbit_num_strikes :: The number of sbit strikes exposed by */
/* FreeType's API, omitting invalid strikes. */
@@ -1380,7 +1379,7 @@ FT_BEGIN_HEADER
/* */
/* sph_compatibility_mode :: */
/* This flag is set if we are in ClearType */
- /* backwards compatibility mode (used by the */
+ /* backward compatibility mode (used by the */
/* v38 implementation of the bytecode */
/* interpreter). */
/* */
@@ -1442,6 +1441,9 @@ FT_BEGIN_HEADER
void* var;
#endif
+ /* a typeless pointer to the PostScript Aux service */
+ void* psaux;
+
/***********************************************************************/
/* */
@@ -1465,7 +1467,7 @@ FT_BEGIN_HEADER
/***********************************************************************/
/* */
- /* TrueType-specific fields (ignored by the OTF-Type2 driver) */
+ /* TrueType-specific fields (ignored by the CFF driver) */
/* */
/***********************************************************************/
@@ -1500,15 +1502,17 @@ FT_BEGIN_HEADER
FT_ULong glyf_len;
FT_ULong glyf_offset; /* since 2.7.1 */
- FT_Bool isCFF2; /* since 2.7.1 */
+ FT_Bool is_cff2; /* since 2.7.1 */
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
FT_Bool doblend;
GX_Blend blend;
- FT_Bool is_default_instance; /* since 2.7.1 */
FT_UInt32 variation_support; /* since 2.7.1 */
- FT_UInt32 mvar_support; /* since 2.7.1 */
+
+ const char* var_postscript_prefix; /* since 2.7.2 */
+ FT_UInt var_postscript_prefix_len; /* since 2.7.2 */
+
#endif
/* since version 2.2 */
diff --git a/modules/freetype2/include/freetype/t1tables.h b/modules/freetype2/include/freetype/t1tables.h
index e272324ba..3503c2616 100644
--- a/modules/freetype2/include/freetype/t1tables.h
+++ b/modules/freetype2/include/freetype/t1tables.h
@@ -5,7 +5,7 @@
/* Basic Type 1/Type 2 tables definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -291,7 +291,7 @@ FT_BEGIN_HEADER
} PS_DesignMapRec, *PS_DesignMap;
- /* backwards-compatible definition */
+ /* backward compatible definition */
typedef PS_DesignMapRec T1_DesignMap;
@@ -326,7 +326,7 @@ FT_BEGIN_HEADER
} PS_BlendRec, *PS_Blend;
- /* backwards-compatible definition */
+ /* backward compatible definition */
typedef PS_BlendRec T1_Blend;
@@ -554,6 +554,9 @@ FT_BEGIN_HEADER
/* T1_ENCODING_TYPE_ISOLATIN1 :: */
/* T1_ENCODING_TYPE_EXPERT :: */
/* */
+ /* <Since> */
+ /* 2.4.8 */
+ /* */
typedef enum T1_EncodingType_
{
T1_ENCODING_TYPE_NONE = 0,
@@ -622,6 +625,9 @@ FT_BEGIN_HEADER
/* PS_DICT_FS_TYPE :: */
/* PS_DICT_ITALIC_ANGLE :: */
/* */
+ /* <Since> */
+ /* 2.4.8 */
+ /* */
typedef enum PS_Dict_Keys_
{
/* conventionally in the font dictionary */
@@ -743,6 +749,9 @@ FT_BEGIN_HEADER
* If the font's format is not PostScript-based, this function returns
* the `FT_Err_Invalid_Argument' error code.
*
+ * @since:
+ * 2.4.8
+ *
*/
FT_EXPORT( FT_Long )
FT_Get_PS_Font_Value( FT_Face face,
diff --git a/modules/freetype2/include/freetype/ttnameid.h b/modules/freetype2/include/freetype/ttnameid.h
index ce707f164..8605183dc 100644
--- a/modules/freetype2/include/freetype/ttnameid.h
+++ b/modules/freetype2/include/freetype/ttnameid.h
@@ -4,7 +4,7 @@
/* */
/* TrueType name ID definitions (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -36,7 +36,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* Possible values for the `platform' identifier code in the name */
- /* records of the TTF `name' table. */
+ /* records of an SFNT `name' table. */
/* */
/*************************************************************************/
@@ -119,14 +119,19 @@ FT_BEGIN_HEADER
* TT_APPLE_ID_VARIANT_SELECTOR ::
* From Adobe, not Apple. Not a normal cmap. Specifies variations
* on a real cmap.
+ *
+ * TT_APPLE_ID_FULL_UNICODE ::
+ * Used for fallback fonts that provide complete Unicode coverage with
+ * a type~13 cmap.
*/
-#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */
-#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */
-#define TT_APPLE_ID_ISO_10646 2 /* deprecated */
-#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */
+#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */
+#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */
+#define TT_APPLE_ID_ISO_10646 2 /* deprecated */
+#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */
#define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */
-#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */
+#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */
+#define TT_APPLE_ID_FULL_UNICODE 6 /* used with type 13 cmaps */
/***********************************************************************
@@ -137,42 +142,6 @@ FT_BEGIN_HEADER
* @description:
* A list of valid values for the `encoding_id' for
* @TT_PLATFORM_MACINTOSH charmaps and name entries.
- *
- * @values:
- * TT_MAC_ID_ROMAN ::
- * TT_MAC_ID_JAPANESE ::
- * TT_MAC_ID_TRADITIONAL_CHINESE ::
- * TT_MAC_ID_KOREAN ::
- * TT_MAC_ID_ARABIC ::
- * TT_MAC_ID_HEBREW ::
- * TT_MAC_ID_GREEK ::
- * TT_MAC_ID_RUSSIAN ::
- * TT_MAC_ID_RSYMBOL ::
- * TT_MAC_ID_DEVANAGARI ::
- * TT_MAC_ID_GURMUKHI ::
- * TT_MAC_ID_GUJARATI ::
- * TT_MAC_ID_ORIYA ::
- * TT_MAC_ID_BENGALI ::
- * TT_MAC_ID_TAMIL ::
- * TT_MAC_ID_TELUGU ::
- * TT_MAC_ID_KANNADA ::
- * TT_MAC_ID_MALAYALAM ::
- * TT_MAC_ID_SINHALESE ::
- * TT_MAC_ID_BURMESE ::
- * TT_MAC_ID_KHMER ::
- * TT_MAC_ID_THAI ::
- * TT_MAC_ID_LAOTIAN ::
- * TT_MAC_ID_GEORGIAN ::
- * TT_MAC_ID_ARMENIAN ::
- * TT_MAC_ID_MALDIVIAN ::
- * TT_MAC_ID_SIMPLIFIED_CHINESE ::
- * TT_MAC_ID_TIBETAN ::
- * TT_MAC_ID_MONGOLIAN ::
- * TT_MAC_ID_GEEZ ::
- * TT_MAC_ID_SLAVIC ::
- * TT_MAC_ID_VIETNAMESE ::
- * TT_MAC_ID_SINDHI ::
- * TT_MAC_ID_UNINTERP ::
*/
#define TT_MAC_ID_ROMAN 0
@@ -247,44 +216,47 @@ FT_BEGIN_HEADER
*
* @values:
* TT_MS_ID_SYMBOL_CS ::
- * Corresponds to Microsoft symbol encoding. See
- * @FT_ENCODING_MS_SYMBOL.
+ * Microsoft symbol encoding. See @FT_ENCODING_MS_SYMBOL.
*
* TT_MS_ID_UNICODE_CS ::
- * Corresponds to a Microsoft WGL4 charmap, matching Unicode. See
+ * Microsoft WGL4 charmap, matching Unicode. See
* @FT_ENCODING_UNICODE.
*
* TT_MS_ID_SJIS ::
- * Corresponds to SJIS Japanese encoding. See @FT_ENCODING_SJIS.
+ * Shift JIS Japanese encoding. See @FT_ENCODING_SJIS.
*
- * TT_MS_ID_GB2312 ::
- * Corresponds to Simplified Chinese as used in Mainland China. See
- * @FT_ENCODING_GB2312.
+ * TT_MS_ID_PRC ::
+ * Chinese encodings as used in the People's Republic of China (PRC).
+ * This means the encodings GB~2312 and its supersets GBK and
+ * GB~18030. See @FT_ENCODING_PRC.
*
* TT_MS_ID_BIG_5 ::
- * Corresponds to Traditional Chinese as used in Taiwan and Hong Kong.
- * See @FT_ENCODING_BIG5.
+ * Traditional Chinese as used in Taiwan and Hong Kong. See
+ * @FT_ENCODING_BIG5.
*
* TT_MS_ID_WANSUNG ::
- * Corresponds to Korean Wansung encoding. See @FT_ENCODING_WANSUNG.
+ * Korean Extended Wansung encoding. See @FT_ENCODING_WANSUNG.
*
* TT_MS_ID_JOHAB ::
- * Corresponds to Johab encoding. See @FT_ENCODING_JOHAB.
+ * Korean Johab encoding. See @FT_ENCODING_JOHAB.
*
* TT_MS_ID_UCS_4 ::
- * Corresponds to UCS-4 or UTF-32 charmaps. This has been added to
- * the OpenType specification version 1.4 (mid-2001.)
+ * UCS-4 or UTF-32 charmaps. This has been added to the OpenType
+ * specification version 1.4 (mid-2001).
*/
#define TT_MS_ID_SYMBOL_CS 0
#define TT_MS_ID_UNICODE_CS 1
#define TT_MS_ID_SJIS 2
-#define TT_MS_ID_GB2312 3
+#define TT_MS_ID_PRC 3
#define TT_MS_ID_BIG_5 4
#define TT_MS_ID_WANSUNG 5
#define TT_MS_ID_JOHAB 6
#define TT_MS_ID_UCS_4 10
+ /* this value is deprecated */
+#define TT_MS_ID_GB2312 TT_MS_ID_PRC
+
/***********************************************************************
*
@@ -312,17 +284,22 @@ FT_BEGIN_HEADER
#define TT_ADOBE_ID_LATIN_1 3
- /*************************************************************************/
- /* */
- /* Possible values of the language identifier field in the name records */
- /* of the TTF `name' table if the `platform' identifier code is */
- /* TT_PLATFORM_MACINTOSH. These values are also used as return values */
- /* for function @FT_Get_CMap_Language_ID. */
- /* */
- /* The canonical source for the Apple assigned Language ID's is at */
- /* */
- /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html */
- /* */
+ /***********************************************************************
+ *
+ * @enum:
+ * TT_MAC_LANGID_XXX
+ *
+ * @description:
+ * Possible values of the language identifier field in the name records
+ * of the SFNT `name' table if the `platform' identifier code is
+ * @TT_PLATFORM_MACINTOSH. These values are also used as return values
+ * for function @FT_Get_CMap_Language_ID.
+ *
+ * The canonical source for Apple's IDs is
+ *
+ * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html
+ */
+
#define TT_MAC_LANGID_ENGLISH 0
#define TT_MAC_LANGID_FRENCH 1
#define TT_MAC_LANGID_GERMAN 2
@@ -433,15 +410,6 @@ FT_BEGIN_HEADER
#define TT_MAC_LANGID_JAVANESE 138
#define TT_MAC_LANGID_SUNDANESE 139
-
-#if 0 /* these seem to be errors that have been dropped */
-
-#define TT_MAC_LANGID_SCOTTISH_GAELIC 140
-#define TT_MAC_LANGID_IRISH_GAELIC 141
-
-#endif
-
-
/* The following codes are new as of 2000-03-10 */
#define TT_MAC_LANGID_GALICIAN 140
#define TT_MAC_LANGID_AFRIKAANS 141
@@ -456,18 +424,30 @@ FT_BEGIN_HEADER
#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT 150
- /*************************************************************************/
- /* */
- /* Possible values of the language identifier field in the name records */
- /* of the TTF `name' table if the `platform' identifier code is */
- /* TT_PLATFORM_MICROSOFT. */
- /* */
- /* The canonical source for the MS assigned LCIDs is */
- /* */
- /* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */
- /* */
+ /***********************************************************************
+ *
+ * @enum:
+ * TT_MS_LANGID_XXX
+ *
+ * @description:
+ * Possible values of the language identifier field in the name records
+ * of the SFNT `name' table if the `platform' identifier code is
+ * @TT_PLATFORM_MICROSOFT. These values are also used as return values
+ * for function @FT_Get_CMap_Language_ID.
+ *
+ * The canonical source for Microsoft's IDs is
+ *
+ * https://www.microsoft.com/globaldev/reference/lcid-all.mspx ,
+ *
+ * however, we only provide macros for language identifiers present in
+ * the OpenType specification: Microsoft has abandoned the concept of
+ * LCIDs (language code identifiers), and format~1 of the `name' table
+ * provides a better mechanism for languages not covered here.
+ *
+ * More legacy values not listed in the reference can be found in the
+ * @FT_TRUETYPE_IDS_H header file.
+ */
-#define TT_MS_LANGID_ARABIC_GENERAL 0x0001
#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401
#define TT_MS_LANGID_ARABIC_IRAQ 0x0801
#define TT_MS_LANGID_ARABIC_EGYPT 0x0C01
@@ -485,39 +465,20 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3C01
#define TT_MS_LANGID_ARABIC_QATAR 0x4001
#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402
-#define TT_MS_LANGID_CATALAN_SPAIN 0x0403
-#define TT_MS_LANGID_CHINESE_GENERAL 0x0004
+#define TT_MS_LANGID_CATALAN_CATALAN 0x0403
#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404
#define TT_MS_LANGID_CHINESE_PRC 0x0804
#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0C04
#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004
-
-#if 1 /* this looks like the correct value */
-#define TT_MS_LANGID_CHINESE_MACAU 0x1404
-#else /* but beware, Microsoft may change its mind...
- the most recent Word reference has the following: */
-#define TT_MS_LANGID_CHINESE_MACAU TT_MS_LANGID_CHINESE_HONG_KONG
-#endif
-
-#if 0 /* used only with .NET `cultures'; commented out */
-#define TT_MS_LANGID_CHINESE_TRADITIONAL 0x7C04
-#endif
-
+#define TT_MS_LANGID_CHINESE_MACAO 0x1404
#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405
#define TT_MS_LANGID_DANISH_DENMARK 0x0406
#define TT_MS_LANGID_GERMAN_GERMANY 0x0407
#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807
#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0C07
#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007
-#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407
+#define TT_MS_LANGID_GERMAN_LIECHTENSTEIN 0x1407
#define TT_MS_LANGID_GREEK_GREECE 0x0408
-
- /* don't ask what this one means... It is commented out currently. */
-#if 0
-#define TT_MS_LANGID_GREEK_GREECE2 0x2008
-#endif
-
-#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009
#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409
#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809
#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0C09
@@ -531,14 +492,12 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2C09
#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009
#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409
-#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809
-#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09
#define TT_MS_LANGID_ENGLISH_INDIA 0x4009
#define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409
#define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809
#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040A
#define TT_MS_LANGID_SPANISH_MEXICO 0x080A
-#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0C0A
+#define TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT 0x0C0A
#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100A
#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140A
#define TT_MS_LANGID_SPANISH_PANAMA 0x180A
@@ -557,9 +516,6 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4C0A
#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500A
#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540A
- /* The following ID blatantly violate MS specs by using a */
- /* sublanguage > 0x1F. */
-#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU
#define TT_MS_LANGID_FINNISH_FINLAND 0x040B
#define TT_MS_LANGID_FRENCH_FRANCE 0x040C
#define TT_MS_LANGID_FRENCH_BELGIUM 0x080C
@@ -567,27 +523,13 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100C
#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140C
#define TT_MS_LANGID_FRENCH_MONACO 0x180C
-#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C
-#define TT_MS_LANGID_FRENCH_REUNION 0x200C
-#define TT_MS_LANGID_FRENCH_CONGO 0x240C
- /* which was formerly: */
-#define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO
-#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C
-#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C
-#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C
-#define TT_MS_LANGID_FRENCH_MALI 0x340C
-#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C
-#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C
- /* and another violation of the spec (see 0xE40AU) */
-#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU
#define TT_MS_LANGID_HEBREW_ISRAEL 0x040D
#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040E
#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040F
#define TT_MS_LANGID_ITALIAN_ITALY 0x0410
#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810
#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411
-#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412
-#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812
+#define TT_MS_LANGID_KOREAN_KOREA 0x0412
#define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413
#define TT_MS_LANGID_DUTCH_BELGIUM 0x0813
#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414
@@ -595,26 +537,17 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_POLISH_POLAND 0x0415
#define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416
#define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816
-#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417
+#define TT_MS_LANGID_ROMANSH_SWITZERLAND 0x0417
#define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418
-#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818
#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419
-#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819
#define TT_MS_LANGID_CROATIAN_CROATIA 0x041A
#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081A
#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0C1A
-
-#if 0 /* this used to be this value, but it looks like we were wrong */
-#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101A
-#else /* current sources say */
#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101A
#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141A
- /* and XPsp2 Platform SDK added (2004-07-26) */
- /* Names are shortened to be significant within 40 chars. */
#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181A
-#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181A
-#endif
-
+#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x1C1A
+#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC 0x201A
#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041B
#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041C
#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041D
@@ -622,36 +555,30 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_THAI_THAILAND 0x041E
#define TT_MS_LANGID_TURKISH_TURKEY 0x041F
#define TT_MS_LANGID_URDU_PAKISTAN 0x0420
-#define TT_MS_LANGID_URDU_INDIA 0x0820
#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421
#define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422
#define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423
-#define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424
+#define TT_MS_LANGID_SLOVENIAN_SLOVENIA 0x0424
#define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425
#define TT_MS_LANGID_LATVIAN_LATVIA 0x0426
#define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427
-#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827
#define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428
-#define TT_MS_LANGID_FARSI_IRAN 0x0429
#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042A
#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042B
#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042C
#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082C
-#define TT_MS_LANGID_BASQUE_SPAIN 0x042D
-#define TT_MS_LANGID_SORBIAN_GERMANY 0x042E
+#define TT_MS_LANGID_BASQUE_BASQUE 0x042D
+#define TT_MS_LANGID_UPPER_SORBIAN_GERMANY 0x042E
+#define TT_MS_LANGID_LOWER_SORBIAN_GERMANY 0x082E
#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042F
-#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430
-#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431
-#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432
-#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433
-#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434
-#define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435
+#define TT_MS_LANGID_SETSWANA_SOUTH_AFRICA 0x0432
+#define TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA 0x0434
+#define TT_MS_LANGID_ISIZULU_SOUTH_AFRICA 0x0435
#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436
#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437
#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438
#define TT_MS_LANGID_HINDI_INDIA 0x0439
#define TT_MS_LANGID_MALTESE_MALTA 0x043A
- /* Added by XPsp2 Platform SDK (2004-07-26) */
#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043B
#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083B
#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3B
@@ -661,37 +588,21 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3B
#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203B
#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243B
- /* ... and we also keep our old identifier... */
-#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B
-
-#if 0 /* this seems to be a previous inversion */
-#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C
-#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C
-#else
-#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C
-#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C
-#endif
-
-#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D
+#define TT_MS_LANGID_IRISH_IRELAND 0x083C
#define TT_MS_LANGID_MALAY_MALAYSIA 0x043E
#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083E
-#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043F
-#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440
- /* alias declared in Windows 2000 */
-#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \
- TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN
-
-#define TT_MS_LANGID_SWAHILI_KENYA 0x0441
+#define TT_MS_LANGID_KAZAKH_KAZAKHSTAN 0x043F
+#define TT_MS_LANGID_KYRGYZ_KYRGYZSTAN /* Cyrillic*/ 0x0440
+#define TT_MS_LANGID_KISWAHILI_KENYA 0x0441
#define TT_MS_LANGID_TURKMEN_TURKMENISTAN 0x0442
#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443
#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843
-#define TT_MS_LANGID_TATAR_TATARSTAN 0x0444
+#define TT_MS_LANGID_TATAR_RUSSIA 0x0444
#define TT_MS_LANGID_BENGALI_INDIA 0x0445
#define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845
#define TT_MS_LANGID_PUNJABI_INDIA 0x0446
-#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846
#define TT_MS_LANGID_GUJARATI_INDIA 0x0447
-#define TT_MS_LANGID_ORIYA_INDIA 0x0448
+#define TT_MS_LANGID_ODIA_INDIA 0x0448
#define TT_MS_LANGID_TAMIL_INDIA 0x0449
#define TT_MS_LANGID_TELUGU_INDIA 0x044A
#define TT_MS_LANGID_KANNADA_INDIA 0x044B
@@ -700,142 +611,241 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_MARATHI_INDIA 0x044E
#define TT_MS_LANGID_SANSKRIT_INDIA 0x044F
#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450
-#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850
-#define TT_MS_LANGID_TIBETAN_CHINA 0x0451
- /* Don't use the next constant! It has */
- /* (1) the wrong spelling (Dzonghka) */
- /* (2) Microsoft doesn't officially define it -- */
- /* at least it is not in the List of Local */
- /* ID Values. */
- /* (3) Dzongkha is not the same language as */
- /* Tibetan, so merging it is wrong anyway. */
- /* */
- /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW. */
-#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851
-
-#if 0
- /* the following used to be defined */
-#define TT_MS_LANGID_TIBETAN_BHUTAN 0x0451
- /* ... but it was changed; */
-#else
- /* So we will continue to #define it, but with the correct value */
-#define TT_MS_LANGID_TIBETAN_BHUTAN TT_MS_LANGID_DZONGHKA_BHUTAN
-#endif
-
-#define TT_MS_LANGID_WELSH_WALES 0x0452
+#define TT_MS_LANGID_MONGOLIAN_PRC 0x0850
+#define TT_MS_LANGID_TIBETAN_PRC 0x0451
+#define TT_MS_LANGID_WELSH_UNITED_KINGDOM 0x0452
#define TT_MS_LANGID_KHMER_CAMBODIA 0x0453
#define TT_MS_LANGID_LAO_LAOS 0x0454
-#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455
-#define TT_MS_LANGID_GALICIAN_SPAIN 0x0456
+#define TT_MS_LANGID_GALICIAN_GALICIAN 0x0456
#define TT_MS_LANGID_KONKANI_INDIA 0x0457
-#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458
-#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459
-#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859
- /* Missing a LCID for Sindhi in Devanagari script */
#define TT_MS_LANGID_SYRIAC_SYRIA 0x045A
-#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045B
-#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C
+#define TT_MS_LANGID_SINHALA_SRI_LANKA 0x045B
#define TT_MS_LANGID_INUKTITUT_CANADA 0x045D
+#define TT_MS_LANGID_INUKTITUT_CANADA_LATIN 0x085D
#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045E
-#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F
-#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085F
- /* Missing a LCID for Tifinagh script */
-#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460
- /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */
- /* script is yet unclear... might be Arabic, Nagari or Sharada */
-#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860
- /* ... and aliased (by MS) for compatibility reasons. */
-#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA
+#define TT_MS_LANGID_TAMAZIGHT_ALGERIA 0x085F
#define TT_MS_LANGID_NEPALI_NEPAL 0x0461
-#define TT_MS_LANGID_NEPALI_INDIA 0x0861
#define TT_MS_LANGID_FRISIAN_NETHERLANDS 0x0462
#define TT_MS_LANGID_PASHTO_AFGHANISTAN 0x0463
#define TT_MS_LANGID_FILIPINO_PHILIPPINES 0x0464
#define TT_MS_LANGID_DHIVEHI_MALDIVES 0x0465
- /* alias declared in Windows 2000 */
-#define TT_MS_LANGID_DIVEHI_MALDIVES TT_MS_LANGID_DHIVEHI_MALDIVES
-#define TT_MS_LANGID_EDO_NIGERIA 0x0466
-#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467
#define TT_MS_LANGID_HAUSA_NIGERIA 0x0468
-#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469
#define TT_MS_LANGID_YORUBA_NIGERIA 0x046A
#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046B
#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086B
#define TT_MS_LANGID_QUECHUA_PERU 0x0C6B
-#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046C
- /* Also spelled by XPsp2 Platform SDK (2004-07-26) */
-#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \
- TT_MS_LANGID_SEPEDI_SOUTH_AFRICA
- /* language codes 0x046D, 0x046E and 0x046F are (still) unknown. */
+#define TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA 0x046C
+#define TT_MS_LANGID_BASHKIR_RUSSIA 0x046D
+#define TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG 0x046E
+#define TT_MS_LANGID_GREENLANDIC_GREENLAND 0x046F
#define TT_MS_LANGID_IGBO_NIGERIA 0x0470
+#define TT_MS_LANGID_YI_PRC 0x0478
+#define TT_MS_LANGID_MAPUDUNGUN_CHILE 0x047A
+#define TT_MS_LANGID_MOHAWK_MOHAWK 0x047C
+#define TT_MS_LANGID_BRETON_FRANCE 0x047E
+#define TT_MS_LANGID_UIGHUR_PRC 0x0480
+#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481
+#define TT_MS_LANGID_OCCITAN_FRANCE 0x0482
+#define TT_MS_LANGID_CORSICAN_FRANCE 0x0483
+#define TT_MS_LANGID_ALSATIAN_FRANCE 0x0484
+#define TT_MS_LANGID_YAKUT_RUSSIA 0x0485
+#define TT_MS_LANGID_KICHE_GUATEMALA 0x0486
+#define TT_MS_LANGID_KINYARWANDA_RWANDA 0x0487
+#define TT_MS_LANGID_WOLOF_SENEGAL 0x0488
+#define TT_MS_LANGID_DARI_AFGHANISTAN 0x048C
+
+ /* */
+
+
+ /* legacy macro definitions not present in OpenType 1.8.1 */
+#define TT_MS_LANGID_ARABIC_GENERAL 0x0001
+#define TT_MS_LANGID_CATALAN_SPAIN \
+ TT_MS_LANGID_CATALAN_CATALAN
+#define TT_MS_LANGID_CHINESE_GENERAL 0x0004
+#define TT_MS_LANGID_CHINESE_MACAU \
+ TT_MS_LANGID_CHINESE_MACAO
+#define TT_MS_LANGID_GERMAN_LIECHTENSTEI \
+ TT_MS_LANGID_GERMAN_LIECHTENSTEIN
+#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009
+#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809
+#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09
+#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT \
+ TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT
+#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU
+#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C
+#define TT_MS_LANGID_FRENCH_REUNION 0x200C
+#define TT_MS_LANGID_FRENCH_CONGO 0x240C
+ /* which was formerly: */
+#define TT_MS_LANGID_FRENCH_ZAIRE \
+ TT_MS_LANGID_FRENCH_CONGO
+#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C
+#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C
+#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C
+#define TT_MS_LANGID_FRENCH_MALI 0x340C
+#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C
+#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C
+#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU
+#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA \
+ TT_MS_LANGID_KOREAN_KOREA
+#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812
+#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND \
+ TT_MS_LANGID_ROMANSH_SWITZERLAND
+#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818
+#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819
+#define TT_MS_LANGID_URDU_INDIA 0x0820
+#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827
+#define TT_MS_LANGID_SLOVENE_SLOVENIA \
+ TT_MS_LANGID_SLOVENIAN_SLOVENIA
+#define TT_MS_LANGID_FARSI_IRAN 0x0429
+#define TT_MS_LANGID_BASQUE_SPAIN \
+ TT_MS_LANGID_BASQUE_BASQUE
+#define TT_MS_LANGID_SORBIAN_GERMANY \
+ TT_MS_LANGID_UPPER_SORBIAN_GERMANY
+#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430
+#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431
+#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA \
+ TT_MS_LANGID_SETSWANA_SOUTH_AFRICA
+#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433
+#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA \
+ TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA
+#define TT_MS_LANGID_ZULU_SOUTH_AFRICA \
+ TT_MS_LANGID_ISIZULU_SOUTH_AFRICA
+#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B
+ /* the next two values are incorrectly inverted */
+#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C
+#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C
+#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D
+#define TT_MS_LANGID_KAZAK_KAZAKSTAN \
+ TT_MS_LANGID_KAZAKH_KAZAKHSTAN
+#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \
+ TT_MS_LANGID_KYRGYZ_KYRGYZSTAN
+#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN \
+ TT_MS_LANGID_KYRGYZ_KYRGYZSTAN
+#define TT_MS_LANGID_SWAHILI_KENYA \
+ TT_MS_LANGID_KISWAHILI_KENYA
+#define TT_MS_LANGID_TATAR_TATARSTAN \
+ TT_MS_LANGID_TATAR_RUSSIA
+#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846
+#define TT_MS_LANGID_ORIYA_INDIA \
+ TT_MS_LANGID_ODIA_INDIA
+#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN \
+ TT_MS_LANGID_MONGOLIAN_PRC
+#define TT_MS_LANGID_TIBETAN_CHINA \
+ TT_MS_LANGID_TIBETAN_PRC
+#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851
+#define TT_MS_LANGID_TIBETAN_BHUTAN \
+ TT_MS_LANGID_DZONGHKA_BHUTAN
+#define TT_MS_LANGID_WELSH_WALES \
+ TT_MS_LANGID_WELSH_UNITED_KINGDOM
+#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455
+#define TT_MS_LANGID_GALICIAN_SPAIN \
+ TT_MS_LANGID_GALICIAN_GALICIAN
+#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458
+#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459
+#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859
+#define TT_MS_LANGID_SINHALESE_SRI_LANKA \
+ TT_MS_LANGID_SINHALA_SRI_LANKA
+#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C
+#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F
+#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN \
+ TT_MS_LANGID_TAMAZIGHT_ALGERIA
+#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460
+#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860
+#define TT_MS_LANGID_KASHMIRI_INDIA \
+ TT_MS_LANGID_KASHMIRI_SASIA
+#define TT_MS_LANGID_NEPALI_INDIA 0x0861
+#define TT_MS_LANGID_DIVEHI_MALDIVES \
+ TT_MS_LANGID_DHIVEHI_MALDIVES
+#define TT_MS_LANGID_EDO_NIGERIA 0x0466
+#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467
+#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469
+#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA \
+ TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA
+#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \
+ TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA
#define TT_MS_LANGID_KANURI_NIGERIA 0x0471
#define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472
#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA 0x0473
#define TT_MS_LANGID_TIGRIGNA_ERYTHREA 0x0873
- /* also spelled in the `Passport SDK' list as: */
-#define TT_MS_LANGID_TIGRIGNA_ERYTREA TT_MS_LANGID_TIGRIGNA_ERYTHREA
+#define TT_MS_LANGID_TIGRIGNA_ERYTREA \
+ TT_MS_LANGID_TIGRIGNA_ERYTHREA
#define TT_MS_LANGID_GUARANI_PARAGUAY 0x0474
#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES 0x0475
#define TT_MS_LANGID_LATIN 0x0476
#define TT_MS_LANGID_SOMALI_SOMALIA 0x0477
- /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */
- /* not written (but OTOH the peculiar writing system is worth */
- /* studying). */
-#define TT_MS_LANGID_YI_CHINA 0x0478
+#define TT_MS_LANGID_YI_CHINA \
+ TT_MS_LANGID_YI_PRC
#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479
- /* language codes from 0x047A to 0x047F are (still) unknown. */
-#define TT_MS_LANGID_UIGHUR_CHINA 0x0480
-#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481
+#define TT_MS_LANGID_UIGHUR_CHINA \
+ TT_MS_LANGID_UIGHUR_PRC
-#if 0 /* not deemed useful for fonts */
-#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04FF
-#endif
+ /***********************************************************************
+ *
+ * @enum:
+ * TT_NAME_ID_XXX
+ *
+ * @description:
+ * Possible values of the `name' identifier field in the name records of
+ * an SFNT `name' table. These values are platform independent.
+ */
- /*************************************************************************/
- /* */
- /* Possible values of the `name' identifier field in the name records of */
- /* the TTF `name' table. These values are platform independent. */
- /* */
-#define TT_NAME_ID_COPYRIGHT 0
-#define TT_NAME_ID_FONT_FAMILY 1
-#define TT_NAME_ID_FONT_SUBFAMILY 2
-#define TT_NAME_ID_UNIQUE_ID 3
-#define TT_NAME_ID_FULL_NAME 4
-#define TT_NAME_ID_VERSION_STRING 5
-#define TT_NAME_ID_PS_NAME 6
-#define TT_NAME_ID_TRADEMARK 7
+#define TT_NAME_ID_COPYRIGHT 0
+#define TT_NAME_ID_FONT_FAMILY 1
+#define TT_NAME_ID_FONT_SUBFAMILY 2
+#define TT_NAME_ID_UNIQUE_ID 3
+#define TT_NAME_ID_FULL_NAME 4
+#define TT_NAME_ID_VERSION_STRING 5
+#define TT_NAME_ID_PS_NAME 6
+#define TT_NAME_ID_TRADEMARK 7
/* the following values are from the OpenType spec */
-#define TT_NAME_ID_MANUFACTURER 8
-#define TT_NAME_ID_DESIGNER 9
-#define TT_NAME_ID_DESCRIPTION 10
-#define TT_NAME_ID_VENDOR_URL 11
-#define TT_NAME_ID_DESIGNER_URL 12
-#define TT_NAME_ID_LICENSE 13
-#define TT_NAME_ID_LICENSE_URL 14
+#define TT_NAME_ID_MANUFACTURER 8
+#define TT_NAME_ID_DESIGNER 9
+#define TT_NAME_ID_DESCRIPTION 10
+#define TT_NAME_ID_VENDOR_URL 11
+#define TT_NAME_ID_DESIGNER_URL 12
+#define TT_NAME_ID_LICENSE 13
+#define TT_NAME_ID_LICENSE_URL 14
/* number 15 is reserved */
-#define TT_NAME_ID_PREFERRED_FAMILY 16
-#define TT_NAME_ID_PREFERRED_SUBFAMILY 17
-#define TT_NAME_ID_MAC_FULL_NAME 18
+#define TT_NAME_ID_TYPOGRAPHIC_FAMILY 16
+#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY 17
+#define TT_NAME_ID_MAC_FULL_NAME 18
/* The following code is new as of 2000-01-21 */
-#define TT_NAME_ID_SAMPLE_TEXT 19
+#define TT_NAME_ID_SAMPLE_TEXT 19
/* This is new in OpenType 1.3 */
-#define TT_NAME_ID_CID_FINDFONT_NAME 20
+#define TT_NAME_ID_CID_FINDFONT_NAME 20
/* This is new in OpenType 1.5 */
-#define TT_NAME_ID_WWS_FAMILY 21
-#define TT_NAME_ID_WWS_SUBFAMILY 22
+#define TT_NAME_ID_WWS_FAMILY 21
+#define TT_NAME_ID_WWS_SUBFAMILY 22
+ /* This is new in OpenType 1.7 */
+#define TT_NAME_ID_LIGHT_BACKGROUND 23
+#define TT_NAME_ID_DARK_BACKGROUND 24
- /*************************************************************************/
- /* */
- /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table. */
- /* */
- /* Updated 08-Nov-2008. */
- /* */
+ /* This is new in OpenType 1.8 */
+#define TT_NAME_ID_VARIATIONS_PREFIX 25
+
+ /* these two values are deprecated */
+#define TT_NAME_ID_PREFERRED_FAMILY TT_NAME_ID_TYPOGRAPHIC_FAMILY
+#define TT_NAME_ID_PREFERRED_SUBFAMILY TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
+
+
+ /***********************************************************************
+ *
+ * @enum:
+ * TT_UCR_XXX
+ *
+ * @description:
+ * Possible bit mask values for the `ulUnicodeRangeX' fields in an SFNT
+ * `OS/2' table.
+ */
+
+ /* ulUnicodeRange1 */
+ /* --------------- */
/* Bit 0 Basic Latin */
#define TT_UCR_BASIC_LATIN (1L << 0) /* U+0020-U+007E */
@@ -857,7 +867,7 @@ FT_BEGIN_HEADER
/* U+A700-U+A71F */
/* Bit 6 Combining Diacritical Marks */
/* Combining Diacritical Marks Supplement */
-#define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */
+#define TT_UCR_COMBINING_DIACRITICAL_MARKS (1L << 6) /* U+0300-U+036F */
/* U+1DC0-U+1DFF */
/* Bit 7 Greek and Coptic */
#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */
@@ -925,12 +935,17 @@ FT_BEGIN_HEADER
/* Supplemental Punctuation */
#define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */
/* U+2E00-U+2E7F */
+
+ /* ulUnicodeRange2 */
+ /* --------------- */
+
/* Bit 32 Superscripts And Subscripts */
#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */
/* Bit 33 Currency Symbols */
#define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */
/* Bit 34 Combining Diacritical Marks For Symbols */
-#define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */
+#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
+ (1L << 2) /* U+20D0-U+20FF */
/* Bit 35 Letterlike Symbols */
#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */
/* Bit 36 Number Forms */
@@ -996,13 +1011,13 @@ FT_BEGIN_HEADER
/* Bit 57 High Surrogates */
/* High Private Use Surrogates */
/* Low Surrogates */
- /* */
+
/* According to OpenType specs v.1.3+, */
/* setting bit 57 implies that there is */
/* at least one codepoint beyond the */
/* Basic Multilingual Plane that is */
/* supported by this font. So it really */
- /* means >= U+10000 */
+ /* means >= U+10000. */
#define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */
/* U+DB80-U+DBFF */
/* U+DC00-U+DFFF */
@@ -1034,7 +1049,11 @@ FT_BEGIN_HEADER
/* Bit 62 Alphabetic Presentation Forms */
#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */
/* Bit 63 Arabic Presentation Forms-A */
-#define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FDFF */
+#define TT_UCR_ARABIC_PRESENTATION_FORMS_A (1L << 31) /* U+FB50-U+FDFF */
+
+ /* ulUnicodeRange3 */
+ /* --------------- */
+
/* Bit 64 Combining Half Marks */
#define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */
/* Bit 65 Vertical forms */
@@ -1044,7 +1063,7 @@ FT_BEGIN_HEADER
/* Bit 66 Small Form Variants */
#define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */
/* Bit 67 Arabic Presentation Forms-B */
-#define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFE */
+#define TT_UCR_ARABIC_PRESENTATION_FORMS_B (1L << 3) /* U+FE70-U+FEFE */
/* Bit 68 Halfwidth and Fullwidth Forms */
#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */
/* Bit 69 Specials */
@@ -1123,6 +1142,10 @@ FT_BEGIN_HEADER
#define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */
/* Bit 95 New Tai Lue */
#define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */
+
+ /* ulUnicodeRange4 */
+ /* --------------- */
+
/* Bit 96 Buginese */
#define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */
/* Bit 97 Glagolitic */
@@ -1191,42 +1214,18 @@ FT_BEGIN_HEADER
/*U+1F000-U+1F02F*/
/* Bit 123-127 Reserved for process-internal usage */
+ /* */
- /*************************************************************************/
- /* */
- /* Some compilers have a very limited length of identifiers. */
- /* */
-#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ )
-#define HAVE_LIMIT_ON_IDENTS
-#endif
-
-
-#ifndef HAVE_LIMIT_ON_IDENTS
-
-
- /*************************************************************************/
- /* */
- /* Here some alias #defines in order to be clearer. */
- /* */
- /* These are not always #defined to stay within the 31~character limit, */
- /* which some compilers have. */
- /* */
- /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */
- /* Borland compilers (read: from BC++ 3.1 on) can increase this limit. */
- /* If you get a warning with such a compiler, use the -i40 switch. */
- /* */
-#define TT_UCR_ARABIC_PRESENTATION_FORMS_A \
- TT_UCR_ARABIC_PRESENTATIONS_A
-#define TT_UCR_ARABIC_PRESENTATION_FORMS_B \
- TT_UCR_ARABIC_PRESENTATIONS_B
-
-#define TT_UCR_COMBINING_DIACRITICAL_MARKS \
- TT_UCR_COMBINING_DIACRITICS
-#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
- TT_UCR_COMBINING_DIACRITICS_SYMB
-
+ /* for backward compatibility with older FreeType versions */
+#define TT_UCR_ARABIC_PRESENTATION_A \
+ TT_UCR_ARABIC_PRESENTATION_FORMS_A
+#define TT_UCR_ARABIC_PRESENTATION_B \
+ TT_UCR_ARABIC_PRESENTATION_FORMS_B
-#endif /* !HAVE_LIMIT_ON_IDENTS */
+#define TT_UCR_COMBINING_DIACRITICS \
+ TT_UCR_COMBINING_DIACRITICAL_MARKS
+#define TT_UCR_COMBINING_DIACRITICS_SYMB \
+ TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB
FT_END_HEADER
diff --git a/modules/freetype2/include/freetype/tttables.h b/modules/freetype2/include/freetype/tttables.h
index 1c075dcf6..ce6a61779 100644
--- a/modules/freetype2/include/freetype/tttables.h
+++ b/modules/freetype2/include/freetype/tttables.h
@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType tables definitions and interface */
/* (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -45,8 +45,9 @@ FT_BEGIN_HEADER
/* TrueType specific table types and functions. */
/* */
/* <Description> */
- /* This section contains the definition of TrueType-specific tables */
- /* as well as some routines used to access and process them. */
+ /* This section contains definitions of some basic tables specific to */
+ /* TrueType and OpenType as well as some routines used to access and */
+ /* process them. */
/* */
/* <Order> */
/* TT_Header */
@@ -76,8 +77,8 @@ FT_BEGIN_HEADER
/* TT_Header */
/* */
/* <Description> */
- /* A structure used to model a TrueType font header table. All */
- /* fields follow the TrueType specification. */
+ /* A structure to model a TrueType font header table. All fields */
+ /* follow the OpenType specification. */
/* */
typedef struct TT_Header_
{
@@ -114,9 +115,9 @@ FT_BEGIN_HEADER
/* TT_HoriHeader */
/* */
/* <Description> */
- /* A structure used to model a TrueType horizontal header, the `hhea' */
+ /* A structure to model a TrueType horizontal header, the `hhea' */
/* table, as well as the corresponding horizontal metrics table, */
- /* i.e., the `hmtx' table. */
+ /* `hmtx'. */
/* */
/* <Fields> */
/* Version :: The table version. */
@@ -131,7 +132,7 @@ FT_BEGIN_HEADER
/* glyphs found in the font (maybe ASCII). */
/* */
/* You should use the `sTypoAscender' field */
- /* of the OS/2 table instead if you want */
+ /* of the `OS/2' table instead if you want */
/* the correct one. */
/* */
/* Descender :: The font's descender, i.e., the distance */
@@ -145,7 +146,7 @@ FT_BEGIN_HEADER
/* glyphs found in the font (maybe ASCII). */
/* */
/* You should use the `sTypoDescender' */
- /* field of the OS/2 table instead if you */
+ /* field of the `OS/2' table instead if you */
/* want the correct one. */
/* */
/* Line_Gap :: The font's line gap, i.e., the distance */
@@ -175,6 +176,8 @@ FT_BEGIN_HEADER
/* caret_Slope_Run :: The run coefficient of the cursor's */
/* slope. */
/* */
+ /* caret_Offset :: The cursor's offset for slanted fonts. */
+ /* */
/* Reserved :: 8~reserved bytes. */
/* */
/* metric_Data_Format :: Always~0. */
@@ -188,13 +191,10 @@ FT_BEGIN_HEADER
/* short_metrics :: A pointer into the `hmtx' table. */
/* */
/* <Note> */
- /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
- /* be identical except for the names of their fields, */
- /* which are different. */
- /* */
- /* This ensures that a single function in the `ttload' */
- /* module is able to read both the horizontal and vertical */
- /* headers. */
+ /* For an OpenType variation font, the values of the following fields */
+ /* can change after a call to @FT_Set_Var_Design_Coordinates (and */
+ /* friends) if the font contains an `MVAR' table: `caret_Slope_Rise', */
+ /* `caret_Slope_Run', and `caret_Offset'. */
/* */
typedef struct TT_HoriHeader_
{
@@ -217,9 +217,9 @@ FT_BEGIN_HEADER
FT_Short metric_Data_Format;
FT_UShort number_Of_HMetrics;
- /* The following fields are not defined by the TrueType specification */
+ /* The following fields are not defined by the OpenType specification */
/* but they are used to connect the metrics header to the relevant */
- /* `HMTX' table. */
+ /* `hmtx' table. */
void* long_metrics;
void* short_metrics;
@@ -234,8 +234,8 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A structure used to model a TrueType vertical header, the `vhea' */
- /* table, as well as the corresponding vertical metrics table, i.e., */
- /* the `vmtx' table. */
+ /* table, as well as the corresponding vertical metrics table, */
+ /* `vmtx'. */
/* */
/* <Fields> */
/* Version :: The table version. */
@@ -251,8 +251,8 @@ FT_BEGIN_HEADER
/* ASCII). */
/* */
/* You should use the `sTypoAscender' */
- /* field of the OS/2 table instead if you */
- /* want the correct one. */
+ /* field of the `OS/2' table instead if */
+ /* you want the correct one. */
/* */
/* Descender :: The font's descender, i.e., the */
/* distance from the baseline to the */
@@ -266,8 +266,8 @@ FT_BEGIN_HEADER
/* ASCII). */
/* */
/* You should use the `sTypoDescender' */
- /* field of the OS/2 table instead if you */
- /* want the correct one. */
+ /* field of the `OS/2' table instead if */
+ /* you want the correct one. */
/* */
/* Line_Gap :: The font's line gap, i.e., the distance */
/* to add to the ascender and descender to */
@@ -297,30 +297,26 @@ FT_BEGIN_HEADER
/* slope. */
/* */
/* caret_Offset :: The cursor's offset for slanted fonts. */
- /* This value is `reserved' in vmtx */
- /* version 1.0. */
/* */
/* Reserved :: 8~reserved bytes. */
/* */
/* metric_Data_Format :: Always~0. */
/* */
- /* number_Of_HMetrics :: Number of VMetrics entries in the */
+ /* number_Of_VMetrics :: Number of VMetrics entries in the */
/* `vmtx' table -- this value can be */
/* smaller than the total number of glyphs */
/* in the font. */
/* */
- /* long_metrics :: A pointer into the `vmtx' table. */
+ /* long_metrics :: A pointer into the `vmtx' table. */
/* */
- /* short_metrics :: A pointer into the `vmtx' table. */
+ /* short_metrics :: A pointer into the `vmtx' table. */
/* */
/* <Note> */
- /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
- /* be identical except for the names of their fields, */
- /* which are different. */
- /* */
- /* This ensures that a single function in the `ttload' */
- /* module is able to read both the horizontal and vertical */
- /* headers. */
+ /* For an OpenType variation font, the values of the following fields */
+ /* can change after a call to @FT_Set_Var_Design_Coordinates (and */
+ /* friends) if the font contains an `MVAR' table: `Ascender', */
+ /* `Descender', `Line_Gap', `caret_Slope_Rise', `caret_Slope_Run', */
+ /* and `caret_Offset'. */
/* */
typedef struct TT_VertHeader_
{
@@ -331,9 +327,9 @@ FT_BEGIN_HEADER
FT_UShort advance_Height_Max; /* advance height maximum */
- FT_Short min_Top_Side_Bearing; /* minimum left-sb or top-sb */
- FT_Short min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */
- FT_Short yMax_Extent; /* xmax or ymax extents */
+ FT_Short min_Top_Side_Bearing; /* minimum top-sb */
+ FT_Short min_Bottom_Side_Bearing; /* minimum bottom-sb */
+ FT_Short yMax_Extent; /* ymax extents */
FT_Short caret_Slope_Rise;
FT_Short caret_Slope_Run;
FT_Short caret_Offset;
@@ -343,9 +339,9 @@ FT_BEGIN_HEADER
FT_Short metric_Data_Format;
FT_UShort number_Of_VMetrics;
- /* The following fields are not defined by the TrueType specification */
- /* but they're used to connect the metrics header to the relevant */
- /* `HMTX' or `VMTX' table. */
+ /* The following fields are not defined by the OpenType specification */
+ /* but they are used to connect the metrics header to the relevant */
+ /* `vmtx' table. */
void* long_metrics;
void* short_metrics;
@@ -359,12 +355,28 @@ FT_BEGIN_HEADER
/* TT_OS2 */
/* */
/* <Description> */
- /* A structure used to model a TrueType OS/2 table. All fields */
- /* comply to the OpenType specification. */
+ /* A structure to model a TrueType `OS/2' table. All fields comply */
+ /* to the OpenType specification. */
+ /* */
+ /* Note that we now support old Mac fonts that do not include an */
+ /* `OS/2' table. In this case, the `version' field is always set to */
+ /* 0xFFFF. */
/* */
- /* Note that we now support old Mac fonts that do not include an OS/2 */
- /* table. In this case, the `version' field is always set to 0xFFFF. */
+ /* <Note> */
+ /* For an OpenType variation font, the values of the following fields */
+ /* can change after a call to @FT_Set_Var_Design_Coordinates (and */
+ /* friends) if the font contains an `MVAR' table: `sCapHeight', */
+ /* `sTypoAscender', `sTypoDescender', `sTypoLineGap', `sxHeight', */
+ /* `usWinAscent', `usWinDescent', `yStrikeoutPosition', */
+ /* `yStrikeoutSize', `ySubscriptXOffset', `ySubScriptXSize', */
+ /* `ySubscriptYOffset', `ySubscriptYSize', `ySuperscriptXOffset', */
+ /* `ySuperscriptXSize', `ySuperscriptYOffset', and */
+ /* `ySuperscriptYSize'. */
+ /* */
+ /* Possible values for bits in the `ulUnicodeRangeX' fields are given */
+ /* by the @TT_UCR_XXX macros. */
/* */
+
typedef struct TT_OS2_
{
FT_UShort version; /* 0x0001 - more or 0xFFFF */
@@ -429,10 +441,16 @@ FT_BEGIN_HEADER
/* TT_Postscript */
/* */
/* <Description> */
- /* A structure used to model a TrueType PostScript table. All fields */
- /* comply to the TrueType specification. This structure does not */
- /* reference the PostScript glyph names, which can be nevertheless */
- /* accessed with the `ttpost' module. */
+ /* A structure to model a TrueType `post' table. All fields comply */
+ /* to the OpenType specification. This structure does not reference */
+ /* a font's PostScript glyph names; use @FT_Get_Glyph_Name to */
+ /* retrieve them. */
+ /* */
+ /* <Note> */
+ /* For an OpenType variation font, the values of the following fields */
+ /* can change after a call to @FT_Set_Var_Design_Coordinates (and */
+ /* friends) if the font contains an `MVAR' table: `underlinePosition' */
+ /* and `underlineThickness'. */
/* */
typedef struct TT_Postscript_
{
@@ -446,8 +464,8 @@ FT_BEGIN_HEADER
FT_ULong minMemType1;
FT_ULong maxMemType1;
- /* Glyph names follow in the file, but we don't */
- /* load them by default. See the ttpost.c file. */
+ /* Glyph names follow in the `post' table, but we don't */
+ /* load them by default. */
} TT_Postscript;
@@ -458,8 +476,8 @@ FT_BEGIN_HEADER
/* TT_PCLT */
/* */
/* <Description> */
- /* A structure used to model a TrueType PCLT table. All fields */
- /* comply to the TrueType specification. */
+ /* A structure to model a TrueType `PCLT' table. All fields comply */
+ /* to the OpenType specification. */
/* */
typedef struct TT_PCLT_
{
@@ -488,9 +506,9 @@ FT_BEGIN_HEADER
/* TT_MaxProfile */
/* */
/* <Description> */
- /* The maximum profile is a table containing many max values, which */
- /* can be used to pre-allocate arrays. This ensures that no memory */
- /* allocation occurs during a glyph load. */
+ /* The maximum profile (`maxp') table contains many max values, which */
+ /* can be used to pre-allocate arrays for speeding up glyph loading */
+ /* and hinting. */
/* */
/* <Fields> */
/* version :: The version number. */
@@ -500,21 +518,19 @@ FT_BEGIN_HEADER
/* */
/* maxPoints :: The maximum number of points in a */
/* non-composite TrueType glyph. See also */
- /* the structure element */
/* `maxCompositePoints'. */
/* */
/* maxContours :: The maximum number of contours in a */
/* non-composite TrueType glyph. See also */
- /* the structure element */
/* `maxCompositeContours'. */
/* */
/* maxCompositePoints :: The maximum number of points in a */
- /* composite TrueType glyph. See also the */
- /* structure element `maxPoints'. */
+ /* composite TrueType glyph. See also */
+ /* `maxPoints'. */
/* */
/* maxCompositeContours :: The maximum number of contours in a */
- /* composite TrueType glyph. See also the */
- /* structure element `maxContours'. */
+ /* composite TrueType glyph. See also */
+ /* `maxContours'. */
/* */
/* maxZones :: The maximum number of zones used for */
/* glyph hinting. */
@@ -575,8 +591,9 @@ FT_BEGIN_HEADER
/* FT_Sfnt_Tag */
/* */
/* <Description> */
- /* An enumeration used to specify the index of an SFNT table. */
- /* Used in the @FT_Get_Sfnt_Table API function. */
+ /* An enumeration to specify indices of SFNT tables loaded and parsed */
+ /* by FreeType during initialization of an SFNT font. Used in the */
+ /* @FT_Get_Sfnt_Table API function. */
/* */
/* <Values> */
/* FT_SFNT_HEAD :: To access the font's @TT_Header structure. */
@@ -624,7 +641,7 @@ FT_BEGIN_HEADER
/* FT_Get_Sfnt_Table */
/* */
/* <Description> */
- /* Return a pointer to a given SFNT table within a face. */
+ /* Return a pointer to a given SFNT table stored within a face. */
/* */
/* <Input> */
/* face :: A handle to the source. */
@@ -632,7 +649,7 @@ FT_BEGIN_HEADER
/* tag :: The index of the SFNT table. */
/* */
/* <Return> */
- /* A type-less pointer to the table. This will be~0 in case of */
+ /* A type-less pointer to the table. This will be NULL in case of */
/* error, or if the corresponding table was not found *OR* loaded */
/* from the file. */
/* */
@@ -661,70 +678,70 @@ FT_BEGIN_HEADER
FT_Sfnt_Tag tag );
- /**************************************************************************
- *
- * @function:
- * FT_Load_Sfnt_Table
- *
- * @description:
- * Load any font table into client memory.
- *
- * @input:
- * face ::
- * A handle to the source face.
- *
- * tag ::
- * The four-byte tag of the table to load. Use the value~0 if you want
- * to access the whole font file. Otherwise, you can use one of the
- * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new
- * one with @FT_MAKE_TAG.
- *
- * offset ::
- * The starting offset in the table (or file if tag == 0).
- *
- * @output:
- * buffer ::
- * The target buffer address. The client must ensure that the memory
- * array is big enough to hold the data.
- *
- * @inout:
- * length ::
- * If the `length' parameter is NULL, then try to load the whole table.
- * Return an error code if it fails.
- *
- * Else, if `*length' is~0, exit immediately while returning the
- * table's (or file) full size in it.
- *
- * Else the number of bytes to read from the table or file, from the
- * starting offset.
- *
- * @return:
- * FreeType error code. 0~means success.
- *
- * @note:
- * If you need to determine the table's length you should first call this
- * function with `*length' set to~0, as in the following example:
- *
- * {
- * FT_ULong length = 0;
- *
- *
- * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
- * if ( error ) { ... table does not exist ... }
- *
- * buffer = malloc( length );
- * if ( buffer == NULL ) { ... not enough memory ... }
- *
- * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
- * if ( error ) { ... could not load table ... }
- * }
- *
- * Note that structures like @TT_Header or @TT_OS2 can't be used with
- * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that
- * those structures depend on the processor architecture, with varying
- * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).
- *
- */
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Load_Sfnt_Table
+ *
+ * @description:
+ * Load any SFNT font table into client memory.
+ *
+ * @input:
+ * face ::
+ * A handle to the source face.
+ *
+ * tag ::
+ * The four-byte tag of the table to load. Use value~0 if you want
+ * to access the whole font file. Otherwise, you can use one of the
+ * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new
+ * one with @FT_MAKE_TAG.
+ *
+ * offset ::
+ * The starting offset in the table (or file if tag~==~0).
+ *
+ * @output:
+ * buffer ::
+ * The target buffer address. The client must ensure that the memory
+ * array is big enough to hold the data.
+ *
+ * @inout:
+ * length ::
+ * If the `length' parameter is NULL, try to load the whole table.
+ * Return an error code if it fails.
+ *
+ * Else, if `*length' is~0, exit immediately while returning the
+ * table's (or file) full size in it.
+ *
+ * Else the number of bytes to read from the table or file, from the
+ * starting offset.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * If you need to determine the table's length you should first call this
+ * function with `*length' set to~0, as in the following example:
+ *
+ * {
+ * FT_ULong length = 0;
+ *
+ *
+ * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
+ * if ( error ) { ... table does not exist ... }
+ *
+ * buffer = malloc( length );
+ * if ( buffer == NULL ) { ... not enough memory ... }
+ *
+ * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
+ * if ( error ) { ... could not load table ... }
+ * }
+ *
+ * Note that structures like @TT_Header or @TT_OS2 can't be used with
+ * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that
+ * those structures depend on the processor architecture, with varying
+ * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).
+ *
+ */
FT_EXPORT( FT_Error )
FT_Load_Sfnt_Table( FT_Face face,
FT_ULong tag,
@@ -733,41 +750,41 @@ FT_BEGIN_HEADER
FT_ULong* length );
- /**************************************************************************
- *
- * @function:
- * FT_Sfnt_Table_Info
- *
- * @description:
- * Return information on an SFNT table.
- *
- * @input:
- * face ::
- * A handle to the source face.
- *
- * table_index ::
- * The index of an SFNT table. The function returns
- * FT_Err_Table_Missing for an invalid value.
- *
- * @inout:
- * tag ::
- * The name tag of the SFNT table. If the value is NULL, `table_index'
- * is ignored, and `length' returns the number of SFNT tables in the
- * font.
- *
- * @output:
- * length ::
- * The length of the SFNT table (or the number of SFNT tables, depending
- * on `tag').
- *
- * @return:
- * FreeType error code. 0~means success.
- *
- * @note:
- * While parsing fonts, FreeType handles SFNT tables with length zero as
- * missing.
- *
- */
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Sfnt_Table_Info
+ *
+ * @description:
+ * Return information on an SFNT table.
+ *
+ * @input:
+ * face ::
+ * A handle to the source face.
+ *
+ * table_index ::
+ * The index of an SFNT table. The function returns
+ * FT_Err_Table_Missing for an invalid value.
+ *
+ * @inout:
+ * tag ::
+ * The name tag of the SFNT table. If the value is NULL, `table_index'
+ * is ignored, and `length' returns the number of SFNT tables in the
+ * font.
+ *
+ * @output:
+ * length ::
+ * The length of the SFNT table (or the number of SFNT tables, depending
+ * on `tag').
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * While parsing fonts, FreeType handles SFNT tables with length zero as
+ * missing.
+ *
+ */
FT_EXPORT( FT_Error )
FT_Sfnt_Table_Info( FT_Face face,
FT_UInt table_index,
@@ -781,16 +798,16 @@ FT_BEGIN_HEADER
/* FT_Get_CMap_Language_ID */
/* */
/* <Description> */
- /* Return TrueType/sfnt specific cmap language ID. Definitions of */
- /* language ID values are in `ttnameid.h'. */
+ /* Return cmap language ID as specified in the OpenType standard. */
+ /* Definitions of language ID values are in file @FT_TRUETYPE_IDS_H. */
/* */
/* <Input> */
/* charmap :: */
/* The target charmap. */
/* */
/* <Return> */
- /* The language ID of `charmap'. If `charmap' doesn't belong to a */
- /* TrueType/sfnt face, just return~0 as the default value. */
+ /* The language ID of `charmap'. If `charmap' doesn't belong to an */
+ /* SFNT face, just return~0 as the default value. */
/* */
/* For a format~14 cmap (to access Unicode IVS), the return value is */
/* 0xFFFFFFFF. */
@@ -805,15 +822,15 @@ FT_BEGIN_HEADER
/* FT_Get_CMap_Format */
/* */
/* <Description> */
- /* Return TrueType/sfnt specific cmap format. */
+ /* Return the format of an SFNT `cmap' table. */
/* */
/* <Input> */
/* charmap :: */
/* The target charmap. */
/* */
/* <Return> */
- /* The format of `charmap'. If `charmap' doesn't belong to a */
- /* TrueType/sfnt face, return -1. */
+ /* The format of `charmap'. If `charmap' doesn't belong to an SFNT */
+ /* face, return -1. */
/* */
FT_EXPORT( FT_Long )
FT_Get_CMap_Format( FT_CharMap charmap );
diff --git a/modules/freetype2/include/freetype/tttags.h b/modules/freetype2/include/freetype/tttags.h
index 63f6258e8..e5cee68a1 100644
--- a/modules/freetype2/include/freetype/tttags.h
+++ b/modules/freetype2/include/freetype/tttags.h
@@ -4,7 +4,7 @@
/* */
/* Tags for TrueType and OpenType tables (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -106,6 +106,12 @@ FT_BEGIN_HEADER
#define TTAG_VVAR FT_MAKE_TAG( 'V', 'V', 'A', 'R' )
#define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' )
+/* used by "Keyboard.dfont" on legacy Mac OS X */
+#define TTAG_0xA5kbd FT_MAKE_TAG( 0xA5, 'k', 'b', 'd' )
+
+/* used by "LastResort.dfont" on legacy Mac OS X */
+#define TTAG_0xA5lst FT_MAKE_TAG( 0xA5, 'l', 's', 't' )
+
FT_END_HEADER
diff --git a/modules/freetype2/include/freetype/ttunpat.h b/modules/freetype2/include/freetype/ttunpat.h
deleted file mode 100644
index ca4676baf..000000000
--- a/modules/freetype2/include/freetype/ttunpat.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/***************************************************************************/
-/* */
-/* ttunpat.h */
-/* */
-/* Definitions for the unpatented TrueType hinting system. */
-/* Obsolete, retained for backwards compatibility. */
-/* */
-/* Copyright 2003-2016 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* Written by Graham Asher <graham.asher@btinternet.com> */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
-
-
-#ifndef TTUNPAT_H_
-#define TTUNPAT_H_
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
- /***************************************************************************
- *
- * @constant:
- * FT_PARAM_TAG_UNPATENTED_HINTING
- *
- * @description:
- * Deprecated.
- *
- * Previously: A constant used as the tag of an @FT_Parameter structure to
- * indicate that unpatented methods only should be used by the TrueType
- * bytecode interpreter for a typeface opened by @FT_Open_Face.
- *
- */
-#define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* TTUNPAT_H_ */
-
-
-/* END */
diff --git a/modules/freetype2/include/ft2build.h b/modules/freetype2/include/ft2build.h
index c89cb469e..e7ce99bc9 100644
--- a/modules/freetype2/include/ft2build.h
+++ b/modules/freetype2/include/ft2build.h
@@ -4,7 +4,7 @@
/* */
/* FreeType 2 build and setup macros. */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/modules.cfg b/modules/freetype2/modules.cfg
index f30049c38..4bf344524 100644
--- a/modules/freetype2/modules.cfg
+++ b/modules/freetype2/modules.cfg
@@ -1,6 +1,6 @@
# modules.cfg
#
-# Copyright 2005-2016 by
+# Copyright 2005-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -42,7 +42,7 @@ FONT_MODULES += type1
# CFF/OpenType font driver.
#
-# This driver needs the `sfnt', `pshinter', and `psnames' modules.
+# This driver needs the `sfnt', `psaux', `pshinter', and `psnames' modules.
FONT_MODULES += cff
# Type 1 CID-keyed font driver.
@@ -66,7 +66,7 @@ FONT_MODULES += type42
# No FT_CONFIG_OPTION_PIC support.
FONT_MODULES += winfonts
-# PCF font driver.
+# PCF font driver. If debugging and tracing is enabled, needs `ftbitmap.c'.
# No FT_CONFIG_OPTION_PIC support.
FONT_MODULES += pcf
@@ -113,11 +113,11 @@ RASTER_MODULES += smooth
# FreeType's cache sub-system (quite stable but still in beta -- this means
# that its public API is subject to change if necessary). See
-# include/freetype/ftcache.h. Needs ftglyph.c.
+# include/freetype/ftcache.h. Needs `ftglyph.c'.
# No FT_CONFIG_OPTION_PIC support.
AUX_MODULES += cache
-# TrueType GX/AAT table validation. Needs ftgxval.c below.
+# TrueType GX/AAT table validation. Needs `ftgxval.c' below.
#
# No FT_CONFIG_OPTION_PIC support.
# AUX_MODULES += gxvalid
@@ -140,7 +140,7 @@ AUX_MODULES += lzw
# No FT_CONFIG_OPTION_PIC support.
AUX_MODULES += bzip2
-# OpenType table validation. Needs ftotval.c below.
+# OpenType table validation. Needs `ftotval.c' below.
#
# No FT_CONFIG_OPTION_PIC support.
# AUX_MODULES += otvalid
@@ -183,12 +183,7 @@ BASE_EXTENSIONS += ftbitmap.c
# See include/freetype/ftcid.h for the API.
BASE_EXTENSIONS += ftcid.c
-# Support functions for font formats.
-#
-# See include/freetype/ftfntfmt.h for the API.
-BASE_EXTENSIONS += ftfntfmt.c
-
-# Access FSType information. Needs fttype1.c.
+# Access FSType information. Needs `fttype1.c'.
#
# See include/freetype/freetype.h for the API.
BASE_EXTENSIONS += ftfstype.c
@@ -198,7 +193,7 @@ BASE_EXTENSIONS += ftfstype.c
# See include/freetype/ftgasp.h for the API.
BASE_EXTENSIONS += ftgasp.c
-# Convenience functions to handle glyphs. Needs ftbitmap.c.
+# Convenience functions to handle glyphs. Needs `ftbitmap.c'.
#
# See include/freetype/ftglyph.h for the API.
BASE_EXTENSIONS += ftglyph.c
@@ -208,11 +203,6 @@ BASE_EXTENSIONS += ftglyph.c
# See include/freetype/ftgxval.h for the API.
BASE_EXTENSIONS += ftgxval.c
-# Support for LCD color filtering of subpixel bitmaps.
-#
-# See include/freetype/ftlcdfil.h for the API.
-BASE_EXTENSIONS += ftlcdfil.c
-
# Multiple Master font interface.
#
# See include/freetype/ftmm.h for the API.
@@ -233,12 +223,13 @@ BASE_EXTENSIONS += ftpatent.c
# See include/freetype/ftpfr.h for the API.
BASE_EXTENSIONS += ftpfr.c
-# Path stroker. Needs ftglyph.c.
+# Path stroker. Needs `ftglyph.c'.
#
# See include/freetype/ftstroke.h for the API.
BASE_EXTENSIONS += ftstroke.c
-# Support for synthetic embolding and slanting of fonts. Needs ftbitmap.c.
+# Support for synthetic emboldening and slanting of fonts. Needs
+# `ftbitmap.c'.
#
# See include/freetype/ftsynth.h for the API.
BASE_EXTENSIONS += ftsynth.c
diff --git a/modules/freetype2/src/Jamfile b/modules/freetype2/src/Jamfile
index ebc036983..562480c94 100644
--- a/modules/freetype2/src/Jamfile
+++ b/modules/freetype2/src/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/autofit/Jamfile b/modules/freetype2/src/autofit/Jamfile
index 638b22972..01b866ec6 100644
--- a/modules/freetype2/src/autofit/Jamfile
+++ b/modules/freetype2/src/autofit/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/autofit Jamfile
#
-# Copyright 2003-2016 by
+# Copyright 2003-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/autofit/afangles.c b/modules/freetype2/src/autofit/afangles.c
index b856e57a8..c65a3ae23 100644
--- a/modules/freetype2/src/autofit/afangles.c
+++ b/modules/freetype2/src/autofit/afangles.c
@@ -5,7 +5,7 @@
/* Routines used to compute vector angles with limited accuracy */
/* and very high speed. It also contains sorting routines (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afblue.c b/modules/freetype2/src/autofit/afblue.c
index 7719c02ca..e4078fd04 100644
--- a/modules/freetype2/src/autofit/afblue.c
+++ b/modules/freetype2/src/autofit/afblue.c
@@ -7,7 +7,7 @@
/* */
/* Auto-fitter data for blue strings (body). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -26,6 +26,14 @@
af_blue_strings[] =
{
/* */
+ '\xF0', '\x9E', '\xA4', '\x8C', ' ', '\xF0', '\x9E', '\xA4', '\x85', ' ', '\xF0', '\x9E', '\xA4', '\x88', ' ', '\xF0', '\x9E', '\xA4', '\x8F', ' ', '\xF0', '\x9E', '\xA4', '\x94', ' ', '\xF0', '\x9E', '\xA4', '\x9A', /* 𞤌 𞤅 𞤈 𞤠𞤔 𞤚 */
+ '\0',
+ '\xF0', '\x9E', '\xA4', '\x82', ' ', '\xF0', '\x9E', '\xA4', '\x96', /* 𞤂 𞤖 */
+ '\0',
+ '\xF0', '\x9E', '\xA4', '\xAC', ' ', '\xF0', '\x9E', '\xA4', '\xAE', ' ', '\xF0', '\x9E', '\xA4', '\xBB', ' ', '\xF0', '\x9E', '\xA4', '\xBC', ' ', '\xF0', '\x9E', '\xA4', '\xBE', /* 𞤬 𞤮 𞤻 𞤼 𞤾 */
+ '\0',
+ '\xF0', '\x9E', '\xA4', '\xA4', ' ', '\xF0', '\x9E', '\xA4', '\xA8', ' ', '\xF0', '\x9E', '\xA4', '\xA9', ' ', '\xF0', '\x9E', '\xA4', '\xAD', ' ', '\xF0', '\x9E', '\xA4', '\xB4', ' ', '\xF0', '\x9E', '\xA4', '\xB8', ' ', '\xF0', '\x9E', '\xA4', '\xBA', ' ', '\xF0', '\x9E', '\xA5', '\x80', /* 𞤤 𞤨 𞤩 𞤭 𞤴 𞤸 𞤺 𞥀 */
+ '\0',
'\xD8', '\xA7', ' ', '\xD8', '\xA5', ' ', '\xD9', '\x84', ' ', '\xD9', '\x83', ' ', '\xD8', '\xB7', ' ', '\xD8', '\xB8', /* ا إ ل ك ط ظ */
'\0',
'\xD8', '\xAA', ' ', '\xD8', '\xAB', ' ', '\xD8', '\xB7', ' ', '\xD8', '\xB8', ' ', '\xD9', '\x83', /* ت ث ط ظ ك */
@@ -44,12 +52,50 @@
'\0',
'\xD5', '\xA2', ' ', '\xD5', '\xA8', ' ', '\xD5', '\xAB', ' ', '\xD5', '\xAC', ' ', '\xD5', '\xB2', ' ', '\xD5', '\xBA', ' ', '\xD6', '\x83', ' ', '\xD6', '\x81', /* Õ¢ Õ¨ Õ« Õ¬ Õ² Õº Öƒ Ö */
'\0',
+ '\xF0', '\x90', '\xAC', '\x80', ' ', '\xF0', '\x90', '\xAC', '\x81', ' ', '\xF0', '\x90', '\xAC', '\x90', ' ', '\xF0', '\x90', '\xAC', '\x9B', /* 𬀠ð¬ ð¬ 𬛠*/
+ '\0',
+ '\xF0', '\x90', '\xAC', '\x80', ' ', '\xF0', '\x90', '\xAC', '\x81', /* 𬀠ð¬ */
+ '\0',
+ '\xEA', '\x9A', '\xA7', ' ', '\xEA', '\x9A', '\xA8', ' ', '\xEA', '\x9B', '\x9B', ' ', '\xEA', '\x9B', '\x89', ' ', '\xEA', '\x9B', '\x81', ' ', '\xEA', '\x9B', '\x88', ' ', '\xEA', '\x9B', '\xAB', ' ', '\xEA', '\x9B', '\xAF', /* ꚧ ꚨ ê›› ꛉ ê› ê›ˆ ꛫ ꛯ */
+ '\0',
+ '\xEA', '\x9A', '\xAD', ' ', '\xEA', '\x9A', '\xB3', ' ', '\xEA', '\x9A', '\xB6', ' ', '\xEA', '\x9B', '\xAC', ' ', '\xEA', '\x9A', '\xA2', ' ', '\xEA', '\x9A', '\xBD', ' ', '\xEA', '\x9B', '\xAF', ' ', '\xEA', '\x9B', '\xB2', /* ꚭ ꚳ ꚶ ꛬ ꚢ ꚽ ꛯ ꛲ */
+ '\0',
'\xE0', '\xA6', '\x85', ' ', '\xE0', '\xA6', '\xA1', ' ', '\xE0', '\xA6', '\xA4', ' ', '\xE0', '\xA6', '\xA8', ' ', '\xE0', '\xA6', '\xAC', ' ', '\xE0', '\xA6', '\xAD', ' ', '\xE0', '\xA6', '\xB2', ' ', '\xE0', '\xA6', '\x95', /* অ ড ত ন ব ভ ল ক */
'\0',
'\xE0', '\xA6', '\x87', ' ', '\xE0', '\xA6', '\x9F', ' ', '\xE0', '\xA6', '\xA0', ' ', '\xE0', '\xA6', '\xBF', ' ', '\xE0', '\xA7', '\x80', ' ', '\xE0', '\xA7', '\x88', ' ', '\xE0', '\xA7', '\x97', /* ই ট ঠ ি ী ৈ ৗ */
'\0',
'\xE0', '\xA6', '\x93', ' ', '\xE0', '\xA6', '\x8F', ' ', '\xE0', '\xA6', '\xA1', ' ', '\xE0', '\xA6', '\xA4', ' ', '\xE0', '\xA6', '\xA8', ' ', '\xE0', '\xA6', '\xAC', ' ', '\xE0', '\xA6', '\xB2', ' ', '\xE0', '\xA6', '\x95', /* ও ঠড ত ন ব ল ক */
'\0',
+ '\xE1', '\x9D', '\x90', ' ', '\xE1', '\x9D', '\x88', /* á ሠ*/
+ '\0',
+ '\xE1', '\x9D', '\x85', ' ', '\xE1', '\x9D', '\x8A', ' ', '\xE1', '\x9D', '\x8E', /* á… áŠ áŽ */
+ '\0',
+ '\xE1', '\x9D', '\x82', ' ', '\xE1', '\x9D', '\x83', ' ', '\xE1', '\x9D', '\x89', ' ', '\xE1', '\x9D', '\x8C', /* Ⴀრበጠ*/
+ '\0',
+ '\xE1', '\x9D', '\x80', ' ', '\xE1', '\x9D', '\x83', ' ', '\xE1', '\x9D', '\x86', ' ', '\xE1', '\x9D', '\x89', ' ', '\xE1', '\x9D', '\x8B', ' ', '\xE1', '\x9D', '\x8F', ' ', '\xE1', '\x9D', '\x91', /* ဠრᆠበዠá á‘ */
+ '\0',
+ '\xE1', '\x97', '\x9C', ' ', '\xE1', '\x96', '\xB4', ' ', '\xE1', '\x90', '\x81', ' ', '\xE1', '\x92', '\xA3', ' ', '\xE1', '\x91', '\xAB', ' ', '\xE1', '\x91', '\x8E', ' ', '\xE1', '\x94', '\x91', ' ', '\xE1', '\x97', '\xB0', /* á—œ á–´ á á’£ á‘« á‘Ž ᔑ á—° */
+ '\0',
+ '\xE1', '\x97', '\xB6', ' ', '\xE1', '\x96', '\xB5', ' ', '\xE1', '\x92', '\xA7', ' ', '\xE1', '\x90', '\x83', ' ', '\xE1', '\x91', '\x8C', ' ', '\xE1', '\x92', '\x8D', ' ', '\xE1', '\x94', '\x91', ' ', '\xE1', '\x97', '\xA2', /* ᗶ ᖵ ᒧ რᑌ ᒠᔑ ᗢ */
+ '\0',
+ '\xE1', '\x93', '\x93', ' ', '\xE1', '\x93', '\x95', ' ', '\xE1', '\x93', '\x80', ' ', '\xE1', '\x93', '\x82', ' ', '\xE1', '\x93', '\x84', ' ', '\xE1', '\x95', '\x84', ' ', '\xE1', '\x95', '\x86', ' ', '\xE1', '\x98', '\xA3', /* ᓓ ᓕ ᓀ ᓂ ᓄ ᕄ ᕆ ᘣ */
+ '\0',
+ '\xE1', '\x95', '\x83', ' ', '\xE1', '\x93', '\x82', ' ', '\xE1', '\x93', '\x80', ' ', '\xE1', '\x95', '\x82', ' ', '\xE1', '\x93', '\x97', ' ', '\xE1', '\x93', '\x9A', ' ', '\xE1', '\x95', '\x86', ' ', '\xE1', '\x98', '\xA3', /* ᕃ ᓂ ᓀ ᕂ ᓗ ᓚ ᕆ ᘣ */
+ '\0',
+ '\xE1', '\x90', '\xAA', ' ', '\xE1', '\x99', '\x86', ' ', '\xE1', '\xA3', '\x98', ' ', '\xE1', '\x90', '\xA2', ' ', '\xE1', '\x92', '\xBE', ' ', '\xE1', '\xA3', '\x97', ' ', '\xE1', '\x94', '\x86', /* ᪠ᙆ ᣘ ᢠᒾ ᣗ ᔆ */
+ '\0',
+ '\xE1', '\x99', '\x86', ' ', '\xE1', '\x97', '\xAE', ' ', '\xE1', '\x92', '\xBB', ' ', '\xE1', '\x90', '\x9E', ' ', '\xE1', '\x94', '\x86', ' ', '\xE1', '\x92', '\xA1', ' ', '\xE1', '\x92', '\xA2', ' ', '\xE1', '\x93', '\x91', /* ᙆ ᗮ ᒻ ហᔆ ᒡ ᒢ ᓑ */
+ '\0',
+ '\xF0', '\x90', '\x8A', '\xA7', ' ', '\xF0', '\x90', '\x8A', '\xAB', ' ', '\xF0', '\x90', '\x8A', '\xAC', ' ', '\xF0', '\x90', '\x8A', '\xAD', ' ', '\xF0', '\x90', '\x8A', '\xB1', ' ', '\xF0', '\x90', '\x8A', '\xBA', ' ', '\xF0', '\x90', '\x8A', '\xBC', ' ', '\xF0', '\x90', '\x8A', '\xBF', /* ðŠ§ ðŠ« ðŠ¬ ðŠ­ ðŠ± ðŠº ðŠ¼ ðŠ¿ */
+ '\0',
+ '\xF0', '\x90', '\x8A', '\xA3', ' ', '\xF0', '\x90', '\x8A', '\xA7', ' ', '\xF0', '\x90', '\x8A', '\xB7', ' ', '\xF0', '\x90', '\x8B', '\x80', ' ', '\xF0', '\x90', '\x8A', '\xAB', ' ', '\xF0', '\x90', '\x8A', '\xB8', ' ', '\xF0', '\x90', '\x8B', '\x89', /* ðŠ£ ðŠ§ ðŠ· ð‹€ ðŠ« ðŠ¸ ð‹‰ */
+ '\0',
+ '\xF0', '\x91', '\x84', '\x83', ' ', '\xF0', '\x91', '\x84', '\x85', ' ', '\xF0', '\x91', '\x84', '\x89', ' ', '\xF0', '\x91', '\x84', '\x99', ' ', '\xF0', '\x91', '\x84', '\x97', /* 𑄃 𑄅 𑄉 𑄙 𑄗 */
+ '\0',
+ '\xF0', '\x91', '\x84', '\x85', ' ', '\xF0', '\x91', '\x84', '\x9B', ' ', '\xF0', '\x91', '\x84', '\x9D', ' ', '\xF0', '\x91', '\x84', '\x97', ' ', '\xF0', '\x91', '\x84', '\x93', /* ð‘„… ð‘„› ð‘„ ð‘„— ð‘„“ */
+ '\0',
+ '\xF0', '\x91', '\x84', '\x96', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\x98', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\x99', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\xA4', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\xA5', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', /* 𑄖𑄳𑄢 𑄘𑄳𑄢 𑄙𑄳𑄢 𑄤𑄳𑄢 𑄥𑄳𑄢 */
+ '\0',
'\xE1', '\x8F', '\x86', ' ', '\xE1', '\x8E', '\xBB', ' ', '\xE1', '\x8E', '\xAC', ' ', '\xE1', '\x8F', '\x83', ' ', '\xE1', '\x8E', '\xA4', ' ', '\xE1', '\x8F', '\xA3', ' ', '\xE1', '\x8E', '\xA6', ' ', '\xE1', '\x8F', '\x95', /* ᆠᎻ Ꭼ რᎤ ᣠᎦ ᕠ*/
'\0',
'\xEA', '\xAE', '\x92', ' ', '\xEA', '\xAE', '\xA4', ' ', '\xEA', '\xAE', '\xB6', ' ', '\xEA', '\xAD', '\xB4', ' ', '\xEA', '\xAD', '\xBE', ' ', '\xEA', '\xAE', '\x97', ' ', '\xEA', '\xAE', '\x9D', ' ', '\xEA', '\xAE', '\xBF', /* ê®’ ꮤ ꮶ ê­´ ê­¾ ê®— ê® ê®¿ */
@@ -58,6 +104,20 @@
'\0',
'\xE1', '\x8F', '\xB8', ' ', '\xEA', '\xAE', '\x90', ' ', '\xEA', '\xAD', '\xB9', ' ', '\xEA', '\xAD', '\xBB', /* á¸ ê® ê­¹ ê­» */
'\0',
+ '\xE2', '\xB2', '\x8C', ' ', '\xE2', '\xB2', '\x8E', ' ', '\xE2', '\xB2', '\xA0', ' ', '\xE2', '\xB3', '\x9E', ' ', '\xE2', '\xB2', '\x9E', ' ', '\xE2', '\xB2', '\x90', ' ', '\xE2', '\xB2', '\xA4', ' ', '\xE2', '\xB3', '\x8A', /* Ⲍ Ⲏ Ⲡ Ⳟ Ⲟ ⲠⲤ Ⳋ */
+ '\0',
+ '\xE2', '\xB3', '\x90', ' ', '\xE2', '\xB3', '\x98', ' ', '\xE2', '\xB3', '\x9E', ' ', '\xE2', '\xB2', '\x8E', ' ', '\xE2', '\xB2', '\x9E', ' ', '\xE2', '\xB2', '\x90', ' ', '\xE2', '\xB3', '\x9C', ' ', '\xE2', '\xB2', '\xB0', /* ⳠⳘ Ⳟ Ⲏ Ⲟ ⲠⳜ Ⲱ */
+ '\0',
+ '\xE2', '\xB2', '\x8D', ' ', '\xE2', '\xB2', '\x8F', ' ', '\xE2', '\xB2', '\xA1', ' ', '\xE2', '\xB3', '\x9F', ' ', '\xE2', '\xB2', '\x9F', ' ', '\xE2', '\xB2', '\x91', ' ', '\xE2', '\xB2', '\xA5', ' ', '\xE2', '\xB3', '\x8B', /* ⲠⲠⲡ ⳟ ⲟ ⲑ ⲥ ⳋ */
+ '\0',
+ '\xE2', '\xB3', '\x91', ' ', '\xE2', '\xB3', '\x99', ' ', '\xE2', '\xB3', '\x9F', ' ', '\xE2', '\xB2', '\x8F', ' ', '\xE2', '\xB2', '\x9F', ' ', '\xE2', '\xB2', '\x91', ' ', '\xE2', '\xB3', '\x9D', ' ', '\xE2', '\xB3', '\x92', /* ⳑ ⳙ ⳟ Ⲡⲟ ⲑ ⳠⳒ */
+ '\0',
+ '\xF0', '\x90', '\xA0', '\x8D', ' ', '\xF0', '\x90', '\xA0', '\x99', ' ', '\xF0', '\x90', '\xA0', '\xB3', ' ', '\xF0', '\x90', '\xA0', '\xB1', ' ', '\xF0', '\x90', '\xA0', '\x85', ' ', '\xF0', '\x90', '\xA0', '\x93', ' ', '\xF0', '\x90', '\xA0', '\xA3', ' ', '\xF0', '\x90', '\xA0', '\xA6', /* ð  ð ™ ð ³ ð ± ð … ð “ ð £ ð ¦ */
+ '\0',
+ '\xF0', '\x90', '\xA0', '\x83', ' ', '\xF0', '\x90', '\xA0', '\x8A', ' ', '\xF0', '\x90', '\xA0', '\x9B', ' ', '\xF0', '\x90', '\xA0', '\xA3', ' ', '\xF0', '\x90', '\xA0', '\xB3', ' ', '\xF0', '\x90', '\xA0', '\xB5', ' ', '\xF0', '\x90', '\xA0', '\x90', /* ð ƒ ð Š ð › ð £ ð ³ ð µ ð  */
+ '\0',
+ '\xF0', '\x90', '\xA0', '\x88', ' ', '\xF0', '\x90', '\xA0', '\x8F', ' ', '\xF0', '\x90', '\xA0', '\x96', /* ð ˆ ð  ð – */
+ '\0',
'\xD0', '\x91', ' ', '\xD0', '\x92', ' ', '\xD0', '\x95', ' ', '\xD0', '\x9F', ' ', '\xD0', '\x97', ' ', '\xD0', '\x9E', ' ', '\xD0', '\xA1', ' ', '\xD0', '\xAD', /* Б В Е П З О С Э */
'\0',
'\xD0', '\x91', ' ', '\xD0', '\x92', ' ', '\xD0', '\x95', ' ', '\xD0', '\xA8', ' ', '\xD0', '\x97', ' ', '\xD0', '\x9E', ' ', '\xD0', '\xA1', ' ', '\xD0', '\xAD', /* Б В Е Ш З О С Э */
@@ -66,6 +126,14 @@
'\0',
'\xD1', '\x80', ' ', '\xD1', '\x83', ' ', '\xD1', '\x84', /* р у ф */
'\0',
+ '\xF0', '\x90', '\x90', '\x82', ' ', '\xF0', '\x90', '\x90', '\x84', ' ', '\xF0', '\x90', '\x90', '\x8B', ' ', '\xF0', '\x90', '\x90', '\x97', ' ', '\xF0', '\x90', '\x90', '\x91', /* ð‚ ð„ ð‹ ð— ð‘ */
+ '\0',
+ '\xF0', '\x90', '\x90', '\x80', ' ', '\xF0', '\x90', '\x90', '\x82', ' ', '\xF0', '\x90', '\x90', '\x84', ' ', '\xF0', '\x90', '\x90', '\x97', ' ', '\xF0', '\x90', '\x90', '\x9B', /* ð€ ð‚ ð„ ð— ð› */
+ '\0',
+ '\xF0', '\x90', '\x90', '\xAA', ' ', '\xF0', '\x90', '\x90', '\xAC', ' ', '\xF0', '\x90', '\x90', '\xB3', ' ', '\xF0', '\x90', '\x90', '\xBF', ' ', '\xF0', '\x90', '\x90', '\xB9', /* ðª ð¬ ð³ ð¿ ð¹ */
+ '\0',
+ '\xF0', '\x90', '\x90', '\xA8', ' ', '\xF0', '\x90', '\x90', '\xAA', ' ', '\xF0', '\x90', '\x90', '\xAC', ' ', '\xF0', '\x90', '\x90', '\xBF', ' ', '\xF0', '\x90', '\x91', '\x83', /* ð¨ ðª ð¬ ð¿ 𑃠*/
+ '\0',
'\xE0', '\xA4', '\x95', ' ', '\xE0', '\xA4', '\xAE', ' ', '\xE0', '\xA4', '\x85', ' ', '\xE0', '\xA4', '\x86', ' ', '\xE0', '\xA4', '\xA5', ' ', '\xE0', '\xA4', '\xA7', ' ', '\xE0', '\xA4', '\xAD', ' ', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */
'\0',
'\xE0', '\xA4', '\x88', ' ', '\xE0', '\xA4', '\x90', ' ', '\xE0', '\xA4', '\x93', ' ', '\xE0', '\xA4', '\x94', ' ', '\xE0', '\xA4', '\xBF', ' ', '\xE0', '\xA5', '\x80', ' ', '\xE0', '\xA5', '\x8B', ' ', '\xE0', '\xA5', '\x8C', /* ई ठओ औ ि ी ो ौ */
@@ -98,6 +166,22 @@
'\0',
'\xE2', '\xB4', '\x84', ' ', '\xE2', '\xB4', '\x85', ' ', '\xE2', '\xB4', '\x94', ' ', '\xE2', '\xB4', '\x95', ' ', '\xE2', '\xB4', '\x81', ' ', '\xE2', '\xB4', '\x82', ' ', '\xE2', '\xB4', '\x98', ' ', '\xE2', '\xB4', '\x9D', /* â´„ â´… â´” â´• â´ â´‚ â´˜ â´ */
'\0',
+ '\xE1', '\xB2', '\x9C', ' ', '\xE1', '\xB2', '\x9F', ' ', '\xE1', '\xB2', '\xB3', ' ', '\xE1', '\xB2', '\xB8', ' ', '\xE1', '\xB2', '\x92', ' ', '\xE1', '\xB2', '\x94', ' ', '\xE1', '\xB2', '\x9D', ' ', '\xE1', '\xB2', '\xB4', /* Ნ Ჟ Ჳ Ჸ Გ Ე ᲠᲴ */
+ '\0',
+ '\xE1', '\xB2', '\x98', ' ', '\xE1', '\xB2', '\xB2', ' ', '\xE1', '\xB2', '\x9D', ' ', '\xE1', '\xB2', '\xA9', ' ', '\xE1', '\xB2', '\x9B', ' ', '\xE1', '\xB2', '\xA8', ' ', '\xE1', '\xB2', '\xAF', ' ', '\xE1', '\xB2', '\xBD', /* Ი Ჲ ᲠᲩ Მ Შ Ჯ Ჽ */
+ '\0',
+ '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x94', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\xAB', ' ', '\xE2', '\xB0', '\x8B', /* â°… â°” â°ª â°„ â°‚ â°Š â°« â°‹ */
+ '\0',
+ '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x9E', ' ', '\xE2', '\xB0', '\xA1', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\x94', /* â°… â°„ â°‚ â°ª â°ž â°¡ â°Š â°” */
+ '\0',
+ '\xE2', '\xB0', '\xB5', ' ', '\xE2', '\xB1', '\x84', ' ', '\xE2', '\xB1', '\x9A', ' ', '\xE2', '\xB0', '\xB4', ' ', '\xE2', '\xB0', '\xB2', ' ', '\xE2', '\xB0', '\xBA', ' ', '\xE2', '\xB1', '\x9B', ' ', '\xE2', '\xB0', '\xBB', /* ⰵ ⱄ ⱚ ⰴ ⰲ ⰺ ⱛ ⰻ */
+ '\0',
+ '\xE2', '\xB0', '\xB5', ' ', '\xE2', '\xB0', '\xB4', ' ', '\xE2', '\xB0', '\xB2', ' ', '\xE2', '\xB1', '\x9A', ' ', '\xE2', '\xB1', '\x8E', ' ', '\xE2', '\xB1', '\x91', ' ', '\xE2', '\xB0', '\xBA', ' ', '\xE2', '\xB1', '\x84', /* ⰵ ⰴ ⰲ ⱚ ⱎ ⱑ ⰺ ⱄ */
+ '\0',
+ '\xF0', '\x90', '\x8C', '\xB2', ' ', '\xF0', '\x90', '\x8C', '\xB6', ' ', '\xF0', '\x90', '\x8D', '\x80', ' ', '\xF0', '\x90', '\x8D', '\x84', ' ', '\xF0', '\x90', '\x8C', '\xB4', ' ', '\xF0', '\x90', '\x8D', '\x83', ' ', '\xF0', '\x90', '\x8D', '\x88', ' ', '\xF0', '\x90', '\x8C', '\xBE', /* ðŒ² ðŒ¶ ð€ ð„ ðŒ´ ðƒ ðˆ ðŒ¾ */
+ '\0',
+ '\xF0', '\x90', '\x8C', '\xB6', ' ', '\xF0', '\x90', '\x8C', '\xB4', ' ', '\xF0', '\x90', '\x8D', '\x83', ' ', '\xF0', '\x90', '\x8D', '\x88', /* ðŒ¶ ðŒ´ ðƒ ðˆ */
+ '\0',
'\xCE', '\x93', ' ', '\xCE', '\x92', ' ', '\xCE', '\x95', ' ', '\xCE', '\x96', ' ', '\xCE', '\x98', ' ', '\xCE', '\x9F', ' ', '\xCE', '\xA9', /* Γ Β Ε Ζ Θ Ο Ω */
'\0',
'\xCE', '\x92', ' ', '\xCE', '\x94', ' ', '\xCE', '\x96', ' ', '\xCE', '\x9E', ' ', '\xCE', '\x98', ' ', '\xCE', '\x9F', /* Β Δ Ζ Ξ Θ Ο */
@@ -138,6 +222,16 @@
'\0',
'\xE0', '\xB2', '\x85', ' ', '\xE0', '\xB2', '\x89', ' ', '\xE0', '\xB2', '\x8E', ' ', '\xE0', '\xB2', '\xB2', ' ', '\xE0', '\xB3', '\xA6', ' ', '\xE0', '\xB3', '\xA8', ' ', '\xE0', '\xB3', '\xAC', ' ', '\xE0', '\xB3', '\xAD', /* ಅ ಉ ಎ ಲ ೦ ೨ ೬ ೭ */
'\0',
+ '\xEA', '\xA4', '\x85', ' ', '\xEA', '\xA4', '\x8F', ' ', '\xEA', '\xA4', '\x81', ' ', '\xEA', '\xA4', '\x8B', ' ', '\xEA', '\xA4', '\x80', ' ', '\xEA', '\xA4', '\x8D', /* ꤅ ê¤ ê¤ ê¤‹ ꤀ ê¤ */
+ '\0',
+ '\xEA', '\xA4', '\x88', ' ', '\xEA', '\xA4', '\x98', ' ', '\xEA', '\xA4', '\x80', ' ', '\xEA', '\xA4', '\x8D', ' ', '\xEA', '\xA4', '\xA2', /* ꤈ ꤘ ꤀ ê¤ ê¤¢ */
+ '\0',
+ '\xEA', '\xA4', '\x96', ' ', '\xEA', '\xA4', '\xA1', /* ꤖ ꤡ */
+ '\0',
+ '\xEA', '\xA4', '\x91', ' ', '\xEA', '\xA4', '\x9C', ' ', '\xEA', '\xA4', '\x9E', /* ꤑ ꤜ ꤞ */
+ '\0',
+ '\xEA', '\xA4', '\x91', '\xEA', '\xA4', '\xAC', ' ', '\xEA', '\xA4', '\x9C', '\xEA', '\xA4', '\xAD', ' ', '\xEA', '\xA4', '\x94', '\xEA', '\xA4', '\xAC', /* ꤑ꤬ ꤜ꤭ ꤔ꤬ */
+ '\0',
'\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x91', ' ', '\xE1', '\x9E', '\x93', ' ', '\xE1', '\x9E', '\xA7', ' ', '\xE1', '\x9E', '\xA9', ' ', '\xE1', '\x9E', '\xB6', /* ហទ ន ឧ ឩ ា */
'\0',
'\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x80', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x82', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x90', /* ក្ក ក្ហក្គ ក្ហ*/
@@ -168,7 +262,9 @@
'\0',
'f', ' ', 'i', ' ', 'j', ' ', 'k', ' ', 'd', ' ', 'b', ' ', 'h', /* f i j k d b h */
'\0',
- 'x', ' ', 'z', ' ', 'r', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c', /* x z r o e s c */
+ 'u', ' ', 'v', ' ', 'x', ' ', 'z', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c', /* u v x z o e s c */
+ '\0',
+ 'n', ' ', 'r', ' ', 'x', ' ', 'z', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c', /* n r x z o e s c */
'\0',
'p', ' ', 'q', ' ', 'g', ' ', 'j', ' ', 'y', /* p q g j y */
'\0',
@@ -192,6 +288,10 @@
'\0',
'\xE1', '\xB5', '\x96', ' ', '\xCA', '\xB8', ' ', '\xE1', '\xB5', '\x8D', /* ᵖ ʸ ᵠ*/
'\0',
+ '\xEA', '\x93', '\xA1', ' ', '\xEA', '\x93', '\xA7', ' ', '\xEA', '\x93', '\xB1', ' ', '\xEA', '\x93', '\xB6', ' ', '\xEA', '\x93', '\xA9', ' ', '\xEA', '\x93', '\x9A', ' ', '\xEA', '\x93', '\xB5', ' ', '\xEA', '\x93', '\xB3', /* ꓡ ꓧ ꓱ ꓶ ꓩ ꓚ ꓵ ꓳ */
+ '\0',
+ '\xEA', '\x93', '\x95', ' ', '\xEA', '\x93', '\x9C', ' ', '\xEA', '\x93', '\x9E', ' ', '\xEA', '\x93', '\xA1', ' ', '\xEA', '\x93', '\x9B', ' ', '\xEA', '\x93', '\xA2', ' ', '\xEA', '\x93', '\xB3', ' ', '\xEA', '\x93', '\xB4', /* ꓕ ꓜ ꓞ ꓡ ꓛ ꓢ ꓳ ꓴ */
+ '\0',
'\xE0', '\xB4', '\x92', ' ', '\xE0', '\xB4', '\x9F', ' ', '\xE0', '\xB4', '\xA0', ' ', '\xE0', '\xB4', '\xB1', ' ', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xAA', ' ', '\xE0', '\xB4', '\x9A', '\xE0', '\xB5', '\x8D', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xAA', '\xE0', '\xB5', '\x8D', '\xE0', '\xB4', '\xAA', /* à´’ à´Ÿ à´  à´± à´š à´ª à´šàµà´š à´ªàµà´ª */
'\0',
'\xE0', '\xB4', '\x9F', ' ', '\xE0', '\xB4', '\xA0', ' ', '\xE0', '\xB4', '\xA7', ' ', '\xE0', '\xB4', '\xB6', ' ', '\xE0', '\xB4', '\x98', ' ', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xA5', ' ', '\xE0', '\xB4', '\xB2', /* à´Ÿ à´  à´§ à´¶ à´˜ à´š à´¥ à´² */
@@ -204,12 +304,68 @@
'\0',
'\xE1', '\x80', '\x89', ' ', '\xE1', '\x80', '\x8A', ' ', '\xE1', '\x80', '\xA5', ' ', '\xE1', '\x80', '\xA9', ' ', '\xE1', '\x80', '\xA8', ' ', '\xE1', '\x81', '\x82', ' ', '\xE1', '\x81', '\x85', ' ', '\xE1', '\x81', '\x89', /* ဉ ည ဥ ဩ ဨ á‚ á… á‰ */
'\0',
+ '\xDF', '\x90', ' ', '\xDF', '\x89', ' ', '\xDF', '\x92', ' ', '\xDF', '\x9F', ' ', '\xDF', '\x96', ' ', '\xDF', '\x9C', ' ', '\xDF', '\xA0', ' ', '\xDF', '\xA5', /* ß ß‰ ß’ ߟ ß– ßœ ß  ߥ */
+ '\0',
+ '\xDF', '\x80', ' ', '\xDF', '\x98', ' ', '\xDF', '\xA1', ' ', '\xDF', '\xA0', ' ', '\xDF', '\xA5', /* ߀ ߘ ߡ ߠ ߥ */
+ '\0',
+ '\xDF', '\x8F', ' ', '\xDF', '\x9B', ' ', '\xDF', '\x8B', /* ß ß› ß‹ */
+ '\0',
+ '\xDF', '\x8E', ' ', '\xDF', '\x8F', ' ', '\xDF', '\x9B', ' ', '\xDF', '\x8B', /* ߎ ß ß› ß‹ */
+ '\0',
+ '\xE1', '\xB1', '\x9B', ' ', '\xE1', '\xB1', '\x9C', ' ', '\xE1', '\xB1', '\x9D', ' ', '\xE1', '\xB1', '\xA1', ' ', '\xE1', '\xB1', '\xA2', ' ', '\xE1', '\xB1', '\xA5', /* ᱛ ᱜ ᱠᱡ ᱢ ᱥ */
+ '\0',
+ '\xF0', '\x90', '\xB0', '\x97', ' ', '\xF0', '\x90', '\xB0', '\x98', ' ', '\xF0', '\x90', '\xB0', '\xA7', /* ð°— ð°˜ ð°§ */
+ '\0',
+ '\xF0', '\x90', '\xB0', '\x89', ' ', '\xF0', '\x90', '\xB0', '\x97', ' ', '\xF0', '\x90', '\xB0', '\xA6', ' ', '\xF0', '\x90', '\xB0', '\xA7', /* ð°‰ ð°— ð°¦ ð°§ */
+ '\0',
+ '\xF0', '\x90', '\x92', '\xBE', ' ', '\xF0', '\x90', '\x93', '\x8D', ' ', '\xF0', '\x90', '\x93', '\x92', ' ', '\xF0', '\x90', '\x93', '\x93', ' ', '\xF0', '\x90', '\x92', '\xBB', ' ', '\xF0', '\x90', '\x93', '\x82', ' ', '\xF0', '\x90', '\x92', '\xB5', ' ', '\xF0', '\x90', '\x93', '\x86', /* ð’¾ ð“ 𓒠𓓠𒻠𓂠𒵠𓆠*/
+ '\0',
+ '\xF0', '\x90', '\x92', '\xB0', ' ', '\xF0', '\x90', '\x93', '\x8D', ' ', '\xF0', '\x90', '\x93', '\x82', ' ', '\xF0', '\x90', '\x92', '\xBF', ' ', '\xF0', '\x90', '\x93', '\x8E', ' ', '\xF0', '\x90', '\x92', '\xB9', /* ð’° ð“ ð“‚ ð’¿ ð“Ž ð’¹ */
+ '\0',
+ '\xF0', '\x90', '\x92', '\xBC', ' ', '\xF0', '\x90', '\x92', '\xBD', ' ', '\xF0', '\x90', '\x92', '\xBE', /* ð’¼ ð’½ ð’¾ */
+ '\0',
+ '\xF0', '\x90', '\x93', '\xB5', ' ', '\xF0', '\x90', '\x93', '\xB6', ' ', '\xF0', '\x90', '\x93', '\xBA', ' ', '\xF0', '\x90', '\x93', '\xBB', ' ', '\xF0', '\x90', '\x93', '\x9D', ' ', '\xF0', '\x90', '\x93', '\xA3', ' ', '\xF0', '\x90', '\x93', '\xAA', ' ', '\xF0', '\x90', '\x93', '\xAE', /* 𓵠𓶠𓺠𓻠ð“ 𓣠𓪠𓮠*/
+ '\0',
+ '\xF0', '\x90', '\x93', '\x98', ' ', '\xF0', '\x90', '\x93', '\x9A', ' ', '\xF0', '\x90', '\x93', '\xA3', ' ', '\xF0', '\x90', '\x93', '\xB5', ' ', '\xF0', '\x90', '\x93', '\xA1', ' ', '\xF0', '\x90', '\x93', '\xA7', ' ', '\xF0', '\x90', '\x93', '\xAA', ' ', '\xF0', '\x90', '\x93', '\xB6', /* 𓘠𓚠𓣠𓵠𓡠𓧠𓪠𓶠*/
+ '\0',
+ '\xF0', '\x90', '\x93', '\xA4', ' ', '\xF0', '\x90', '\x93', '\xA6', ' ', '\xF0', '\x90', '\x93', '\xB8', ' ', '\xF0', '\x90', '\x93', '\xB9', ' ', '\xF0', '\x90', '\x93', '\x9B', /* 𓤠𓦠𓸠𓹠𓛠*/
+ '\0',
+ '\xF0', '\x90', '\x93', '\xA4', ' ', '\xF0', '\x90', '\x93', '\xA5', ' ', '\xF0', '\x90', '\x93', '\xA6', /* 𓤠𓥠𓦠*/
+ '\0',
+ '\xF0', '\x90', '\x92', '\x86', ' ', '\xF0', '\x90', '\x92', '\x89', ' ', '\xF0', '\x90', '\x92', '\x90', ' ', '\xF0', '\x90', '\x92', '\x92', ' ', '\xF0', '\x90', '\x92', '\x98', ' ', '\xF0', '\x90', '\x92', '\x9B', ' ', '\xF0', '\x90', '\x92', '\xA0', ' ', '\xF0', '\x90', '\x92', '\xA3', /* ð’† ð’‰ ð’ ð’’ ð’˜ ð’› ð’  ð’£ */
+ '\0',
+ '\xF0', '\x90', '\x92', '\x80', ' ', '\xF0', '\x90', '\x92', '\x82', ' ', '\xF0', '\x90', '\x92', '\x86', ' ', '\xF0', '\x90', '\x92', '\x88', ' ', '\xF0', '\x90', '\x92', '\x8A', ' ', '\xF0', '\x90', '\x92', '\x92', ' ', '\xF0', '\x90', '\x92', '\xA0', ' ', '\xF0', '\x90', '\x92', '\xA9', /* ð’€ ð’‚ ð’† ð’ˆ ð’Š ð’’ ð’  ð’© */
+ '\0',
+ '\xEA', '\xA2', '\x9C', ' ', '\xEA', '\xA2', '\x9E', ' ', '\xEA', '\xA2', '\xB3', ' ', '\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\x96', ' ', '\xEA', '\xA2', '\x92', ' ', '\xEA', '\xA2', '\x9D', ' ', '\xEA', '\xA2', '\x9B', /* ꢜ ꢞ ꢳ ꢂ ꢖ ꢒ ê¢ ê¢› */
+ '\0',
+ '\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\xA8', ' ', '\xEA', '\xA2', '\xBA', ' ', '\xEA', '\xA2', '\xA4', ' ', '\xEA', '\xA2', '\x8E', /* ꢂ ꢨ ꢺ ꢤ ꢎ */
+ '\0',
+ '\xF0', '\x90', '\x91', '\x95', ' ', '\xF0', '\x90', '\x91', '\x99', /* ð‘• ð‘™ */
+ '\0',
+ '\xF0', '\x90', '\x91', '\x94', ' ', '\xF0', '\x90', '\x91', '\x96', ' ', '\xF0', '\x90', '\x91', '\x97', ' ', '\xF0', '\x90', '\x91', '\xB9', ' ', '\xF0', '\x90', '\x91', '\xBB', /* 𑔠𑖠𑗠𑹠𑻠*/
+ '\0',
+ '\xF0', '\x90', '\x91', '\x9F', ' ', '\xF0', '\x90', '\x91', '\xA3', /* ð‘Ÿ ð‘£ */
+ '\0',
+ '\xF0', '\x90', '\x91', '\xB1', ' ', '\xF0', '\x90', '\x91', '\xB2', ' ', '\xF0', '\x90', '\x91', '\xB3', ' ', '\xF0', '\x90', '\x91', '\xB4', ' ', '\xF0', '\x90', '\x91', '\xB8', ' ', '\xF0', '\x90', '\x91', '\xBA', ' ', '\xF0', '\x90', '\x91', '\xBC', /* 𑱠𑲠𑳠𑴠𑸠𑺠𑼠*/
+ '\0',
+ '\xF0', '\x90', '\x91', '\xB4', ' ', '\xF0', '\x90', '\x91', '\xBB', ' ', '\xF0', '\x90', '\x91', '\xB9', /* 𑴠𑻠𑹠*/
+ '\0',
'\xE0', '\xB6', '\x89', ' ', '\xE0', '\xB6', '\x9A', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\xB4', ' ', '\xE0', '\xB6', '\xBA', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB7', '\x86', /* ඉ ක චඳ ප ය ල ෆ */
'\0',
'\xE0', '\xB6', '\x91', ' ', '\xE0', '\xB6', '\x94', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xA2', ' ', '\xE0', '\xB6', '\xA7', ' ', '\xE0', '\xB6', '\xAE', ' ', '\xE0', '\xB6', '\xB0', ' ', '\xE0', '\xB6', '\xBB', /* එ ඔ චජ ට ථ ධ ර */
'\0',
'\xE0', '\xB6', '\xAF', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\x8B', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x96', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xB6', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xAF', '\xE0', '\xB7', '\x94', /* ද ඳ උ ල තූ තු බු දු */
'\0',
+ '\xE1', '\xAE', '\x8B', ' ', '\xE1', '\xAE', '\x9E', ' ', '\xE1', '\xAE', '\xAE', ' ', '\xE1', '\xAE', '\xBD', ' ', '\xE1', '\xAE', '\xB0', ' ', '\xE1', '\xAE', '\x88', /* ᮋ ᮞ ᮮ ᮽ ᮰ ᮈ */
+ '\0',
+ '\xE1', '\xAE', '\x84', ' ', '\xE1', '\xAE', '\x94', ' ', '\xE1', '\xAE', '\x95', ' ', '\xE1', '\xAE', '\x97', ' ', '\xE1', '\xAE', '\xB0', ' ', '\xE1', '\xAE', '\x86', ' ', '\xE1', '\xAE', '\x88', ' ', '\xE1', '\xAE', '\x89', /* ᮄ ᮔ ᮕ ᮗ ᮰ ᮆ ᮈ ᮉ */
+ '\0',
+ '\xE1', '\xAE', '\xBC', ' ', '\xE1', '\xB3', '\x84', /* ᮼ ᳄ */
+ '\0',
+ '\xEA', '\xAA', '\x86', ' ', '\xEA', '\xAA', '\x94', ' ', '\xEA', '\xAA', '\x92', ' ', '\xEA', '\xAA', '\x96', ' ', '\xEA', '\xAA', '\xAB', /* ꪆ ꪔ ꪒ ꪖ ꪫ */
+ '\0',
+ '\xEA', '\xAA', '\x89', ' ', '\xEA', '\xAA', '\xAB', ' ', '\xEA', '\xAA', '\xAE', /* ꪉ ꪫ ꪮ */
+ '\0',
'\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x92', ' ', '\xE0', '\xAE', '\x93', ' ', '\xE0', '\xAE', '\xB1', ' ', '\xE0', '\xAE', '\x88', ' ', '\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9A', /* உ ஒ ஓ ற ஈ க ங ச */
'\0',
'\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x9A', ' ', '\xE0', '\xAE', '\xB2', ' ', '\xE0', '\xAE', '\xB6', ' ', '\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9F', ' ', '\xE0', '\xAE', '\xAA', /* க ச ல ஶ உ ங ட ப */
@@ -231,6 +387,12 @@
'\xE0', '\xB8', '\x8D', ' ', '\xE0', '\xB8', '\x90', /* ภภ*/
'\0',
'\xE0', '\xB9', '\x90', ' ', '\xE0', '\xB9', '\x91', ' ', '\xE0', '\xB9', '\x93', /* ๠๑ ๓ */
+ '\0',
+ '\xE2', '\xB5', '\x94', ' ', '\xE2', '\xB5', '\x99', ' ', '\xE2', '\xB5', '\x9B', ' ', '\xE2', '\xB5', '\x9E', ' ', '\xE2', '\xB4', '\xB5', ' ', '\xE2', '\xB4', '\xBC', ' ', '\xE2', '\xB4', '\xB9', ' ', '\xE2', '\xB5', '\x8E', /* ⵔ ⵙ ⵛ ⵞ ⴵ ⴼ ⴹ ⵎ */
+ '\0',
+ '\xEA', '\x97', '\x8D', ' ', '\xEA', '\x98', '\x96', ' ', '\xEA', '\x98', '\x99', ' ', '\xEA', '\x98', '\x9C', ' ', '\xEA', '\x96', '\x9C', ' ', '\xEA', '\x96', '\x9D', ' ', '\xEA', '\x94', '\x85', ' ', '\xEA', '\x95', '\xA2', /* ê— ê˜– ꘙ ꘜ ê–œ ê– ê”… ê•¢ */
+ '\0',
+ '\xEA', '\x97', '\x8D', ' ', '\xEA', '\x98', '\x96', ' ', '\xEA', '\x98', '\x99', ' ', '\xEA', '\x97', '\x9E', ' ', '\xEA', '\x94', '\x85', ' ', '\xEA', '\x95', '\xA2', ' ', '\xEA', '\x96', '\x9C', ' ', '\xEA', '\x94', '\x86', /* ê— ê˜– ꘙ ê—ž ê”… ê•¢ ê–œ ꔆ */
#ifdef AF_CONFIG_OPTION_CJK
'\0',
'\xE4', '\xBB', '\x96', ' ', '\xE4', '\xBB', '\xAC', ' ', '\xE4', '\xBD', '\xA0', ' ', '\xE4', '\xBE', '\x86', ' ', '\xE5', '\x80', '\x91', ' ', '\xE5', '\x88', '\xB0', ' ', '\xE5', '\x92', '\x8C', ' ', '\xE5', '\x9C', '\xB0', /* 他 们 你 來 們 到 和 地 */
@@ -281,6 +443,12 @@
af_blue_stringsets[] =
{
/* */
+ { AF_BLUE_STRING_ADLAM_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, 0 },
+ { AF_BLUE_STRING_ADLAM_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_ARABIC_BOTTOM, 0 },
{ AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL },
@@ -293,6 +461,12 @@
{ AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM, 0 },
{ AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_AVESTAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_AVESTAN_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_BAMUM_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_BAMUM_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_BENGALI_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_BENGALI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_BENGALI_BASE, AF_BLUE_PROPERTY_LATIN_TOP |
@@ -300,6 +474,27 @@
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
{ AF_BLUE_STRING_BENGALI_BASE, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_BUHID_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_BUHID_LARGE, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_BUHID_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_BUHID_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_CHAKMA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_CHAKMA_BOTTOM, 0 },
+ { AF_BLUE_STRING_CHAKMA_DESCENDER, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM, 0 },
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM, 0 },
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_CARIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_CARIAN_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_CHEROKEE_CAPITAL, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_CHEROKEE_CAPITAL, 0 },
{ AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
@@ -308,6 +503,17 @@
{ AF_BLUE_STRING_CHEROKEE_SMALL, 0 },
{ AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_COPTIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, 0 },
+ { AF_BLUE_STRING_COPTIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_CYPRIOT_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_CYPRIOT_BOTTOM, 0 },
+ { AF_BLUE_STRING_CYPRIOT_SMALL, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_CYPRIOT_SMALL, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 },
{ AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
@@ -323,6 +529,12 @@
{ AF_BLUE_STRING_DEVANAGARI_BASE, 0 },
{ AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_DESERET_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, 0 },
+ { AF_BLUE_STRING_DESERET_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_DESERET_SMALL_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_ETHIOPIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0 },
{ AF_BLUE_STRING_MAX, 0 },
@@ -331,6 +543,8 @@
{ AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM, 0 },
{ AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0 },
+ { AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM, 0 },
{ AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM, 0 },
@@ -340,6 +554,15 @@
{ AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, 0 },
+ { AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_GOTHIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_GOTHIC_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 },
{ AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
@@ -368,9 +591,13 @@
{ AF_BLUE_STRING_HEBREW_BOTTOM, 0 },
{ AF_BLUE_STRING_HEBREW_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
- { AF_BLUE_STRING_KANNADA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
- { AF_BLUE_STRING_KANNADA_BOTTOM, 0 },
- { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_KAYAH_LI_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_KAYAH_LI_BOTTOM, 0 },
+ { AF_BLUE_STRING_KAYAH_LI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_KAYAH_LI_DESCENDER, 0 },
+ { AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_KHMER_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
{ AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP, AF_BLUE_PROPERTY_LATIN_SUB_TOP },
@@ -382,6 +609,9 @@
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
{ AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_KANNADA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_KANNADA_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_LAO_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
{ AF_BLUE_STRING_LAO_BOTTOM, 0 },
@@ -392,9 +622,9 @@
{ AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 },
{ AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
- { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
+ { AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
- { AF_BLUE_STRING_LATIN_SMALL, 0 },
+ { AF_BLUE_STRING_LATIN_SMALL_BOTTOM, 0 },
{ AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
@@ -413,6 +643,9 @@
{ AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 },
{ AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_LISU_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_LISU_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_MALAYALAM_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_MALAYALAM_BOTTOM, 0 },
{ AF_BLUE_STRING_MAX, 0 },
@@ -422,17 +655,61 @@
{ AF_BLUE_STRING_MYANMAR_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_MYANMAR_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_NKO_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_NKO_BOTTOM, 0 },
+ { AF_BLUE_STRING_NKO_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_NKO_SMALL_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_OL_CHIKI, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_OL_CHIKI, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_OLD_TURKIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_OLD_TURKIC_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_OSAGE_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM, 0 },
+ { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0 },
+ { AF_BLUE_STRING_OSAGE_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM, 0 },
+ { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_OSMANYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_OSMANYA_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_SAURASHTRA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_SHAVIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_SHAVIAN_BOTTOM, 0 },
+ { AF_BLUE_STRING_SHAVIAN_DESCENDER, 0 },
+ { AF_BLUE_STRING_SHAVIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_SINHALA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_SINHALA_BOTTOM, 0 },
{ AF_BLUE_STRING_SINHALA_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_SUNDANESE_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_SUNDANESE_BOTTOM, 0 },
+ { AF_BLUE_STRING_SUNDANESE_DESCENDER, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_TAMIL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_TAMIL_BOTTOM, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_TAI_VIET_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_TAI_VIET_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_TELUGU_BOTTOM, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_TIFINAGH, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_TIFINAGH, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_THAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
{ AF_BLUE_STRING_THAI_BOTTOM, 0 },
@@ -442,6 +719,9 @@
{ AF_BLUE_STRING_THAI_LARGE_DESCENDER, 0 },
{ AF_BLUE_STRING_THAI_DIGIT_TOP, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_VAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_VAI_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
#ifdef AF_CONFIG_OPTION_CJK
{ AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP },
{ AF_BLUE_STRING_CJK_BOTTOM, 0 },
diff --git a/modules/freetype2/src/autofit/afblue.cin b/modules/freetype2/src/autofit/afblue.cin
index 0c3cae818..4913e2eb6 100644
--- a/modules/freetype2/src/autofit/afblue.cin
+++ b/modules/freetype2/src/autofit/afblue.cin
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter data for blue strings (body). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afblue.dat b/modules/freetype2/src/autofit/afblue.dat
index f5f04f289..bc2f0d275 100644
--- a/modules/freetype2/src/autofit/afblue.dat
+++ b/modules/freetype2/src/autofit/afblue.dat
@@ -2,7 +2,7 @@
//
// Auto-fitter data for blue strings.
//
-// Copyright 2013-2016 by
+// Copyright 2013-2018 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used,
@@ -74,6 +74,15 @@
AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
+ AF_BLUE_STRING_ADLAM_CAPITAL_TOP
+ "𞤌 𞤅 𞤈 𞤠𞤔 𞤚"
+ AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM
+ "𞤂 𞤖"
+ AF_BLUE_STRING_ADLAM_SMALL_TOP
+ "𞤬 𞤮 𞤻 𞤼 𞤾"
+ AF_BLUE_STRING_ADLAM_SMALL_BOTTOM
+ "𞤤 𞤨 𞤩 𞤭 𞤴 𞤸 𞤺 𞥀"
+
AF_BLUE_STRING_ARABIC_TOP
"ا إ ل ك ط ظ"
AF_BLUE_STRING_ARABIC_BOTTOM
@@ -99,6 +108,16 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER
"Õ¢ Õ¨ Õ« Õ¬ Õ² Õº Öƒ Ö"
+ AF_BLUE_STRING_AVESTAN_TOP
+ "𬀠ð¬ ð¬ ð¬›"
+ AF_BLUE_STRING_AVESTAN_BOTTOM
+ "𬀠ð¬"
+
+ AF_BLUE_STRING_BAMUM_TOP
+ "ꚧ ꚨ ê›› ꛉ ê› ê›ˆ ꛫ ꛯ"
+ AF_BLUE_STRING_BAMUM_BOTTOM
+ "ꚭ ꚳ ꚶ ꛬ ꚢ ꚽ ꛯ ꛲"
+
AF_BLUE_STRING_BENGALI_BASE
"অ ড ত ন ব ভ ল ক"
AF_BLUE_STRING_BENGALI_TOP
@@ -106,6 +125,40 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_BENGALI_HEAD
"ও ঠড ত ন ব ল ক"
+ AF_BLUE_STRING_BUHID_TOP
+ "á áˆ"
+ AF_BLUE_STRING_BUHID_LARGE
+ "á… áŠ áŽ"
+ AF_BLUE_STRING_BUHID_SMALL
+ "ႠრበáŒ"
+ AF_BLUE_STRING_BUHID_BOTTOM
+ "ဠრᆠበዠá á‘"
+
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP
+ "á—œ á–´ á á’£ á‘« á‘Ž ᔑ á—°"
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM
+ "ᗶ ᖵ ᒧ რᑌ ᒠᔑ ᗢ"
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP
+ "ᓓ ᓕ ᓀ ᓂ ᓄ ᕄ ᕆ ᘣ"
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM
+ "ᕃ ᓂ ᓀ ᕂ ᓗ ᓚ ᕆ ᘣ"
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP
+ "᪠ᙆ ᣘ ᢠᒾ ᣗ ᔆ"
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM
+ "ᙆ ᗮ ᒻ ហᔆ ᒡ ᒢ ᓑ"
+
+ AF_BLUE_STRING_CARIAN_TOP
+ "ðŠ§ ðŠ« ðŠ¬ ðŠ­ ðŠ± ðŠº ðŠ¼ ðŠ¿"
+ AF_BLUE_STRING_CARIAN_BOTTOM
+ "ðŠ£ ðŠ§ ðŠ· ð‹€ ðŠ« ðŠ¸ ð‹‰"
+
+ AF_BLUE_STRING_CHAKMA_TOP
+ "𑄃 𑄅 𑄉 𑄙 𑄗"
+ AF_BLUE_STRING_CHAKMA_BOTTOM
+ "ð‘„… ð‘„› ð‘„ ð‘„— ð‘„“"
+ AF_BLUE_STRING_CHAKMA_DESCENDER
+ "𑄖𑄳𑄢 𑄘𑄳𑄢 𑄙𑄳𑄢 𑄤𑄳𑄢 𑄥𑄳𑄢"
+
AF_BLUE_STRING_CHEROKEE_CAPITAL
"ᆠᎻ Ꭼ რᎤ ᣠᎦ á•"
AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER
@@ -115,6 +168,22 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER
"á¸ ê® ê­¹ ê­»"
+ AF_BLUE_STRING_COPTIC_CAPITAL_TOP
+ "Ⲍ Ⲏ Ⲡ Ⳟ Ⲟ ⲠⲤ Ⳋ"
+ AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM
+ "ⳠⳘ Ⳟ Ⲏ Ⲟ ⲠⳜ Ⲱ"
+ AF_BLUE_STRING_COPTIC_SMALL_TOP
+ "ⲠⲠⲡ ⳟ ⲟ ⲑ ⲥ ⳋ"
+ AF_BLUE_STRING_COPTIC_SMALL_BOTTOM
+ "ⳑ ⳙ ⳟ Ⲡⲟ ⲑ ⳠⳒ"
+
+ AF_BLUE_STRING_CYPRIOT_TOP
+ "ð  ð ™ ð ³ ð ± ð … ð “ ð £ ð ¦"
+ AF_BLUE_STRING_CYPRIOT_BOTTOM
+ "ð ƒ ð Š ð › ð £ ð ³ ð µ ð "
+ AF_BLUE_STRING_CYPRIOT_SMALL
+ "ð ˆ ð  ð –"
+
AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP
"Б В Е П З О С Э"
AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM
@@ -124,6 +193,15 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER
"р у ф"
+ AF_BLUE_STRING_DESERET_CAPITAL_TOP
+ "ð‚ ð„ ð‹ ð— ð‘"
+ AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM
+ "ð€ ð‚ ð„ ð— ð›"
+ AF_BLUE_STRING_DESERET_SMALL_TOP
+ "ðª ð¬ ð³ ð¿ ð¹"
+ AF_BLUE_STRING_DESERET_SMALL_BOTTOM
+ "ð¨ ðª ð¬ ð¿ ð‘ƒ"
+
AF_BLUE_STRING_DEVANAGARI_BASE
"क म अ आ थ ध भ श"
AF_BLUE_STRING_DEVANAGARI_TOP
@@ -164,6 +242,25 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER
"â´„ â´… â´” â´• â´ â´‚ â´˜ â´"
+ AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP
+ "Ნ Ჟ Ჳ Ჸ Გ Ე ᲠᲴ"
+ AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM
+ "Ი Ჲ ᲠᲩ Მ Შ Ჯ Ჽ"
+
+ AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP
+ "â°… â°” â°ª â°„ â°‚ â°Š â°« â°‹"
+ AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM
+ "â°… â°„ â°‚ â°ª â°ž â°¡ â°Š â°”"
+ AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP
+ "ⰵ ⱄ ⱚ ⰴ ⰲ ⰺ ⱛ ⰻ"
+ AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM
+ "ⰵ ⰴ ⰲ ⱚ ⱎ ⱑ ⰺ ⱄ"
+
+ AF_BLUE_STRING_GOTHIC_TOP
+ "ðŒ² ðŒ¶ ð€ ð„ ðŒ´ ðƒ ðˆ ðŒ¾"
+ AF_BLUE_STRING_GOTHIC_BOTTOM
+ "ðŒ¶ ðŒ´ ðƒ ðˆ"
+
AF_BLUE_STRING_GREEK_CAPITAL_TOP
"Γ Β Ε Ζ Θ Ο Ω"
AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM
@@ -209,6 +306,17 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_KANNADA_BOTTOM
"ಅ ಉ ಎ ಲ ೦ ೨ ೬ ೭"
+ AF_BLUE_STRING_KAYAH_LI_TOP
+ "꤅ ê¤ ê¤ ê¤‹ ꤀ ê¤"
+ AF_BLUE_STRING_KAYAH_LI_BOTTOM
+ "꤈ ꤘ ꤀ ê¤ ê¤¢"
+ AF_BLUE_STRING_KAYAH_LI_ASCENDER
+ "ꤖ ꤡ"
+ AF_BLUE_STRING_KAYAH_LI_DESCENDER
+ "ꤑ ꤜ ꤞ"
+ AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER
+ "ꤑ꤬ ꤜ꤭ ꤔ꤬"
+
AF_BLUE_STRING_KHMER_TOP
"ហទ ន ឧ ឩ ា"
AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP
@@ -242,8 +350,10 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
"H E Z L O C U S"
AF_BLUE_STRING_LATIN_SMALL_F_TOP
"f i j k d b h"
- AF_BLUE_STRING_LATIN_SMALL
- "x z r o e s c"
+ AF_BLUE_STRING_LATIN_SMALL_TOP
+ "u v x z o e s c"
+ AF_BLUE_STRING_LATIN_SMALL_BOTTOM
+ "n r x z o e s c"
AF_BLUE_STRING_LATIN_SMALL_DESCENDER
"p q g j y"
@@ -272,6 +382,11 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER
"áµ– ʸ áµ"
+ AF_BLUE_STRING_LISU_TOP
+ "ꓡ ꓧ ꓱ ꓶ ꓩ ꓚ ꓵ ꓳ"
+ AF_BLUE_STRING_LISU_BOTTOM
+ "ꓕ ꓜ ꓞ ꓡ ꓛ ꓢ ꓳ ꓴ"
+
AF_BLUE_STRING_MALAYALAM_TOP
"à´’ à´Ÿ à´  à´± à´š à´ª à´šàµà´š à´ªàµà´ª"
AF_BLUE_STRING_MALAYALAM_BOTTOM
@@ -286,6 +401,59 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_MYANMAR_DESCENDER
"ဉ ည ဥ ဩ ဨ á‚ á… á‰"
+ AF_BLUE_STRING_NKO_TOP
+ "ß ß‰ ß’ ߟ ß– ßœ ß  ߥ"
+ AF_BLUE_STRING_NKO_BOTTOM
+ "߀ ߘ ߡ ߠ ߥ"
+ AF_BLUE_STRING_NKO_SMALL_TOP
+ "ß ß› ß‹"
+ AF_BLUE_STRING_NKO_SMALL_BOTTOM
+ "ߎ ß ß› ß‹"
+
+ AF_BLUE_STRING_OL_CHIKI
+ "ᱛ ᱜ ᱠᱡ ᱢ ᱥ"
+
+ AF_BLUE_STRING_OLD_TURKIC_TOP
+ "ð°— ð°˜ ð°§"
+ AF_BLUE_STRING_OLD_TURKIC_BOTTOM
+ "ð°‰ ð°— ð°¦ ð°§"
+
+ AF_BLUE_STRING_OSAGE_CAPITAL_TOP
+ "ð’¾ ð“ ð“’ ð““ ð’» ð“‚ ð’µ ð“†"
+ AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM
+ "ð’° ð“ ð“‚ ð’¿ ð“Ž ð’¹"
+ AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER
+ "ð’¼ ð’½ ð’¾"
+ AF_BLUE_STRING_OSAGE_SMALL_TOP
+ "𓵠𓶠𓺠𓻠ð“ 𓣠𓪠ð“®"
+ AF_BLUE_STRING_OSAGE_SMALL_BOTTOM
+ "𓘠𓚠𓣠𓵠𓡠𓧠𓪠ð“¶"
+ AF_BLUE_STRING_OSAGE_SMALL_ASCENDER
+ "𓤠𓦠𓸠𓹠ð“›"
+ AF_BLUE_STRING_OSAGE_SMALL_DESCENDER
+ "𓤠𓥠ð“¦"
+
+ AF_BLUE_STRING_OSMANYA_TOP
+ "ð’† ð’‰ ð’ ð’’ ð’˜ ð’› ð’  ð’£"
+ AF_BLUE_STRING_OSMANYA_BOTTOM
+ "ð’€ ð’‚ ð’† ð’ˆ ð’Š ð’’ ð’  ð’©"
+
+ AF_BLUE_STRING_SAURASHTRA_TOP
+ "ꢜ ꢞ ꢳ ꢂ ꢖ ꢒ ê¢ ê¢›"
+ AF_BLUE_STRING_SAURASHTRA_BOTTOM
+ "ꢂ ꢨ ꢺ ꢤ ꢎ"
+
+ AF_BLUE_STRING_SHAVIAN_TOP
+ "ð‘• ð‘™"
+ AF_BLUE_STRING_SHAVIAN_BOTTOM
+ "𑔠𑖠𑗠𑹠ð‘»"
+ AF_BLUE_STRING_SHAVIAN_DESCENDER
+ "ð‘Ÿ ð‘£"
+ AF_BLUE_STRING_SHAVIAN_SMALL_TOP
+ "𑱠𑲠𑳠𑴠𑸠𑺠ð‘¼"
+ AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM
+ "ð‘´ ð‘» ð‘¹"
+
AF_BLUE_STRING_SINHALA_TOP
"ඉ ක චඳ ප ය ල ෆ"
AF_BLUE_STRING_SINHALA_BOTTOM
@@ -293,6 +461,18 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_SINHALA_DESCENDER
"ද ඳ උ ල තූ තු බු දු"
+ AF_BLUE_STRING_SUNDANESE_TOP
+ "ᮋ ᮞ ᮮ ᮽ ᮰ ᮈ"
+ AF_BLUE_STRING_SUNDANESE_BOTTOM
+ "ᮄ ᮔ ᮕ ᮗ ᮰ ᮆ ᮈ ᮉ"
+ AF_BLUE_STRING_SUNDANESE_DESCENDER
+ "ᮼ ᳄"
+
+ AF_BLUE_STRING_TAI_VIET_TOP
+ "ꪆ ꪔ ꪒ ꪖ ꪫ"
+ AF_BLUE_STRING_TAI_VIET_BOTTOM
+ "ꪉ ꪫ ꪮ"
+
AF_BLUE_STRING_TAMIL_TOP
"உ ஒ ஓ ற ஈ க ங ச"
AF_BLUE_STRING_TAMIL_BOTTOM
@@ -318,6 +498,14 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_THAI_DIGIT_TOP
"๠๑ ๓"
+ AF_BLUE_STRING_TIFINAGH
+ "ⵔ ⵙ ⵛ ⵞ ⴵ ⴼ ⴹ ⵎ"
+
+ AF_BLUE_STRING_VAI_TOP
+ "ê— ê˜– ꘙ ꘜ ê–œ ê– ê”… ê•¢"
+ AF_BLUE_STRING_VAI_BOTTOM
+ "ê— ê˜– ꘙ ê—ž ê”… ê•¢ ê–œ ꔆ"
+
#ifdef AF_CONFIG_OPTION_CJK
@@ -483,6 +671,14 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
+ AF_BLUE_STRINGSET_ADLM
+ { AF_BLUE_STRING_ADLAM_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, 0 }
+ { AF_BLUE_STRING_ADLAM_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_ARAB
{ AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_ARABIC_BOTTOM, 0 }
@@ -499,6 +695,16 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_AVST
+ { AF_BLUE_STRING_AVESTAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_AVESTAN_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_BAMU
+ { AF_BLUE_STRING_BAMUM_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_BAMUM_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_BENG
{ AF_BLUE_STRING_BENGALI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_BENGALI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP }
@@ -508,6 +714,35 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_BENGALI_BASE, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_BUHD
+ { AF_BLUE_STRING_BUHID_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_BUHID_LARGE, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_BUHID_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_BUHID_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_CAKM
+ { AF_BLUE_STRING_CHAKMA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_CHAKMA_BOTTOM, 0 }
+ { AF_BLUE_STRING_CHAKMA_DESCENDER, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_CANS
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM, 0 }
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM, 0 }
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_CARI
+ { AF_BLUE_STRING_CARIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_CARIAN_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_CHER
{ AF_BLUE_STRING_CHEROKEE_CAPITAL, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_CHEROKEE_CAPITAL, 0 }
@@ -518,6 +753,21 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_COPT
+ { AF_BLUE_STRING_COPTIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, 0 }
+ { AF_BLUE_STRING_COPTIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_CPRT
+ { AF_BLUE_STRING_CYPRIOT_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_CYPRIOT_BOTTOM, 0 }
+ { AF_BLUE_STRING_CYPRIOT_SMALL, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_CYPRIOT_SMALL, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_CYRL
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }
@@ -537,18 +787,27 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_DSRT
+ { AF_BLUE_STRING_DESERET_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, 0 }
+ { AF_BLUE_STRING_DESERET_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_DESERET_SMALL_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_ETHI
{ AF_BLUE_STRING_ETHIOPIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0 }
{ AF_BLUE_STRING_MAX, 0 }
- // blue zones for Mtavruli are missing (not yet defined in Unicode)
AF_BLUE_STRINGSET_GEOR
{ AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
{ AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM, 0 }
{ AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0 }
+ { AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM, 0 }
{ AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_GEOK
@@ -561,6 +820,19 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_GLAG
+ { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, 0 }
+ { AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_GOTH
+ { AF_BLUE_STRING_GOTHIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_GOTHIC_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_GREK
{ AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 }
@@ -597,10 +869,14 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_HEBREW_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
- AF_BLUE_STRINGSET_KNDA
- { AF_BLUE_STRING_KANNADA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
- { AF_BLUE_STRING_KANNADA_BOTTOM, 0 }
- { AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_KALI
+ { AF_BLUE_STRING_KAYAH_LI_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_KAYAH_LI_BOTTOM, 0 }
+ { AF_BLUE_STRING_KAYAH_LI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_KAYAH_LI_DESCENDER, 0 }
+ { AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_KHMR
{ AF_BLUE_STRING_KHMER_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
@@ -617,6 +893,11 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_KNDA
+ { AF_BLUE_STRING_KANNADA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_KANNADA_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_LAO
{ AF_BLUE_STRING_LAO_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
@@ -630,9 +911,9 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 }
{ AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
- { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
+ { AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
- { AF_BLUE_STRING_LATIN_SMALL, 0 }
+ { AF_BLUE_STRING_LATIN_SMALL_BOTTOM, 0 }
{ AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
@@ -656,6 +937,11 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_LISU
+ { AF_BLUE_STRING_LISU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_LISU_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_MLYM
{ AF_BLUE_STRING_MALAYALAM_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_MALAYALAM_BOTTOM, 0 }
@@ -669,25 +955,89 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_MYANMAR_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_NKOO
+ { AF_BLUE_STRING_NKO_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_NKO_BOTTOM, 0 }
+ { AF_BLUE_STRING_NKO_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_NKO_SMALL_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_NONE
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_OLCK
+ { AF_BLUE_STRING_OL_CHIKI, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_OL_CHIKI, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_ORKH
+ { AF_BLUE_STRING_OLD_TURKIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_OLD_TURKIC_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_OSGE
+ { AF_BLUE_STRING_OSAGE_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM, 0 }
+ { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0 }
+ { AF_BLUE_STRING_OSAGE_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM, 0 }
+ { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_OSMA
+ { AF_BLUE_STRING_OSMANYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_OSMANYA_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_SAUR
+ { AF_BLUE_STRING_SAURASHTRA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_SHAW
+ { AF_BLUE_STRING_SHAVIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_SHAVIAN_BOTTOM, 0 }
+ { AF_BLUE_STRING_SHAVIAN_DESCENDER, 0 }
+ { AF_BLUE_STRING_SHAVIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_SINH
{ AF_BLUE_STRING_SINHALA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_SINHALA_BOTTOM, 0 }
{ AF_BLUE_STRING_SINHALA_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_SUND
+ { AF_BLUE_STRING_SUNDANESE_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_SUNDANESE_BOTTOM, 0 }
+ { AF_BLUE_STRING_SUNDANESE_DESCENDER, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_TAML
{ AF_BLUE_STRING_TAMIL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_TAMIL_BOTTOM, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_TAVT
+ { AF_BLUE_STRING_TAI_VIET_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_TAI_VIET_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_TELU
{ AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_TELUGU_BOTTOM, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_TFNG
+ { AF_BLUE_STRING_TIFINAGH, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_TIFINAGH, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
AF_BLUE_STRINGSET_THAI
{ AF_BLUE_STRING_THAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
@@ -699,6 +1049,10 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_THAI_DIGIT_TOP, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+ AF_BLUE_STRINGSET_VAII
+ { AF_BLUE_STRING_VAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_VAI_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
#ifdef AF_CONFIG_OPTION_CJK
diff --git a/modules/freetype2/src/autofit/afblue.h b/modules/freetype2/src/autofit/afblue.h
index 75c3ab508..de31e259c 100644
--- a/modules/freetype2/src/autofit/afblue.h
+++ b/modules/freetype2/src/autofit/afblue.h
@@ -7,7 +7,7 @@
/* */
/* Auto-fitter data for blue strings (specification). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -77,110 +77,191 @@ FT_BEGIN_HEADER
typedef enum AF_Blue_String_
{
- AF_BLUE_STRING_ARABIC_TOP = 0,
- AF_BLUE_STRING_ARABIC_BOTTOM = 18,
- AF_BLUE_STRING_ARABIC_JOIN = 33,
- AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP = 36,
- AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM = 60,
- AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER = 84,
- AF_BLUE_STRING_ARMENIAN_SMALL_TOP = 105,
- AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM = 129,
- AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER = 153,
- AF_BLUE_STRING_BENGALI_BASE = 177,
- AF_BLUE_STRING_BENGALI_TOP = 209,
- AF_BLUE_STRING_BENGALI_HEAD = 237,
- AF_BLUE_STRING_CHEROKEE_CAPITAL = 269,
- AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER = 301,
- AF_BLUE_STRING_CHEROKEE_SMALL = 333,
- AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER = 365,
- AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 381,
- AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 405,
- AF_BLUE_STRING_CYRILLIC_SMALL = 429,
- AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 453,
- AF_BLUE_STRING_DEVANAGARI_BASE = 462,
- AF_BLUE_STRING_DEVANAGARI_TOP = 494,
- AF_BLUE_STRING_DEVANAGARI_HEAD = 526,
- AF_BLUE_STRING_DEVANAGARI_BOTTOM = 558,
- AF_BLUE_STRING_ETHIOPIC_TOP = 566,
- AF_BLUE_STRING_ETHIOPIC_BOTTOM = 598,
- AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP = 630,
- AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM = 662,
- AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER = 694,
- AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER = 726,
- AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP = 758,
- AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM = 790,
- AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP = 822,
- AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM = 854,
- AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER = 886,
- AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER = 918,
- AF_BLUE_STRING_GREEK_CAPITAL_TOP = 950,
- AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 971,
- AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 989,
- AF_BLUE_STRING_GREEK_SMALL = 1007,
- AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 1031,
- AF_BLUE_STRING_GUJARATI_TOP = 1055,
- AF_BLUE_STRING_GUJARATI_BOTTOM = 1087,
- AF_BLUE_STRING_GUJARATI_ASCENDER = 1119,
- AF_BLUE_STRING_GUJARATI_DESCENDER = 1169,
- AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 1202,
- AF_BLUE_STRING_GURMUKHI_BASE = 1222,
- AF_BLUE_STRING_GURMUKHI_HEAD = 1254,
- AF_BLUE_STRING_GURMUKHI_TOP = 1286,
- AF_BLUE_STRING_GURMUKHI_BOTTOM = 1318,
- AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 1350,
- AF_BLUE_STRING_HEBREW_TOP = 1370,
- AF_BLUE_STRING_HEBREW_BOTTOM = 1394,
- AF_BLUE_STRING_HEBREW_DESCENDER = 1412,
- AF_BLUE_STRING_KANNADA_TOP = 1427,
- AF_BLUE_STRING_KANNADA_BOTTOM = 1471,
- AF_BLUE_STRING_KHMER_TOP = 1503,
- AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 1527,
- AF_BLUE_STRING_KHMER_BOTTOM = 1567,
- AF_BLUE_STRING_KHMER_DESCENDER = 1599,
- AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 1633,
- AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 1720,
- AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 1728,
- AF_BLUE_STRING_LAO_TOP = 1736,
- AF_BLUE_STRING_LAO_BOTTOM = 1768,
- AF_BLUE_STRING_LAO_ASCENDER = 1800,
- AF_BLUE_STRING_LAO_LARGE_ASCENDER = 1816,
- AF_BLUE_STRING_LAO_DESCENDER = 1828,
- AF_BLUE_STRING_LATIN_CAPITAL_TOP = 1852,
- AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 1868,
- AF_BLUE_STRING_LATIN_SMALL_F_TOP = 1884,
- AF_BLUE_STRING_LATIN_SMALL = 1898,
- AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 1912,
- AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 1922,
- AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 1942,
- AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 1962,
- AF_BLUE_STRING_LATIN_SUBS_SMALL = 1982,
- AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 2018,
- AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 2038,
- AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 2069,
- AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 2098,
- AF_BLUE_STRING_LATIN_SUPS_SMALL = 2124,
- AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 2149,
- AF_BLUE_STRING_MALAYALAM_TOP = 2160,
- AF_BLUE_STRING_MALAYALAM_BOTTOM = 2204,
- AF_BLUE_STRING_MYANMAR_TOP = 2236,
- AF_BLUE_STRING_MYANMAR_BOTTOM = 2268,
- AF_BLUE_STRING_MYANMAR_ASCENDER = 2300,
- AF_BLUE_STRING_MYANMAR_DESCENDER = 2328,
- AF_BLUE_STRING_SINHALA_TOP = 2360,
- AF_BLUE_STRING_SINHALA_BOTTOM = 2392,
- AF_BLUE_STRING_SINHALA_DESCENDER = 2424,
- AF_BLUE_STRING_TAMIL_TOP = 2468,
- AF_BLUE_STRING_TAMIL_BOTTOM = 2500,
- AF_BLUE_STRING_TELUGU_TOP = 2532,
- AF_BLUE_STRING_TELUGU_BOTTOM = 2560,
- AF_BLUE_STRING_THAI_TOP = 2588,
- AF_BLUE_STRING_THAI_BOTTOM = 2612,
- AF_BLUE_STRING_THAI_ASCENDER = 2640,
- AF_BLUE_STRING_THAI_LARGE_ASCENDER = 2652,
- AF_BLUE_STRING_THAI_DESCENDER = 2664,
- AF_BLUE_STRING_THAI_LARGE_DESCENDER = 2680,
- AF_BLUE_STRING_THAI_DIGIT_TOP = 2688,
- af_blue_1_1 = 2699,
+ AF_BLUE_STRING_ADLAM_CAPITAL_TOP = 0,
+ AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM = 30,
+ AF_BLUE_STRING_ADLAM_SMALL_TOP = 40,
+ AF_BLUE_STRING_ADLAM_SMALL_BOTTOM = 65,
+ AF_BLUE_STRING_ARABIC_TOP = 105,
+ AF_BLUE_STRING_ARABIC_BOTTOM = 123,
+ AF_BLUE_STRING_ARABIC_JOIN = 138,
+ AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP = 141,
+ AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM = 165,
+ AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER = 189,
+ AF_BLUE_STRING_ARMENIAN_SMALL_TOP = 210,
+ AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM = 234,
+ AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER = 258,
+ AF_BLUE_STRING_AVESTAN_TOP = 282,
+ AF_BLUE_STRING_AVESTAN_BOTTOM = 302,
+ AF_BLUE_STRING_BAMUM_TOP = 312,
+ AF_BLUE_STRING_BAMUM_BOTTOM = 344,
+ AF_BLUE_STRING_BENGALI_BASE = 376,
+ AF_BLUE_STRING_BENGALI_TOP = 408,
+ AF_BLUE_STRING_BENGALI_HEAD = 436,
+ AF_BLUE_STRING_BUHID_TOP = 468,
+ AF_BLUE_STRING_BUHID_LARGE = 476,
+ AF_BLUE_STRING_BUHID_SMALL = 488,
+ AF_BLUE_STRING_BUHID_BOTTOM = 504,
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP = 532,
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM = 564,
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP = 596,
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM = 628,
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP = 660,
+ AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM = 688,
+ AF_BLUE_STRING_CARIAN_TOP = 720,
+ AF_BLUE_STRING_CARIAN_BOTTOM = 760,
+ AF_BLUE_STRING_CHAKMA_TOP = 795,
+ AF_BLUE_STRING_CHAKMA_BOTTOM = 820,
+ AF_BLUE_STRING_CHAKMA_DESCENDER = 845,
+ AF_BLUE_STRING_CHEROKEE_CAPITAL = 910,
+ AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER = 942,
+ AF_BLUE_STRING_CHEROKEE_SMALL = 974,
+ AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER = 1006,
+ AF_BLUE_STRING_COPTIC_CAPITAL_TOP = 1022,
+ AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM = 1054,
+ AF_BLUE_STRING_COPTIC_SMALL_TOP = 1086,
+ AF_BLUE_STRING_COPTIC_SMALL_BOTTOM = 1118,
+ AF_BLUE_STRING_CYPRIOT_TOP = 1150,
+ AF_BLUE_STRING_CYPRIOT_BOTTOM = 1190,
+ AF_BLUE_STRING_CYPRIOT_SMALL = 1225,
+ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 1240,
+ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 1264,
+ AF_BLUE_STRING_CYRILLIC_SMALL = 1288,
+ AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 1312,
+ AF_BLUE_STRING_DESERET_CAPITAL_TOP = 1321,
+ AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM = 1346,
+ AF_BLUE_STRING_DESERET_SMALL_TOP = 1371,
+ AF_BLUE_STRING_DESERET_SMALL_BOTTOM = 1396,
+ AF_BLUE_STRING_DEVANAGARI_BASE = 1421,
+ AF_BLUE_STRING_DEVANAGARI_TOP = 1453,
+ AF_BLUE_STRING_DEVANAGARI_HEAD = 1485,
+ AF_BLUE_STRING_DEVANAGARI_BOTTOM = 1517,
+ AF_BLUE_STRING_ETHIOPIC_TOP = 1525,
+ AF_BLUE_STRING_ETHIOPIC_BOTTOM = 1557,
+ AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP = 1589,
+ AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM = 1621,
+ AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER = 1653,
+ AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER = 1685,
+ AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP = 1717,
+ AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM = 1749,
+ AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP = 1781,
+ AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM = 1813,
+ AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER = 1845,
+ AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER = 1877,
+ AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP = 1909,
+ AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM = 1941,
+ AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP = 1973,
+ AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM = 2005,
+ AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP = 2037,
+ AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM = 2069,
+ AF_BLUE_STRING_GOTHIC_TOP = 2101,
+ AF_BLUE_STRING_GOTHIC_BOTTOM = 2141,
+ AF_BLUE_STRING_GREEK_CAPITAL_TOP = 2161,
+ AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 2182,
+ AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 2200,
+ AF_BLUE_STRING_GREEK_SMALL = 2218,
+ AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 2242,
+ AF_BLUE_STRING_GUJARATI_TOP = 2266,
+ AF_BLUE_STRING_GUJARATI_BOTTOM = 2298,
+ AF_BLUE_STRING_GUJARATI_ASCENDER = 2330,
+ AF_BLUE_STRING_GUJARATI_DESCENDER = 2380,
+ AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 2413,
+ AF_BLUE_STRING_GURMUKHI_BASE = 2433,
+ AF_BLUE_STRING_GURMUKHI_HEAD = 2465,
+ AF_BLUE_STRING_GURMUKHI_TOP = 2497,
+ AF_BLUE_STRING_GURMUKHI_BOTTOM = 2529,
+ AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 2561,
+ AF_BLUE_STRING_HEBREW_TOP = 2581,
+ AF_BLUE_STRING_HEBREW_BOTTOM = 2605,
+ AF_BLUE_STRING_HEBREW_DESCENDER = 2623,
+ AF_BLUE_STRING_KANNADA_TOP = 2638,
+ AF_BLUE_STRING_KANNADA_BOTTOM = 2682,
+ AF_BLUE_STRING_KAYAH_LI_TOP = 2714,
+ AF_BLUE_STRING_KAYAH_LI_BOTTOM = 2738,
+ AF_BLUE_STRING_KAYAH_LI_ASCENDER = 2758,
+ AF_BLUE_STRING_KAYAH_LI_DESCENDER = 2766,
+ AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER = 2778,
+ AF_BLUE_STRING_KHMER_TOP = 2799,
+ AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 2823,
+ AF_BLUE_STRING_KHMER_BOTTOM = 2863,
+ AF_BLUE_STRING_KHMER_DESCENDER = 2895,
+ AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 2929,
+ AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 3016,
+ AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 3024,
+ AF_BLUE_STRING_LAO_TOP = 3032,
+ AF_BLUE_STRING_LAO_BOTTOM = 3064,
+ AF_BLUE_STRING_LAO_ASCENDER = 3096,
+ AF_BLUE_STRING_LAO_LARGE_ASCENDER = 3112,
+ AF_BLUE_STRING_LAO_DESCENDER = 3124,
+ AF_BLUE_STRING_LATIN_CAPITAL_TOP = 3148,
+ AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 3164,
+ AF_BLUE_STRING_LATIN_SMALL_F_TOP = 3180,
+ AF_BLUE_STRING_LATIN_SMALL_TOP = 3194,
+ AF_BLUE_STRING_LATIN_SMALL_BOTTOM = 3210,
+ AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 3226,
+ AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 3236,
+ AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 3256,
+ AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 3276,
+ AF_BLUE_STRING_LATIN_SUBS_SMALL = 3296,
+ AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 3332,
+ AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 3352,
+ AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 3383,
+ AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 3412,
+ AF_BLUE_STRING_LATIN_SUPS_SMALL = 3438,
+ AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 3463,
+ AF_BLUE_STRING_LISU_TOP = 3474,
+ AF_BLUE_STRING_LISU_BOTTOM = 3506,
+ AF_BLUE_STRING_MALAYALAM_TOP = 3538,
+ AF_BLUE_STRING_MALAYALAM_BOTTOM = 3582,
+ AF_BLUE_STRING_MYANMAR_TOP = 3614,
+ AF_BLUE_STRING_MYANMAR_BOTTOM = 3646,
+ AF_BLUE_STRING_MYANMAR_ASCENDER = 3678,
+ AF_BLUE_STRING_MYANMAR_DESCENDER = 3706,
+ AF_BLUE_STRING_NKO_TOP = 3738,
+ AF_BLUE_STRING_NKO_BOTTOM = 3762,
+ AF_BLUE_STRING_NKO_SMALL_TOP = 3777,
+ AF_BLUE_STRING_NKO_SMALL_BOTTOM = 3786,
+ AF_BLUE_STRING_OL_CHIKI = 3798,
+ AF_BLUE_STRING_OLD_TURKIC_TOP = 3822,
+ AF_BLUE_STRING_OLD_TURKIC_BOTTOM = 3837,
+ AF_BLUE_STRING_OSAGE_CAPITAL_TOP = 3857,
+ AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM = 3897,
+ AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER = 3927,
+ AF_BLUE_STRING_OSAGE_SMALL_TOP = 3942,
+ AF_BLUE_STRING_OSAGE_SMALL_BOTTOM = 3982,
+ AF_BLUE_STRING_OSAGE_SMALL_ASCENDER = 4022,
+ AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 4047,
+ AF_BLUE_STRING_OSMANYA_TOP = 4062,
+ AF_BLUE_STRING_OSMANYA_BOTTOM = 4102,
+ AF_BLUE_STRING_SAURASHTRA_TOP = 4142,
+ AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4174,
+ AF_BLUE_STRING_SHAVIAN_TOP = 4194,
+ AF_BLUE_STRING_SHAVIAN_BOTTOM = 4204,
+ AF_BLUE_STRING_SHAVIAN_DESCENDER = 4229,
+ AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4239,
+ AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4274,
+ AF_BLUE_STRING_SINHALA_TOP = 4289,
+ AF_BLUE_STRING_SINHALA_BOTTOM = 4321,
+ AF_BLUE_STRING_SINHALA_DESCENDER = 4353,
+ AF_BLUE_STRING_SUNDANESE_TOP = 4397,
+ AF_BLUE_STRING_SUNDANESE_BOTTOM = 4421,
+ AF_BLUE_STRING_SUNDANESE_DESCENDER = 4453,
+ AF_BLUE_STRING_TAI_VIET_TOP = 4461,
+ AF_BLUE_STRING_TAI_VIET_BOTTOM = 4481,
+ AF_BLUE_STRING_TAMIL_TOP = 4493,
+ AF_BLUE_STRING_TAMIL_BOTTOM = 4525,
+ AF_BLUE_STRING_TELUGU_TOP = 4557,
+ AF_BLUE_STRING_TELUGU_BOTTOM = 4585,
+ AF_BLUE_STRING_THAI_TOP = 4613,
+ AF_BLUE_STRING_THAI_BOTTOM = 4637,
+ AF_BLUE_STRING_THAI_ASCENDER = 4665,
+ AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4677,
+ AF_BLUE_STRING_THAI_DESCENDER = 4689,
+ AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4705,
+ AF_BLUE_STRING_THAI_DIGIT_TOP = 4713,
+ AF_BLUE_STRING_TIFINAGH = 4725,
+ AF_BLUE_STRING_VAI_TOP = 4757,
+ AF_BLUE_STRING_VAI_BOTTOM = 4789,
+ af_blue_1_1 = 4820,
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203,
@@ -239,34 +320,59 @@ FT_BEGIN_HEADER
typedef enum AF_Blue_Stringset_
{
- AF_BLUE_STRINGSET_ARAB = 0,
- AF_BLUE_STRINGSET_ARMN = 4,
- AF_BLUE_STRINGSET_BENG = 11,
- AF_BLUE_STRINGSET_CHER = 16,
- AF_BLUE_STRINGSET_CYRL = 23,
- AF_BLUE_STRINGSET_DEVA = 29,
- AF_BLUE_STRINGSET_ETHI = 35,
- AF_BLUE_STRINGSET_GEOR = 38,
- AF_BLUE_STRINGSET_GEOK = 43,
- AF_BLUE_STRINGSET_GREK = 50,
- AF_BLUE_STRINGSET_GUJR = 57,
- AF_BLUE_STRINGSET_GURU = 63,
- AF_BLUE_STRINGSET_HEBR = 69,
- AF_BLUE_STRINGSET_KNDA = 73,
- AF_BLUE_STRINGSET_KHMR = 76,
- AF_BLUE_STRINGSET_KHMS = 82,
- AF_BLUE_STRINGSET_LAO = 85,
- AF_BLUE_STRINGSET_LATN = 91,
- AF_BLUE_STRINGSET_LATB = 98,
- AF_BLUE_STRINGSET_LATP = 105,
- AF_BLUE_STRINGSET_MLYM = 112,
- AF_BLUE_STRINGSET_MYMR = 115,
- AF_BLUE_STRINGSET_NONE = 120,
- AF_BLUE_STRINGSET_SINH = 121,
- AF_BLUE_STRINGSET_TAML = 125,
- AF_BLUE_STRINGSET_TELU = 128,
- AF_BLUE_STRINGSET_THAI = 131,
- af_blue_2_1 = 139,
+ AF_BLUE_STRINGSET_ADLM = 0,
+ AF_BLUE_STRINGSET_ARAB = 5,
+ AF_BLUE_STRINGSET_ARMN = 9,
+ AF_BLUE_STRINGSET_AVST = 16,
+ AF_BLUE_STRINGSET_BAMU = 19,
+ AF_BLUE_STRINGSET_BENG = 22,
+ AF_BLUE_STRINGSET_BUHD = 27,
+ AF_BLUE_STRINGSET_CAKM = 32,
+ AF_BLUE_STRINGSET_CANS = 36,
+ AF_BLUE_STRINGSET_CARI = 43,
+ AF_BLUE_STRINGSET_CHER = 46,
+ AF_BLUE_STRINGSET_COPT = 53,
+ AF_BLUE_STRINGSET_CPRT = 58,
+ AF_BLUE_STRINGSET_CYRL = 63,
+ AF_BLUE_STRINGSET_DEVA = 69,
+ AF_BLUE_STRINGSET_DSRT = 75,
+ AF_BLUE_STRINGSET_ETHI = 80,
+ AF_BLUE_STRINGSET_GEOR = 83,
+ AF_BLUE_STRINGSET_GEOK = 90,
+ AF_BLUE_STRINGSET_GLAG = 97,
+ AF_BLUE_STRINGSET_GOTH = 102,
+ AF_BLUE_STRINGSET_GREK = 105,
+ AF_BLUE_STRINGSET_GUJR = 112,
+ AF_BLUE_STRINGSET_GURU = 118,
+ AF_BLUE_STRINGSET_HEBR = 124,
+ AF_BLUE_STRINGSET_KALI = 128,
+ AF_BLUE_STRINGSET_KHMR = 134,
+ AF_BLUE_STRINGSET_KHMS = 140,
+ AF_BLUE_STRINGSET_KNDA = 143,
+ AF_BLUE_STRINGSET_LAO = 146,
+ AF_BLUE_STRINGSET_LATN = 152,
+ AF_BLUE_STRINGSET_LATB = 159,
+ AF_BLUE_STRINGSET_LATP = 166,
+ AF_BLUE_STRINGSET_LISU = 173,
+ AF_BLUE_STRINGSET_MLYM = 176,
+ AF_BLUE_STRINGSET_MYMR = 179,
+ AF_BLUE_STRINGSET_NKOO = 184,
+ AF_BLUE_STRINGSET_NONE = 189,
+ AF_BLUE_STRINGSET_OLCK = 190,
+ AF_BLUE_STRINGSET_ORKH = 193,
+ AF_BLUE_STRINGSET_OSGE = 196,
+ AF_BLUE_STRINGSET_OSMA = 204,
+ AF_BLUE_STRINGSET_SAUR = 207,
+ AF_BLUE_STRINGSET_SHAW = 210,
+ AF_BLUE_STRINGSET_SINH = 216,
+ AF_BLUE_STRINGSET_SUND = 220,
+ AF_BLUE_STRINGSET_TAML = 224,
+ AF_BLUE_STRINGSET_TAVT = 227,
+ AF_BLUE_STRINGSET_TELU = 230,
+ AF_BLUE_STRINGSET_TFNG = 233,
+ AF_BLUE_STRINGSET_THAI = 236,
+ AF_BLUE_STRINGSET_VAII = 244,
+ af_blue_2_1 = 247,
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
af_blue_2_1_1 = af_blue_2_1 + 2,
diff --git a/modules/freetype2/src/autofit/afblue.hin b/modules/freetype2/src/autofit/afblue.hin
index dd44e7725..682147cb3 100644
--- a/modules/freetype2/src/autofit/afblue.hin
+++ b/modules/freetype2/src/autofit/afblue.hin
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter data for blue strings (specification). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afcjk.c b/modules/freetype2/src/autofit/afcjk.c
index 412663315..21b6bffa3 100644
--- a/modules/freetype2/src/autofit/afcjk.c
+++ b/modules/freetype2/src/autofit/afcjk.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for CJK writing system (body). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,9 +16,9 @@
/***************************************************************************/
/*
- * The algorithm is based on akito's autohint patch, available here:
+ * The algorithm is based on akito's autohint patch, archived at
*
- * http://www.kde.gr.jp/~akito/patch/freetype2/
+ * https://web.archive.org/web/20051219160454/http://www.kde.gr.jp:80/~akito/patch/freetype2/2.1.7/
*
*/
@@ -29,13 +29,13 @@
#include "afglobal.h"
#include "afpic.h"
#include "aflatin.h"
+#include "afcjk.h"
#ifdef AF_CONFIG_OPTION_CJK
#undef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
-#include "afcjk.h"
#include "aferrors.h"
@@ -563,7 +563,7 @@
FT_Face face )
{
FT_Bool started = 0, same_width = 1;
- FT_Fixed advance, old_advance = 0;
+ FT_Fixed advance = 0, old_advance = 0;
void* shaper_buf;
@@ -1398,9 +1398,9 @@
other_flags |= AF_LATIN_HINTS_VERT_SNAP;
/*
- * We adjust stems to full pixels only if we don't use the `light' mode.
+ * We adjust stems to full pixels unless in `light' or `lcd' mode.
*/
- if ( mode != FT_RENDER_MODE_LIGHT )
+ if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
if ( mode == FT_RENDER_MODE_MONO )
@@ -2272,13 +2272,7 @@
goto Exit;
/* analyze glyph outline */
-#ifdef AF_CONFIG_OPTION_USE_WARPER
- if ( ( metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT &&
- AF_HINTS_DO_WARP( hints ) ) ||
- AF_HINTS_DO_HORIZONTAL( hints ) )
-#else
if ( AF_HINTS_DO_HORIZONTAL( hints ) )
-#endif
{
error = af_cjk_hints_detect_features( hints, AF_DIMENSION_HORZ );
if ( error )
@@ -2304,9 +2298,9 @@
{
#ifdef AF_CONFIG_OPTION_USE_WARPER
- if ( dim == AF_DIMENSION_HORZ &&
- metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT &&
- AF_HINTS_DO_WARP( hints ) )
+ if ( dim == AF_DIMENSION_HORZ &&
+ metrics->root.scaler.render_mode == FT_RENDER_MODE_NORMAL &&
+ AF_HINTS_DO_WARP( hints ) )
{
AF_WarperRec warper;
FT_Fixed scale;
diff --git a/modules/freetype2/src/autofit/afcjk.h b/modules/freetype2/src/autofit/afcjk.h
index 40d118438..d229c0c9c 100644
--- a/modules/freetype2/src/autofit/afcjk.h
+++ b/modules/freetype2/src/autofit/afcjk.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for CJK writing system (specification). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afcover.h b/modules/freetype2/src/autofit/afcover.h
index 1c39a707e..6eeb8fc9f 100644
--- a/modules/freetype2/src/autofit/afcover.h
+++ b/modules/freetype2/src/autofit/afcover.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter coverages (specification only). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afdummy.c b/modules/freetype2/src/autofit/afdummy.c
index ff47dcb0c..f30c517cb 100644
--- a/modules/freetype2/src/autofit/afdummy.c
+++ b/modules/freetype2/src/autofit/afdummy.c
@@ -5,7 +5,7 @@
/* Auto-fitter dummy routines to be used if no hinting should be */
/* performed (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afdummy.h b/modules/freetype2/src/autofit/afdummy.h
index 7e58d1a9a..b382acd92 100644
--- a/modules/freetype2/src/autofit/afdummy.h
+++ b/modules/freetype2/src/autofit/afdummy.h
@@ -5,7 +5,7 @@
/* Auto-fitter dummy routines to be used if no hinting should be */
/* performed (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/aferrors.h b/modules/freetype2/src/autofit/aferrors.h
index 53c01f64d..e5de54360 100644
--- a/modules/freetype2/src/autofit/aferrors.h
+++ b/modules/freetype2/src/autofit/aferrors.h
@@ -4,7 +4,7 @@
/* */
/* Autofitter error codes (specification only). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afglobal.c b/modules/freetype2/src/autofit/afglobal.c
index 11ed0dff9..3d09c53e8 100644
--- a/modules/freetype2/src/autofit/afglobal.c
+++ b/modules/freetype2/src/autofit/afglobal.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter routines to compute global hinting values (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -411,10 +411,7 @@
#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
hb_font_destroy( globals->hb_font );
- globals->hb_font = NULL;
-
hb_buffer_destroy( globals->hb_buf );
- globals->hb_buf = NULL;
#endif
/* no need to free `globals->glyph_styles'; */
diff --git a/modules/freetype2/src/autofit/afglobal.h b/modules/freetype2/src/autofit/afglobal.h
index ce6b9e8f2..489ed46d9 100644
--- a/modules/freetype2/src/autofit/afglobal.h
+++ b/modules/freetype2/src/autofit/afglobal.h
@@ -5,7 +5,7 @@
/* Auto-fitter routines to compute global hinting values */
/* (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afhints.c b/modules/freetype2/src/autofit/afhints.c
index 8ad3e1c97..0666dbc8e 100644
--- a/modules/freetype2/src/autofit/afhints.c
+++ b/modules/freetype2/src/autofit/afhints.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -314,8 +314,12 @@
AF_DUMP(( "Table of points:\n" ));
if ( hints->num_points )
+ {
AF_DUMP(( " index hedge hseg vedge vseg flags "
+ /* " XXXXX XXXXX XXXXX XXXXX XXXXX XXXXXX" */
" xorg yorg xscale yscale xfit yfit" ));
+ /* " XXXXX XXXXX XXXX.XX XXXX.XX XXXX.XX XXXX.XX" */
+ }
else
AF_DUMP(( " (none)\n" ));
@@ -420,9 +424,14 @@
dimension == AF_DIMENSION_HORZ ? "vertical"
: "horizontal" ));
if ( axis->num_segments )
+ {
AF_DUMP(( " index pos delta dir from to "
+ /* " XXXXX XXXXX XXXXX XXXXX XXXX XXXX" */
" link serif edge"
+ /* " XXXX XXXXX XXXX" */
" height extra flags\n" ));
+ /* " XXXXXX XXXXX XXXXXXXXXXX" */
+ }
else
AF_DUMP(( " (none)\n" ));
@@ -507,15 +516,15 @@
return FT_THROW( Invalid_Argument );
seg = &axis->segments[idx];
- *offset = ( dim == AF_DIMENSION_HORZ ) ? seg->first->ox
- : seg->first->oy;
+ *offset = ( dim == AF_DIMENSION_HORZ ) ? seg->first->fx
+ : seg->first->fy;
if ( seg->edge )
*is_blue = (FT_Bool)( seg->edge->blue_edge != 0 );
else
*is_blue = FALSE;
if ( *is_blue )
- *blue_offset = seg->edge->blue_edge->cur;
+ *blue_offset = seg->edge->blue_edge->org;
else
*blue_offset = 0;
@@ -564,8 +573,12 @@
10.0 * hints->y_scale / 65536.0 / 64.0 ));
if ( axis->num_edges )
+ {
AF_DUMP(( " index pos dir link serif"
+ /* " XXXXX XXXX.XX XXXXX XXXX XXXXX" */
" blue opos pos flags\n" ));
+ /* " X XXXX.XX XXXX.XX XXXXXXXXXXX" */
+ }
else
AF_DUMP(( " (none)\n" ));
diff --git a/modules/freetype2/src/autofit/afhints.h b/modules/freetype2/src/autofit/afhints.h
index 4fdf732d4..3326ebc44 100644
--- a/modules/freetype2/src/autofit/afhints.h
+++ b/modules/freetype2/src/autofit/afhints.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -62,7 +62,7 @@ FT_BEGIN_HEADER
*
* by David Turner and Werner Lemberg
*
- * http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf
+ * https://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf
*
* with appropriate updates.
*
diff --git a/modules/freetype2/src/autofit/afindic.c b/modules/freetype2/src/autofit/afindic.c
index cfaf7196d..dfbea5f34 100644
--- a/modules/freetype2/src/autofit/afindic.c
+++ b/modules/freetype2/src/autofit/afindic.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for Indic writing system (body). */
/* */
-/* Copyright 2007-2016 by */
+/* Copyright 2007-2018 by */
/* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,13 +18,13 @@
#include "aftypes.h"
#include "aflatin.h"
+#include "afcjk.h"
#ifdef AF_CONFIG_OPTION_INDIC
#include "afindic.h"
#include "aferrors.h"
-#include "afcjk.h"
#ifdef AF_CONFIG_OPTION_USE_WARPER
diff --git a/modules/freetype2/src/autofit/afindic.h b/modules/freetype2/src/autofit/afindic.h
index 0772e07a2..5688738e6 100644
--- a/modules/freetype2/src/autofit/afindic.h
+++ b/modules/freetype2/src/autofit/afindic.h
@@ -5,7 +5,7 @@
/* Auto-fitter hinting routines for Indic writing system */
/* (specification). */
/* */
-/* Copyright 2007-2016 by */
+/* Copyright 2007-2018 by */
/* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/aflatin.c b/modules/freetype2/src/autofit/aflatin.c
index f4d29e7b8..9f1b54056 100644
--- a/modules/freetype2/src/autofit/aflatin.c
+++ b/modules/freetype2/src/autofit/aflatin.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for latin writing system (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -265,6 +265,45 @@
}
+ static void
+ af_latin_sort_blue( FT_UInt count,
+ AF_LatinBlue* table )
+ {
+ FT_UInt i, j;
+ AF_LatinBlue swap;
+
+
+ /* we sort from bottom to top */
+ for ( i = 1; i < count; i++ )
+ {
+ for ( j = i; j > 0; j-- )
+ {
+ FT_Pos a, b;
+
+
+ if ( table[j - 1]->flags & ( AF_LATIN_BLUE_TOP |
+ AF_LATIN_BLUE_SUB_TOP ) )
+ a = table[j - 1]->ref.org;
+ else
+ a = table[j - 1]->shoot.org;
+
+ if ( table[j]->flags & ( AF_LATIN_BLUE_TOP |
+ AF_LATIN_BLUE_SUB_TOP ) )
+ b = table[j]->ref.org;
+ else
+ b = table[j]->shoot.org;
+
+ if ( b >= a )
+ break;
+
+ swap = table[j];
+ table[j] = table[j - 1];
+ table[j - 1] = swap;
+ }
+ }
+ }
+
+
/* Find all blue zones. Flat segments give the reference points, */
/* round segments the overshoot positions. */
@@ -928,6 +967,60 @@
af_shaper_buf_destroy( face, shaper_buf );
+ /* we finally check whether blue zones are ordered; */
+ /* `ref' and `shoot' values of two blue zones must not overlap */
+ if ( axis->blue_count )
+ {
+ FT_UInt i;
+ AF_LatinBlue blue_sorted[AF_BLUE_STRINGSET_MAX_LEN + 2];
+
+
+ for ( i = 0; i < axis->blue_count; i++ )
+ blue_sorted[i] = &axis->blues[i];
+
+ /* sort bottoms of blue zones... */
+ af_latin_sort_blue( axis->blue_count, blue_sorted );
+
+ /* ...and adjust top values if necessary */
+ for ( i = 0; i < axis->blue_count - 1; i++ )
+ {
+ FT_Pos* a;
+ FT_Pos* b;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_Bool a_is_top = 0;
+#endif
+
+
+ if ( blue_sorted[i]->flags & ( AF_LATIN_BLUE_TOP |
+ AF_LATIN_BLUE_SUB_TOP ) )
+ {
+ a = &blue_sorted[i]->shoot.org;
+#ifdef FT_DEBUG_LEVEL_TRACE
+ a_is_top = 1;
+#endif
+ }
+ else
+ a = &blue_sorted[i]->ref.org;
+
+ if ( blue_sorted[i + 1]->flags & ( AF_LATIN_BLUE_TOP |
+ AF_LATIN_BLUE_SUB_TOP ) )
+ b = &blue_sorted[i + 1]->shoot.org;
+ else
+ b = &blue_sorted[i + 1]->ref.org;
+
+ if ( *a > *b )
+ {
+ *a = *b;
+ FT_TRACE5(( "blue zone overlap:"
+ " adjusting %s %d to %ld\n",
+ a_is_top ? "overshoot" : "reference",
+ blue_sorted[i] - axis->blues,
+ *a ));
+ }
+ }
+ }
+
FT_TRACE5(( "\n" ));
return;
@@ -941,7 +1034,7 @@
FT_Face face )
{
FT_Bool started = 0, same_width = 1;
- FT_Fixed advance, old_advance = 0;
+ FT_Fixed advance = 0, old_advance = 0;
void* shaper_buf;
@@ -1597,9 +1690,11 @@
if ( prev_max_on_coord > max_on_coord )
max_on_coord = prev_max_on_coord;
- prev_segment->last = point;
- prev_segment->pos = (FT_Short)( ( min_pos +
- max_pos ) >> 1 );
+ prev_segment->last = point;
+ prev_segment->pos = (FT_Short)( ( min_pos +
+ max_pos ) >> 1 );
+ prev_segment->delta = (FT_Short)( ( max_pos -
+ min_pos ) >> 1 );
if ( ( min_flags | max_flags ) & AF_FLAG_CONTROL &&
( max_on_coord - min_on_coord ) < flat_threshold )
@@ -1627,9 +1722,11 @@
if ( max_pos > prev_max_pos )
prev_max_pos = max_pos;
- prev_segment->last = point;
- prev_segment->pos = (FT_Short)( ( prev_min_pos +
- prev_max_pos ) >> 1 );
+ prev_segment->last = point;
+ prev_segment->pos = (FT_Short)( ( prev_min_pos +
+ prev_max_pos ) >> 1 );
+ prev_segment->delta = (FT_Short)( ( prev_max_pos -
+ prev_min_pos ) >> 1 );
}
else
{
@@ -1640,8 +1737,9 @@
if ( prev_max_pos > max_pos )
max_pos = prev_max_pos;
- segment->last = point;
- segment->pos = (FT_Short)( ( min_pos + max_pos ) >> 1 );
+ segment->last = point;
+ segment->pos = (FT_Short)( ( min_pos + max_pos ) >> 1 );
+ segment->delta = (FT_Short)( ( max_pos - min_pos ) >> 1 );
if ( ( min_flags | max_flags ) & AF_FLAG_CONTROL &&
( max_on_coord - min_on_coord ) < flat_threshold )
@@ -1951,6 +2049,10 @@
FT_Memory memory = hints->memory;
AF_LatinAxis laxis = &((AF_LatinMetrics)hints->metrics)->axis[dim];
+#ifdef FT_CONFIG_OPTION_PIC
+ AF_FaceGlobals globals = hints->metrics->globals;
+#endif
+
AF_StyleClass style_class = hints->metrics->style_class;
AF_ScriptClass script_class = AF_SCRIPT_CLASSES_GET
[style_class->script];
@@ -2478,23 +2580,23 @@
other_flags |= AF_LATIN_HINTS_VERT_SNAP;
/*
- * We adjust stems to full pixels only if we don't use the `light' mode.
+ * We adjust stems to full pixels unless in `light' or `lcd' mode.
*/
- if ( mode != FT_RENDER_MODE_LIGHT )
+ if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
if ( mode == FT_RENDER_MODE_MONO )
other_flags |= AF_LATIN_HINTS_MONO;
/*
- * In `light' hinting mode we disable horizontal hinting completely.
+ * In `light' or `lcd' mode we disable horizontal hinting completely.
* We also do it if the face is italic.
*
* However, if warping is enabled (which only works in `light' hinting
* mode), advance widths get adjusted, too.
*/
- if ( mode == FT_RENDER_MODE_LIGHT ||
- ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )
+ if ( mode == FT_RENDER_MODE_LIGHT || mode == FT_RENDER_MODE_LCD ||
+ ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )
scaler_flags |= AF_SCALER_FLAG_NO_HORIZONTAL;
#ifdef AF_CONFIG_OPTION_USE_WARPER
@@ -2834,6 +2936,10 @@
AF_Edge anchor = NULL;
FT_Int has_serifs = 0;
+#ifdef FT_CONFIG_OPTION_PIC
+ AF_FaceGlobals globals = hints->metrics->globals;
+#endif
+
AF_StyleClass style_class = hints->metrics->style_class;
AF_ScriptClass script_class = AF_SCRIPT_CLASSES_GET
[style_class->script];
@@ -3391,13 +3497,7 @@
goto Exit;
/* analyze glyph outline */
-#ifdef AF_CONFIG_OPTION_USE_WARPER
- if ( ( metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT &&
- AF_HINTS_DO_WARP( hints ) ) ||
- AF_HINTS_DO_HORIZONTAL( hints ) )
-#else
if ( AF_HINTS_DO_HORIZONTAL( hints ) )
-#endif
{
axis = &metrics->axis[AF_DIMENSION_HORZ];
error = af_latin_hints_detect_features( hints,
@@ -3427,9 +3527,9 @@
for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
{
#ifdef AF_CONFIG_OPTION_USE_WARPER
- if ( dim == AF_DIMENSION_HORZ &&
- metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT &&
- AF_HINTS_DO_WARP( hints ) )
+ if ( dim == AF_DIMENSION_HORZ &&
+ metrics->root.scaler.render_mode == FT_RENDER_MODE_NORMAL &&
+ AF_HINTS_DO_WARP( hints ) )
{
AF_WarperRec warper;
FT_Fixed scale;
diff --git a/modules/freetype2/src/autofit/aflatin.h b/modules/freetype2/src/autofit/aflatin.h
index fe6bbd801..432cccce4 100644
--- a/modules/freetype2/src/autofit/aflatin.h
+++ b/modules/freetype2/src/autofit/aflatin.h
@@ -5,7 +5,7 @@
/* Auto-fitter hinting routines for latin writing system */
/* (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/aflatin2.c b/modules/freetype2/src/autofit/aflatin2.c
index e1cc1f56d..5c7137811 100644
--- a/modules/freetype2/src/autofit/aflatin2.c
+++ b/modules/freetype2/src/autofit/aflatin2.c
@@ -9,7 +9,7 @@
/* */
/* Auto-fitter hinting routines for latin writing system (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,6 +23,9 @@
#include FT_ADVANCES_H
+
+#ifdef FT_OPTION_AUTOFIT2
+
#include "afglobal.h"
#include "aflatin.h"
#include "aflatin2.h"
@@ -1555,20 +1558,20 @@
other_flags |= AF_LATIN_HINTS_VERT_SNAP;
/*
- * We adjust stems to full pixels only if we don't use the `light' mode.
+ * We adjust stems to full pixels unless in `light' or `lcd' mode.
*/
- if ( mode != FT_RENDER_MODE_LIGHT )
+ if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
if ( mode == FT_RENDER_MODE_MONO )
other_flags |= AF_LATIN_HINTS_MONO;
/*
- * In `light' hinting mode we disable horizontal hinting completely.
+ * In `light' or `lcd' mode we disable horizontal hinting completely.
* We also do it if the face is italic.
*/
- if ( mode == FT_RENDER_MODE_LIGHT ||
- ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )
+ if ( mode == FT_RENDER_MODE_LIGHT || mode == FT_RENDER_MODE_LCD ||
+ ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )
scaler_flags |= AF_SCALER_FLAG_NO_HORIZONTAL;
#ifdef AF_CONFIG_OPTION_USE_WARPER
@@ -2337,13 +2340,7 @@
goto Exit;
/* analyze glyph outline */
-#ifdef AF_CONFIG_OPTION_USE_WARPER
- if ( ( metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT &&
- AF_HINTS_DO_WARP( hints ) ) ||
- AF_HINTS_DO_HORIZONTAL( hints ) )
-#else
if ( AF_HINTS_DO_HORIZONTAL( hints ) )
-#endif
{
error = af_latin2_hints_detect_features( hints, AF_DIMENSION_HORZ );
if ( error )
@@ -2363,9 +2360,9 @@
for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
{
#ifdef AF_CONFIG_OPTION_USE_WARPER
- if ( dim == AF_DIMENSION_HORZ &&
- metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT &&
- AF_HINTS_DO_WARP( hints ) )
+ if ( dim == AF_DIMENSION_HORZ &&
+ metrics->root.scaler.render_mode == FT_RENDER_MODE_NORMAL &&
+ AF_HINTS_DO_WARP( hints ) )
{
AF_WarperRec warper;
FT_Fixed scale;
@@ -2419,5 +2416,12 @@
(AF_WritingSystem_ApplyHintsFunc) af_latin2_hints_apply /* style_hints_apply */
)
+#else /* !FT_OPTION_AUTOFIT2 */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _af_latin2_dummy;
+
+#endif /* !FT_OPTION_AUTOFIT2 */
+
/* END */
diff --git a/modules/freetype2/src/autofit/aflatin2.h b/modules/freetype2/src/autofit/aflatin2.h
index f83f70428..0129dc707 100644
--- a/modules/freetype2/src/autofit/aflatin2.h
+++ b/modules/freetype2/src/autofit/aflatin2.h
@@ -10,7 +10,7 @@
/* Auto-fitter hinting routines for latin writing system */
/* (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afloader.c b/modules/freetype2/src/autofit/afloader.c
index 7f75fc349..a55550b33 100644
--- a/modules/freetype2/src/autofit/afloader.c
+++ b/modules/freetype2/src/autofit/afloader.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter glyph loading routines (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -97,11 +97,13 @@
AF_FaceGlobals globals = loader->globals;
AF_WritingSystemClass writing_system_class;
+ FT_Size_Metrics* size_metrics = &face->size->internal->autohint_metrics;
+
FT_Pos stdVW = 0;
FT_Pos stdHW = 0;
- FT_Bool size_changed = face->size->metrics.x_ppem
- != globals->stem_darkening_for_ppem;
+ FT_Bool size_changed = size_metrics->x_ppem !=
+ globals->stem_darkening_for_ppem;
FT_Fixed em_size = af_intToFixed( face->units_per_EM );
FT_Fixed em_ratio = FT_DivFix( af_intToFixed( 1000 ), em_size );
@@ -112,7 +114,7 @@
/* Skip stem darkening for broken fonts. */
if ( !face->units_per_EM )
{
- error = FT_Err_Corrupted_Font_Header;
+ error = FT_ERR( Corrupted_Font_Header );
goto Exit;
}
@@ -130,7 +132,7 @@
&stdVW );
else
{
- error = FT_Err_Unimplemented_Feature;
+ error = FT_ERR( Unimplemented_Feature );
goto Exit;
}
@@ -145,11 +147,11 @@
face,
stdVW ) );
darken_x = FT_DivFix( FT_MulFix( darken_by_font_units_x,
- face->size->metrics.x_scale ),
+ size_metrics->x_scale ),
em_ratio );
globals->standard_vertical_width = stdVW;
- globals->stem_darkening_for_ppem = face->size->metrics.x_ppem;
+ globals->stem_darkening_for_ppem = size_metrics->x_ppem;
globals->darken_x = af_fixedToInt( darken_x );
}
@@ -164,11 +166,11 @@
face,
stdHW ) );
darken_y = FT_DivFix( FT_MulFix( darken_by_font_units_y,
- face->size->metrics.y_scale ),
+ size_metrics->y_scale ),
em_ratio );
globals->standard_horizontal_width = stdHW;
- globals->stem_darkening_for_ppem = face->size->metrics.x_ppem;
+ globals->stem_darkening_for_ppem = size_metrics->x_ppem;
globals->darken_y = af_fixedToInt( darken_y );
/*
@@ -217,15 +219,16 @@
{
FT_Error error;
- FT_Size size = face->size;
- FT_GlyphSlot slot = face->glyph;
- FT_Slot_Internal internal = slot->internal;
- FT_GlyphLoader gloader = internal->loader;
+ FT_Size size = face->size;
+ FT_Size_Internal size_internal = size->internal;
+ FT_GlyphSlot slot = face->glyph;
+ FT_Slot_Internal slot_internal = slot->internal;
+ FT_GlyphLoader gloader = slot_internal->loader;
- AF_GlyphHints hints = loader->hints;
+ AF_GlyphHints hints = loader->hints;
AF_ScalerRec scaler;
AF_StyleMetrics style_metrics;
- FT_UInt style_options = AF_STYLE_NONE_DFLT;
+ FT_UInt style_options = AF_STYLE_NONE_DFLT;
AF_StyleClass style_class;
AF_WritingSystemClass writing_system_class;
@@ -239,24 +242,65 @@
FT_ZERO( &scaler );
+ if ( !size_internal->autohint_metrics.x_scale ||
+ size_internal->autohint_mode != FT_LOAD_TARGET_MODE( load_flags ) )
+ {
+ /* switching between hinting modes usually means different scaling */
+ /* values; this later on enforces recomputation of everything */
+ /* related to the current size */
+
+ size_internal->autohint_mode = FT_LOAD_TARGET_MODE( load_flags );
+ size_internal->autohint_metrics = size->metrics;
+
+#ifdef AF_CONFIG_OPTION_TT_SIZE_METRICS
+ {
+ FT_Size_Metrics* size_metrics = &size_internal->autohint_metrics;
+
+
+ /* set metrics to integer values and adjust scaling accordingly; */
+ /* this is the same setup as with TrueType fonts, cf. function */
+ /* `tt_size_reset' in file `ttobjs.c' */
+ size_metrics->ascender = FT_PIX_ROUND(
+ FT_MulFix( face->ascender,
+ size_metrics->y_scale ) );
+ size_metrics->descender = FT_PIX_ROUND(
+ FT_MulFix( face->descender,
+ size_metrics->y_scale ) );
+ size_metrics->height = FT_PIX_ROUND(
+ FT_MulFix( face->height,
+ size_metrics->y_scale ) );
+
+ size_metrics->x_scale = FT_DivFix( size_metrics->x_ppem << 6,
+ face->units_per_EM );
+ size_metrics->y_scale = FT_DivFix( size_metrics->y_ppem << 6,
+ face->units_per_EM );
+ size_metrics->max_advance = FT_PIX_ROUND(
+ FT_MulFix( face->max_advance_width,
+ size_metrics->x_scale ) );
+ }
+#endif /* AF_CONFIG_OPTION_TT_SIZE_METRICS */
+ }
+
/*
* TODO: This code currently doesn't support fractional advance widths,
- * i.e. placing hinted glyphs at anything other than integer
+ * i.e., placing hinted glyphs at anything other than integer
* x-positions. This is only relevant for the warper code, which
* scales and shifts glyphs to optimize blackness of stems (hinting on
* the x-axis by nature places things on pixel integers, hinting on the
- * y-axis only, i.e. LIGHT mode, doesn't touch the x-axis). The delta
+ * y-axis only, i.e., LIGHT mode, doesn't touch the x-axis). The delta
* values of the scaler would need to be adjusted.
*/
scaler.face = face;
- scaler.x_scale = size->metrics.x_scale;
+ scaler.x_scale = size_internal->autohint_metrics.x_scale;
scaler.x_delta = 0;
- scaler.y_scale = size->metrics.y_scale;
+ scaler.y_scale = size_internal->autohint_metrics.y_scale;
scaler.y_delta = 0;
scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags );
scaler.flags = 0;
+ /* note that the fallback style can't be changed anymore */
+ /* after the first call of `af_loader_load_glyph' */
error = af_loader_reset( loader, module, face );
if ( error )
goto Exit;
@@ -334,18 +378,24 @@
* `standard_{vertical,horizontal}_width' change.
*
* Ignore errors and carry on without emboldening.
+ *
*/
- if ( !module->no_stem_darkening )
+
+ /* stem darkening only works well in `light' mode */
+ if ( scaler.render_mode == FT_RENDER_MODE_LIGHT &&
+ ( !face->internal->no_stem_darkening ||
+ ( face->internal->no_stem_darkening < 0 &&
+ !module->no_stem_darkening ) ) )
af_loader_embolden_glyph_in_slot( loader, face, style_metrics );
- loader->transformed = internal->glyph_transformed;
+ loader->transformed = slot_internal->glyph_transformed;
if ( loader->transformed )
{
FT_Matrix inverse;
- loader->trans_matrix = internal->glyph_matrix;
- loader->trans_delta = internal->glyph_delta;
+ loader->trans_matrix = slot_internal->glyph_matrix;
+ loader->trans_delta = slot_internal->glyph_delta;
inverse = loader->trans_matrix;
if ( !FT_Matrix_Invert( &inverse ) )
@@ -375,18 +425,11 @@
/* now load the slot image into the auto-outline */
/* and run the automatic hinting process */
- {
-#ifdef FT_CONFIG_OPTION_PIC
- AF_FaceGlobals globals = loader->globals;
-#endif
-
-
- if ( writing_system_class->style_hints_apply )
- writing_system_class->style_hints_apply( glyph_index,
- hints,
- &gloader->base.outline,
- style_metrics );
- }
+ if ( writing_system_class->style_hints_apply )
+ writing_system_class->style_hints_apply( glyph_index,
+ hints,
+ &gloader->base.outline,
+ style_metrics );
/* we now need to adjust the metrics according to the change in */
/* width/positioning that occurred during the hinting process */
@@ -408,6 +451,8 @@
old_lsb = edge1->opos /* - loader->pp1.x */;
new_lsb = edge1->pos;
+ /* remember unhinted values to later account */
+ /* for rounding errors */
pp1x_uh = new_lsb - old_lsb;
pp2x_uh = edge2->pos + old_rsb;
@@ -438,21 +483,23 @@
FT_Pos pp2x = loader->pp2.x;
- loader->pp1.x = FT_PIX_ROUND( pp1x );
- loader->pp2.x = FT_PIX_ROUND( pp2x );
+ loader->pp1.x = FT_PIX_ROUND( pp1x + hints->xmin_delta );
+ loader->pp2.x = FT_PIX_ROUND( pp2x + hints->xmax_delta );
slot->lsb_delta = loader->pp1.x - pp1x;
slot->rsb_delta = loader->pp2.x - pp2x;
}
}
+ /* `light' mode uses integer advance widths */
+ /* but sets `lsb_delta' and `rsb_delta' */
else
{
FT_Pos pp1x = loader->pp1.x;
FT_Pos pp2x = loader->pp2.x;
- loader->pp1.x = FT_PIX_ROUND( pp1x + hints->xmin_delta );
- loader->pp2.x = FT_PIX_ROUND( pp2x + hints->xmax_delta );
+ loader->pp1.x = FT_PIX_ROUND( pp1x );
+ loader->pp2.x = FT_PIX_ROUND( pp2x );
slot->lsb_delta = loader->pp1.x - pp1x;
slot->rsb_delta = loader->pp2.x - pp2x;
diff --git a/modules/freetype2/src/autofit/afloader.h b/modules/freetype2/src/autofit/afloader.h
index 0062eb9b0..d4d72d158 100644
--- a/modules/freetype2/src/autofit/afloader.h
+++ b/modules/freetype2/src/autofit/afloader.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter glyph loading routines (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afmodule.c b/modules/freetype2/src/autofit/afmodule.c
index f325ebf45..dcaa17a27 100644
--- a/modules/freetype2/src/autofit/afmodule.c
+++ b/modules/freetype2/src/autofit/afmodule.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter module implementation (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -56,7 +56,7 @@
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
-#include FT_AUTOHINTER_H
+#include FT_DRIVER_H
#include FT_SERVICE_PROPERTIES_H
@@ -104,6 +104,19 @@
}
+#ifdef FT_CONFIG_OPTION_PIC
+
+#undef AF_SCRIPT_CLASSES_GET
+#define AF_SCRIPT_CLASSES_GET \
+ ( GET_PIC( ft_module->library )->af_script_classes )
+
+#undef AF_STYLE_CLASSES_GET
+#define AF_STYLE_CLASSES_GET \
+ ( GET_PIC( ft_module->library )->af_style_classes )
+
+#endif
+
+
static FT_Error
af_property_set( FT_Module ft_module,
const char* property_name,
@@ -291,12 +304,10 @@
long nsd = ft_strtol( s, NULL, 10 );
- if ( nsd == 0 )
- module->no_stem_darkening = 0;
- else if ( nsd == 1 )
- module->no_stem_darkening = 1;
+ if ( !nsd )
+ module->no_stem_darkening = FALSE;
else
- return FT_THROW( Invalid_Argument );
+ module->no_stem_darkening = TRUE;
}
else
#endif
diff --git a/modules/freetype2/src/autofit/afmodule.h b/modules/freetype2/src/autofit/afmodule.h
index e65db5f5c..56f64eaf2 100644
--- a/modules/freetype2/src/autofit/afmodule.h
+++ b/modules/freetype2/src/autofit/afmodule.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter module implementation (specification). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afpic.c b/modules/freetype2/src/autofit/afpic.c
index 3cbd9168e..d48d016a0 100644
--- a/modules/freetype2/src/autofit/afpic.c
+++ b/modules/freetype2/src/autofit/afpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for autofit module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afpic.h b/modules/freetype2/src/autofit/afpic.h
index 98a45a26b..0c7345678 100644
--- a/modules/freetype2/src/autofit/afpic.h
+++ b/modules/freetype2/src/autofit/afpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for autofit module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -69,7 +69,7 @@ FT_BEGIN_HEADER
#define GET_PIC( lib ) \
- ( (AFModulePIC*)((lib)->pic_container.autofit) )
+ ( (AFModulePIC*)( (lib)->pic_container.autofit ) )
#define AF_SERVICES_GET \
( GET_PIC( library )->af_services )
diff --git a/modules/freetype2/src/autofit/afranges.c b/modules/freetype2/src/autofit/afranges.c
index 732f3d162..cf67fafb1 100644
--- a/modules/freetype2/src/autofit/afranges.c
+++ b/modules/freetype2/src/autofit/afranges.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter Unicode script ranges (body). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -52,8 +52,21 @@
/* not be affected by blue zones, regardless of whether this is a */
/* spacing or no-spacing glyph */
- /* the `ta_xxxx_nonbase_uniranges' ranges must be strict subsets */
- /* of the corresponding `ta_xxxx_uniranges' ranges */
+ /* the `af_xxxx_nonbase_uniranges' ranges must be strict subsets */
+ /* of the corresponding `af_xxxx_uniranges' ranges */
+
+
+ const AF_Script_UniRangeRec af_adlm_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1E900, 0x1E95F ), /* Adlam */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_adlm_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1D944, 0x1E94A ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
const AF_Script_UniRangeRec af_arab_uniranges[] =
@@ -78,7 +91,7 @@
AF_UNIRANGE_REC( 0x06E7, 0x06E8 ),
AF_UNIRANGE_REC( 0x06EA, 0x06ED ),
AF_UNIRANGE_REC( 0x08D4, 0x08E1 ),
- AF_UNIRANGE_REC( 0x08E3, 0x08FF ),
+ AF_UNIRANGE_REC( 0x08D3, 0x08FF ),
AF_UNIRANGE_REC( 0xFBB2, 0xFBC1 ),
AF_UNIRANGE_REC( 0xFE70, 0xFE70 ),
AF_UNIRANGE_REC( 0xFE72, 0xFE72 ),
@@ -106,6 +119,37 @@
};
+ const AF_Script_UniRangeRec af_avst_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x10B00, 0x10B3F ), /* Avestan */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_avst_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x10B39, 0x10B3F ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_bamu_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0xA6A0, 0xA6FF ), /* Bamum */
+#if 0
+ /* The characters in the Bamum supplement are pictograms, */
+ /* not (directly) related to the syllabic Bamum script */
+ AF_UNIRANGE_REC( 0x16800, 0x16A3F ), /* Bamum Supplement */
+#endif
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_bamu_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0xA6F0, 0xA6F1 ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
const AF_Script_UniRangeRec af_beng_uniranges[] =
{
AF_UNIRANGE_REC( 0x0980, 0x09FF ), /* Bengali */
@@ -119,10 +163,64 @@
AF_UNIRANGE_REC( 0x09C1, 0x09C4 ),
AF_UNIRANGE_REC( 0x09CD, 0x09CD ),
AF_UNIRANGE_REC( 0x09E2, 0x09E3 ),
+ AF_UNIRANGE_REC( 0x09FE, 0x09FE ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_buhd_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1740, 0x175F ), /* Buhid */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_buhd_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1752, 0x1753 ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_cakm_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x11100, 0x1114F ), /* Chakma */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_cakm_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x11100, 0x11102 ),
+ AF_UNIRANGE_REC( 0x11127, 0x11134 ),
+ AF_UNIRANGE_REC( 0x11146, 0x11146 ),
AF_UNIRANGE_REC( 0, 0 )
};
+ const AF_Script_UniRangeRec af_cans_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1400, 0x167F ), /* Unified Canadian Aboriginal Syllabics */
+ AF_UNIRANGE_REC( 0x18B0, 0x18FF ), /* Unified Canadian Aboriginal Syllabics Extended */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_cans_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_cari_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x102A0, 0x102DF ), /* Carian */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_cari_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
const AF_Script_UniRangeRec af_cher_uniranges[] =
{
AF_UNIRANGE_REC( 0x13A0, 0x13FF ), /* Cherokee */
@@ -136,6 +234,31 @@
};
+ const AF_Script_UniRangeRec af_copt_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x2C80, 0x2CFF ), /* Coptic */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_copt_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x2CEF, 0x2CF1 ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_cprt_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x10800, 0x1083F ), /* Cypriot */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_cprt_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
const AF_Script_UniRangeRec af_cyrl_uniranges[] =
{
AF_UNIRANGE_REC( 0x0400, 0x04FF ), /* Cyrillic */
@@ -183,10 +306,23 @@
AF_UNIRANGE_REC( 0x0953, 0x0957 ),
AF_UNIRANGE_REC( 0x0962, 0x0963 ),
AF_UNIRANGE_REC( 0xA8E0, 0xA8F1 ),
+ AF_UNIRANGE_REC( 0xA8FF, 0xA8FF ),
AF_UNIRANGE_REC( 0, 0 )
};
+ const AF_Script_UniRangeRec af_dsrt_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x10400, 0x1044F ), /* Deseret */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_dsrt_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
const AF_Script_UniRangeRec af_ethi_uniranges[] =
{
AF_UNIRANGE_REC( 0x1200, 0x137F ), /* Ethiopic */
@@ -205,11 +341,8 @@
const AF_Script_UniRangeRec af_geor_uniranges[] =
{
- AF_UNIRANGE_REC( 0x10D0, 0x10FF ), /* Georgian (Mkhedruli) */
-#if 0
- /* the following range is proposed for inclusion in Unicode */
- AF_UNIRANGE_REC( 0x1C90, 0x1CBF ), /* Georgian (Mtavruli) */
-#endif
+ AF_UNIRANGE_REC( 0x10D0, 0x10FF ), /* Georgian (Mkhedruli) */
+ AF_UNIRANGE_REC( 0x1C90, 0x1CBF ), /* Georgian Extended (Mtavruli) */
AF_UNIRANGE_REC( 0, 0 )
};
@@ -222,8 +355,8 @@
const AF_Script_UniRangeRec af_geok_uniranges[] =
{
/* Khutsuri */
- AF_UNIRANGE_REC( 0x10A0, 0x10CD ), /* Georgian (Asomtavruli) */
- AF_UNIRANGE_REC( 0x2D00, 0x2D2D ), /* Georgian (Nuskhuri) */
+ AF_UNIRANGE_REC( 0x10A0, 0x10CD ), /* Georgian (Asomtavruli) */
+ AF_UNIRANGE_REC( 0x2D00, 0x2D2D ), /* Georgian Supplement (Nuskhuri) */
AF_UNIRANGE_REC( 0, 0 )
};
@@ -233,6 +366,32 @@
};
+ const AF_Script_UniRangeRec af_glag_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x2C00, 0x2C5F ), /* Glagolitic */
+ AF_UNIRANGE_REC( 0x1E000, 0x1E02F ), /* Glagolitic Supplement */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_glag_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1E000, 0x1E02F ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_goth_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x10330, 0x1034F ), /* Gothic */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_goth_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
const AF_Script_UniRangeRec af_grek_uniranges[] =
{
AF_UNIRANGE_REC( 0x0370, 0x03FF ), /* Greek and Coptic */
@@ -266,6 +425,7 @@
AF_UNIRANGE_REC( 0x0AC1, 0x0AC8 ),
AF_UNIRANGE_REC( 0x0ACD, 0x0ACD ),
AF_UNIRANGE_REC( 0x0AE2, 0x0AE3 ),
+ AF_UNIRANGE_REC( 0x0AFA, 0x0AFF ),
AF_UNIRANGE_REC( 0, 0 )
};
@@ -305,6 +465,19 @@
};
+ const AF_Script_UniRangeRec af_kali_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0xA900, 0xA92F ), /* Kayah Li */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_kali_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0xA926, 0xA92D ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
const AF_Script_UniRangeRec af_knda_uniranges[] =
{
AF_UNIRANGE_REC( 0x0C80, 0x0CFF ), /* Kannada */
@@ -463,6 +636,18 @@
};
+ const AF_Script_UniRangeRec af_lisu_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0xA4D0, 0xA4FF ), /* Lisu */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_lisu_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
const AF_Script_UniRangeRec af_mlym_uniranges[] =
{
AF_UNIRANGE_REC( 0x0D00, 0x0D7F ), /* Malayalam */
@@ -471,7 +656,8 @@
const AF_Script_UniRangeRec af_mlym_nonbase_uniranges[] =
{
- AF_UNIRANGE_REC( 0x0D01, 0x0D01 ),
+ AF_UNIRANGE_REC( 0x0D00, 0x0D01 ),
+ AF_UNIRANGE_REC( 0x0D3B, 0x0D3C ),
AF_UNIRANGE_REC( 0x0D4D, 0x0D4E ),
AF_UNIRANGE_REC( 0x0D62, 0x0D63 ),
AF_UNIRANGE_REC( 0, 0 )
@@ -480,27 +666,41 @@
const AF_Script_UniRangeRec af_mymr_uniranges[] =
{
- AF_UNIRANGE_REC( 0x1000, 0x109F ), /* Myanmar */
- AF_UNIRANGE_REC( 0xA9E0, 0xA9FF ), /* Myanmar Extended-B */
- AF_UNIRANGE_REC( 0xAA60, 0xAA7F ), /* Myanmar Extended-A */
- AF_UNIRANGE_REC( 0, 0 )
+ AF_UNIRANGE_REC( 0x1000, 0x109F ), /* Myanmar */
+ AF_UNIRANGE_REC( 0xA9E0, 0xA9FF ), /* Myanmar Extended-B */
+ AF_UNIRANGE_REC( 0xAA60, 0xAA7F ), /* Myanmar Extended-A */
+ AF_UNIRANGE_REC( 0, 0 )
};
const AF_Script_UniRangeRec af_mymr_nonbase_uniranges[] =
{
- AF_UNIRANGE_REC( 0x102D, 0x1030 ),
- AF_UNIRANGE_REC( 0x1032, 0x1037 ),
- AF_UNIRANGE_REC( 0x103A, 0x103A ),
- AF_UNIRANGE_REC( 0x103D, 0x103E ),
- AF_UNIRANGE_REC( 0x1058, 0x1059 ),
- AF_UNIRANGE_REC( 0x105E, 0x1060 ),
- AF_UNIRANGE_REC( 0x1071, 0x1074 ),
- AF_UNIRANGE_REC( 0x1082, 0x1082 ),
- AF_UNIRANGE_REC( 0x1085, 0x1086 ),
- AF_UNIRANGE_REC( 0x108D, 0x108D ),
- AF_UNIRANGE_REC( 0xA9E5, 0xA9E5 ),
- AF_UNIRANGE_REC( 0xAA7C, 0xAA7C ),
- AF_UNIRANGE_REC( 0, 0 )
+ AF_UNIRANGE_REC( 0x102D, 0x1030 ),
+ AF_UNIRANGE_REC( 0x1032, 0x1037 ),
+ AF_UNIRANGE_REC( 0x103A, 0x103A ),
+ AF_UNIRANGE_REC( 0x103D, 0x103E ),
+ AF_UNIRANGE_REC( 0x1058, 0x1059 ),
+ AF_UNIRANGE_REC( 0x105E, 0x1060 ),
+ AF_UNIRANGE_REC( 0x1071, 0x1074 ),
+ AF_UNIRANGE_REC( 0x1082, 0x1082 ),
+ AF_UNIRANGE_REC( 0x1085, 0x1086 ),
+ AF_UNIRANGE_REC( 0x108D, 0x108D ),
+ AF_UNIRANGE_REC( 0xA9E5, 0xA9E5 ),
+ AF_UNIRANGE_REC( 0xAA7C, 0xAA7C ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_nkoo_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x07C0, 0x07FF ), /* N'Ko */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_nkoo_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x07EB, 0x07F5 ),
+ AF_UNIRANGE_REC( 0x07FD, 0x07FD ),
+ AF_UNIRANGE_REC( 0, 0 )
};
@@ -515,6 +715,80 @@
};
+ const AF_Script_UniRangeRec af_olck_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1C50, 0x1C7F ), /* Ol Chiki */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_olck_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_orkh_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x10C00, 0x10C4F ), /* Old Turkic */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_orkh_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_osge_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x104B0, 0x104FF ), /* Osage */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_osge_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_osma_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x10480, 0x104AF ), /* Osmanya */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_osma_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_saur_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0xA880, 0xA8DF ), /* Saurashtra */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_saur_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0xA880, 0xA881 ),
+ AF_UNIRANGE_REC( 0xA8B4, 0xA8C5 ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_shaw_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x10450, 0x1047F ), /* Shavian */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_shaw_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
const AF_Script_UniRangeRec af_sinh_uniranges[] =
{
AF_UNIRANGE_REC( 0x0D80, 0x0DFF ), /* Sinhala */
@@ -529,6 +803,21 @@
};
+ const AF_Script_UniRangeRec af_sund_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1B80, 0x1BBF ), /* Sundanese */
+ AF_UNIRANGE_REC( 0x1CC0, 0x1CCF ), /* Sundanese Supplement */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_sund_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1B80, 0x1B82 ),
+ AF_UNIRANGE_REC( 0x1BA1, 0x1BAD ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
const AF_Script_UniRangeRec af_taml_uniranges[] =
{
AF_UNIRANGE_REC( 0x0B80, 0x0BFF ), /* Tamil */
@@ -544,6 +833,23 @@
};
+ const AF_Script_UniRangeRec af_tavt_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0xAA80, 0xAADF ), /* Tai Viet */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_tavt_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0xAAB0, 0xAAB0 ),
+ AF_UNIRANGE_REC( 0xAAB2, 0xAAB4 ),
+ AF_UNIRANGE_REC( 0xAAB7, 0xAAB8 ),
+ AF_UNIRANGE_REC( 0xAABE, 0xAABF ),
+ AF_UNIRANGE_REC( 0xAAC1, 0xAAC1 ),
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
const AF_Script_UniRangeRec af_telu_uniranges[] =
{
AF_UNIRANGE_REC( 0x0C00, 0x0C7F ), /* Telugu */
@@ -553,6 +859,7 @@
const AF_Script_UniRangeRec af_telu_nonbase_uniranges[] =
{
AF_UNIRANGE_REC( 0x0C00, 0x0C00 ),
+ AF_UNIRANGE_REC( 0x0C04, 0x0C04 ),
AF_UNIRANGE_REC( 0x0C3E, 0x0C40 ),
AF_UNIRANGE_REC( 0x0C46, 0x0C56 ),
AF_UNIRANGE_REC( 0x0C62, 0x0C63 ),
@@ -575,6 +882,30 @@
};
+ const AF_Script_UniRangeRec af_tfng_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x2D30, 0x2D7F ), /* Tifinagh */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_tfng_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
+ const AF_Script_UniRangeRec af_vaii_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0xA500, 0xA63F ), /* Vai */
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+ const AF_Script_UniRangeRec af_vaii_nonbase_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0, 0 )
+ };
+
+
#ifdef AF_CONFIG_OPTION_INDIC
const AF_Script_UniRangeRec af_limb_uniranges[] =
@@ -610,21 +941,6 @@
};
- const AF_Script_UniRangeRec af_sund_uniranges[] =
- {
- AF_UNIRANGE_REC( 0x1B80, 0x1BBF ), /* Sundanese */
- AF_UNIRANGE_REC( 0x1CC0, 0x1CCF ), /* Sundanese Supplement */
- AF_UNIRANGE_REC( 0, 0 )
- };
-
- const AF_Script_UniRangeRec af_sund_nonbase_uniranges[] =
- {
- AF_UNIRANGE_REC( 0x1B80, 0x1B82 ),
- AF_UNIRANGE_REC( 0x1BA1, 0x1BAD ),
- AF_UNIRANGE_REC( 0, 0 )
- };
-
-
const AF_Script_UniRangeRec af_sylo_uniranges[] =
{
AF_UNIRANGE_REC( 0xA800, 0xA82F ), /* Syloti Nagri */
@@ -694,10 +1010,13 @@
AF_UNIRANGE_REC( 0xFE30, 0xFE4F ), /* CJK Compatibility Forms */
AF_UNIRANGE_REC( 0xFF00, 0xFFEF ), /* Halfwidth and Fullwidth Forms */
AF_UNIRANGE_REC( 0x1B000, 0x1B0FF ), /* Kana Supplement */
+ AF_UNIRANGE_REC( 0x1B100, 0x1B12F ), /* Kana Extended-A */
AF_UNIRANGE_REC( 0x1D300, 0x1D35F ), /* Tai Xuan Hing Symbols */
AF_UNIRANGE_REC( 0x20000, 0x2A6DF ), /* CJK Unified Ideographs Extension B */
AF_UNIRANGE_REC( 0x2A700, 0x2B73F ), /* CJK Unified Ideographs Extension C */
AF_UNIRANGE_REC( 0x2B740, 0x2B81F ), /* CJK Unified Ideographs Extension D */
+ AF_UNIRANGE_REC( 0x2B820, 0x2CEAF ), /* CJK Unified Ideographs Extension E */
+ AF_UNIRANGE_REC( 0x2CEB0, 0x2EBEF ), /* CJK Unified Ideographs Extension F */
AF_UNIRANGE_REC( 0x2F800, 0x2FA1F ), /* CJK Compatibility Ideographs Supplement */
AF_UNIRANGE_REC( 0, 0 )
};
diff --git a/modules/freetype2/src/autofit/afranges.h b/modules/freetype2/src/autofit/afranges.h
index 1a0e4b153..ba3b5e7cc 100644
--- a/modules/freetype2/src/autofit/afranges.h
+++ b/modules/freetype2/src/autofit/afranges.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter Unicode script ranges (specification). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afscript.h b/modules/freetype2/src/autofit/afscript.h
index cffe59105..623a1734a 100644
--- a/modules/freetype2/src/autofit/afscript.h
+++ b/modules/freetype2/src/autofit/afscript.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter scripts (specification only). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -30,6 +30,12 @@
/* use `HB_SCRIPT_INVALID' as the HarfBuzz script name tag for */
/* them. */
+ SCRIPT( adlm, ADLM,
+ "Adlam",
+ HB_SCRIPT_ADLAM,
+ HINTING_BOTTOM_TO_TOP,
+ "\xF0\x9E\xA4\x8C \xF0\x9E\xA4\xAE" ) /* 𞤌 𞤮 */
+
SCRIPT( arab, ARAB,
"Arabic",
HB_SCRIPT_ARABIC,
@@ -42,6 +48,18 @@
HINTING_BOTTOM_TO_TOP,
"\xD5\xBD \xD5\x8D" ) /* Õ½ Õ */
+ SCRIPT( avst, AVST,
+ "Avestan",
+ HB_SCRIPT_AVESTAN,
+ HINTING_BOTTOM_TO_TOP,
+ "\xF0\x90\xAC\x9A" ) /* 𬚠*/
+
+ SCRIPT( bamu, BAMU,
+ "Bamum",
+ HB_SCRIPT_BAMUM,
+ HINTING_BOTTOM_TO_TOP,
+ "\xEA\x9B\x81 \xEA\x9B\xAF" ) /* ê› ê›¯ */
+
/* there are no simple forms for letters; we thus use two digit shapes */
SCRIPT( beng, BENG,
"Bengali",
@@ -49,12 +67,48 @@
HINTING_TOP_TO_BOTTOM,
"\xE0\xA7\xA6 \xE0\xA7\xAA" ) /* ০ ৪ */
+ SCRIPT( buhd, BUHD,
+ "Buhid",
+ HB_SCRIPT_BUHID,
+ HINTING_BOTTOM_TO_TOP,
+ "\xE1\x9D\x8B \xE1\x9D\x8F" ) /* á‹ á */
+
+ SCRIPT( cakm, CAKM,
+ "Chakma",
+ HB_SCRIPT_CHAKMA,
+ HINTING_BOTTOM_TO_TOP,
+ "\xF0\x91\x84\xA4 \xF0\x91\x84\x89 \xF0\x91\x84\x9B" ) /* 𑄤 𑄉 𑄛 */
+
+ SCRIPT( cans, CANS,
+ "Canadian Syllabics",
+ HB_SCRIPT_CANADIAN_SYLLABICS,
+ HINTING_BOTTOM_TO_TOP,
+ "\xE1\x91\x8C \xE1\x93\x9A" ) /* ᑌ ᓚ */
+
+ SCRIPT( cari, CARI,
+ "Carian",
+ HB_SCRIPT_CARIAN,
+ HINTING_BOTTOM_TO_TOP,
+ "\xF0\x90\x8A\xAB \xF0\x90\x8B\x89" ) /* ðŠ« ð‹‰ */
+
SCRIPT( cher, CHER,
"Cherokee",
HB_SCRIPT_CHEROKEE,
HINTING_BOTTOM_TO_TOP,
"\xE1\x8E\xA4 \xE1\x8F\x85 \xEA\xAE\x95" ) /* Ꭴ á… ê®• */
+ SCRIPT( copt, COPT,
+ "Coptic",
+ HB_SCRIPT_COPTIC,
+ HINTING_BOTTOM_TO_TOP,
+ "\xE2\xB2\x9E \xE2\xB2\x9F" ) /* Ⲟ ⲟ */
+
+ SCRIPT( cprt, CPRT,
+ "Cypriot",
+ HB_SCRIPT_CYPRIOT,
+ HINTING_BOTTOM_TO_TOP,
+ "\xF0\x90\xA0\x85 \xF0\x90\xA0\xA3" ) /* ð … ð £ */
+
SCRIPT( cyrl, CYRL,
"Cyrillic",
HB_SCRIPT_CYRILLIC,
@@ -67,6 +121,12 @@
HINTING_TOP_TO_BOTTOM,
"\xE0\xA4\xA0 \xE0\xA4\xB5 \xE0\xA4\x9F" ) /* ठ व ट */
+ SCRIPT( dsrt, DSRT,
+ "Deseret",
+ HB_SCRIPT_DESERET,
+ HINTING_BOTTOM_TO_TOP,
+ "\xF0\x90\x90\x84 \xF0\x90\x90\xAC" ) /* ð„ ð¬ */
+
SCRIPT( ethi, ETHI,
"Ethiopic",
HB_SCRIPT_ETHIOPIC,
@@ -77,7 +137,7 @@
"Georgian (Mkhedruli)",
HB_SCRIPT_GEORGIAN,
HINTING_BOTTOM_TO_TOP,
- "\xE1\x83\x98 \xE1\x83\x94 \xE1\x83\x90" ) /* ი ე რ*/
+ "\xE1\x83\x98 \xE1\x83\x94 \xE1\x83\x90 \xE1\xB2\xBF" ) /* ი ე რᲘ */
SCRIPT( geok, GEOK,
"Georgian (Khutsuri)",
@@ -85,6 +145,18 @@
HINTING_BOTTOM_TO_TOP,
"\xE1\x82\xB6 \xE1\x82\xB1 \xE2\xB4\x99" ) /* Ⴖ Ⴑ ⴙ */
+ SCRIPT( glag, GLAG,
+ "Glagolitic",
+ HB_SCRIPT_GLAGOLITIC,
+ HINTING_BOTTOM_TO_TOP,
+ "\xE2\xB0\x95 \xE2\xB1\x85" ) /* â°• â±… */
+
+ SCRIPT( goth, GOTH,
+ "Gothic",
+ HB_SCRIPT_GOTHIC,
+ HINTING_TOP_TO_BOTTOM,
+ "\xF0\x90\x8C\xB4 \xF0\x90\x8C\xBE \xF0\x90\x8D\x83" ) /* ðŒ´ ðŒ¾ ðƒ */
+
SCRIPT( grek, GREK,
"Greek",
HB_SCRIPT_GREEK,
@@ -109,11 +181,11 @@
HINTING_BOTTOM_TO_TOP,
"\xD7\x9D" ) /* × */
- SCRIPT( knda, KNDA,
- "Kannada",
- HB_SCRIPT_KANNADA,
+ SCRIPT( kali, KALI,
+ "Kayah Li",
+ HB_SCRIPT_KAYAH_LI,
HINTING_BOTTOM_TO_TOP,
- "\xE0\xB3\xA6 \xE0\xB2\xAC" ) /* ೦ ಬ */
+ "\xEA\xA4\x8D \xEA\xA4\x80" ) /* ê¤ ê¤€ */
/* only digit zero has a simple shape in the Khmer script */
SCRIPT( khmr, KHMR,
@@ -128,6 +200,12 @@
HINTING_BOTTOM_TO_TOP,
"\xE1\xA7\xA1 \xE1\xA7\xAA" ) /* ᧡ ᧪ */
+ SCRIPT( knda, KNDA,
+ "Kannada",
+ HB_SCRIPT_KANNADA,
+ HINTING_BOTTOM_TO_TOP,
+ "\xE0\xB3\xA6 \xE0\xB2\xAC" ) /* ೦ ಬ */
+
/* only digit zero has a simple shape in the Lao script */
SCRIPT( lao, LAO,
"Lao",
@@ -153,6 +231,12 @@
HINTING_BOTTOM_TO_TOP,
"\xE1\xB5\x92 \xE1\xB4\xBC \xE2\x81\xB0" ) /* áµ’ á´¼ â° */
+ SCRIPT( lisu, LISU,
+ "Lisu",
+ HB_SCRIPT_LISU,
+ HINTING_BOTTOM_TO_TOP,
+ "\xEA\x93\xB3" ) /* ꓳ */
+
SCRIPT( mlym, MLYM,
"Malayalam",
HB_SCRIPT_MALAYALAM,
@@ -165,18 +249,67 @@
HINTING_BOTTOM_TO_TOP,
"\xE1\x80\x9D \xE1\x80\x84 \xE1\x80\x82" ) /* ဠင ဂ */
+ SCRIPT( nkoo, NKOO,
+ "N'Ko",
+ HB_SCRIPT_NKO,
+ HINTING_BOTTOM_TO_TOP,
+ "\xDF\x8B \xDF\x80" ) /* ߋ ߀ */
+
SCRIPT( none, NONE,
"no script",
HB_SCRIPT_INVALID,
HINTING_BOTTOM_TO_TOP,
"" )
+ SCRIPT( olck, OLCK,
+ "Ol Chiki",
+ HB_SCRIPT_OL_CHIKI,
+ HINTING_BOTTOM_TO_TOP,
+ "\xE1\xB1\x9B" ) /* á±› */
+
+ SCRIPT( orkh, ORKH,
+ "Old Turkic",
+ HB_SCRIPT_OLD_TURKIC,
+ HINTING_BOTTOM_TO_TOP,
+ "\xF0\x90\xB0\x97" ) /* ð°— */
+
+ SCRIPT( osge, OSGE,
+ "Osage",
+ HB_SCRIPT_OSAGE,
+ HINTING_BOTTOM_TO_TOP,
+ "\xF0\x90\x93\x82 \xF0\x90\x93\xAA" ) /* 𓂠𓪠*/
+
+ SCRIPT( osma, OSMA,
+ "Osmanya",
+ HB_SCRIPT_OSMANYA,
+ HINTING_BOTTOM_TO_TOP,
+ "\xF0\x90\x92\x86 \xF0\x90\x92\xA0" ) /* ð’† ð’  */
+
+ SCRIPT( saur, SAUR,
+ "Saurashtra",
+ HB_SCRIPT_SAURASHTRA,
+ HINTING_BOTTOM_TO_TOP,
+ "\xEA\xA2\x9D \xEA\xA3\x90" ) /* ê¢ ê£ */
+
+ SCRIPT( shaw, SHAW,
+ "Shavian",
+ HB_SCRIPT_SHAVIAN,
+ HINTING_BOTTOM_TO_TOP,
+ "\xF0\x90\x91\xB4" ) /* ð‘´ */
+
SCRIPT( sinh, SINH,
"Sinhala",
HB_SCRIPT_SINHALA,
HINTING_BOTTOM_TO_TOP,
"\xE0\xB6\xA7" ) /* ට */
+ /* only digit zero has a simple (round) shape in the Sundanese script */
+ SCRIPT( sund, SUND,
+ "Sundanese",
+ HB_SCRIPT_SUNDANESE,
+ HINTING_BOTTOM_TO_TOP,
+ "\xE1\xAE\xB0" ) /* á®° */
+
/* only digit zero has a simple (round) shape in the Tamil script */
SCRIPT( taml, TAML,
"Tamil",
@@ -184,6 +317,12 @@
HINTING_BOTTOM_TO_TOP,
"\xE0\xAF\xA6" ) /* ௦ */
+ SCRIPT( tavt, TAVT,
+ "Tai Viet",
+ HB_SCRIPT_TAI_VIET,
+ HINTING_BOTTOM_TO_TOP,
+ "\xEA\xAA\x92 \xEA\xAA\xAB" ) /* ꪒ ꪫ */
+
/* there are no simple forms for letters; we thus use two digit shapes */
SCRIPT( telu, TELU,
"Telugu",
@@ -191,12 +330,24 @@
HINTING_BOTTOM_TO_TOP,
"\xE0\xB1\xA6 \xE0\xB1\xA7" ) /* ౦ ౧ */
+ SCRIPT( tfng, TFNG,
+ "Tifinagh",
+ HB_SCRIPT_TIFINAGH,
+ HINTING_BOTTOM_TO_TOP,
+ "\xE2\xB5\x94" ) /* âµ” */
+
SCRIPT( thai, THAI,
"Thai",
HB_SCRIPT_THAI,
HINTING_BOTTOM_TO_TOP,
"\xE0\xB8\xB2 \xE0\xB9\x85 \xE0\xB9\x90" ) /* า ๅ ๠*/
+ SCRIPT( vaii, VAII,
+ "Vai",
+ HB_SCRIPT_VAI,
+ HINTING_BOTTOM_TO_TOP,
+ "\xEA\x98\x93 \xEA\x96\x9C \xEA\x96\xB4" ) /* ꘓ ꖜ ꖴ */
+
#ifdef AF_CONFIG_OPTION_INDIC
SCRIPT( limb, LIMB,
@@ -211,12 +362,6 @@
HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
- SCRIPT( sund, SUND,
- "Sundanese",
- HB_SCRIPT_SUNDANESE,
- HINTING_BOTTOM_TO_TOP,
- "o" ) /* XXX */
-
SCRIPT( sylo, SYLO,
"Syloti Nagri",
HB_SCRIPT_SYLOTI_NAGRI,
diff --git a/modules/freetype2/src/autofit/afshaper.c b/modules/freetype2/src/autofit/afshaper.c
index 6d13b6585..f30828173 100644
--- a/modules/freetype2/src/autofit/afshaper.c
+++ b/modules/freetype2/src/autofit/afshaper.c
@@ -4,7 +4,7 @@
/* */
/* HarfBuzz interface for accessing OpenType features (body). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,6 +18,7 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#include FT_ADVANCES_H
#include "afglobal.h"
#include "aftypes.h"
#include "afshaper.h"
@@ -103,10 +104,10 @@
{
hb_face_t* face;
- hb_set_t* gsub_lookups; /* GSUB lookups for a given script */
- hb_set_t* gsub_glyphs; /* glyphs covered by GSUB lookups */
- hb_set_t* gpos_lookups; /* GPOS lookups for a given script */
- hb_set_t* gpos_glyphs; /* glyphs covered by GPOS lookups */
+ hb_set_t* gsub_lookups = NULL; /* GSUB lookups for a given script */
+ hb_set_t* gsub_glyphs = NULL; /* glyphs covered by GSUB lookups */
+ hb_set_t* gpos_lookups = NULL; /* GPOS lookups for a given script */
+ hb_set_t* gpos_glyphs = NULL; /* glyphs covered by GPOS lookups */
hb_script_t script;
const hb_tag_t* coverage_tags;
@@ -126,11 +127,6 @@
face = hb_font_get_face( globals->hb_font );
- gsub_lookups = hb_set_create();
- gsub_glyphs = hb_set_create();
- gpos_lookups = hb_set_create();
- gpos_glyphs = hb_set_create();
-
coverage_tags = coverages[style_class->coverage];
script = scripts[style_class->script];
@@ -167,6 +163,7 @@
script_tags[1] = HB_TAG_NONE;
}
+ gsub_lookups = hb_set_create();
hb_ot_layout_collect_lookups( face,
HB_OT_TAG_GSUB,
script_tags,
@@ -177,13 +174,6 @@
if ( hb_set_is_empty( gsub_lookups ) )
goto Exit; /* nothing to do */
- hb_ot_layout_collect_lookups( face,
- HB_OT_TAG_GPOS,
- script_tags,
- NULL,
- coverage_tags,
- gpos_lookups );
-
FT_TRACE4(( "GSUB lookups (style `%s'):\n"
" ",
af_style_names[style_class->style] ));
@@ -192,6 +182,7 @@
count = 0;
#endif
+ gsub_glyphs = hb_set_create();
for ( idx = HB_SET_VALUE_INVALID; hb_set_next( gsub_lookups, &idx ); )
{
#ifdef FT_DEBUG_LEVEL_TRACE
@@ -219,10 +210,19 @@
" ",
af_style_names[style_class->style] ));
+ gpos_lookups = hb_set_create();
+ hb_ot_layout_collect_lookups( face,
+ HB_OT_TAG_GPOS,
+ script_tags,
+ NULL,
+ coverage_tags,
+ gpos_lookups );
+
#ifdef FT_DEBUG_LEVEL_TRACE
count = 0;
#endif
+ gpos_glyphs = hb_set_create();
for ( idx = HB_SET_VALUE_INVALID; hb_set_next( gpos_lookups, &idx ); )
{
#ifdef FT_DEBUG_LEVEL_TRACE
diff --git a/modules/freetype2/src/autofit/afshaper.h b/modules/freetype2/src/autofit/afshaper.h
index 0d41f7876..7efd9f6a4 100644
--- a/modules/freetype2/src/autofit/afshaper.h
+++ b/modules/freetype2/src/autofit/afshaper.h
@@ -4,7 +4,7 @@
/* */
/* HarfBuzz interface for accessing OpenType features (specification). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afstyles.h b/modules/freetype2/src/autofit/afstyles.h
index e83a95bb5..e2688b3fc 100644
--- a/modules/freetype2/src/autofit/afstyles.h
+++ b/modules/freetype2/src/autofit/afstyles.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter styles (specification only). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -83,6 +83,13 @@
DEFAULT )
+ STYLE( adlm_dflt, ADLM_DFLT,
+ "Adlam default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_ADLM,
+ AF_BLUE_STRINGSET_ADLM,
+ AF_COVERAGE_DEFAULT )
+
STYLE( arab_dflt, ARAB_DFLT,
"Arabic default style",
AF_WRITING_SYSTEM_LATIN,
@@ -97,6 +104,20 @@
AF_BLUE_STRINGSET_ARMN,
AF_COVERAGE_DEFAULT )
+ STYLE( avst_dflt, AVST_DFLT,
+ "Avestan default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_AVST,
+ AF_BLUE_STRINGSET_AVST,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( bamu_dflt, BAMU_DFLT,
+ "Bamum default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_BAMU,
+ AF_BLUE_STRINGSET_BAMU,
+ AF_COVERAGE_DEFAULT )
+
STYLE( beng_dflt, BENG_DFLT,
"Bengali default style",
AF_WRITING_SYSTEM_LATIN,
@@ -104,6 +125,34 @@
AF_BLUE_STRINGSET_BENG,
AF_COVERAGE_DEFAULT )
+ STYLE( buhd_dflt, BUHD_DFLT,
+ "Buhid default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_BUHD,
+ AF_BLUE_STRINGSET_BUHD,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( cakm_dflt, CAKM_DFLT,
+ "Chakma default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_CAKM,
+ AF_BLUE_STRINGSET_CAKM,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( cans_dflt, CANS_DFLT,
+ "Canadian Syllabics default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_CANS,
+ AF_BLUE_STRINGSET_CANS,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( cari_dflt, CARI_DFLT,
+ "Carian default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_CARI,
+ AF_BLUE_STRINGSET_CARI,
+ AF_COVERAGE_DEFAULT )
+
STYLE( cher_dflt, CHER_DFLT,
"Cherokee default style",
AF_WRITING_SYSTEM_LATIN,
@@ -111,6 +160,20 @@
AF_BLUE_STRINGSET_CHER,
AF_COVERAGE_DEFAULT )
+ STYLE( copt_dflt, COPT_DFLT,
+ "Coptic default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_COPT,
+ AF_BLUE_STRINGSET_COPT,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( cprt_dflt, CPRT_DFLT,
+ "Cypriot default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_CPRT,
+ AF_BLUE_STRINGSET_CPRT,
+ AF_COVERAGE_DEFAULT )
+
META_STYLE_LATIN( cyrl, CYRL, "Cyrillic" )
STYLE( deva_dflt, DEVA_DFLT,
@@ -120,6 +183,13 @@
AF_BLUE_STRINGSET_DEVA,
AF_COVERAGE_DEFAULT )
+ STYLE( dsrt_dflt, DSRT_DFLT,
+ "Deseret default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_DSRT,
+ AF_BLUE_STRINGSET_DSRT,
+ AF_COVERAGE_DEFAULT )
+
STYLE( ethi_dflt, ETHI_DFLT,
"Ethiopic default style",
AF_WRITING_SYSTEM_LATIN,
@@ -141,6 +211,20 @@
AF_BLUE_STRINGSET_GEOK,
AF_COVERAGE_DEFAULT )
+ STYLE( glag_dflt, GLAG_DFLT,
+ "Glagolitic default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_GLAG,
+ AF_BLUE_STRINGSET_GLAG,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( goth_dflt, GOTH_DFLT,
+ "Gothic default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_GOTH,
+ AF_BLUE_STRINGSET_GOTH,
+ AF_COVERAGE_DEFAULT )
+
META_STYLE_LATIN( grek, GREK, "Greek" )
STYLE( gujr_dflt, GUJR_DFLT,
@@ -164,11 +248,11 @@
AF_BLUE_STRINGSET_HEBR,
AF_COVERAGE_DEFAULT )
- STYLE( knda_dflt, KNDA_DFLT,
- "Kannada default style",
+ STYLE( kali_dflt, KALI_DFLT,
+ "Kayah Li default style",
AF_WRITING_SYSTEM_LATIN,
- AF_SCRIPT_KNDA,
- AF_BLUE_STRINGSET_KNDA,
+ AF_SCRIPT_KALI,
+ AF_BLUE_STRINGSET_KALI,
AF_COVERAGE_DEFAULT )
STYLE( khmr_dflt, KHMR_DFLT,
@@ -185,6 +269,13 @@
AF_BLUE_STRINGSET_KHMS,
AF_COVERAGE_DEFAULT )
+ STYLE( knda_dflt, KNDA_DFLT,
+ "Kannada default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_KNDA,
+ AF_BLUE_STRINGSET_KNDA,
+ AF_COVERAGE_DEFAULT )
+
STYLE( lao_dflt, LAO_DFLT,
"Lao default style",
AF_WRITING_SYSTEM_LATIN,
@@ -217,6 +308,13 @@
AF_COVERAGE_DEFAULT )
#endif
+ STYLE( lisu_dflt, LISU_DFLT,
+ "Lisu default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_LISU,
+ AF_BLUE_STRINGSET_LISU,
+ AF_COVERAGE_DEFAULT )
+
STYLE( mlym_dflt, MLYM_DFLT,
"Malayalam default style",
AF_WRITING_SYSTEM_LATIN,
@@ -231,6 +329,13 @@
AF_BLUE_STRINGSET_MYMR,
AF_COVERAGE_DEFAULT )
+ STYLE( nkoo_dflt, NKOO_DFLT,
+ "N'Ko default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_NKOO,
+ AF_BLUE_STRINGSET_NKOO,
+ AF_COVERAGE_DEFAULT )
+
STYLE( none_dflt, NONE_DFLT,
"no style",
AF_WRITING_SYSTEM_DUMMY,
@@ -238,6 +343,48 @@
AF_BLUE_STRINGSET_NONE,
AF_COVERAGE_DEFAULT )
+ STYLE( olck_dflt, OLCK_DFLT,
+ "Ol Chiki default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_OLCK,
+ AF_BLUE_STRINGSET_OLCK,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( orkh_dflt, ORKH_DFLT,
+ "Old Turkic default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_ORKH,
+ AF_BLUE_STRINGSET_ORKH,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( osge_dflt, OSGE_DFLT,
+ "Osage default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_OSGE,
+ AF_BLUE_STRINGSET_OSGE,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( osma_dflt, OSMA_DFLT,
+ "Osmanya default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_OSMA,
+ AF_BLUE_STRINGSET_OSMA,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( saur_dflt, SAUR_DFLT,
+ "Saurashtra default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_SAUR,
+ AF_BLUE_STRINGSET_SAUR,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( shaw_dflt, SHAW_DFLT,
+ "Shavian default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_SHAW,
+ AF_BLUE_STRINGSET_SHAW,
+ AF_COVERAGE_DEFAULT )
+
STYLE( sinh_dflt, SINH_DFLT,
"Sinhala default style",
AF_WRITING_SYSTEM_LATIN,
@@ -245,6 +392,13 @@
AF_BLUE_STRINGSET_SINH,
AF_COVERAGE_DEFAULT )
+ STYLE( sund_dflt, SUND_DFLT,
+ "Sundanese default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_SUND,
+ AF_BLUE_STRINGSET_SUND,
+ AF_COVERAGE_DEFAULT )
+
STYLE( taml_dflt, TAML_DFLT,
"Tamil default style",
AF_WRITING_SYSTEM_LATIN,
@@ -252,6 +406,13 @@
AF_BLUE_STRINGSET_TAML,
AF_COVERAGE_DEFAULT )
+ STYLE( tavt_dflt, TAVT_DFLT,
+ "Tai Viet default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_TAVT,
+ AF_BLUE_STRINGSET_TAVT,
+ AF_COVERAGE_DEFAULT )
+
STYLE( telu_dflt, TELU_DFLT,
"Telugu default style",
AF_WRITING_SYSTEM_LATIN,
@@ -259,6 +420,13 @@
AF_BLUE_STRINGSET_TELU,
AF_COVERAGE_DEFAULT )
+ STYLE( tfng_dflt, TFNG_DFLT,
+ "Tifinagh default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_TFNG,
+ AF_BLUE_STRINGSET_TFNG,
+ AF_COVERAGE_DEFAULT )
+
STYLE( thai_dflt, THAI_DFLT,
"Thai default style",
AF_WRITING_SYSTEM_LATIN,
@@ -266,6 +434,13 @@
AF_BLUE_STRINGSET_THAI,
AF_COVERAGE_DEFAULT )
+ STYLE( vaii_dflt, VAII_DFLT,
+ "Vai default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_VAII,
+ AF_BLUE_STRINGSET_VAII,
+ AF_COVERAGE_DEFAULT )
+
#ifdef AF_CONFIG_OPTION_INDIC
/* no blue stringset support for the Indic writing system yet */
@@ -280,7 +455,6 @@
STYLE_DEFAULT_INDIC( limb, LIMB, "Limbu" )
STYLE_DEFAULT_INDIC( orya, ORYA, "Oriya" )
- STYLE_DEFAULT_INDIC( sund, SUND, "Sundanese" )
STYLE_DEFAULT_INDIC( sylo, SYLO, "Syloti Nagri" )
STYLE_DEFAULT_INDIC( tibt, TIBT, "Tibetan" )
diff --git a/modules/freetype2/src/autofit/aftypes.h b/modules/freetype2/src/autofit/aftypes.h
index 61b6b12bb..6bd8c895b 100644
--- a/modules/freetype2/src/autofit/aftypes.h
+++ b/modules/freetype2/src/autofit/aftypes.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter types (specification only). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -76,9 +76,9 @@ extern void* _af_debug_hints;
typedef struct AF_WidthRec_
{
- FT_Pos org; /* original position/width in font units */
- FT_Pos cur; /* current/scaled position/width in device sub-pixels */
- FT_Pos fit; /* current/fitted position/width in device sub-pixels */
+ FT_Pos org; /* original position/width in font units */
+ FT_Pos cur; /* current/scaled position/width in device subpixels */
+ FT_Pos fit; /* current/fitted position/width in device subpixels */
} AF_WidthRec, *AF_Width;
@@ -575,6 +575,7 @@ extern void* _af_debug_hints;
m_init, \
m_scale, \
m_done, \
+ m_stdw, \
h_init, \
h_apply ) \
FT_LOCAL_DEF( void ) \
diff --git a/modules/freetype2/src/autofit/afwarp.c b/modules/freetype2/src/autofit/afwarp.c
index ce1806c9d..2a75ea7b3 100644
--- a/modules/freetype2/src/autofit/afwarp.c
+++ b/modules/freetype2/src/autofit/afwarp.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter warping algorithm (body). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -98,7 +98,6 @@
if ( xx1min + w < warper->x2min )
xx1min = warper->x2min - w;
- xx1max = warper->x1max;
if ( xx1max + w > warper->x2max )
xx1max = warper->x2max - w;
diff --git a/modules/freetype2/src/autofit/afwarp.h b/modules/freetype2/src/autofit/afwarp.h
index 6d96f86d7..520b1be90 100644
--- a/modules/freetype2/src/autofit/afwarp.h
+++ b/modules/freetype2/src/autofit/afwarp.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter warping algorithm (specification). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/afwrtsys.h b/modules/freetype2/src/autofit/afwrtsys.h
index 842f4921a..4675f3242 100644
--- a/modules/freetype2/src/autofit/afwrtsys.h
+++ b/modules/freetype2/src/autofit/afwrtsys.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter writing systems (specification only). */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/autofit/autofit.c b/modules/freetype2/src/autofit/autofit.c
index dda9aeb6d..c1605160a 100644
--- a/modules/freetype2/src/autofit/autofit.c
+++ b/modules/freetype2/src/autofit/autofit.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter module (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,29 +18,22 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
-#include "afpic.c"
+
#include "afangles.c"
#include "afblue.c"
+#include "afcjk.c"
+#include "afdummy.c"
#include "afglobal.c"
#include "afhints.c"
-
-#include "afranges.c"
-
-#include "afdummy.c"
+#include "afindic.c"
#include "aflatin.c"
-#ifdef FT_OPTION_AUTOFIT2
#include "aflatin2.c"
-#endif
-#include "afcjk.c"
-#include "afindic.c"
-
-#include "afshaper.c"
-
#include "afloader.c"
#include "afmodule.c"
-
-#ifdef AF_CONFIG_OPTION_USE_WARPER
+#include "afpic.c"
+#include "afranges.c"
+#include "afshaper.c"
#include "afwarp.c"
-#endif
+
/* END */
diff --git a/modules/freetype2/src/autofit/module.mk b/modules/freetype2/src/autofit/module.mk
index 98f0612b9..ff05f83e7 100644
--- a/modules/freetype2/src/autofit/module.mk
+++ b/modules/freetype2/src/autofit/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2003-2016 by
+# Copyright 2003-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/autofit/rules.mk b/modules/freetype2/src/autofit/rules.mk
index 1ef470464..75171b412 100644
--- a/modules/freetype2/src/autofit/rules.mk
+++ b/modules/freetype2/src/autofit/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2003-2016 by
+# Copyright 2003-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/base/Jamfile b/modules/freetype2/src/base/Jamfile
index cfc69657f..4994c1b4c 100644
--- a/modules/freetype2/src/base/Jamfile
+++ b/modules/freetype2/src/base/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/base Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -21,11 +21,14 @@ SubDir FT2_TOP $(FT2_SRC_DIR) base ;
ftadvanc
ftcalc
ftdbgmem
+ ftfntfmt
ftgloadr
fthash
+ ftlcdfil
ftobjs
ftoutln
ftpic
+ ftpsprop
ftrfork
ftsnames
ftstream
@@ -50,13 +53,11 @@ SubDir FT2_TOP $(FT2_SRC_DIR) base ;
ftbitmap
ftcid
ftdebug
- ftfntfmt
ftfstype
ftgasp
ftglyph
ftgxval
ftinit
- ftlcdfil
ftmm
ftotval
ftpatent
diff --git a/modules/freetype2/src/base/basepic.c b/modules/freetype2/src/base/basepic.c
index f2cea90d7..bc8040644 100644
--- a/modules/freetype2/src/base/basepic.c
+++ b/modules/freetype2/src/base/basepic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for base. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/basepic.h b/modules/freetype2/src/base/basepic.h
index a1a75a0ba..492d1ede5 100644
--- a/modules/freetype2/src/base/basepic.h
+++ b/modules/freetype2/src/base/basepic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for base. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftadvanc.c b/modules/freetype2/src/base/ftadvanc.c
index 59c74502c..230c84d6a 100644
--- a/modules/freetype2/src/base/ftadvanc.c
+++ b/modules/freetype2/src/base/ftadvanc.c
@@ -4,7 +4,7 @@
/* */
/* Quick computation of advance widths (body). */
/* */
-/* Copyright 2008-2016 by */
+/* Copyright 2008-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -116,9 +116,12 @@
FT_Int32 flags,
FT_Fixed *padvances )
{
+ FT_Error error = FT_Err_Ok;
+
FT_Face_GetAdvancesFunc func;
- FT_UInt num, end, nn;
- FT_Error error = FT_Err_Ok;
+
+ FT_UInt num, end, nn;
+ FT_Int factor;
if ( !face )
@@ -152,16 +155,17 @@
return FT_THROW( Unimplemented_Feature );
flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY;
+ factor = ( flags & FT_LOAD_NO_SCALE ) ? 1 : 1024;
for ( nn = 0; nn < count; nn++ )
{
error = FT_Load_Glyph( face, start + nn, flags );
if ( error )
break;
- /* scale from 26.6 to 16.16 */
+ /* scale from 26.6 to 16.16, unless NO_SCALE was requested */
padvances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT )
- ? face->glyph->advance.y * 1024
- : face->glyph->advance.x * 1024;
+ ? face->glyph->advance.y * factor
+ : face->glyph->advance.x * factor;
}
return error;
diff --git a/modules/freetype2/src/base/ftapi.c b/modules/freetype2/src/base/ftapi.c
index b94c3eb9f..32d6e95d1 100644
--- a/modules/freetype2/src/base/ftapi.c
+++ b/modules/freetype2/src/base/ftapi.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType compatibility functions (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -38,7 +38,7 @@
/*************************************************************************/
/*************************************************************************/
- /* backwards compatibility API */
+ /* backward compatibility API */
FT_BASE_DEF( void )
FT_New_Memory_Stream( FT_Library library,
diff --git a/modules/freetype2/src/base/ftbase.c b/modules/freetype2/src/base/ftbase.c
index ab1af6f9f..f914b9b24 100644
--- a/modules/freetype2/src/base/ftbase.c
+++ b/modules/freetype2/src/base/ftbase.c
@@ -4,7 +4,7 @@
/* */
/* Single object library component (body only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,26 +17,26 @@
#include <ft2build.h>
-
#define FT_MAKE_OPTION_SINGLE_OBJECT
-#include "ftpic.c"
#include "basepic.c"
#include "ftadvanc.c"
#include "ftcalc.c"
#include "ftdbgmem.c"
+#include "ftfntfmt.c"
#include "ftgloadr.c"
#include "fthash.c"
+#include "ftlcdfil.c"
+#include "ftmac.c"
#include "ftobjs.c"
#include "ftoutln.c"
+#include "ftpic.c"
+#include "ftpsprop.c"
#include "ftrfork.c"
#include "ftsnames.c"
#include "ftstream.c"
#include "fttrigon.c"
#include "ftutil.c"
-#ifdef FT_MACINTOSH
-#include "ftmac.c"
-#endif
/* END */
diff --git a/modules/freetype2/src/base/ftbase.h b/modules/freetype2/src/base/ftbase.h
index 717fdaae2..7e8cfad95 100644
--- a/modules/freetype2/src/base/ftbase.h
+++ b/modules/freetype2/src/base/ftbase.h
@@ -2,9 +2,9 @@
/* */
/* ftbase.h */
/* */
-/* The FreeType private functions used in base module (specification). */
+/* Private functions used in the `base' module (specification). */
/* */
-/* Copyright 2008-2016 by */
+/* Copyright 2008-2018 by */
/* David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,6 +27,8 @@
FT_BEGIN_HEADER
+#ifdef FT_CONFIG_OPTION_MAC_FONTS
+
/* MacOS resource fork cannot exceed 16MB at least for Carbon code; */
/* see https://support.microsoft.com/en-us/kb/130437 */
#define FT_MAC_RFORK_MAX_LEN 0x00FFFFFFUL
@@ -65,6 +67,8 @@ FT_BEGIN_HEADER
ft_raccess_rule_by_darwin_vfs( FT_Library library, FT_UInt rule_index );
#endif
+#endif /* FT_CONFIG_OPTION_MAC_FONTS */
+
FT_END_HEADER
diff --git a/modules/freetype2/src/base/ftbbox.c b/modules/freetype2/src/base/ftbbox.c
index 804dc9058..151e85c97 100644
--- a/modules/freetype2/src/base/ftbbox.c
+++ b/modules/freetype2/src/base/ftbbox.c
@@ -4,7 +4,7 @@
/* */
/* FreeType bbox computation (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
diff --git a/modules/freetype2/src/base/ftbdf.c b/modules/freetype2/src/base/ftbdf.c
index 4aafc2b98..c4ea502fb 100644
--- a/modules/freetype2/src/base/ftbdf.c
+++ b/modules/freetype2/src/base/ftbdf.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing BDF-specific strings (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftbitmap.c b/modules/freetype2/src/base/ftbitmap.c
index 533e57a70..a9746663f 100644
--- a/modules/freetype2/src/base/ftbitmap.c
+++ b/modules/freetype2/src/base/ftbitmap.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility functions for bitmaps (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -153,38 +153,36 @@
FT_UInt ypixels )
{
FT_Error error;
- int pitch;
- int new_pitch;
+ unsigned int pitch;
+ unsigned int new_pitch;
FT_UInt bpp;
- FT_UInt i, width, height;
+ FT_UInt width, height;
unsigned char* buffer = NULL;
width = bitmap->width;
height = bitmap->rows;
- pitch = bitmap->pitch;
- if ( pitch < 0 )
- pitch = -pitch;
+ pitch = (unsigned int)FT_ABS( bitmap->pitch );
switch ( bitmap->pixel_mode )
{
case FT_PIXEL_MODE_MONO:
bpp = 1;
- new_pitch = (int)( ( width + xpixels + 7 ) >> 3 );
+ new_pitch = ( width + xpixels + 7 ) >> 3;
break;
case FT_PIXEL_MODE_GRAY2:
bpp = 2;
- new_pitch = (int)( ( width + xpixels + 3 ) >> 2 );
+ new_pitch = ( width + xpixels + 3 ) >> 2;
break;
case FT_PIXEL_MODE_GRAY4:
bpp = 4;
- new_pitch = (int)( ( width + xpixels + 1 ) >> 1 );
+ new_pitch = ( width + xpixels + 1 ) >> 1;
break;
case FT_PIXEL_MODE_GRAY:
case FT_PIXEL_MODE_LCD:
case FT_PIXEL_MODE_LCD_V:
bpp = 8;
- new_pitch = (int)( width + xpixels );
+ new_pitch = width + xpixels;
break;
default:
return FT_THROW( Invalid_Glyph_Format );
@@ -194,7 +192,7 @@
if ( ypixels == 0 && new_pitch <= pitch )
{
/* zero the padding */
- FT_UInt bit_width = (FT_UInt)pitch * 8;
+ FT_UInt bit_width = pitch * 8;
FT_UInt bit_last = ( width + xpixels ) * bpp;
@@ -226,7 +224,7 @@
}
/* otherwise allocate new buffer */
- if ( FT_QALLOC_MULT( buffer, new_pitch, bitmap->rows + ypixels ) )
+ if ( FT_QALLOC_MULT( buffer, bitmap->rows + ypixels, new_pitch ) )
return error;
/* new rows get added at the top of the bitmap, */
@@ -235,31 +233,60 @@
{
FT_UInt len = ( width * bpp + 7 ) >> 3;
+ unsigned char* in = bitmap->buffer;
+ unsigned char* out = buffer;
+
+ unsigned char* limit = bitmap->buffer + pitch * bitmap->rows;
+ unsigned int delta = new_pitch - len;
+
+
+ FT_MEM_ZERO( out, new_pitch * ypixels );
+ out += new_pitch * ypixels;
- for ( i = 0; i < bitmap->rows; i++ )
- FT_MEM_COPY( buffer + (FT_UInt)new_pitch * ( ypixels + i ),
- bitmap->buffer + (FT_UInt)pitch * i,
- len );
+ while ( in < limit )
+ {
+ FT_MEM_COPY( out, in, len );
+ in += pitch;
+ out += len;
+
+ /* we use FT_QALLOC_MULT, which doesn't zero out the buffer; */
+ /* consequently, we have to manually zero out the remaining bytes */
+ FT_MEM_ZERO( out, delta );
+ out += delta;
+ }
}
else
{
FT_UInt len = ( width * bpp + 7 ) >> 3;
+ unsigned char* in = bitmap->buffer;
+ unsigned char* out = buffer;
+
+ unsigned char* limit = bitmap->buffer + pitch * bitmap->rows;
+ unsigned int delta = new_pitch - len;
+
- for ( i = 0; i < bitmap->rows; i++ )
- FT_MEM_COPY( buffer + (FT_UInt)new_pitch * i,
- bitmap->buffer + (FT_UInt)pitch * i,
- len );
+ while ( in < limit )
+ {
+ FT_MEM_COPY( out, in, len );
+ in += pitch;
+ out += len;
+
+ FT_MEM_ZERO( out, delta );
+ out += delta;
+ }
+
+ FT_MEM_ZERO( out, new_pitch * ypixels );
}
FT_FREE( bitmap->buffer );
bitmap->buffer = buffer;
- if ( bitmap->pitch < 0 )
- new_pitch = -new_pitch;
-
/* set pitch only, width and height are left untouched */
- bitmap->pitch = new_pitch;
+ if ( bitmap->pitch < 0 )
+ bitmap->pitch = -(int)new_pitch;
+ else
+ bitmap->pitch = (int)new_pitch;
return FT_Err_Ok;
}
@@ -444,7 +471,7 @@
* A gamma of 2.2 is fair to assume. And then, we need to
* undo the premultiplication too.
*
- * http://accessibility.kde.org/hsl-adjusted.php
+ * https://accessibility.kde.org/hsl-adjusted.php
*
* We do the computation with integers only, applying a gamma of 2.0.
* We guarantee 32-bit arithmetic to avoid overflow but the resulting
@@ -534,8 +561,7 @@
(FT_ULong)target->rows > FT_ULONG_MAX / (FT_ULong)target_pitch )
return FT_THROW( Invalid_Argument );
- if ( target->rows * (FT_ULong)target_pitch > old_size &&
- FT_QREALLOC( target->buffer,
+ if ( FT_QREALLOC( target->buffer,
old_size, target->rows * (FT_UInt)target_pitch ) )
return error;
diff --git a/modules/freetype2/src/base/ftcalc.c b/modules/freetype2/src/base/ftcalc.c
index 1c2392222..f4ff45f8e 100644
--- a/modules/freetype2/src/base/ftcalc.c
+++ b/modules/freetype2/src/base/ftcalc.c
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -68,14 +68,15 @@
#define FT_COMPONENT trace_calc
- /* transfer sign leaving a positive number */
-#define FT_MOVE_SIGN( x, s ) \
- FT_BEGIN_STMNT \
- if ( x < 0 ) \
- { \
- x = -x; \
- s = -s; \
- } \
+ /* transfer sign, leaving a positive number; */
+ /* we need an unsigned value to safely negate INT_MIN (or LONG_MIN) */
+#define FT_MOVE_SIGN( x, x_unsigned, s ) \
+ FT_BEGIN_STMNT \
+ if ( x < 0 ) \
+ { \
+ x_unsigned = 0U - (x_unsigned); \
+ s = -s; \
+ } \
FT_END_STMNT
/* The following three functions are available regardless of whether */
@@ -86,7 +87,7 @@
FT_EXPORT_DEF( FT_Fixed )
FT_RoundFix( FT_Fixed a )
{
- return ( a + 0x8000L - ( a < 0 ) ) & ~0xFFFFL;
+ return ( ADD_LONG( a, 0x8000L - ( a < 0 ) ) ) & ~0xFFFFL;
}
@@ -95,7 +96,7 @@
FT_EXPORT_DEF( FT_Fixed )
FT_CeilFix( FT_Fixed a )
{
- return ( a + 0xFFFFL ) & ~0xFFFFL;
+ return ( ADD_LONG( a, 0xFFFFL ) ) & ~0xFFFFL;
}
@@ -179,20 +180,20 @@
FT_Long d_;
- FT_MOVE_SIGN( a_, s );
- FT_MOVE_SIGN( b_, s );
- FT_MOVE_SIGN( c_, s );
-
a = (FT_UInt64)a_;
b = (FT_UInt64)b_;
c = (FT_UInt64)c_;
+ FT_MOVE_SIGN( a_, a, s );
+ FT_MOVE_SIGN( b_, b, s );
+ FT_MOVE_SIGN( c_, c, s );
+
d = c > 0 ? ( a * b + ( c >> 1 ) ) / c
: 0x7FFFFFFFUL;
d_ = (FT_Long)d;
- return s < 0 ? -d_ : d_;
+ return s < 0 ? NEG_LONG( d_ ) : d_;
}
@@ -208,20 +209,20 @@
FT_Long d_;
- FT_MOVE_SIGN( a_, s );
- FT_MOVE_SIGN( b_, s );
- FT_MOVE_SIGN( c_, s );
-
a = (FT_UInt64)a_;
b = (FT_UInt64)b_;
c = (FT_UInt64)c_;
+ FT_MOVE_SIGN( a_, a, s );
+ FT_MOVE_SIGN( b_, b, s );
+ FT_MOVE_SIGN( c_, c, s );
+
d = c > 0 ? a * b / c
: 0x7FFFFFFFUL;
d_ = (FT_Long)d;
- return s < 0 ? -d_ : d_;
+ return s < 0 ? NEG_LONG( d_ ) : d_;
}
@@ -257,18 +258,18 @@
FT_Long q_;
- FT_MOVE_SIGN( a_, s );
- FT_MOVE_SIGN( b_, s );
-
a = (FT_UInt64)a_;
b = (FT_UInt64)b_;
+ FT_MOVE_SIGN( a_, a, s );
+ FT_MOVE_SIGN( b_, b, s );
+
q = b > 0 ? ( ( a << 16 ) + ( b >> 1 ) ) / b
: 0x7FFFFFFFUL;
q_ = (FT_Long)q;
- return s < 0 ? -q_ : q_;
+ return s < 0 ? NEG_LONG( q_ ) : q_;
}
@@ -422,14 +423,14 @@
/* XXX: this function does not allow 64-bit arguments */
- FT_MOVE_SIGN( a_, s );
- FT_MOVE_SIGN( b_, s );
- FT_MOVE_SIGN( c_, s );
-
a = (FT_UInt32)a_;
b = (FT_UInt32)b_;
c = (FT_UInt32)c_;
+ FT_MOVE_SIGN( a_, a, s );
+ FT_MOVE_SIGN( b_, b, s );
+ FT_MOVE_SIGN( c_, c, s );
+
if ( c == 0 )
a = 0x7FFFFFFFUL;
@@ -455,7 +456,7 @@
a_ = (FT_Long)a;
- return s < 0 ? -a_ : a_;
+ return s < 0 ? NEG_LONG( a_ ) : a_;
}
@@ -470,14 +471,14 @@
/* XXX: this function does not allow 64-bit arguments */
- FT_MOVE_SIGN( a_, s );
- FT_MOVE_SIGN( b_, s );
- FT_MOVE_SIGN( c_, s );
-
a = (FT_UInt32)a_;
b = (FT_UInt32)b_;
c = (FT_UInt32)c_;
+ FT_MOVE_SIGN( a_, a, s );
+ FT_MOVE_SIGN( b_, b, s );
+ FT_MOVE_SIGN( c_, c, s );
+
if ( c == 0 )
a = 0x7FFFFFFFUL;
@@ -498,7 +499,7 @@
a_ = (FT_Long)a;
- return s < 0 ? -a_ : a_;
+ return s < 0 ? NEG_LONG( a_ ) : a_;
}
@@ -575,12 +576,12 @@
/* XXX: this function does not allow 64-bit arguments */
- FT_MOVE_SIGN( a_, s );
- FT_MOVE_SIGN( b_, s );
-
a = (FT_UInt32)a_;
b = (FT_UInt32)b_;
+ FT_MOVE_SIGN( a_, a, s );
+ FT_MOVE_SIGN( b_, b, s );
+
if ( a + ( b >> 8 ) <= 8190UL )
a = ( a * b + 0x8000UL ) >> 16;
else
@@ -594,7 +595,7 @@
a_ = (FT_Long)a;
- return s < 0 ? -a_ : a_;
+ return s < 0 ? NEG_LONG( a_ ) : a_;
#endif /* 0 */
@@ -614,12 +615,12 @@
/* XXX: this function does not allow 64-bit arguments */
- FT_MOVE_SIGN( a_, s );
- FT_MOVE_SIGN( b_, s );
-
a = (FT_UInt32)a_;
b = (FT_UInt32)b_;
+ FT_MOVE_SIGN( a_, a, s );
+ FT_MOVE_SIGN( b_, b, s );
+
if ( b == 0 )
{
/* check for division by 0 */
@@ -647,7 +648,7 @@
q_ = (FT_Long)q;
- return s < 0 ? -q_ : q_;
+ return s < 0 ? NEG_LONG( q_ ) : q_;
}
@@ -666,13 +667,19 @@
if ( !a || !b )
return;
- xx = FT_MulFix( a->xx, b->xx ) + FT_MulFix( a->xy, b->yx );
- xy = FT_MulFix( a->xx, b->xy ) + FT_MulFix( a->xy, b->yy );
- yx = FT_MulFix( a->yx, b->xx ) + FT_MulFix( a->yy, b->yx );
- yy = FT_MulFix( a->yx, b->xy ) + FT_MulFix( a->yy, b->yy );
-
- b->xx = xx; b->xy = xy;
- b->yx = yx; b->yy = yy;
+ xx = ADD_LONG( FT_MulFix( a->xx, b->xx ),
+ FT_MulFix( a->xy, b->yx ) );
+ xy = ADD_LONG( FT_MulFix( a->xx, b->xy ),
+ FT_MulFix( a->xy, b->yy ) );
+ yx = ADD_LONG( FT_MulFix( a->yx, b->xx ),
+ FT_MulFix( a->yy, b->yx ) );
+ yy = ADD_LONG( FT_MulFix( a->yx, b->xy ),
+ FT_MulFix( a->yy, b->yy ) );
+
+ b->xx = xx;
+ b->xy = xy;
+ b->yx = yx;
+ b->yy = yy;
}
@@ -722,13 +729,19 @@
if ( !a || !b )
return;
- xx = FT_MulDiv( a->xx, b->xx, val ) + FT_MulDiv( a->xy, b->yx, val );
- xy = FT_MulDiv( a->xx, b->xy, val ) + FT_MulDiv( a->xy, b->yy, val );
- yx = FT_MulDiv( a->yx, b->xx, val ) + FT_MulDiv( a->yy, b->yx, val );
- yy = FT_MulDiv( a->yx, b->xy, val ) + FT_MulDiv( a->yy, b->yy, val );
-
- b->xx = xx; b->xy = xy;
- b->yx = yx; b->yy = yy;
+ xx = ADD_LONG( FT_MulDiv( a->xx, b->xx, val ),
+ FT_MulDiv( a->xy, b->yx, val ) );
+ xy = ADD_LONG( FT_MulDiv( a->xx, b->xy, val ),
+ FT_MulDiv( a->xy, b->yy, val ) );
+ yx = ADD_LONG( FT_MulDiv( a->yx, b->xx, val ),
+ FT_MulDiv( a->yy, b->yx, val ) );
+ yy = ADD_LONG( FT_MulDiv( a->yx, b->xy, val ),
+ FT_MulDiv( a->yy, b->yy, val ) );
+
+ b->xx = xx;
+ b->xy = xy;
+ b->yx = yx;
+ b->yy = yy;
}
@@ -747,11 +760,10 @@
if ( !vector || !matrix )
return;
- xz = FT_MulDiv( vector->x, matrix->xx, val ) +
- FT_MulDiv( vector->y, matrix->xy, val );
-
- yz = FT_MulDiv( vector->x, matrix->yx, val ) +
- FT_MulDiv( vector->y, matrix->yy, val );
+ xz = ADD_LONG( FT_MulDiv( vector->x, matrix->xx, val ),
+ FT_MulDiv( vector->y, matrix->xy, val ) );
+ yz = ADD_LONG( FT_MulDiv( vector->x, matrix->yx, val ),
+ FT_MulDiv( vector->y, matrix->yy, val ) );
vector->x = xz;
vector->y = yz;
@@ -770,12 +782,12 @@
FT_Int sx = 1, sy = 1, shift;
- FT_MOVE_SIGN( x_, sx );
- FT_MOVE_SIGN( y_, sy );
-
x = (FT_UInt32)x_;
y = (FT_UInt32)y_;
+ FT_MOVE_SIGN( x_, x, sx );
+ FT_MOVE_SIGN( y_, y, sy );
+
/* trivial cases */
if ( x == 0 )
{
@@ -913,11 +925,13 @@
FT_Int result;
- if ( (FT_ULong)FT_ABS( in_x ) + (FT_ULong)FT_ABS( out_y ) <= 131071UL &&
- (FT_ULong)FT_ABS( in_y ) + (FT_ULong)FT_ABS( out_x ) <= 131071UL )
+ /* we silently ignore overflow errors, since such large values */
+ /* lead to even more (harmless) rendering errors later on */
+ if ( ADD_LONG( FT_ABS( in_x ), FT_ABS( out_y ) ) <= 131071L &&
+ ADD_LONG( FT_ABS( in_y ), FT_ABS( out_x ) ) <= 131071L )
{
- FT_Long z1 = in_x * out_y;
- FT_Long z2 = in_y * out_x;
+ FT_Long z1 = MUL_LONG( in_x, out_y );
+ FT_Long z2 = MUL_LONG( in_y, out_x );
if ( z1 > z2 )
diff --git a/modules/freetype2/src/base/ftcid.c b/modules/freetype2/src/base/ftcid.c
index 251bbd009..f5184649b 100644
--- a/modules/freetype2/src/base/ftcid.c
+++ b/modules/freetype2/src/base/ftcid.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing CID font information. */
/* */
-/* Copyright 2007-2016 by */
+/* Copyright 2007-2018 by */
/* Derek Clegg and Michael Toftdal. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftdbgmem.c b/modules/freetype2/src/base/ftdbgmem.c
index fcdceefd6..c33d8acb4 100644
--- a/modules/freetype2/src/base/ftdbgmem.c
+++ b/modules/freetype2/src/base/ftdbgmem.c
@@ -4,7 +4,7 @@
/* */
/* Memory debugger (body). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -826,7 +826,7 @@
FT_Int result = 0;
- if ( getenv( "FT2_DEBUG_MEMORY" ) )
+ if ( ft_getenv( "FT2_DEBUG_MEMORY" ) )
{
table = ft_mem_table_new( memory );
if ( table )
@@ -839,7 +839,7 @@
memory->realloc = ft_mem_debug_realloc;
memory->free = ft_mem_debug_free;
- p = getenv( "FT2_ALLOC_TOTAL_MAX" );
+ p = ft_getenv( "FT2_ALLOC_TOTAL_MAX" );
if ( p )
{
FT_Long total_max = ft_strtol( p, NULL, 10 );
@@ -852,7 +852,7 @@
}
}
- p = getenv( "FT2_ALLOC_COUNT_MAX" );
+ p = ft_getenv( "FT2_ALLOC_COUNT_MAX" );
if ( p )
{
FT_Long total_count = ft_strtol( p, NULL, 10 );
@@ -865,7 +865,7 @@
}
}
- p = getenv( "FT2_KEEP_ALIVE" );
+ p = ft_getenv( "FT2_KEEP_ALIVE" );
if ( p )
{
FT_Long keep_alive = ft_strtol( p, NULL, 10 );
diff --git a/modules/freetype2/src/base/ftdebug.c b/modules/freetype2/src/base/ftdebug.c
index 40925d14a..fe2630910 100644
--- a/modules/freetype2/src/base/ftdebug.c
+++ b/modules/freetype2/src/base/ftdebug.c
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -161,7 +161,7 @@
FT_BASE_DEF( void )
ft_debug_init( void )
{
- const char* ft2_debug = getenv( "FT2_DEBUG" );
+ const char* ft2_debug = ft_getenv( "FT2_DEBUG" );
if ( ft2_debug )
diff --git a/modules/freetype2/src/base/ftfntfmt.c b/modules/freetype2/src/base/ftfntfmt.c
index c6eb3190c..a2900ceb0 100644
--- a/modules/freetype2/src/base/ftfntfmt.c
+++ b/modules/freetype2/src/base/ftfntfmt.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility file for font formats (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftfstype.c b/modules/freetype2/src/base/ftfstype.c
index ae56c8fc8..e6cdf6e2e 100644
--- a/modules/freetype2/src/base/ftfstype.c
+++ b/modules/freetype2/src/base/ftfstype.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility file to access FSType data (body). */
/* */
-/* Copyright 2008-2016 by */
+/* Copyright 2008-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftgasp.c b/modules/freetype2/src/base/ftgasp.c
index e38e55b6c..4f80bba63 100644
--- a/modules/freetype2/src/base/ftgasp.c
+++ b/modules/freetype2/src/base/ftgasp.c
@@ -4,7 +4,7 @@
/* */
/* Access of TrueType's `gasp' table (body). */
/* */
-/* Copyright 2007-2016 by */
+/* Copyright 2007-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftgloadr.c b/modules/freetype2/src/base/ftgloadr.c
index c4f0ff70f..47202496b 100644
--- a/modules/freetype2/src/base/ftgloadr.c
+++ b/modules/freetype2/src/base/ftgloadr.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph loader (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftglyph.c b/modules/freetype2/src/base/ftglyph.c
index d336b1c12..6759aa25d 100644
--- a/modules/freetype2/src/base/ftglyph.c
+++ b/modules/freetype2/src/base/ftglyph.c
@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -408,12 +408,28 @@
goto Exit;
/* copy advance while converting 26.6 to 16.16 format */
+ if ( slot->advance.x >= 0x8000L * 64 ||
+ slot->advance.x <= -0x8000L * 64 )
+ {
+ FT_ERROR(( "FT_Get_Glyph: advance width too large\n" ));
+ error = FT_THROW( Invalid_Argument );
+ goto Exit2;
+ }
+ if ( slot->advance.y >= 0x8000L * 64 ||
+ slot->advance.y <= -0x8000L * 64 )
+ {
+ FT_ERROR(( "FT_Get_Glyph: advance height too large\n" ));
+ error = FT_THROW( Invalid_Argument );
+ goto Exit2;
+ }
+
glyph->advance.x = slot->advance.x * 1024;
glyph->advance.y = slot->advance.y * 1024;
/* now import the image from the glyph slot */
error = clazz->glyph_init( glyph, slot );
+ Exit2:
/* if an error occurred, destroy the glyph */
if ( error )
FT_Done_Glyph( glyph );
diff --git a/modules/freetype2/src/base/ftgxval.c b/modules/freetype2/src/base/ftgxval.c
index 6667b371a..19e2d6acb 100644
--- a/modules/freetype2/src/base/ftgxval.c
+++ b/modules/freetype2/src/base/ftgxval.c
@@ -2,9 +2,9 @@
/* */
/* ftgxval.c */
/* */
-/* FreeType API for validating TrueTyepGX/AAT tables (body). */
+/* FreeType API for validating TrueTypeGX/AAT tables (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* Masatake YAMATO, Redhat K.K, */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/base/ftinit.c b/modules/freetype2/src/base/ftinit.c
index 02ef938d5..1fa472109 100644
--- a/modules/freetype2/src/base/ftinit.c
+++ b/modules/freetype2/src/base/ftinit.c
@@ -4,7 +4,7 @@
/* */
/* FreeType initialization layer (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -230,31 +230,10 @@
#define MAX_LENGTH 128
- /*
- * Set default properties derived from the `FREETYPE_PROPERTIES'
- * environment variable.
- *
- * `FREETYPE_PROPERTIES' has the following syntax form (broken here into
- * multiple lines for better readability)
- *
- * <optional whitespace>
- * <module-name1> ':'
- * <property-name1> '=' <property-value1>
- * <whitespace>
- * <module-name2> ':'
- * <property-name2> '=' <property-value2>
- * ...
- *
- * Example:
- *
- * FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
- * cff:no-stem-darkening=1 \
- * autofitter:warping=1
- *
- */
-
- static void
- ft_set_default_properties( FT_Library library )
+ /* documentation is in ftmodapi.h */
+
+ FT_EXPORT_DEF( void )
+ FT_Set_Default_Properties( FT_Library library )
{
const char* env;
const char* p;
@@ -326,8 +305,8 @@
#else
- static void
- ft_set_default_properties( FT_Library library )
+ FT_EXPORT_DEF( void )
+ FT_Set_Default_Properties( FT_Library library )
{
FT_UNUSED( library );
}
@@ -365,7 +344,7 @@
else
FT_Add_Default_Modules( *alibrary );
- ft_set_default_properties( *alibrary );
+ FT_Set_Default_Properties( *alibrary );
return error;
}
diff --git a/modules/freetype2/src/base/ftlcdfil.c b/modules/freetype2/src/base/ftlcdfil.c
index 8bcbed7aa..8d314df08 100644
--- a/modules/freetype2/src/base/ftlcdfil.c
+++ b/modules/freetype2/src/base/ftlcdfil.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for color filtering of subpixel bitmap glyphs (body). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,142 +29,140 @@
/* define USE_LEGACY to implement the legacy filter */
#define USE_LEGACY
- /* FIR filter used by the default and light filters */
- static void
- _ft_lcd_filter_fir( FT_Bitmap* bitmap,
- FT_Render_Mode mode,
- FT_Library library )
+#define FT_SHIFTCLAMP( x ) ( x >>= 8, (FT_Byte)( x > 255 ? 255 : x ) )
+
+
+ /* add padding according to filter weights */
+ FT_BASE_DEF (void)
+ ft_lcd_padding( FT_Pos* Min,
+ FT_Pos* Max,
+ FT_GlyphSlot slot )
{
- FT_Byte* weights = library->lcd_weights;
- FT_UInt width = (FT_UInt)bitmap->width;
- FT_UInt height = (FT_UInt)bitmap->rows;
+ FT_Byte* lcd_weights;
+ FT_Bitmap_LcdFilterFunc lcd_filter_func;
- /* horizontal in-place FIR filter */
- if ( mode == FT_RENDER_MODE_LCD && width >= 4 )
+ /* Per-face LCD filtering takes priority if set up. */
+ if ( slot->face && slot->face->internal->lcd_filter_func )
+ {
+ lcd_weights = slot->face->internal->lcd_weights;
+ lcd_filter_func = slot->face->internal->lcd_filter_func;
+ }
+ else
{
- FT_Byte* line = bitmap->buffer;
+ lcd_weights = slot->library->lcd_weights;
+ lcd_filter_func = slot->library->lcd_filter_func;
+ }
+ if ( lcd_filter_func == ft_lcd_filter_fir )
+ {
+ *Min -= lcd_weights[0] ? 43 :
+ lcd_weights[1] ? 22 : 0;
+ *Max += lcd_weights[4] ? 43 :
+ lcd_weights[3] ? 22 : 0;
+ }
+ }
- /* take care of bitmap flow */
- if ( bitmap->pitch < 0 )
- line -= bitmap->pitch * (FT_Int)( bitmap->rows - 1 );
- /* `fir' and `pix' must be at least 32 bit wide, since the sum of */
- /* the values in `weights' can exceed 0xFF */
+ /* FIR filter used by the default and light filters */
+ FT_BASE_DEF( void )
+ ft_lcd_filter_fir( FT_Bitmap* bitmap,
+ FT_Render_Mode mode,
+ FT_LcdFiveTapFilter weights )
+ {
+ FT_UInt width = (FT_UInt)bitmap->width;
+ FT_UInt height = (FT_UInt)bitmap->rows;
+ FT_Int pitch = bitmap->pitch;
+ FT_Byte* origin = bitmap->buffer;
- for ( ; height > 0; height--, line += bitmap->pitch )
- {
- FT_UInt fir[4]; /* below, `pix' is used as the 5th element */
- FT_UInt val1, xx;
+ /* take care of bitmap flow */
+ if ( pitch > 0 && height > 0 )
+ origin += pitch * (FT_Int)( height - 1 );
- val1 = line[0];
- fir[0] = weights[2] * val1;
- fir[1] = weights[3] * val1;
- fir[2] = weights[4] * val1;
- fir[3] = 0;
+ /* horizontal in-place FIR filter */
+ if ( mode == FT_RENDER_MODE_LCD && width >= 2 )
+ {
+ FT_Byte* line = origin;
- val1 = line[1];
- fir[0] += weights[1] * val1;
- fir[1] += weights[2] * val1;
- fir[2] += weights[3] * val1;
- fir[3] += weights[4] * val1;
- for ( xx = 2; xx < width; xx++ )
- {
- FT_UInt val, pix;
+ /* `fir' must be at least 32 bit wide, since the sum of */
+ /* the values in `weights' can exceed 0xFF */
+ for ( ; height > 0; height--, line -= pitch )
+ {
+ FT_UInt fir[5];
+ FT_UInt val, xx;
- val = line[xx];
- pix = fir[0] + weights[0] * val;
- fir[0] = fir[1] + weights[1] * val;
- fir[1] = fir[2] + weights[2] * val;
- fir[2] = fir[3] + weights[3] * val;
- fir[3] = weights[4] * val;
-
- pix >>= 8;
- pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
- line[xx - 2] = (FT_Byte)pix;
- }
- {
- FT_UInt pix;
+ val = line[0];
+ fir[2] = weights[2] * val;
+ fir[3] = weights[3] * val;
+ fir[4] = weights[4] * val;
+ val = line[1];
+ fir[1] = fir[2] + weights[1] * val;
+ fir[2] = fir[3] + weights[2] * val;
+ fir[3] = fir[4] + weights[3] * val;
+ fir[4] = weights[4] * val;
- pix = fir[0] >> 8;
- pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
- line[xx - 2] = (FT_Byte)pix;
+ for ( xx = 2; xx < width; xx++ )
+ {
+ val = line[xx];
+ fir[0] = fir[1] + weights[0] * val;
+ fir[1] = fir[2] + weights[1] * val;
+ fir[2] = fir[3] + weights[2] * val;
+ fir[3] = fir[4] + weights[3] * val;
+ fir[4] = weights[4] * val;
- pix = fir[1] >> 8;
- pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
- line[xx - 1] = (FT_Byte)pix;
+ line[xx - 2] = FT_SHIFTCLAMP( fir[0] );
}
+
+ line[xx - 2] = FT_SHIFTCLAMP( fir[1] );
+ line[xx - 1] = FT_SHIFTCLAMP( fir[2] );
}
}
/* vertical in-place FIR filter */
- else if ( mode == FT_RENDER_MODE_LCD_V && height >= 4 )
+ else if ( mode == FT_RENDER_MODE_LCD_V && height >= 2 )
{
- FT_Byte* column = bitmap->buffer;
- FT_Int pitch = bitmap->pitch;
+ FT_Byte* column = origin;
- /* take care of bitmap flow */
- if ( bitmap->pitch < 0 )
- column -= bitmap->pitch * (FT_Int)( bitmap->rows - 1 );
-
for ( ; width > 0; width--, column++ )
{
FT_Byte* col = column;
- FT_UInt fir[4]; /* below, `pix' is used as the 5th element */
- FT_UInt val1, yy;
+ FT_UInt fir[5];
+ FT_UInt val, yy;
- val1 = col[0];
- fir[0] = weights[2] * val1;
- fir[1] = weights[3] * val1;
- fir[2] = weights[4] * val1;
- fir[3] = 0;
- col += pitch;
+ val = col[0];
+ fir[2] = weights[2] * val;
+ fir[3] = weights[3] * val;
+ fir[4] = weights[4] * val;
+ col -= pitch;
- val1 = col[0];
- fir[0] += weights[1] * val1;
- fir[1] += weights[2] * val1;
- fir[2] += weights[3] * val1;
- fir[3] += weights[4] * val1;
- col += pitch;
+ val = col[0];
+ fir[1] = fir[2] + weights[1] * val;
+ fir[2] = fir[3] + weights[2] * val;
+ fir[3] = fir[4] + weights[3] * val;
+ fir[4] = weights[4] * val;
+ col -= pitch;
- for ( yy = 2; yy < height; yy++ )
+ for ( yy = 2; yy < height; yy++, col -= pitch )
{
- FT_UInt val, pix;
-
-
val = col[0];
- pix = fir[0] + weights[0] * val;
- fir[0] = fir[1] + weights[1] * val;
- fir[1] = fir[2] + weights[2] * val;
- fir[2] = fir[3] + weights[3] * val;
- fir[3] = weights[4] * val;
-
- pix >>= 8;
- pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
- col[-2 * pitch] = (FT_Byte)pix;
- col += pitch;
- }
-
- {
- FT_UInt pix;
+ fir[0] = fir[1] + weights[0] * val;
+ fir[1] = fir[2] + weights[1] * val;
+ fir[2] = fir[3] + weights[2] * val;
+ fir[3] = fir[4] + weights[3] * val;
+ fir[4] = weights[4] * val;
-
- pix = fir[0] >> 8;
- pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
- col[-2 * pitch] = (FT_Byte)pix;
-
- pix = fir[1] >> 8;
- pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
- col[-pitch] = (FT_Byte)pix;
+ col[pitch * 2] = FT_SHIFTCLAMP( fir[0] );
}
+
+ col[pitch * 2] = FT_SHIFTCLAMP( fir[1] );
+ col[pitch] = FT_SHIFTCLAMP( fir[2] );
}
}
}
@@ -176,11 +174,12 @@
static void
_ft_lcd_filter_legacy( FT_Bitmap* bitmap,
FT_Render_Mode mode,
- FT_Library library )
+ FT_Byte* weights )
{
- FT_UInt width = (FT_UInt)bitmap->width;
- FT_UInt height = (FT_UInt)bitmap->rows;
- FT_Int pitch = bitmap->pitch;
+ FT_UInt width = (FT_UInt)bitmap->width;
+ FT_UInt height = (FT_UInt)bitmap->rows;
+ FT_Int pitch = bitmap->pitch;
+ FT_Byte* origin = bitmap->buffer;
static const unsigned int filters[3][3] =
{
@@ -189,36 +188,34 @@
{ 65538 * 1/13, 65538 * 1/6, 65538 * 9/13 }
};
- FT_UNUSED( library );
+ FT_UNUSED( weights );
+
+ /* take care of bitmap flow */
+ if ( pitch > 0 && height > 0 )
+ origin += pitch * (FT_Int)( height - 1 );
/* horizontal in-place intra-pixel filter */
if ( mode == FT_RENDER_MODE_LCD && width >= 3 )
{
- FT_Byte* line = bitmap->buffer;
+ FT_Byte* line = origin;
- /* take care of bitmap flow */
- if ( bitmap->pitch < 0 )
- line -= bitmap->pitch * (FT_Int)( bitmap->rows - 1 );
-
- for ( ; height > 0; height--, line += pitch )
+ for ( ; height > 0; height--, line -= pitch )
{
FT_UInt xx;
for ( xx = 0; xx < width; xx += 3 )
{
- FT_UInt r = 0;
- FT_UInt g = 0;
- FT_UInt b = 0;
+ FT_UInt r, g, b;
FT_UInt p;
p = line[xx];
- r += filters[0][0] * p;
- g += filters[0][1] * p;
- b += filters[0][2] * p;
+ r = filters[0][0] * p;
+ g = filters[0][1] * p;
+ b = filters[0][2] * p;
p = line[xx + 1];
r += filters[1][0] * p;
@@ -238,31 +235,24 @@
}
else if ( mode == FT_RENDER_MODE_LCD_V && height >= 3 )
{
- FT_Byte* column = bitmap->buffer;
-
+ FT_Byte* column = origin;
- /* take care of bitmap flow */
- if ( bitmap->pitch < 0 )
- column -= bitmap->pitch * (FT_Int)( bitmap->rows - 1 );
for ( ; width > 0; width--, column++ )
{
- FT_Byte* col = column;
- FT_Byte* col_end = col + (FT_Int)height * pitch;
+ FT_Byte* col = column - 2 * pitch;
- for ( ; col < col_end; col += 3 * pitch )
+ for ( ; height > 0; height -= 3, col -= 3 * pitch )
{
- FT_UInt r = 0;
- FT_UInt g = 0;
- FT_UInt b = 0;
+ FT_UInt r, g, b;
FT_UInt p;
p = col[0];
- r += filters[0][0] * p;
- g += filters[0][1] * p;
- b += filters[0][2] * p;
+ r = filters[0][0] * p;
+ g = filters[0][1] * p;
+ b = filters[0][2] * p;
p = col[pitch];
r += filters[1][0] * p;
@@ -276,7 +266,7 @@
col[0] = (FT_Byte)( r / 65536 );
col[pitch] = (FT_Byte)( g / 65536 );
- col[2 * pitch] = (FT_Byte)( b / 65536 );
+ col[pitch * 2] = (FT_Byte)( b / 65536 );
}
}
}
@@ -295,9 +285,8 @@
if ( !weights )
return FT_THROW( Invalid_Argument );
- ft_memcpy( library->lcd_weights, weights, 5 );
- library->lcd_filter_func = _ft_lcd_filter_fir;
- library->lcd_extra = 2;
+ ft_memcpy( library->lcd_weights, weights, FT_LCD_FILTER_FIVE_TAPS );
+ library->lcd_filter_func = ft_lcd_filter_fir;
return FT_Err_Ok;
}
@@ -307,10 +296,10 @@
FT_Library_SetLcdFilter( FT_Library library,
FT_LcdFilter filter )
{
- static const FT_Byte default_filter[5] =
- { 0x08, 0x4d, 0x56, 0x4d, 0x08 };
- static const FT_Byte light_filter[5] =
- { 0x00, 0x55, 0x56, 0x55, 0x00 };
+ static const FT_LcdFiveTapFilter default_weights =
+ { 0x08, 0x4d, 0x56, 0x4d, 0x08 };
+ static const FT_LcdFiveTapFilter light_weights =
+ { 0x00, 0x55, 0x56, 0x55, 0x00 };
if ( !library )
@@ -320,19 +309,20 @@
{
case FT_LCD_FILTER_NONE:
library->lcd_filter_func = NULL;
- library->lcd_extra = 0;
break;
case FT_LCD_FILTER_DEFAULT:
- ft_memcpy( library->lcd_weights, default_filter, 5 );
- library->lcd_filter_func = _ft_lcd_filter_fir;
- library->lcd_extra = 2;
+ ft_memcpy( library->lcd_weights,
+ default_weights,
+ FT_LCD_FILTER_FIVE_TAPS );
+ library->lcd_filter_func = ft_lcd_filter_fir;
break;
case FT_LCD_FILTER_LIGHT:
- ft_memcpy( library->lcd_weights, light_filter, 5 );
- library->lcd_filter_func = _ft_lcd_filter_fir;
- library->lcd_extra = 2;
+ ft_memcpy( library->lcd_weights,
+ light_weights,
+ FT_LCD_FILTER_FIVE_TAPS );
+ library->lcd_filter_func = ft_lcd_filter_fir;
break;
#ifdef USE_LEGACY
@@ -340,7 +330,6 @@
case FT_LCD_FILTER_LEGACY:
case FT_LCD_FILTER_LEGACY1:
library->lcd_filter_func = _ft_lcd_filter_legacy;
- library->lcd_extra = 0;
break;
#endif
@@ -349,13 +338,24 @@
return FT_THROW( Invalid_Argument );
}
- library->lcd_filter = filter;
-
return FT_Err_Ok;
}
#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+ /* add padding according to accommodate outline shifts */
+ FT_BASE_DEF (void)
+ ft_lcd_padding( FT_Pos* Min,
+ FT_Pos* Max,
+ FT_GlyphSlot slot )
+ {
+ FT_UNUSED( slot );
+
+ *Min -= 21;
+ *Max += 21;
+ }
+
+
FT_EXPORT_DEF( FT_Error )
FT_Library_SetLcdFilterWeights( FT_Library library,
unsigned char *weights )
diff --git a/modules/freetype2/src/base/ftmac.c b/modules/freetype2/src/base/ftmac.c
index f0edc94ea..fd4c0cc27 100644
--- a/modules/freetype2/src/base/ftmac.c
+++ b/modules/freetype2/src/base/ftmac.c
@@ -8,7 +8,7 @@
/* This file is for Mac OS X only; see builds/mac/ftoldmac.c for */
/* classic platforms built by MPW. */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -71,6 +71,9 @@
#include FT_INTERNAL_STREAM_H
#include "ftbase.h"
+
+#ifdef FT_MACINTOSH
+
/* This is for Mac OS X. Without redefinition, OS_INLINE */
/* expands to `static inline' which doesn't survive the */
/* -ansi compilation flag of GCC. */
@@ -118,8 +121,6 @@
#endif
-#ifdef FT_MACINTOSH
-
/* This function is deprecated because FSSpec is deprecated in Mac OS X */
FT_EXPORT_DEF( FT_Error )
FT_GetFile_From_Mac_Name( const char* fontName,
@@ -1004,7 +1005,7 @@
/* accepts an FSRef instead of a path. */
/* */
/* This function is deprecated because Carbon data types (FSRef) */
- /* are not cross-platform, and thus not suitable for the freetype API. */
+ /* are not cross-platform, and thus not suitable for the FreeType API. */
FT_EXPORT_DEF( FT_Error )
FT_New_Face_From_FSRef( FT_Library library,
const FSRef* ref,
@@ -1076,7 +1077,12 @@
#endif
}
-#endif /* FT_MACINTOSH */
+#else /* !FT_MACINTOSH */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _ft_mac_dummy;
+
+#endif /* !FT_MACINTOSH */
/* END */
diff --git a/modules/freetype2/src/base/ftmm.c b/modules/freetype2/src/base/ftmm.c
index 1b724ace6..800441bca 100644
--- a/modules/freetype2/src/base/ftmm.c
+++ b/modules/freetype2/src/base/ftmm.c
@@ -4,7 +4,7 @@
/* */
/* Multiple Master font support (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,7 @@
#include FT_MULTIPLE_MASTERS_H
#include FT_INTERNAL_OBJECTS_H
#include FT_SERVICE_MULTIPLE_MASTERS_H
+#include FT_SERVICE_METRICS_VARIATIONS_H
/*************************************************************************/
@@ -62,6 +63,34 @@
}
+ static FT_Error
+ ft_face_get_mvar_service( FT_Face face,
+ FT_Service_MetricsVariations *aservice )
+ {
+ FT_Error error;
+
+
+ *aservice = NULL;
+
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
+
+ error = FT_ERR( Invalid_Argument );
+
+ if ( FT_HAS_MULTIPLE_MASTERS( face ) )
+ {
+ FT_FACE_LOOKUP_SERVICE( face,
+ *aservice,
+ METRICS_VARIATIONS );
+
+ if ( *aservice )
+ error = FT_Err_Ok;
+ }
+
+ return error;
+ }
+
+
/* documentation is in ftmm.h */
FT_EXPORT_DEF( FT_Error )
@@ -119,6 +148,25 @@
/* documentation is in ftmm.h */
FT_EXPORT_DEF( FT_Error )
+ FT_Done_MM_Var( FT_Library library,
+ FT_MM_Var* amaster )
+ {
+ FT_Memory memory;
+
+
+ if ( !library )
+ return FT_THROW( Invalid_Library_Handle );
+
+ memory = library->memory;
+ FT_FREE( amaster );
+
+ return FT_Err_Ok;
+ }
+
+
+ /* documentation is in ftmm.h */
+
+ FT_EXPORT_DEF( FT_Error )
FT_Set_MM_Design_Coordinates( FT_Face face,
FT_UInt num_coords,
FT_Long* coords )
@@ -129,7 +177,7 @@
/* check of `face' delayed to `ft_face_get_mm_service' */
- if ( !coords )
+ if ( num_coords && !coords )
return FT_THROW( Invalid_Argument );
error = ft_face_get_mm_service( face, &service );
@@ -158,21 +206,34 @@
FT_UInt num_coords,
FT_Fixed* coords )
{
- FT_Error error;
- FT_Service_MultiMasters service;
+ FT_Error error;
+ FT_Service_MultiMasters service_mm = NULL;
+ FT_Service_MetricsVariations service_mvar = NULL;
/* check of `face' delayed to `ft_face_get_mm_service' */
- if ( !coords )
+ if ( num_coords && !coords )
return FT_THROW( Invalid_Argument );
- error = ft_face_get_mm_service( face, &service );
+ error = ft_face_get_mm_service( face, &service_mm );
if ( !error )
{
error = FT_ERR( Invalid_Argument );
- if ( service->set_var_design )
- error = service->set_var_design( face, num_coords, coords );
+ if ( service_mm->set_var_design )
+ error = service_mm->set_var_design( face, num_coords, coords );
+
+ /* internal error code -1 means `no change'; we can exit immediately */
+ if ( error == -1 )
+ return FT_Err_Ok;
+ }
+
+ if ( !error )
+ {
+ (void)ft_face_get_mvar_service( face, &service_mvar );
+
+ if ( service_mvar && service_mvar->metrics_adjust )
+ service_mvar->metrics_adjust( face );
}
/* enforce recomputation of auto-hinting data */
@@ -221,21 +282,34 @@
FT_UInt num_coords,
FT_Fixed* coords )
{
- FT_Error error;
- FT_Service_MultiMasters service;
+ FT_Error error;
+ FT_Service_MultiMasters service_mm = NULL;
+ FT_Service_MetricsVariations service_mvar = NULL;
/* check of `face' delayed to `ft_face_get_mm_service' */
- if ( !coords )
+ if ( num_coords && !coords )
return FT_THROW( Invalid_Argument );
- error = ft_face_get_mm_service( face, &service );
+ error = ft_face_get_mm_service( face, &service_mm );
if ( !error )
{
error = FT_ERR( Invalid_Argument );
- if ( service->set_mm_blend )
- error = service->set_mm_blend( face, num_coords, coords );
+ if ( service_mm->set_mm_blend )
+ error = service_mm->set_mm_blend( face, num_coords, coords );
+
+ /* internal error code -1 means `no change'; we can exit immediately */
+ if ( error == -1 )
+ return FT_Err_Ok;
+ }
+
+ if ( !error )
+ {
+ (void)ft_face_get_mvar_service( face, &service_mvar );
+
+ if ( service_mvar && service_mvar->metrics_adjust )
+ service_mvar->metrics_adjust( face );
}
/* enforce recomputation of auto-hinting data */
@@ -259,21 +333,34 @@
FT_UInt num_coords,
FT_Fixed* coords )
{
- FT_Error error;
- FT_Service_MultiMasters service;
+ FT_Error error;
+ FT_Service_MultiMasters service_mm = NULL;
+ FT_Service_MetricsVariations service_mvar = NULL;
/* check of `face' delayed to `ft_face_get_mm_service' */
- if ( !coords )
+ if ( num_coords && !coords )
return FT_THROW( Invalid_Argument );
- error = ft_face_get_mm_service( face, &service );
+ error = ft_face_get_mm_service( face, &service_mm );
if ( !error )
{
error = FT_ERR( Invalid_Argument );
- if ( service->set_mm_blend )
- error = service->set_mm_blend( face, num_coords, coords );
+ if ( service_mm->set_mm_blend )
+ error = service_mm->set_mm_blend( face, num_coords, coords );
+
+ /* internal error code -1 means `no change'; we can exit immediately */
+ if ( error == -1 )
+ return FT_Err_Ok;
+ }
+
+ if ( !error )
+ {
+ (void)ft_face_get_mvar_service( face, &service_mvar );
+
+ if ( service_mvar && service_mvar->metrics_adjust )
+ service_mvar->metrics_adjust( face );
}
/* enforce recomputation of auto-hinting data */
@@ -346,4 +433,76 @@
}
+ /* documentation is in ftmm.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Get_Var_Axis_Flags( FT_MM_Var* master,
+ FT_UInt axis_index,
+ FT_UInt* flags )
+ {
+ FT_UShort* axis_flags;
+
+
+ if ( !master || !flags )
+ return FT_THROW( Invalid_Argument );
+
+ if ( axis_index >= master->num_axis )
+ return FT_THROW( Invalid_Argument );
+
+ /* the axis flags array immediately follows the data of `master' */
+ axis_flags = (FT_UShort*)&( master[1] );
+ *flags = axis_flags[axis_index];
+
+ return FT_Err_Ok;
+ }
+
+
+ /* documentation is in ftmm.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Set_Named_Instance( FT_Face face,
+ FT_UInt instance_index )
+ {
+ FT_Error error;
+
+ FT_Service_MultiMasters service_mm = NULL;
+ FT_Service_MetricsVariations service_mvar = NULL;
+
+
+ /* check of `face' delayed to `ft_face_get_mm_service' */
+
+ error = ft_face_get_mm_service( face, &service_mm );
+ if ( !error )
+ {
+ error = FT_ERR( Invalid_Argument );
+ if ( service_mm->set_instance )
+ error = service_mm->set_instance( face, instance_index );
+ }
+
+ if ( !error )
+ {
+ (void)ft_face_get_mvar_service( face, &service_mvar );
+
+ if ( service_mvar && service_mvar->metrics_adjust )
+ service_mvar->metrics_adjust( face );
+ }
+
+ /* enforce recomputation of auto-hinting data */
+ if ( !error && face->autohint.finalizer )
+ {
+ face->autohint.finalizer( face->autohint.data );
+ face->autohint.data = NULL;
+ }
+
+ if ( !error )
+ {
+ face->face_index = ( instance_index << 16 ) |
+ ( face->face_index & 0xFFFFL );
+ face->face_flags &= ~FT_FACE_FLAG_VARIATION;
+ }
+
+ return error;
+ }
+
+
/* END */
diff --git a/modules/freetype2/src/base/ftobjs.c b/modules/freetype2/src/base/ftobjs.c
index 4f2a9ecdb..8d07e35ae 100644
--- a/modules/freetype2/src/base/ftobjs.c
+++ b/modules/freetype2/src/base/ftobjs.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,12 +19,16 @@
#include <ft2build.h>
#include FT_LIST_H
#include FT_OUTLINE_H
+#include FT_FONT_FORMATS_H
+
#include FT_INTERNAL_VALIDATE_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_RFORK_H
#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_SFNT_H /* for SFNT_Load_Table_Func */
+#include FT_INTERNAL_SFNT_H /* for SFNT_Load_Table_Func */
+#include FT_INTERNAL_POSTSCRIPT_AUX_H /* for PS_Driver */
+
#include FT_TRUETYPE_TABLES_H
#include FT_TRUETYPE_TAGS_H
#include FT_TRUETYPE_IDS_H
@@ -37,6 +41,8 @@
#include FT_SERVICE_KERNING_H
#include FT_SERVICE_TRUETYPE_ENGINE_H
+#include FT_DRIVER_H
+
#ifdef FT_CONFIG_OPTION_MAC_FONTS
#include "ftbase.h"
#endif
@@ -325,6 +331,138 @@
FT_BASE_DEF( void )
+ ft_glyphslot_preset_bitmap( FT_GlyphSlot slot,
+ FT_Render_Mode mode,
+ const FT_Vector* origin )
+ {
+ FT_Outline* outline = &slot->outline;
+ FT_Bitmap* bitmap = &slot->bitmap;
+
+ FT_Pixel_Mode pixel_mode;
+
+ FT_BBox cbox;
+ FT_Pos x_shift = 0;
+ FT_Pos y_shift = 0;
+ FT_Pos x_left, y_top;
+ FT_Pos width, height, pitch;
+
+
+ if ( slot->internal && ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) )
+ return;
+
+ if ( origin )
+ {
+ x_shift = origin->x;
+ y_shift = origin->y;
+ }
+
+ /* compute the control box, and grid-fit it, */
+ /* taking into account the origin shift */
+ FT_Outline_Get_CBox( outline, &cbox );
+
+ cbox.xMin += x_shift;
+ cbox.yMin += y_shift;
+ cbox.xMax += x_shift;
+ cbox.yMax += y_shift;
+
+ switch ( mode )
+ {
+ case FT_RENDER_MODE_MONO:
+ pixel_mode = FT_PIXEL_MODE_MONO;
+#if 1
+ /* undocumented but confirmed: bbox values get rounded */
+ /* unless the rounded box can collapse for a narrow glyph */
+ if ( cbox.xMax - cbox.xMin < 64 )
+ {
+ cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
+ cbox.xMax = FT_PIX_CEIL_LONG( cbox.xMax );
+ }
+ else
+ {
+ cbox.xMin = FT_PIX_ROUND_LONG( cbox.xMin );
+ cbox.xMax = FT_PIX_ROUND_LONG( cbox.xMax );
+ }
+
+ if ( cbox.yMax - cbox.yMin < 64 )
+ {
+ cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
+ cbox.yMax = FT_PIX_CEIL_LONG( cbox.yMax );
+ }
+ else
+ {
+ cbox.yMin = FT_PIX_ROUND_LONG( cbox.yMin );
+ cbox.yMax = FT_PIX_ROUND_LONG( cbox.yMax );
+ }
+#else
+ cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
+ cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
+ cbox.xMax = FT_PIX_CEIL_LONG( cbox.xMax );
+ cbox.yMax = FT_PIX_CEIL_LONG( cbox.yMax );
+#endif
+ break;
+
+ case FT_RENDER_MODE_LCD:
+ pixel_mode = FT_PIXEL_MODE_LCD;
+ ft_lcd_padding( &cbox.xMin, &cbox.xMax, slot );
+ goto Round;
+
+ case FT_RENDER_MODE_LCD_V:
+ pixel_mode = FT_PIXEL_MODE_LCD_V;
+ ft_lcd_padding( &cbox.yMin, &cbox.yMax, slot );
+ goto Round;
+
+ case FT_RENDER_MODE_NORMAL:
+ case FT_RENDER_MODE_LIGHT:
+ default:
+ pixel_mode = FT_PIXEL_MODE_GRAY;
+ Round:
+ cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
+ cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
+ cbox.xMax = FT_PIX_CEIL_LONG( cbox.xMax );
+ cbox.yMax = FT_PIX_CEIL_LONG( cbox.yMax );
+ }
+
+ x_shift = SUB_LONG( x_shift, cbox.xMin );
+ y_shift = SUB_LONG( y_shift, cbox.yMin );
+
+ x_left = cbox.xMin >> 6;
+ y_top = cbox.yMax >> 6;
+
+ width = ( (FT_ULong)cbox.xMax - (FT_ULong)cbox.xMin ) >> 6;
+ height = ( (FT_ULong)cbox.yMax - (FT_ULong)cbox.yMin ) >> 6;
+
+ switch ( pixel_mode )
+ {
+ case FT_PIXEL_MODE_MONO:
+ pitch = ( ( width + 15 ) >> 4 ) << 1;
+ break;
+
+ case FT_PIXEL_MODE_LCD:
+ width *= 3;
+ pitch = FT_PAD_CEIL( width, 4 );
+ break;
+
+ case FT_PIXEL_MODE_LCD_V:
+ height *= 3;
+ /* fall through */
+
+ case FT_PIXEL_MODE_GRAY:
+ default:
+ pitch = width;
+ }
+
+ slot->bitmap_left = (FT_Int)x_left;
+ slot->bitmap_top = (FT_Int)y_top;
+
+ bitmap->pixel_mode = (unsigned char)pixel_mode;
+ bitmap->num_grays = 256;
+ bitmap->width = (unsigned int)width;
+ bitmap->rows = (unsigned int)height;
+ bitmap->pitch = pitch;
+ }
+
+
+ FT_BASE_DEF( void )
ft_glyphslot_set_bitmap( FT_GlyphSlot slot,
FT_Byte* buffer )
{
@@ -462,7 +600,8 @@
Exit:
- FT_TRACE4(( "FT_New_GlyphSlot: Return %d\n", error ));
+ FT_TRACE4(( "FT_New_GlyphSlot: Return 0x%x\n", error ));
+
return error;
}
@@ -575,34 +714,42 @@
if ( vertical )
{
metrics->horiBearingX = FT_PIX_FLOOR( metrics->horiBearingX );
- metrics->horiBearingY = FT_PIX_CEIL ( metrics->horiBearingY );
+ metrics->horiBearingY = FT_PIX_CEIL_LONG( metrics->horiBearingY );
- right = FT_PIX_CEIL( metrics->vertBearingX + metrics->width );
- bottom = FT_PIX_CEIL( metrics->vertBearingY + metrics->height );
+ right = FT_PIX_CEIL_LONG( ADD_LONG( metrics->vertBearingX,
+ metrics->width ) );
+ bottom = FT_PIX_CEIL_LONG( ADD_LONG( metrics->vertBearingY,
+ metrics->height ) );
metrics->vertBearingX = FT_PIX_FLOOR( metrics->vertBearingX );
metrics->vertBearingY = FT_PIX_FLOOR( metrics->vertBearingY );
- metrics->width = right - metrics->vertBearingX;
- metrics->height = bottom - metrics->vertBearingY;
+ metrics->width = SUB_LONG( right,
+ metrics->vertBearingX );
+ metrics->height = SUB_LONG( bottom,
+ metrics->vertBearingY );
}
else
{
metrics->vertBearingX = FT_PIX_FLOOR( metrics->vertBearingX );
metrics->vertBearingY = FT_PIX_FLOOR( metrics->vertBearingY );
- right = FT_PIX_CEIL ( metrics->horiBearingX + metrics->width );
- bottom = FT_PIX_FLOOR( metrics->horiBearingY - metrics->height );
+ right = FT_PIX_CEIL_LONG( ADD_LONG( metrics->horiBearingX,
+ metrics->width ) );
+ bottom = FT_PIX_FLOOR( SUB_LONG( metrics->horiBearingY,
+ metrics->height ) );
metrics->horiBearingX = FT_PIX_FLOOR( metrics->horiBearingX );
- metrics->horiBearingY = FT_PIX_CEIL ( metrics->horiBearingY );
+ metrics->horiBearingY = FT_PIX_CEIL_LONG( metrics->horiBearingY );
- metrics->width = right - metrics->horiBearingX;
- metrics->height = metrics->horiBearingY - bottom;
+ metrics->width = SUB_LONG( right,
+ metrics->horiBearingX );
+ metrics->height = SUB_LONG( metrics->horiBearingY,
+ bottom );
}
- metrics->horiAdvance = FT_PIX_ROUND( metrics->horiAdvance );
- metrics->vertAdvance = FT_PIX_ROUND( metrics->vertAdvance );
+ metrics->horiAdvance = FT_PIX_ROUND_LONG( metrics->horiAdvance );
+ metrics->vertAdvance = FT_PIX_ROUND_LONG( metrics->vertAdvance );
}
#endif /* GRID_FIT_METRICS */
@@ -657,9 +804,13 @@
* Determine whether we need to auto-hint or not.
* The general rules are:
*
- * - Do only auto-hinting if we have a hinter module, a scalable font
- * format dealing with outlines, and no transforms except simple
- * slants and/or rotations by integer multiples of 90 degrees.
+ * - Do only auto-hinting if we have
+ *
+ * - a hinter module,
+ * - a scalable font format dealing with outlines,
+ * - not a tricky font, and
+ * - no transforms except simple slants and/or rotations by
+ * integer multiples of 90 degrees.
*
* - Then, auto-hint if FT_LOAD_FORCE_AUTOHINT is set or if we don't
* have a native font hinter.
@@ -689,7 +840,14 @@
else
{
FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags );
+ FT_Bool is_light_type1;
+
+ /* only the new Adobe engine (for both CFF and Type 1) is `light'; */
+ /* we use `strstr' to catch both `Type 1' and `CID Type 1' */
+ is_light_type1 =
+ ft_strstr( FT_Get_Font_Format( face ), "Type 1" ) != NULL &&
+ ((PS_Driver)driver)->hinting_engine == FT_HINTING_ADOBE;
/* the check for `num_locations' assures that we actually */
/* test for instructions in a TTF and not in a CFF-based OTF */
@@ -698,8 +856,9 @@
/* check the size of the `fpgm' and `prep' tables, too -- */
/* the assumption is that there don't exist real TTFs where */
/* both `fpgm' and `prep' tables are missing */
- if ( ( mode == FT_RENDER_MODE_LIGHT &&
- !FT_DRIVER_HINTS_LIGHTLY( driver ) ) ||
+ if ( ( mode == FT_RENDER_MODE_LIGHT &&
+ ( !FT_DRIVER_HINTS_LIGHTLY( driver ) &&
+ !is_light_type1 ) ) ||
( FT_IS_SFNT( face ) &&
ttface->num_locations &&
ttface->max_profile.maxSizeOfInstructions == 0 &&
@@ -719,8 +878,8 @@
/* XXX: This is really a temporary hack that should disappear */
/* promptly with FreeType 2.1! */
/* */
- if ( FT_HAS_FIXED_SIZES( face ) &&
- ( load_flags & FT_LOAD_NO_BITMAP ) == 0 )
+ if ( FT_HAS_FIXED_SIZES( face ) &&
+ ( load_flags & FT_LOAD_NO_BITMAP ) == 0 )
{
error = driver->clazz->load_glyph( slot, face->size,
glyph_index,
@@ -788,7 +947,7 @@
/* compute the linear advance in 16.16 pixels */
if ( ( load_flags & FT_LOAD_LINEAR_DESIGN ) == 0 &&
- ( FT_IS_SCALABLE( face ) ) )
+ FT_IS_SCALABLE( face ) )
{
FT_Size_Metrics* metrics = &face->size->metrics;
@@ -836,28 +995,37 @@
}
}
- FT_TRACE5(( " x advance: %d\n" , slot->advance.x ));
- FT_TRACE5(( " y advance: %d\n" , slot->advance.y ));
-
- FT_TRACE5(( " linear x advance: %d\n" , slot->linearHoriAdvance ));
- FT_TRACE5(( " linear y advance: %d\n" , slot->linearVertAdvance ));
-
- /* do we need to render the image now? */
+ /* do we need to render the image or preset the bitmap now? */
if ( !error &&
+ ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
slot->format != FT_GLYPH_FORMAT_BITMAP &&
- slot->format != FT_GLYPH_FORMAT_COMPOSITE &&
- load_flags & FT_LOAD_RENDER )
+ slot->format != FT_GLYPH_FORMAT_COMPOSITE )
{
FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags );
- if ( mode == FT_RENDER_MODE_NORMAL &&
- (load_flags & FT_LOAD_MONOCHROME ) )
+ if ( mode == FT_RENDER_MODE_NORMAL &&
+ load_flags & FT_LOAD_MONOCHROME )
mode = FT_RENDER_MODE_MONO;
- error = FT_Render_Glyph( slot, mode );
+ if ( load_flags & FT_LOAD_RENDER )
+ error = FT_Render_Glyph( slot, mode );
+ else
+ ft_glyphslot_preset_bitmap( slot, mode, NULL );
}
+ FT_TRACE5(( "FT_Load_Glyph: index %d, flags %x\n",
+ glyph_index, load_flags ));
+ FT_TRACE5(( " x advance: %f\n", slot->advance.x / 64.0 ));
+ FT_TRACE5(( " y advance: %f\n", slot->advance.y / 64.0 ));
+ FT_TRACE5(( " linear x advance: %f\n",
+ slot->linearHoriAdvance / 65536.0 ));
+ FT_TRACE5(( " linear y advance: %f\n",
+ slot->linearVertAdvance / 65536.0 ));
+ FT_TRACE5(( " bitmap %dx%d, mode %d\n",
+ slot->bitmap.width, slot->bitmap.rows,
+ slot->bitmap.pixel_mode ));
+
Exit:
return error;
}
@@ -1185,6 +1353,8 @@
}
#endif
+ face->internal->random_seed = -1;
+
if ( clazz->init_face )
error = clazz->init_face( *astream,
face,
@@ -2031,13 +2201,15 @@
{
FT_TRACE3(( "Skip rule %d: darwin vfs resource fork"
" is already checked and"
- " no font is found\n", i ));
+ " no font is found\n",
+ i ));
continue;
}
if ( errors[i] )
{
- FT_TRACE3(( "Error[%d] has occurred in rule %d\n", errors[i], i ));
+ FT_TRACE3(( "Error 0x%x has occurred in rule %d\n",
+ errors[i], i ));
continue;
}
@@ -2396,7 +2568,7 @@
if ( bsize->height < 0 || bsize->x_ppem < 0 || bsize->y_ppem < 0 )
{
FT_TRACE0(( "FT_Open_Face:"
- " Invalid bitmap dimensions for stroke %d,"
+ " Invalid bitmap dimensions for strike %d,"
" now disabled\n", i ));
bsize->width = 0;
bsize->height = 0;
@@ -2421,6 +2593,13 @@
internal->transform_delta.y = 0;
internal->refcount = 1;
+
+ internal->no_stem_darkening = -1;
+
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ /* Per-face filtering can only be set up by FT_Face_Properties */
+ internal->lcd_filter_func = NULL;
+#endif
}
if ( aface )
@@ -2440,15 +2619,17 @@
#ifdef FT_DEBUG_LEVEL_TRACE
if ( !error && face_index < 0 )
{
- FT_TRACE3(( "FT_Open_Face: The font has %ld faces\n"
- " and %ld named instances for face %ld\n",
+ FT_TRACE3(( "FT_Open_Face: The font has %ld face%s\n"
+ " and %ld named instance%s for face %ld\n",
face->num_faces,
+ face->num_faces == 1 ? "" : "s",
face->style_flags >> 16,
+ ( face->style_flags >> 16 ) == 1 ? "" : "s",
-face_index - 1 ));
}
#endif
- FT_TRACE4(( "FT_Open_Face: Return %d\n", error ));
+ FT_TRACE4(( "FT_Open_Face: Return 0x%x\n", error ));
return error;
}
@@ -2589,6 +2770,8 @@
FT_Size size = NULL;
FT_ListNode node = NULL;
+ FT_Size_Internal internal = NULL;
+
if ( !face )
return FT_THROW( Invalid_Face_Handle );
@@ -2611,8 +2794,10 @@
size->face = face;
- /* for now, do not use any internal fields in size objects */
- size->internal = NULL;
+ if ( FT_NEW( internal ) )
+ goto Exit;
+
+ size->internal = internal;
if ( clazz->init_size )
error = clazz->init_size( size );
@@ -2836,18 +3021,6 @@
metrics->height = bsize->height << 6;
metrics->max_advance = bsize->x_ppem;
}
-
- FT_TRACE5(( "FT_Select_Metrics:\n" ));
- FT_TRACE5(( " x scale: %d (%f)\n",
- metrics->x_scale, metrics->x_scale / 65536.0 ));
- FT_TRACE5(( " y scale: %d (%f)\n",
- metrics->y_scale, metrics->y_scale / 65536.0 ));
- FT_TRACE5(( " ascender: %f\n", metrics->ascender / 64.0 ));
- FT_TRACE5(( " descender: %f\n", metrics->descender / 64.0 ));
- FT_TRACE5(( " height: %f\n", metrics->height / 64.0 ));
- FT_TRACE5(( " max advance: %f\n", metrics->max_advance / 64.0 ));
- FT_TRACE5(( " x ppem: %d\n", metrics->x_ppem ));
- FT_TRACE5(( " y ppem: %d\n", metrics->y_ppem ));
}
@@ -2956,18 +3129,6 @@
metrics->x_scale = 1L << 16;
metrics->y_scale = 1L << 16;
}
-
- FT_TRACE5(( "FT_Request_Metrics:\n" ));
- FT_TRACE5(( " x scale: %d (%f)\n",
- metrics->x_scale, metrics->x_scale / 65536.0 ));
- FT_TRACE5(( " y scale: %d (%f)\n",
- metrics->y_scale, metrics->y_scale / 65536.0 ));
- FT_TRACE5(( " ascender: %f\n", metrics->ascender / 64.0 ));
- FT_TRACE5(( " descender: %f\n", metrics->descender / 64.0 ));
- FT_TRACE5(( " height: %f\n", metrics->height / 64.0 ));
- FT_TRACE5(( " max advance: %f\n", metrics->max_advance / 64.0 ));
- FT_TRACE5(( " x ppem: %d\n", metrics->x_ppem ));
- FT_TRACE5(( " y ppem: %d\n", metrics->y_ppem ));
}
@@ -2977,6 +3138,7 @@
FT_Select_Size( FT_Face face,
FT_Int strike_index )
{
+ FT_Error error = FT_Err_Ok;
FT_Driver_Class clazz;
@@ -2990,36 +3152,37 @@
if ( clazz->select_size )
{
- FT_Error error;
+ error = clazz->select_size( face->size, (FT_ULong)strike_index );
+ FT_TRACE5(( "FT_Select_Size (%s driver):\n",
+ face->driver->root.clazz->module_name ));
+ }
+ else
+ {
+ FT_Select_Metrics( face, (FT_ULong)strike_index );
- error = clazz->select_size( face->size, (FT_ULong)strike_index );
+ FT_TRACE5(( "FT_Select_Size:\n" ));
+ }
#ifdef FT_DEBUG_LEVEL_TRACE
- {
- FT_Size_Metrics* metrics = &face->size->metrics;
-
-
- FT_TRACE5(( "FT_Select_Size (font driver's `select_size'):\n" ));
- FT_TRACE5(( " x scale: %d (%f)\n",
- metrics->x_scale, metrics->x_scale / 65536.0 ));
- FT_TRACE5(( " y scale: %d (%f)\n",
- metrics->y_scale, metrics->y_scale / 65536.0 ));
- FT_TRACE5(( " ascender: %f\n", metrics->ascender / 64.0 ));
- FT_TRACE5(( " descender: %f\n", metrics->descender / 64.0 ));
- FT_TRACE5(( " height: %f\n", metrics->height / 64.0 ));
- FT_TRACE5(( " max advance: %f\n", metrics->max_advance / 64.0 ));
- FT_TRACE5(( " x ppem: %d\n", metrics->x_ppem ));
- FT_TRACE5(( " y ppem: %d\n", metrics->y_ppem ));
- }
-#endif
+ {
+ FT_Size_Metrics* metrics = &face->size->metrics;
- return error;
- }
- FT_Select_Metrics( face, (FT_ULong)strike_index );
+ FT_TRACE5(( " x scale: %d (%f)\n",
+ metrics->x_scale, metrics->x_scale / 65536.0 ));
+ FT_TRACE5(( " y scale: %d (%f)\n",
+ metrics->y_scale, metrics->y_scale / 65536.0 ));
+ FT_TRACE5(( " ascender: %f\n", metrics->ascender / 64.0 ));
+ FT_TRACE5(( " descender: %f\n", metrics->descender / 64.0 ));
+ FT_TRACE5(( " height: %f\n", metrics->height / 64.0 ));
+ FT_TRACE5(( " max advance: %f\n", metrics->max_advance / 64.0 ));
+ FT_TRACE5(( " x ppem: %d\n", metrics->x_ppem ));
+ FT_TRACE5(( " y ppem: %d\n", metrics->y_ppem ));
+ }
+#endif
- return FT_Err_Ok;
+ return error;
}
@@ -3029,6 +3192,7 @@
FT_Request_Size( FT_Face face,
FT_Size_Request req )
{
+ FT_Error error = FT_Err_Ok;
FT_Driver_Class clazz;
FT_ULong strike_index;
@@ -3040,59 +3204,60 @@
req->type >= FT_SIZE_REQUEST_TYPE_MAX )
return FT_THROW( Invalid_Argument );
+ /* signal the auto-hinter to recompute its size metrics */
+ /* (if requested) */
+ face->size->internal->autohint_metrics.x_scale = 0;
+
clazz = face->driver->clazz;
if ( clazz->request_size )
{
- FT_Error error;
-
-
error = clazz->request_size( face->size, req );
-#ifdef FT_DEBUG_LEVEL_TRACE
- {
- FT_Size_Metrics* metrics = &face->size->metrics;
-
-
- FT_TRACE5(( "FT_Request_Size (font driver's `request_size'):\n" ));
- FT_TRACE5(( " x scale: %d (%f)\n",
- metrics->x_scale, metrics->x_scale / 65536.0 ));
- FT_TRACE5(( " y scale: %d (%f)\n",
- metrics->y_scale, metrics->y_scale / 65536.0 ));
- FT_TRACE5(( " ascender: %f\n", metrics->ascender / 64.0 ));
- FT_TRACE5(( " descender: %f\n", metrics->descender / 64.0 ));
- FT_TRACE5(( " height: %f\n", metrics->height / 64.0 ));
- FT_TRACE5(( " max advance: %f\n", metrics->max_advance / 64.0 ));
- FT_TRACE5(( " x ppem: %d\n", metrics->x_ppem ));
- FT_TRACE5(( " y ppem: %d\n", metrics->y_ppem ));
- }
-#endif
-
- return error;
+ FT_TRACE5(( "FT_Request_Size (%s driver):\n",
+ face->driver->root.clazz->module_name ));
}
-
- /*
- * The reason that a driver doesn't have `request_size' defined is
- * either that the scaling here suffices or that the supported formats
- * are bitmap-only and size matching is not implemented.
- *
- * In the latter case, a simple size matching is done.
- */
- if ( !FT_IS_SCALABLE( face ) && FT_HAS_FIXED_SIZES( face ) )
+ else if ( !FT_IS_SCALABLE( face ) && FT_HAS_FIXED_SIZES( face ) )
{
- FT_Error error;
-
-
+ /*
+ * The reason that a driver doesn't have `request_size' defined is
+ * either that the scaling here suffices or that the supported formats
+ * are bitmap-only and size matching is not implemented.
+ *
+ * In the latter case, a simple size matching is done.
+ */
error = FT_Match_Size( face, req, 0, &strike_index );
if ( error )
return error;
return FT_Select_Size( face, (FT_Int)strike_index );
}
+ else
+ {
+ FT_Request_Metrics( face, req );
+
+ FT_TRACE5(( "FT_Request_Size:\n" ));
+ }
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ FT_Size_Metrics* metrics = &face->size->metrics;
- FT_Request_Metrics( face, req );
- return FT_Err_Ok;
+ FT_TRACE5(( " x scale: %d (%f)\n",
+ metrics->x_scale, metrics->x_scale / 65536.0 ));
+ FT_TRACE5(( " y scale: %d (%f)\n",
+ metrics->y_scale, metrics->y_scale / 65536.0 ));
+ FT_TRACE5(( " ascender: %f\n", metrics->ascender / 64.0 ));
+ FT_TRACE5(( " descender: %f\n", metrics->descender / 64.0 ));
+ FT_TRACE5(( " height: %f\n", metrics->height / 64.0 ));
+ FT_TRACE5(( " max advance: %f\n", metrics->max_advance / 64.0 ));
+ FT_TRACE5(( " x ppem: %d\n", metrics->x_ppem ));
+ FT_TRACE5(( " y ppem: %d\n", metrics->y_ppem ));
+ }
+#endif
+
+ return error;
}
@@ -3586,6 +3751,85 @@
/* documentation is in freetype.h */
+ FT_EXPORT_DEF( FT_Error )
+ FT_Face_Properties( FT_Face face,
+ FT_UInt num_properties,
+ FT_Parameter* properties )
+ {
+ FT_Error error = FT_Err_Ok;
+
+
+ if ( num_properties > 0 && !properties )
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+
+ for ( ; num_properties > 0; num_properties-- )
+ {
+ if ( properties->tag == FT_PARAM_TAG_STEM_DARKENING )
+ {
+ if ( properties->data )
+ {
+ if ( *( (FT_Bool*)properties->data ) == TRUE )
+ face->internal->no_stem_darkening = FALSE;
+ else
+ face->internal->no_stem_darkening = TRUE;
+ }
+ else
+ {
+ /* use module default */
+ face->internal->no_stem_darkening = -1;
+ }
+ }
+ else if ( properties->tag == FT_PARAM_TAG_LCD_FILTER_WEIGHTS )
+ {
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ if ( properties->data )
+ {
+ ft_memcpy( face->internal->lcd_weights,
+ properties->data,
+ FT_LCD_FILTER_FIVE_TAPS );
+ face->internal->lcd_filter_func = ft_lcd_filter_fir;
+ }
+#else
+ error = FT_THROW( Unimplemented_Feature );
+ goto Exit;
+#endif
+ }
+ else if ( properties->tag == FT_PARAM_TAG_RANDOM_SEED )
+ {
+ if ( properties->data )
+ {
+ face->internal->random_seed = *( (FT_Int32*)properties->data );
+ if ( face->internal->random_seed < 0 )
+ face->internal->random_seed = 0;
+ }
+ else
+ {
+ /* use module default */
+ face->internal->random_seed = -1;
+ }
+ }
+ else
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+
+ if ( error )
+ break;
+
+ properties++;
+ }
+
+ Exit:
+ return error;
+ }
+
+
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_UInt )
FT_Face_GetCharVariantIndex( FT_Face face,
FT_ULong charcode,
@@ -3609,12 +3853,14 @@
if ( charcode > 0xFFFFFFFFUL )
{
- FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
+ FT_TRACE1(( "FT_Face_GetCharVariantIndex:"
+ " too large charcode" ));
FT_TRACE1(( " 0x%x is truncated\n", charcode ));
}
if ( variantSelector > 0xFFFFFFFFUL )
{
- FT_TRACE1(( "FT_Get_Char_Index: too large variantSelector" ));
+ FT_TRACE1(( "FT_Face_GetCharVariantIndex:"
+ " too large variantSelector" ));
FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
}
@@ -3650,12 +3896,14 @@
if ( charcode > 0xFFFFFFFFUL )
{
- FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
+ FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:"
+ " too large charcode" ));
FT_TRACE1(( " 0x%x is truncated\n", charcode ));
}
if ( variantSelector > 0xFFFFFFFFUL )
{
- FT_TRACE1(( "FT_Get_Char_Index: too large variantSelector" ));
+ FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:"
+ " too large variantSelector" ));
FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
}
@@ -3718,7 +3966,7 @@
if ( charcode > 0xFFFFFFFFUL )
{
- FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
+ FT_TRACE1(( "FT_Face_GetVariantsOfChar: too large charcode" ));
FT_TRACE1(( " 0x%x is truncated\n", charcode ));
}
@@ -4294,43 +4542,97 @@
*/
/* we use FT_TRACE3 in this block */
- if ( ft_trace_levels[trace_bitmap] >= 3 )
+ if ( !error &&
+ ft_trace_levels[trace_bitmap] >= 3 &&
+ slot->bitmap.buffer )
{
+ FT_Bitmap bitmap;
+ FT_Error err;
+
+
+ FT_Bitmap_Init( &bitmap );
+
/* we convert to a single bitmap format for computing the checksum */
- if ( !error && slot->bitmap.buffer )
+ /* this also converts the bitmap flow to `down' (i.e., pitch > 0) */
+ err = FT_Bitmap_Convert( library, &slot->bitmap, &bitmap, 1 );
+ if ( !err )
{
- FT_Bitmap bitmap;
- FT_Error err;
+ MD5_CTX ctx;
+ unsigned char md5[16];
+ unsigned long coverage = 0;
+ int i, j;
+ int rows = (int)bitmap.rows;
+ int pitch = bitmap.pitch;
+
+
+ FT_TRACE3(( "FT_Render_Glyph: bitmap %dx%d, mode %d\n",
+ rows, pitch, slot->bitmap.pixel_mode ));
+
+ for ( i = 0; i < rows; i++ )
+ for ( j = 0; j < pitch; j++ )
+ coverage += bitmap.buffer[i * pitch + j];
+
+ FT_TRACE3(( " Total coverage: %lu\n", coverage ));
+
+ MD5_Init( &ctx );
+ if ( bitmap.buffer )
+ MD5_Update( &ctx, bitmap.buffer,
+ (unsigned long)rows * (unsigned long)pitch );
+ MD5_Final( md5, &ctx );
+
+ FT_TRACE3(( " MD5 checksum: " ));
+ for ( i = 0; i < 16; i++ )
+ FT_TRACE3(( "%02X", md5[i] ));
+ FT_TRACE3(( "\n" ));
+ }
+
+ FT_Bitmap_Done( library, &bitmap );
+ }
+
+ /*
+ * Dump bitmap in Netpbm format (PBM or PGM).
+ */
+ /* we use FT_TRACE7 in this block */
+ if ( !error &&
+ ft_trace_levels[trace_bitmap] >= 7 &&
+ slot->bitmap.rows < 128U &&
+ slot->bitmap.width < 128U &&
+ slot->bitmap.buffer )
+ {
+ int rows = (int)slot->bitmap.rows;
+ int width = (int)slot->bitmap.width;
+ int pitch = slot->bitmap.pitch;
+ int i, j, m;
+ unsigned char* topleft = slot->bitmap.buffer;
- FT_Bitmap_Init( &bitmap );
+ if ( pitch < 0 )
+ topleft -= pitch * ( rows - 1 );
- /* this also converts the bitmap flow to `down' (i.e., pitch > 0) */
- err = FT_Bitmap_Convert( library, &slot->bitmap, &bitmap, 1 );
- if ( !err )
+ FT_TRACE7(( "Netpbm image: start\n" ));
+ switch ( slot->bitmap.pixel_mode )
+ {
+ case FT_PIXEL_MODE_MONO:
+ FT_TRACE7(( "P1 %d %d\n", width, rows ));
+ for ( i = 0; i < rows; i++ )
{
- MD5_CTX ctx;
- unsigned char md5[16];
- int i;
- unsigned int rows = bitmap.rows;
- unsigned int pitch = (unsigned int)bitmap.pitch;
-
-
- MD5_Init( &ctx );
- if ( bitmap.buffer )
- MD5_Update( &ctx, bitmap.buffer, rows * pitch );
- MD5_Final( md5, &ctx );
-
- FT_TRACE3(( "MD5 checksum for %dx%d bitmap:\n"
- " ",
- rows, pitch ));
- for ( i = 0; i < 16; i++ )
- FT_TRACE3(( "%02X", md5[i] ));
- FT_TRACE3(( "\n" ));
+ for ( j = 0; j < width; )
+ for ( m = 128; m > 0 && j < width; m >>= 1, j++ )
+ FT_TRACE7(( " %d", ( topleft[i * pitch + j / 8] & m ) != 0 ));
+ FT_TRACE7(( "\n" ));
}
+ break;
- FT_Bitmap_Done( library, &bitmap );
+ default:
+ FT_TRACE7(( "P2 %d %d 255\n", width, rows ));
+ for ( i = 0; i < rows; i++ )
+ {
+ for ( j = 0; j < width; j += 1 )
+ FT_TRACE7(( " %3u", topleft[i * pitch + j] ));
+ FT_TRACE7(( "\n" ));
+ }
}
+ FT_TRACE7(( "Netpbm image: end\n" ));
}
#undef FT_COMPONENT
@@ -4437,7 +4739,7 @@
if ( !clazz )
return FT_THROW( Invalid_Argument );
- /* check freetype version */
+ /* check FreeType version */
if ( clazz->module_requires > FREETYPE_VER_FIXED )
return FT_THROW( Invalid_Version );
@@ -4861,10 +5163,6 @@
goto Fail;
#endif
- /* we don't use raster_pool anymore. */
- library->raster_pool_size = 0;
- library->raster_pool = NULL;
-
library->version_major = FREETYPE_MAJOR;
library->version_minor = FREETYPE_MINOR;
library->version_patch = FREETYPE_PATCH;
@@ -4879,9 +5177,9 @@
#ifdef FT_CONFIG_OPTION_PIC
Fail:
ft_pic_container_destroy( library );
-#endif
FT_FREE( library );
return error;
+#endif
}
diff --git a/modules/freetype2/src/base/ftotval.c b/modules/freetype2/src/base/ftotval.c
index fe54e0228..a2944a795 100644
--- a/modules/freetype2/src/base/ftotval.c
+++ b/modules/freetype2/src/base/ftotval.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating OpenType tables (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftoutln.c b/modules/freetype2/src/base/ftoutln.c
index fc28225c6..cb91321de 100644
--- a/modules/freetype2/src/base/ftoutln.c
+++ b/modules/freetype2/src/base/ftoutln.c
@@ -4,7 +4,7 @@
/* */
/* FreeType outline management (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -286,12 +286,13 @@
FT_TRACE5(( "FT_Outline_Decompose: Done\n", n ));
return FT_Err_Ok;
+ Invalid_Outline:
+ error = FT_THROW( Invalid_Outline );
+ /* fall through */
+
Exit:
- FT_TRACE5(( "FT_Outline_Decompose: Error %d\n", error ));
+ FT_TRACE5(( "FT_Outline_Decompose: Error 0x%x\n", error ));
return error;
-
- Invalid_Outline:
- return FT_THROW( Invalid_Outline );
}
@@ -540,8 +541,8 @@
for ( n = 0; n < outline->n_points; n++ )
{
- vec->x += xOffset;
- vec->y += yOffset;
+ vec->x = ADD_LONG( vec->x, xOffset );
+ vec->y = ADD_LONG( vec->y, yOffset );
vec++;
}
}
@@ -1088,7 +1089,8 @@
v_cur.x = points[n].x >> xshift;
v_cur.y = points[n].y >> yshift;
- area += ( v_cur.y - v_prev.y ) * ( v_cur.x + v_prev.x );
+ area = ADD_LONG( area,
+ ( v_cur.y - v_prev.y ) * ( v_cur.x + v_prev.x ) );
v_prev = v_cur;
}
diff --git a/modules/freetype2/src/base/ftpatent.c b/modules/freetype2/src/base/ftpatent.c
index 4861be130..e23ee2e3f 100644
--- a/modules/freetype2/src/base/ftpatent.c
+++ b/modules/freetype2/src/base/ftpatent.c
@@ -3,9 +3,9 @@
/* ftpatent.c */
/* */
/* FreeType API for checking patented TrueType bytecode instructions */
-/* (body). Obsolete, retained for backwards compatibility. */
+/* (body). Obsolete, retained for backward compatibility. */
/* */
-/* Copyright 2007-2016 by */
+/* Copyright 2007-2018 by */
/* David Turner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftpfr.c b/modules/freetype2/src/base/ftpfr.c
index 81faa529c..bfe13520e 100644
--- a/modules/freetype2/src/base/ftpfr.c
+++ b/modules/freetype2/src/base/ftpfr.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing PFR-specific data (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftpic.c b/modules/freetype2/src/base/ftpic.c
index 03769dba2..1492e1809 100644
--- a/modules/freetype2/src/base/ftpic.c
+++ b/modules/freetype2/src/base/ftpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services (body). */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftpsprop.c b/modules/freetype2/src/base/ftpsprop.c
new file mode 100644
index 000000000..459b5e605
--- /dev/null
+++ b/modules/freetype2/src/base/ftpsprop.c
@@ -0,0 +1,285 @@
+/***************************************************************************/
+/* */
+/* ftpsprop.c */
+/* */
+/* Get and set properties of PostScript drivers (body). */
+/* See `ftdriver.h' for available properties. */
+/* */
+/* Copyright 2017-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_DRIVER_H
+#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_POSTSCRIPT_PROPS_H
+
+
+ /*************************************************************************/
+ /* */
+ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+ /* messages during execution. */
+ /* */
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_psprops
+
+
+ FT_BASE_CALLBACK_DEF( FT_Error )
+ ps_property_set( FT_Module module, /* PS_Driver */
+ const char* property_name,
+ const void* value,
+ FT_Bool value_is_string )
+ {
+ FT_Error error = FT_Err_Ok;
+ PS_Driver driver = (PS_Driver)module;
+
+#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+ FT_UNUSED( value_is_string );
+#endif
+
+
+ if ( !ft_strcmp( property_name, "darkening-parameters" ) )
+ {
+ FT_Int* darken_params;
+ FT_Int x1, y1, x2, y2, x3, y3, x4, y4;
+
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+ FT_Int dp[8];
+
+
+ if ( value_is_string )
+ {
+ const char* s = (const char*)value;
+ char* ep;
+ int i;
+
+
+ /* eight comma-separated numbers */
+ for ( i = 0; i < 7; i++ )
+ {
+ dp[i] = (FT_Int)ft_strtol( s, &ep, 10 );
+ if ( *ep != ',' || s == ep )
+ return FT_THROW( Invalid_Argument );
+
+ s = ep + 1;
+ }
+
+ dp[7] = (FT_Int)ft_strtol( s, &ep, 10 );
+ if ( !( *ep == '\0' || *ep == ' ' ) || s == ep )
+ return FT_THROW( Invalid_Argument );
+
+ darken_params = dp;
+ }
+ else
+#endif
+ darken_params = (FT_Int*)value;
+
+ x1 = darken_params[0];
+ y1 = darken_params[1];
+ x2 = darken_params[2];
+ y2 = darken_params[3];
+ x3 = darken_params[4];
+ y3 = darken_params[5];
+ x4 = darken_params[6];
+ y4 = darken_params[7];
+
+ if ( x1 < 0 || x2 < 0 || x3 < 0 || x4 < 0 ||
+ y1 < 0 || y2 < 0 || y3 < 0 || y4 < 0 ||
+ x1 > x2 || x2 > x3 || x3 > x4 ||
+ y1 > 500 || y2 > 500 || y3 > 500 || y4 > 500 )
+ return FT_THROW( Invalid_Argument );
+
+ driver->darken_params[0] = x1;
+ driver->darken_params[1] = y1;
+ driver->darken_params[2] = x2;
+ driver->darken_params[3] = y2;
+ driver->darken_params[4] = x3;
+ driver->darken_params[5] = y3;
+ driver->darken_params[6] = x4;
+ driver->darken_params[7] = y4;
+
+ return error;
+ }
+
+ else if ( !ft_strcmp( property_name, "hinting-engine" ) )
+ {
+#if defined( CFF_CONFIG_OPTION_OLD_ENGINE ) || \
+ defined( T1_CONFIG_OPTION_OLD_ENGINE )
+ const char* module_name = module->clazz->module_name;
+#endif
+
+
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+ if ( value_is_string )
+ {
+ const char* s = (const char*)value;
+
+
+ if ( !ft_strcmp( s, "adobe" ) )
+ driver->hinting_engine = FT_HINTING_ADOBE;
+
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ else if ( !ft_strcmp( module_name, "cff" ) &&
+ !ft_strcmp( s, "freetype" ) )
+ driver->hinting_engine = FT_HINTING_FREETYPE;
+#endif
+
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+ else if ( ( !ft_strcmp( module_name, "type1" ) ||
+ !ft_strcmp( module_name, "t1cid" ) ) &&
+ !ft_strcmp( s, "freetype" ) )
+ driver->hinting_engine = FT_HINTING_FREETYPE;
+#endif
+
+ else
+ return FT_THROW( Invalid_Argument );
+ }
+ else
+#endif /* FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES */
+ {
+ FT_UInt* hinting_engine = (FT_UInt*)value;
+
+
+ if ( *hinting_engine == FT_HINTING_ADOBE
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ || ( *hinting_engine == FT_HINTING_FREETYPE &&
+ !ft_strcmp( module_name, "cff" ) )
+#endif
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+ || ( *hinting_engine == FT_HINTING_FREETYPE &&
+ ( !ft_strcmp( module_name, "type1" ) ||
+ !ft_strcmp( module_name, "t1cid" ) ) )
+#endif
+ )
+ driver->hinting_engine = *hinting_engine;
+ else
+ error = FT_ERR( Unimplemented_Feature );
+
+ return error;
+ }
+ }
+
+ else if ( !ft_strcmp( property_name, "no-stem-darkening" ) )
+ {
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+ if ( value_is_string )
+ {
+ const char* s = (const char*)value;
+ long nsd = ft_strtol( s, NULL, 10 );
+
+
+ if ( !nsd )
+ driver->no_stem_darkening = FALSE;
+ else
+ driver->no_stem_darkening = TRUE;
+ }
+ else
+#endif
+ {
+ FT_Bool* no_stem_darkening = (FT_Bool*)value;
+
+
+ driver->no_stem_darkening = *no_stem_darkening;
+ }
+
+ return error;
+ }
+
+ else if ( !ft_strcmp( property_name, "random-seed" ) )
+ {
+ FT_Int32 random_seed;
+
+
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+ if ( value_is_string )
+ {
+ const char* s = (const char*)value;
+
+
+ random_seed = (FT_Int32)ft_strtol( s, NULL, 10 );
+ }
+ else
+#endif
+ random_seed = *(FT_Int32*)value;
+
+ if ( random_seed < 0 )
+ random_seed = 0;
+
+ driver->random_seed = random_seed;
+
+ return error;
+ }
+
+ FT_TRACE0(( "ps_property_set: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+ FT_BASE_CALLBACK_DEF( FT_Error )
+ ps_property_get( FT_Module module, /* PS_Driver */
+ const char* property_name,
+ void* value )
+ {
+ FT_Error error = FT_Err_Ok;
+ PS_Driver driver = (PS_Driver)module;
+
+
+ if ( !ft_strcmp( property_name, "darkening-parameters" ) )
+ {
+ FT_Int* darken_params = driver->darken_params;
+ FT_Int* val = (FT_Int*)value;
+
+
+ val[0] = darken_params[0];
+ val[1] = darken_params[1];
+ val[2] = darken_params[2];
+ val[3] = darken_params[3];
+ val[4] = darken_params[4];
+ val[5] = darken_params[5];
+ val[6] = darken_params[6];
+ val[7] = darken_params[7];
+
+ return error;
+ }
+
+ else if ( !ft_strcmp( property_name, "hinting-engine" ) )
+ {
+ FT_UInt hinting_engine = driver->hinting_engine;
+ FT_UInt* val = (FT_UInt*)value;
+
+
+ *val = hinting_engine;
+
+ return error;
+ }
+
+ else if ( !ft_strcmp( property_name, "no-stem-darkening" ) )
+ {
+ FT_Bool no_stem_darkening = driver->no_stem_darkening;
+ FT_Bool* val = (FT_Bool*)value;
+
+
+ *val = no_stem_darkening;
+
+ return error;
+ }
+
+ FT_TRACE0(( "ps_property_get: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+/* END */
diff --git a/modules/freetype2/src/base/ftrfork.c b/modules/freetype2/src/base/ftrfork.c
index eac2ddba9..c3a2b9151 100644
--- a/modules/freetype2/src/base/ftrfork.c
+++ b/modules/freetype2/src/base/ftrfork.c
@@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */
@@ -271,7 +271,13 @@
if ( FT_STREAM_SKIP( 4 ) ) /* mbz */
goto Exit;
- if ( ref[j].res_id < 0 || temp < 0 )
+ /*
+ * According to Inside Macintosh: More Macintosh Toolbox,
+ * "Resource IDs" (1-46), there are some reserved IDs.
+ * However, FreeType2 is not a font synthesizer, no need
+ * to check the acceptable resource ID.
+ */
+ if ( temp < 0 )
{
error = FT_THROW( Invalid_Table );
goto Exit;
@@ -281,7 +287,7 @@
FT_TRACE3(( " [%d]:"
" resource_id=0x%04x, offset=0x%08x\n",
- j, ref[j].res_id, ref[j].offset ));
+ j, (FT_UShort)ref[j].res_id, ref[j].offset ));
}
if ( sort_by_res_id )
@@ -472,7 +478,7 @@
}
-#ifndef FT_MACINTOSH
+#if defined( FT_CONFIG_OPTION_MAC_FONTS ) && !defined( FT_MACINTOSH )
static FT_RFork_Rule
raccess_get_rule_type_from_rule_index( FT_Library library,
FT_UInt rule_index )
diff --git a/modules/freetype2/src/base/ftsnames.c b/modules/freetype2/src/base/ftsnames.c
index e0d5f824d..90ea1e2be 100644
--- a/modules/freetype2/src/base/ftsnames.c
+++ b/modules/freetype2/src/base/ftsnames.c
@@ -7,7 +7,7 @@
/* */
/* This is _not_ used to retrieve glyph names! */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,6 +20,8 @@
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_SFNT_NAMES_H
#include FT_INTERNAL_TRUETYPE_TYPES_H
#include FT_INTERNAL_STREAM_H
@@ -54,7 +56,7 @@
if ( idx < (FT_UInt)ttface->num_names )
{
- TT_NameEntryRec* entry = ttface->name_table.names + idx;
+ TT_Name entry = ttface->name_table.names + idx;
/* load name on demand */
@@ -88,6 +90,58 @@
}
+ /* documentation is in ftsnames.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Get_Sfnt_LangTag( FT_Face face,
+ FT_UInt langID,
+ FT_SfntLangTag *alangTag )
+ {
+ FT_Error error = FT_ERR( Invalid_Argument );
+
+
+ if ( alangTag && face && FT_IS_SFNT( face ) )
+ {
+ TT_Face ttface = (TT_Face)face;
+
+
+ if ( ttface->name_table.format != 1 )
+ return FT_THROW( Invalid_Table );
+
+ if ( langID > 0x8000U &&
+ langID - 0x8000U < ttface->name_table.numLangTagRecords )
+ {
+ TT_LangTag entry = ttface->name_table.langTags +
+ ( langID - 0x8000U );
+
+
+ /* load name on demand */
+ if ( entry->stringLength > 0 && !entry->string )
+ {
+ FT_Memory memory = face->memory;
+ FT_Stream stream = face->stream;
+
+
+ if ( FT_NEW_ARRAY ( entry->string, entry->stringLength ) ||
+ FT_STREAM_SEEK( entry->stringOffset ) ||
+ FT_STREAM_READ( entry->string, entry->stringLength ) )
+ {
+ FT_FREE( entry->string );
+ entry->stringLength = 0;
+ }
+ }
+
+ alangTag->string = (FT_Byte*)entry->string;
+ alangTag->string_len = entry->stringLength;
+
+ error = FT_Err_Ok;
+ }
+ }
+
+ return error;
+ }
+
+
#endif /* TT_CONFIG_OPTION_SFNT_NAMES */
diff --git a/modules/freetype2/src/base/ftstream.c b/modules/freetype2/src/base/ftstream.c
index bb512a7cc..18df7dcfe 100644
--- a/modules/freetype2/src/base/ftstream.c
+++ b/modules/freetype2/src/base/ftstream.c
@@ -4,7 +4,7 @@
/* */
/* I/O stream support (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftstroke.c b/modules/freetype2/src/base/ftstroke.c
index 4f3c4937b..6ae181906 100644
--- a/modules/freetype2/src/base/ftstroke.c
+++ b/modules/freetype2/src/base/ftstroke.c
@@ -4,7 +4,7 @@
/* */
/* FreeType path stroker (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftsynth.c b/modules/freetype2/src/base/ftsynth.c
index 4b66a33c3..c28346707 100644
--- a/modules/freetype2/src/base/ftsynth.c
+++ b/modules/freetype2/src/base/ftsynth.c
@@ -4,7 +4,7 @@
/* */
/* FreeType synthesizing code for emboldening and slanting (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -123,14 +123,14 @@
/*
* XXX: overflow check for 16-bit system, for compatibility
- * with FT_GlyphSlot_Embolden() since freetype-2.1.10.
+ * with FT_GlyphSlot_Embolden() since FreeType 2.1.10.
* unfortunately, this function return no informations
* about the cause of error.
*/
if ( ( ystr >> 6 ) > FT_INT_MAX || ( ystr >> 6 ) < FT_INT_MIN )
{
FT_TRACE1(( "FT_GlyphSlot_Embolden:" ));
- FT_TRACE1(( "too strong embolding parameter ystr=%d\n", ystr ));
+ FT_TRACE1(( "too strong emboldening parameter ystr=%d\n", ystr ));
return;
}
error = FT_GlyphSlot_Own_Bitmap( slot );
diff --git a/modules/freetype2/src/base/ftsystem.c b/modules/freetype2/src/base/ftsystem.c
index ac1f01c8b..6adebdb93 100644
--- a/modules/freetype2/src/base/ftsystem.c
+++ b/modules/freetype2/src/base/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* ANSI-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/fttrigon.c b/modules/freetype2/src/base/fttrigon.c
index 7b582c8a3..d6dd098c4 100644
--- a/modules/freetype2/src/base/fttrigon.c
+++ b/modules/freetype2/src/base/fttrigon.c
@@ -4,7 +4,7 @@
/* */
/* FreeType trigonometric functions (body). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/fttype1.c b/modules/freetype2/src/base/fttype1.c
index 5c0fce868..aa8f8ccbb 100644
--- a/modules/freetype2/src/base/fttype1.c
+++ b/modules/freetype2/src/base/fttype1.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility file for PS names support (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/ftutil.c b/modules/freetype2/src/base/ftutil.c
index 36d2dd721..4de5f2c14 100644
--- a/modules/freetype2/src/base/ftutil.c
+++ b/modules/freetype2/src/base/ftutil.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility file for memory and list management (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -135,7 +135,7 @@
ft_mem_free( memory, block );
block = NULL;
}
- else if ( new_count > FT_INT_MAX/item_size )
+ else if ( new_count > FT_INT_MAX / item_size )
{
error = FT_THROW( Array_Too_Large );
}
@@ -143,13 +143,15 @@
{
FT_ASSERT( !block );
- block = ft_mem_alloc( memory, new_count*item_size, &error );
+ block = memory->alloc( memory, new_count * item_size );
+ if ( block == NULL )
+ error = FT_THROW( Out_Of_Memory );
}
else
{
FT_Pointer block2;
- FT_Long cur_size = cur_count*item_size;
- FT_Long new_size = new_count*item_size;
+ FT_Long cur_size = cur_count * item_size;
+ FT_Long new_size = new_count * item_size;
block2 = memory->realloc( memory, cur_size, new_size, block );
diff --git a/modules/freetype2/src/base/ftver.rc b/modules/freetype2/src/base/ftver.rc
new file mode 100644
index 000000000..a2903d588
--- /dev/null
+++ b/modules/freetype2/src/base/ftver.rc
@@ -0,0 +1,61 @@
+/***************************************************************************/
+/* */
+/* ftver.rc */
+/* */
+/* FreeType VERSIONINFO resource for Windows DLLs. */
+/* */
+/* Copyright 2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#include<windows.h>
+
+#define FT_VERSION 2,9,1,0
+#define FT_VERSION_STR "2.9.1"
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION FT_VERSION
+PRODUCTVERSION FT_VERSION
+FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+FILEFLAGS VS_FF_DEBUG
+#endif
+#ifdef _DLL
+FILETYPE VFT_DLL
+#define FT_FILENAME "freetype.dll"
+#else
+FILETYPE VFT_STATIC_LIB
+#define FT_FILENAME "freetype.lib"
+#endif
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "The FreeType Project"
+ VALUE "FileDescription", "Font Rendering Library"
+ VALUE "FileVersion", FT_VERSION_STR
+ VALUE "ProductName", "FreeType"
+ VALUE "ProductVersion", FT_VERSION_STR
+ VALUE "LegalCopyright", "\251 2018 The FreeType Project www.freetype.org. All rights reserved."
+ VALUE "InternalName", "freetype"
+ VALUE "OriginalFilename", FT_FILENAME
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ /* The following line should only be modified for localized versions. */
+ /* It consists of any number of WORD,WORD pairs, with each pair */
+ /* describing a "language,codepage" combination supported by the file. */
+ VALUE "Translation", 0x409, 1252
+ END
+END
diff --git a/modules/freetype2/src/base/ftwinfnt.c b/modules/freetype2/src/base/ftwinfnt.c
index 89e915509..11bd28afb 100644
--- a/modules/freetype2/src/base/ftwinfnt.c
+++ b/modules/freetype2/src/base/ftwinfnt.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing Windows FNT specific info (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/base/rules.mk b/modules/freetype2/src/base/rules.mk
index aa424c546..e9805bd06 100644
--- a/modules/freetype2/src/base/rules.mk
+++ b/modules/freetype2/src/base/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -40,11 +40,14 @@ BASE_SRC := $(BASE_DIR)/basepic.c \
$(BASE_DIR)/ftadvanc.c \
$(BASE_DIR)/ftcalc.c \
$(BASE_DIR)/ftdbgmem.c \
+ $(BASE_DIR)/ftfntfmt.c \
$(BASE_DIR)/ftgloadr.c \
$(BASE_DIR)/fthash.c \
+ $(BASE_DIR)/ftlcdfil.c \
$(BASE_DIR)/ftobjs.c \
$(BASE_DIR)/ftoutln.c \
$(BASE_DIR)/ftpic.c \
+ $(BASE_DIR)/ftpsprop.c \
$(BASE_DIR)/ftrfork.c \
$(BASE_DIR)/ftsnames.c \
$(BASE_DIR)/ftstream.c \
diff --git a/modules/freetype2/src/bdf/Jamfile b/modules/freetype2/src/bdf/Jamfile
index 2f0147bbb..d9e441c18 100644
--- a/modules/freetype2/src/bdf/Jamfile
+++ b/modules/freetype2/src/bdf/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/bdf Jamfile
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/bdf/README b/modules/freetype2/src/bdf/README
index b761aba2b..996ac2d2a 100644
--- a/modules/freetype2/src/bdf/README
+++ b/modules/freetype2/src/bdf/README
@@ -13,7 +13,7 @@ This code implements a BDF driver for the FreeType library, following the
Adobe Specification V 2.2. The specification of the BDF font format is
available from Adobe's web site:
- http://partners.adobe.com/public/developer/en/font/5005.BDF_Spec.pdf
+ https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5005.BDF_Spec.pdf
Many good bitmap fonts in bdf format come with XFree86 (www.XFree86.org).
They do not define vertical metrics, because the X Consortium BDF
diff --git a/modules/freetype2/src/bdf/bdf.c b/modules/freetype2/src/bdf/bdf.c
index f95fb7622..e54df6649 100644
--- a/modules/freetype2/src/bdf/bdf.c
+++ b/modules/freetype2/src/bdf/bdf.c
@@ -24,9 +24,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-#define FT_MAKE_OPTION_SINGLE_OBJECT
+#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
+
#include "bdflib.c"
#include "bdfdrivr.c"
diff --git a/modules/freetype2/src/bdf/bdfdrivr.c b/modules/freetype2/src/bdf/bdfdrivr.c
index a2242be01..ca937f89c 100644
--- a/modules/freetype2/src/bdf/bdfdrivr.c
+++ b/modules/freetype2/src/bdf/bdfdrivr.c
@@ -373,7 +373,7 @@ THE SOFTWARE.
/* we have a bdf font: let's construct the face object */
face->bdffont = font;
- /* BDF could not have multiple face in single font file.
+ /* BDF cannot have multiple faces in a single font file.
* XXX: non-zero face_index is already invalid argument, but
* Type1, Type42 driver has a convention to return
* an invalid argument error when the font could be
@@ -437,46 +437,156 @@ THE SOFTWARE.
{
FT_Bitmap_Size* bsize = bdfface->available_sizes;
FT_Short resolution_x = 0, resolution_y = 0;
+ long value;
FT_ZERO( bsize );
+ /* sanity checks */
+ if ( font->font_ascent > 0x7FFF || font->font_ascent < -0x7FFF )
+ {
+ font->font_ascent = font->font_ascent < 0 ? -0x7FFF : 0x7FFF;
+ FT_TRACE0(( "BDF_Face_Init: clamping font ascent to value %d\n",
+ font->font_ascent ));
+ }
+ if ( font->font_descent > 0x7FFF || font->font_descent < -0x7FFF )
+ {
+ font->font_descent = font->font_descent < 0 ? -0x7FFF : 0x7FFF;
+ FT_TRACE0(( "BDF_Face_Init: clamping font descent to value %d\n",
+ font->font_descent ));
+ }
+
bsize->height = (FT_Short)( font->font_ascent + font->font_descent );
prop = bdf_get_font_property( font, "AVERAGE_WIDTH" );
if ( prop )
- bsize->width = (FT_Short)( ( prop->value.l + 5 ) / 10 );
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( prop->value.l < 0 )
+ FT_TRACE0(( "BDF_Face_Init: negative average width\n" ));
+#endif
+ if ( prop->value.l > 0x7FFFL * 10 - 5 ||
+ prop->value.l < -( 0x7FFFL * 10 - 5 ) )
+ {
+ bsize->width = 0x7FFF;
+ FT_TRACE0(( "BDF_Face_Init: clamping average width to value %d\n",
+ bsize->width ));
+ }
+ else
+ bsize->width = FT_ABS( (FT_Short)( ( prop->value.l + 5 ) / 10 ) );
+ }
else
- bsize->width = (FT_Short)( bsize->height * 2/3 );
+ {
+ /* this is a heuristical value */
+ bsize->width = (FT_Short)FT_MulDiv( bsize->height, 2, 3 );
+ }
prop = bdf_get_font_property( font, "POINT_SIZE" );
if ( prop )
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( prop->value.l < 0 )
+ FT_TRACE0(( "BDF_Face_Init: negative point size\n" ));
+#endif
/* convert from 722.7 decipoints to 72 points per inch */
- bsize->size =
- (FT_Pos)( ( prop->value.l * 64 * 7200 + 36135L ) / 72270L );
+ if ( prop->value.l > 0x504C2L || /* 0x7FFF * 72270/7200 */
+ prop->value.l < -0x504C2L )
+ {
+ bsize->size = 0x7FFF;
+ FT_TRACE0(( "BDF_Face_Init: clamping point size to value %d\n",
+ bsize->size ));
+ }
+ else
+ bsize->size = FT_MulDiv( FT_ABS( prop->value.l ),
+ 64 * 7200,
+ 72270L );
+ }
+ else if ( font->point_size )
+ {
+ if ( font->point_size > 0x7FFF )
+ {
+ bsize->size = 0x7FFF;
+ FT_TRACE0(( "BDF_Face_Init: clamping point size to value %d\n",
+ bsize->size ));
+ }
+ else
+ bsize->size = (FT_Pos)font->point_size << 6;
+ }
else
- bsize->size = bsize->width << 6;
+ {
+ /* this is a heuristical value */
+ bsize->size = bsize->width * 64;
+ }
prop = bdf_get_font_property( font, "PIXEL_SIZE" );
if ( prop )
- bsize->y_ppem = (FT_Short)prop->value.l << 6;
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( prop->value.l < 0 )
+ FT_TRACE0(( "BDF_Face_Init: negative pixel size\n" ));
+#endif
+ if ( prop->value.l > 0x7FFF || prop->value.l < -0x7FFF )
+ {
+ bsize->y_ppem = 0x7FFF << 6;
+ FT_TRACE0(( "BDF_Face_Init: clamping pixel size to value %d\n",
+ bsize->y_ppem ));
+ }
+ else
+ bsize->y_ppem = FT_ABS( (FT_Short)prop->value.l ) << 6;
+ }
prop = bdf_get_font_property( font, "RESOLUTION_X" );
if ( prop )
- resolution_x = (FT_Short)prop->value.l;
+ value = prop->value.l;
+ else
+ value = (long)font->resolution_x;
+ if ( value )
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( value < 0 )
+ FT_TRACE0(( "BDF_Face_Init: negative X resolution\n" ));
+#endif
+ if ( value > 0x7FFF || value < -0x7FFF )
+ {
+ resolution_x = 0x7FFF;
+ FT_TRACE0(( "BDF_Face_Init: clamping X resolution to value %d\n",
+ resolution_x ));
+ }
+ else
+ resolution_x = FT_ABS( (FT_Short)value );
+ }
prop = bdf_get_font_property( font, "RESOLUTION_Y" );
if ( prop )
- resolution_y = (FT_Short)prop->value.l;
+ value = prop->value.l;
+ else
+ value = (long)font->resolution_y;
+ if ( value )
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( value < 0 )
+ FT_TRACE0(( "BDF_Face_Init: negative Y resolution\n" ));
+#endif
+ if ( value > 0x7FFF || value < -0x7FFF )
+ {
+ resolution_y = 0x7FFF;
+ FT_TRACE0(( "BDF_Face_Init: clamping Y resolution to value %d\n",
+ resolution_y ));
+ }
+ else
+ resolution_y = FT_ABS( (FT_Short)value );
+ }
if ( bsize->y_ppem == 0 )
{
bsize->y_ppem = bsize->size;
if ( resolution_y )
- bsize->y_ppem = bsize->y_ppem * resolution_y / 72;
+ bsize->y_ppem = FT_MulDiv( bsize->y_ppem, resolution_y, 72 );
}
if ( resolution_x && resolution_y )
- bsize->x_ppem = bsize->y_ppem * resolution_x / resolution_y;
+ bsize->x_ppem = FT_MulDiv( bsize->y_ppem,
+ resolution_x,
+ resolution_y );
else
bsize->x_ppem = bsize->y_ppem;
}
@@ -545,7 +655,11 @@ THE SOFTWARE.
if ( !ft_strcmp( s, "10646" ) ||
( !ft_strcmp( s, "8859" ) &&
!ft_strcmp( face->charset_encoding, "1" ) ) )
- unicode_charmap = 1;
+ unicode_charmap = 1;
+ /* another name for ASCII */
+ else if ( !ft_strcmp( s, "646.1991" ) &&
+ !ft_strcmp( face->charset_encoding, "IRV" ) )
+ unicode_charmap = 1;
}
{
@@ -566,12 +680,6 @@ THE SOFTWARE.
}
error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );
-
-#if 0
- /* Select default charmap */
- if ( bdfface->num_charmaps )
- bdfface->charmap = bdfface->charmaps[0];
-#endif
}
goto Exit;
@@ -705,7 +813,7 @@ THE SOFTWARE.
bitmap->rows = glyph.bbx.height;
bitmap->width = glyph.bbx.width;
- if ( glyph.bpr > INT_MAX )
+ if ( glyph.bpr > FT_INT_MAX )
FT_TRACE1(( "BDF_Glyph_Load: too large pitch %d is truncated\n",
glyph.bpr ));
bitmap->pitch = (int)glyph.bpr; /* same as FT_Bitmap.pitch */
diff --git a/modules/freetype2/src/bdf/bdflib.c b/modules/freetype2/src/bdf/bdflib.c
index 7fd95a738..2f5c99d54 100644
--- a/modules/freetype2/src/bdf/bdflib.c
+++ b/modules/freetype2/src/bdf/bdflib.c
@@ -704,7 +704,15 @@
return 0;
for ( v = 0; sbitset( ddigits, *s ); s++ )
- v = v * 10 + a2i[(int)*s];
+ {
+ if ( v < ( FT_ULONG_MAX - 9 ) / 10 )
+ v = v * 10 + a2i[(int)*s];
+ else
+ {
+ v = FT_ULONG_MAX;
+ break;
+ }
+ }
return v;
}
@@ -729,7 +737,15 @@
}
for ( v = 0; sbitset( ddigits, *s ); s++ )
- v = v * 10 + a2i[(int)*s];
+ {
+ if ( v < ( FT_LONG_MAX - 9 ) / 10 )
+ v = v * 10 + a2i[(int)*s];
+ else
+ {
+ v = FT_LONG_MAX;
+ break;
+ }
+ }
return ( !neg ) ? v : -v;
}
@@ -746,7 +762,15 @@
return 0;
for ( v = 0; sbitset( ddigits, *s ); s++ )
- v = (unsigned short)( v * 10 + a2i[(int)*s] );
+ {
+ if ( v < ( FT_USHORT_MAX - 9 ) / 10 )
+ v = (unsigned short)( v * 10 + a2i[(int)*s] );
+ else
+ {
+ v = FT_USHORT_MAX;
+ break;
+ }
+ }
return v;
}
@@ -771,7 +795,15 @@
}
for ( v = 0; sbitset( ddigits, *s ); s++ )
- v = (short)( v * 10 + a2i[(int)*s] );
+ {
+ if ( v < ( SHRT_MAX - 9 ) / 10 )
+ v = (short)( v * 10 + a2i[(int)*s] );
+ else
+ {
+ v = SHRT_MAX;
+ break;
+ }
+ }
return (short)( ( !neg ) ? v : -v );
}
diff --git a/modules/freetype2/src/bzip2/Jamfile b/modules/freetype2/src/bzip2/Jamfile
index 5c28f7e53..3548eab59 100644
--- a/modules/freetype2/src/bzip2/Jamfile
+++ b/modules/freetype2/src/bzip2/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/bzip2 Jamfile
#
-# Copyright 2010-2016 by
+# Copyright 2010-2018 by
# Joel Klinghed
#
# based on `src/lzw/Jamfile'
diff --git a/modules/freetype2/src/bzip2/ftbzip2.c b/modules/freetype2/src/bzip2/ftbzip2.c
index 4d0b388d6..16019485a 100644
--- a/modules/freetype2/src/bzip2/ftbzip2.c
+++ b/modules/freetype2/src/bzip2/ftbzip2.c
@@ -8,7 +8,7 @@
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2010-2016 by */
+/* Copyright 2010-2018 by */
/* Joel Klinghed. */
/* */
/* based on `src/gzip/ftgzip.c' */
diff --git a/modules/freetype2/src/bzip2/rules.mk b/modules/freetype2/src/bzip2/rules.mk
index 68b17633d..95954d752 100644
--- a/modules/freetype2/src/bzip2/rules.mk
+++ b/modules/freetype2/src/bzip2/rules.mk
@@ -2,7 +2,7 @@
# FreeType 2 BZIP2 support configuration rules
#
-# Copyright 2010-2016 by
+# Copyright 2010-2018 by
# Joel Klinghed.
#
# based on `src/lzw/rules.mk'
diff --git a/modules/freetype2/src/cache/Jamfile b/modules/freetype2/src/cache/Jamfile
index da6551015..53f4c7b60 100644
--- a/modules/freetype2/src/cache/Jamfile
+++ b/modules/freetype2/src/cache/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/cache Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/cache/ftcache.c b/modules/freetype2/src/cache/ftcache.c
index 50941df4c..1b425af91 100644
--- a/modules/freetype2/src/cache/ftcache.c
+++ b/modules/freetype2/src/cache/ftcache.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType Caching sub-system (body only). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,15 +17,16 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "ftcmru.c"
-#include "ftcmanag.c"
+
+#include "ftcbasic.c"
#include "ftccache.c"
#include "ftccmap.c"
#include "ftcglyph.c"
#include "ftcimage.c"
+#include "ftcmanag.c"
+#include "ftcmru.c"
#include "ftcsbits.c"
-#include "ftcbasic.c"
+
/* END */
diff --git a/modules/freetype2/src/cache/ftcbasic.c b/modules/freetype2/src/cache/ftcbasic.c
index fc8905c95..994aa1228 100644
--- a/modules/freetype2/src/cache/ftcbasic.c
+++ b/modules/freetype2/src/cache/ftcbasic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType basic cache interface (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -304,10 +304,18 @@
if ( anode )
*anode = NULL;
- if ( (FT_ULong)( type->flags - FT_INT_MIN ) > FT_UINT_MAX )
+ /*
+ * Internal `FTC_BasicAttr->load_flags' is of type `FT_UInt',
+ * but public `FT_ImageType->flags' is of type `FT_Int32'.
+ *
+ * On 16bit systems, higher bits of type->flags cannot be handled.
+ */
+#if 0xFFFFFFFFUL > FT_UINT_MAX
+ if ( (type->flags & (FT_ULong)FT_UINT_MAX) )
FT_TRACE1(( "FTC_ImageCache_Lookup:"
" higher bits in load_flags 0x%x are dropped\n",
(FT_ULong)type->flags & ~((FT_ULong)FT_UINT_MAX) ));
+#endif
query.attrs.scaler.face_id = type->face_id;
query.attrs.scaler.width = type->width;
@@ -377,11 +385,18 @@
if ( anode )
*anode = NULL;
- /* `FT_Load_Glyph' and `FT_Load_Char' take FT_UInt flags */
+ /*
+ * Internal `FTC_BasicAttr->load_flags' is of type `FT_UInt',
+ * but public `FT_Face->face_flags' is of type `FT_Long'.
+ *
+ * On long > int systems, higher bits of load_flags cannot be handled.
+ */
+#if FT_ULONG_MAX > FT_UINT_MAX
if ( load_flags > FT_UINT_MAX )
FT_TRACE1(( "FTC_ImageCache_LookupScaler:"
" higher bits in load_flags 0x%x are dropped\n",
load_flags & ~((FT_ULong)FT_UINT_MAX) ));
+#endif
query.attrs.scaler = scaler[0];
query.attrs.load_flags = (FT_UInt)load_flags;
@@ -487,10 +502,18 @@
*ansbit = NULL;
- if ( (FT_ULong)( type->flags - FT_INT_MIN ) > FT_UINT_MAX )
+ /*
+ * Internal `FTC_BasicAttr->load_flags' is of type `FT_UInt',
+ * but public `FT_ImageType->flags' is of type `FT_Int32'.
+ *
+ * On 16bit systems, higher bits of type->flags cannot be handled.
+ */
+#if 0xFFFFFFFFUL > FT_UINT_MAX
+ if ( (type->flags & (FT_ULong)FT_UINT_MAX) )
FT_TRACE1(( "FTC_ImageCache_Lookup:"
" higher bits in load_flags 0x%x are dropped\n",
(FT_ULong)type->flags & ~((FT_ULong)FT_UINT_MAX) ));
+#endif
query.attrs.scaler.face_id = type->face_id;
query.attrs.scaler.width = type->width;
@@ -562,11 +585,18 @@
*ansbit = NULL;
- /* `FT_Load_Glyph' and `FT_Load_Char' take FT_UInt flags */
+ /*
+ * Internal `FTC_BasicAttr->load_flags' is of type `FT_UInt',
+ * but public `FT_Face->face_flags' is of type `FT_Long'.
+ *
+ * On long > int systems, higher bits of load_flags cannot be handled.
+ */
+#if FT_ULONG_MAX > FT_UINT_MAX
if ( load_flags > FT_UINT_MAX )
FT_TRACE1(( "FTC_ImageCache_LookupScaler:"
" higher bits in load_flags 0x%x are dropped\n",
load_flags & ~((FT_ULong)FT_UINT_MAX) ));
+#endif
query.attrs.scaler = scaler[0];
query.attrs.load_flags = (FT_UInt)load_flags;
diff --git a/modules/freetype2/src/cache/ftccache.c b/modules/freetype2/src/cache/ftccache.c
index de2025533..12ec585a2 100644
--- a/modules/freetype2/src/cache/ftccache.c
+++ b/modules/freetype2/src/cache/ftccache.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType internal cache interface (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftccache.h b/modules/freetype2/src/cache/ftccache.h
index ab4ea5124..859c547e4 100644
--- a/modules/freetype2/src/cache/ftccache.h
+++ b/modules/freetype2/src/cache/ftccache.h
@@ -4,7 +4,7 @@
/* */
/* FreeType internal cache interface (specification). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftccback.h b/modules/freetype2/src/cache/ftccback.h
index 279e94d92..e51d8d6e5 100644
--- a/modules/freetype2/src/cache/ftccback.h
+++ b/modules/freetype2/src/cache/ftccback.h
@@ -4,7 +4,7 @@
/* */
/* Callback functions of the caching sub-system (specification only). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftccmap.c b/modules/freetype2/src/cache/ftccmap.c
index f0a85f9c5..d20b0f48f 100644
--- a/modules/freetype2/src/cache/ftccmap.c
+++ b/modules/freetype2/src/cache/ftccmap.c
@@ -4,7 +4,7 @@
/* */
/* FreeType CharMap cache (body) */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftcerror.h b/modules/freetype2/src/cache/ftcerror.h
index 1fd7357a8..a26cd5935 100644
--- a/modules/freetype2/src/cache/ftcerror.h
+++ b/modules/freetype2/src/cache/ftcerror.h
@@ -4,7 +4,7 @@
/* */
/* Caching sub-system error codes (specification only). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftcglyph.c b/modules/freetype2/src/cache/ftcglyph.c
index c4046812d..782cc0ed0 100644
--- a/modules/freetype2/src/cache/ftcglyph.c
+++ b/modules/freetype2/src/cache/ftcglyph.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Glyph Image (FT_Glyph) cache (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftcglyph.h b/modules/freetype2/src/cache/ftcglyph.h
index dc7be06f0..23c24d223 100644
--- a/modules/freetype2/src/cache/ftcglyph.h
+++ b/modules/freetype2/src/cache/ftcglyph.h
@@ -4,7 +4,7 @@
/* */
/* FreeType abstract glyph cache (specification). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftcimage.c b/modules/freetype2/src/cache/ftcimage.c
index 74040aa74..77a100153 100644
--- a/modules/freetype2/src/cache/ftcimage.c
+++ b/modules/freetype2/src/cache/ftcimage.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Image cache (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftcimage.h b/modules/freetype2/src/cache/ftcimage.h
index 25aa43b97..24a221053 100644
--- a/modules/freetype2/src/cache/ftcimage.h
+++ b/modules/freetype2/src/cache/ftcimage.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Generic Image cache (specification) */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftcmanag.c b/modules/freetype2/src/cache/ftcmanag.c
index 9a25b9772..2bcd9df50 100644
--- a/modules/freetype2/src/cache/ftcmanag.c
+++ b/modules/freetype2/src/cache/ftcmanag.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftcmanag.h b/modules/freetype2/src/cache/ftcmanag.h
index f2c434a13..b4b475535 100644
--- a/modules/freetype2/src/cache/ftcmanag.h
+++ b/modules/freetype2/src/cache/ftcmanag.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (specification). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftcmru.c b/modules/freetype2/src/cache/ftcmru.c
index 7c460b928..1087be4d8 100644
--- a/modules/freetype2/src/cache/ftcmru.c
+++ b/modules/freetype2/src/cache/ftcmru.c
@@ -4,7 +4,7 @@
/* */
/* FreeType MRU support (body). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftcmru.h b/modules/freetype2/src/cache/ftcmru.h
index 27ad55aa0..82396b917 100644
--- a/modules/freetype2/src/cache/ftcmru.h
+++ b/modules/freetype2/src/cache/ftcmru.h
@@ -4,7 +4,7 @@
/* */
/* Simple MRU list-cache (specification). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftcsbits.c b/modules/freetype2/src/cache/ftcsbits.c
index 78cd8de82..018f1ecdb 100644
--- a/modules/freetype2/src/cache/ftcsbits.c
+++ b/modules/freetype2/src/cache/ftcsbits.c
@@ -4,7 +4,7 @@
/* */
/* FreeType sbits manager (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/ftcsbits.h b/modules/freetype2/src/cache/ftcsbits.h
index a0600ede0..206a1bb3f 100644
--- a/modules/freetype2/src/cache/ftcsbits.h
+++ b/modules/freetype2/src/cache/ftcsbits.h
@@ -4,7 +4,7 @@
/* */
/* A small-bitmap cache (specification). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cache/rules.mk b/modules/freetype2/src/cache/rules.mk
index 827e259f9..558935976 100644
--- a/modules/freetype2/src/cache/rules.mk
+++ b/modules/freetype2/src/cache/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2000-2016 by
+# Copyright 2000-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/cff/Jamfile b/modules/freetype2/src/cff/Jamfile
index 8067e6b29..53c904fcf 100644
--- a/modules/freetype2/src/cff/Jamfile
+++ b/modules/freetype2/src/cff/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/cff Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -23,15 +23,6 @@ SubDir FT2_TOP $(FT2_SRC_DIR) cff ;
cffobjs
cffparse
cffpic
- cf2arrst
- cf2blues
- cf2error
- cf2font
- cf2ft
- cf2hints
- cf2intrp
- cf2read
- cf2stack
;
}
else
diff --git a/modules/freetype2/src/cff/cf2intrp.c b/modules/freetype2/src/cff/cf2intrp.c
deleted file mode 100644
index 6bf298a4d..000000000
--- a/modules/freetype2/src/cff/cf2intrp.c
+++ /dev/null
@@ -1,1913 +0,0 @@
-/***************************************************************************/
-/* */
-/* cf2intrp.c */
-/* */
-/* Adobe's CFF Interpreter (body). */
-/* */
-/* Copyright 2007-2014 Adobe Systems Incorporated. */
-/* */
-/* This software, and all works of authorship, whether in source or */
-/* object code form as indicated by the copyright notice(s) included */
-/* herein (collectively, the "Work") is made available, and may only be */
-/* used, modified, and distributed under the FreeType Project License, */
-/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
-/* FreeType Project License, each contributor to the Work hereby grants */
-/* to any individual or legal entity exercising permissions granted by */
-/* the FreeType Project License and this section (hereafter, "You" or */
-/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
-/* royalty-free, irrevocable (except as stated in this section) patent */
-/* license to make, have made, use, offer to sell, sell, import, and */
-/* otherwise transfer the Work, where such license applies only to those */
-/* patent claims licensable by such contributor that are necessarily */
-/* infringed by their contribution(s) alone or by combination of their */
-/* contribution(s) with the Work to which such contribution(s) was */
-/* submitted. If You institute patent litigation against any entity */
-/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
-/* the Work or a contribution incorporated within the Work constitutes */
-/* direct or contributory patent infringement, then any patent licenses */
-/* granted to You under this License for that Work shall terminate as of */
-/* the date such litigation is filed. */
-/* */
-/* By using, modifying, or distributing the Work you indicate that you */
-/* have read and understood the terms and conditions of the */
-/* FreeType Project License as well as those provided in this section, */
-/* and you accept them fully. */
-/* */
-/***************************************************************************/
-
-
-#include "cf2ft.h"
-#include FT_INTERNAL_DEBUG_H
-
-#include "cf2glue.h"
-#include "cf2font.h"
-#include "cf2stack.h"
-#include "cf2hints.h"
-#include "cf2intrp.h"
-
-#include "cf2error.h"
-
-#include "cffload.h"
-
-
- /*************************************************************************/
- /* */
- /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
- /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
- /* messages during execution. */
- /* */
-#undef FT_COMPONENT
-#define FT_COMPONENT trace_cf2interp
-
-
- /* some operators are not implemented yet */
-#define CF2_FIXME FT_TRACE4(( "cf2_interpT2CharString:" \
- " operator not implemented yet\n" ))
-
-
-
- FT_LOCAL_DEF( void )
- cf2_hintmask_init( CF2_HintMask hintmask,
- FT_Error* error )
- {
- FT_ZERO( hintmask );
-
- hintmask->error = error;
- }
-
-
- FT_LOCAL_DEF( FT_Bool )
- cf2_hintmask_isValid( const CF2_HintMask hintmask )
- {
- return hintmask->isValid;
- }
-
-
- FT_LOCAL_DEF( FT_Bool )
- cf2_hintmask_isNew( const CF2_HintMask hintmask )
- {
- return hintmask->isNew;
- }
-
-
- FT_LOCAL_DEF( void )
- cf2_hintmask_setNew( CF2_HintMask hintmask,
- FT_Bool val )
- {
- hintmask->isNew = val;
- }
-
-
- /* clients call `getMaskPtr' in order to iterate */
- /* through hint mask */
-
- FT_LOCAL_DEF( FT_Byte* )
- cf2_hintmask_getMaskPtr( CF2_HintMask hintmask )
- {
- return hintmask->mask;
- }
-
-
- static size_t
- cf2_hintmask_setCounts( CF2_HintMask hintmask,
- size_t bitCount )
- {
- if ( bitCount > CF2_MAX_HINTS )
- {
- /* total of h and v stems must be <= 96 */
- CF2_SET_ERROR( hintmask->error, Invalid_Glyph_Format );
- return 0;
- }
-
- hintmask->bitCount = bitCount;
- hintmask->byteCount = ( hintmask->bitCount + 7 ) / 8;
-
- hintmask->isValid = TRUE;
- hintmask->isNew = TRUE;
-
- return bitCount;
- }
-
-
- /* consume the hintmask bytes from the charstring, advancing the src */
- /* pointer */
- static void
- cf2_hintmask_read( CF2_HintMask hintmask,
- CF2_Buffer charstring,
- size_t bitCount )
- {
- size_t i;
-
-#ifndef CF2_NDEBUG
- /* these are the bits in the final mask byte that should be zero */
- /* Note: this variable is only used in an assert expression below */
- /* and then only if CF2_NDEBUG is not defined */
- CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1;
-#endif
-
-
- /* initialize counts and isValid */
- if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 )
- return;
-
- FT_ASSERT( hintmask->byteCount > 0 );
-
- FT_TRACE4(( " (maskbytes:" ));
-
- /* set mask and advance interpreter's charstring pointer */
- for ( i = 0; i < hintmask->byteCount; i++ )
- {
- hintmask->mask[i] = (FT_Byte)cf2_buf_readByte( charstring );
- FT_TRACE4(( " 0x%02X", hintmask->mask[i] ));
- }
-
- FT_TRACE4(( ")\n" ));
-
- /* assert any unused bits in last byte are zero unless there's a prior */
- /* error */
- /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1 */
-#ifndef CF2_NDEBUG
- FT_ASSERT( ( hintmask->mask[hintmask->byteCount - 1] & mask ) == 0 ||
- *hintmask->error );
-#endif
- }
-
-
- FT_LOCAL_DEF( void )
- cf2_hintmask_setAll( CF2_HintMask hintmask,
- size_t bitCount )
- {
- size_t i;
- CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1;
-
-
- /* initialize counts and isValid */
- if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 )
- return;
-
- FT_ASSERT( hintmask->byteCount > 0 );
- FT_ASSERT( hintmask->byteCount <=
- sizeof ( hintmask->mask ) / sizeof ( hintmask->mask[0] ) );
-
- /* set mask to all ones */
- for ( i = 0; i < hintmask->byteCount; i++ )
- hintmask->mask[i] = 0xFF;
-
- /* clear unused bits */
- /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1 */
- hintmask->mask[hintmask->byteCount - 1] &= ~mask;
- }
-
-
- /* Type2 charstring opcodes */
- enum
- {
- cf2_cmdRESERVED_0, /* 0 */
- cf2_cmdHSTEM, /* 1 */
- cf2_cmdRESERVED_2, /* 2 */
- cf2_cmdVSTEM, /* 3 */
- cf2_cmdVMOVETO, /* 4 */
- cf2_cmdRLINETO, /* 5 */
- cf2_cmdHLINETO, /* 6 */
- cf2_cmdVLINETO, /* 7 */
- cf2_cmdRRCURVETO, /* 8 */
- cf2_cmdRESERVED_9, /* 9 */
- cf2_cmdCALLSUBR, /* 10 */
- cf2_cmdRETURN, /* 11 */
- cf2_cmdESC, /* 12 */
- cf2_cmdRESERVED_13, /* 13 */
- cf2_cmdENDCHAR, /* 14 */
- cf2_cmdVSINDEX, /* 15 */
- cf2_cmdBLEND, /* 16 */
- cf2_cmdRESERVED_17, /* 17 */
- cf2_cmdHSTEMHM, /* 18 */
- cf2_cmdHINTMASK, /* 19 */
- cf2_cmdCNTRMASK, /* 20 */
- cf2_cmdRMOVETO, /* 21 */
- cf2_cmdHMOVETO, /* 22 */
- cf2_cmdVSTEMHM, /* 23 */
- cf2_cmdRCURVELINE, /* 24 */
- cf2_cmdRLINECURVE, /* 25 */
- cf2_cmdVVCURVETO, /* 26 */
- cf2_cmdHHCURVETO, /* 27 */
- cf2_cmdEXTENDEDNMBR, /* 28 */
- cf2_cmdCALLGSUBR, /* 29 */
- cf2_cmdVHCURVETO, /* 30 */
- cf2_cmdHVCURVETO /* 31 */
- };
-
- enum
- {
- cf2_escDOTSECTION, /* 0 */
- cf2_escRESERVED_1, /* 1 */
- cf2_escRESERVED_2, /* 2 */
- cf2_escAND, /* 3 */
- cf2_escOR, /* 4 */
- cf2_escNOT, /* 5 */
- cf2_escRESERVED_6, /* 6 */
- cf2_escRESERVED_7, /* 7 */
- cf2_escRESERVED_8, /* 8 */
- cf2_escABS, /* 9 */
- cf2_escADD, /* 10 like otherADD */
- cf2_escSUB, /* 11 like otherSUB */
- cf2_escDIV, /* 12 */
- cf2_escRESERVED_13, /* 13 */
- cf2_escNEG, /* 14 */
- cf2_escEQ, /* 15 */
- cf2_escRESERVED_16, /* 16 */
- cf2_escRESERVED_17, /* 17 */
- cf2_escDROP, /* 18 */
- cf2_escRESERVED_19, /* 19 */
- cf2_escPUT, /* 20 like otherPUT */
- cf2_escGET, /* 21 like otherGET */
- cf2_escIFELSE, /* 22 like otherIFELSE */
- cf2_escRANDOM, /* 23 like otherRANDOM */
- cf2_escMUL, /* 24 like otherMUL */
- cf2_escRESERVED_25, /* 25 */
- cf2_escSQRT, /* 26 */
- cf2_escDUP, /* 27 like otherDUP */
- cf2_escEXCH, /* 28 like otherEXCH */
- cf2_escINDEX, /* 29 */
- cf2_escROLL, /* 30 */
- cf2_escRESERVED_31, /* 31 */
- cf2_escRESERVED_32, /* 32 */
- cf2_escRESERVED_33, /* 33 */
- cf2_escHFLEX, /* 34 */
- cf2_escFLEX, /* 35 */
- cf2_escHFLEX1, /* 36 */
- cf2_escFLEX1, /* 37 */
- cf2_escRESERVED_38 /* 38 & all higher */
- };
-
-
- /* `stemHintArray' does not change once we start drawing the outline. */
- static void
- cf2_doStems( const CF2_Font font,
- CF2_Stack opStack,
- CF2_ArrStack stemHintArray,
- CF2_Fixed* width,
- FT_Bool* haveWidth,
- CF2_Fixed hintOffset )
- {
- CF2_UInt i;
- CF2_UInt count = cf2_stack_count( opStack );
- FT_Bool hasWidthArg = (FT_Bool)( count & 1 );
-
- /* variable accumulates delta values from operand stack */
- CF2_Fixed position = hintOffset;
-
-
- if ( hasWidthArg && !*haveWidth )
- *width = cf2_stack_getReal( opStack, 0 ) +
- cf2_getNominalWidthX( font->decoder );
-
- if ( font->decoder->width_only )
- goto exit;
-
- for ( i = hasWidthArg ? 1 : 0; i < count; i += 2 )
- {
- /* construct a CF2_StemHint and push it onto the list */
- CF2_StemHintRec stemhint;
-
-
- stemhint.min =
- position += cf2_stack_getReal( opStack, i );
- stemhint.max =
- position += cf2_stack_getReal( opStack, i + 1 );
-
- stemhint.used = FALSE;
- stemhint.maxDS =
- stemhint.minDS = 0;
-
- cf2_arrstack_push( stemHintArray, &stemhint ); /* defer error check */
- }
-
- cf2_stack_clear( opStack );
-
- exit:
- /* cf2_doStems must define a width (may be default) */
- *haveWidth = TRUE;
- }
-
-
- static void
- cf2_doFlex( CF2_Stack opStack,
- CF2_Fixed* curX,
- CF2_Fixed* curY,
- CF2_GlyphPath glyphPath,
- const FT_Bool* readFromStack,
- FT_Bool doConditionalLastRead )
- {
- CF2_Fixed vals[14];
- CF2_UInt index;
- FT_Bool isHFlex;
- CF2_Int top, i, j;
-
-
- vals[0] = *curX;
- vals[1] = *curY;
- index = 0;
- isHFlex = FT_BOOL( readFromStack[9] == FALSE );
- top = isHFlex ? 9 : 10;
-
- for ( i = 0; i < top; i++ )
- {
- vals[i + 2] = vals[i];
- if ( readFromStack[i] )
- vals[i + 2] += cf2_stack_getReal( opStack, index++ );
- }
-
- if ( isHFlex )
- vals[9 + 2] = *curY;
-
- if ( doConditionalLastRead )
- {
- FT_Bool lastIsX = (FT_Bool)( cf2_fixedAbs( vals[10] - *curX ) >
- cf2_fixedAbs( vals[11] - *curY ) );
- CF2_Fixed lastVal = cf2_stack_getReal( opStack, index );
-
-
- if ( lastIsX )
- {
- vals[12] = vals[10] + lastVal;
- vals[13] = *curY;
- }
- else
- {
- vals[12] = *curX;
- vals[13] = vals[11] + lastVal;
- }
- }
- else
- {
- if ( readFromStack[10] )
- vals[12] = vals[10] + cf2_stack_getReal( opStack, index++ );
- else
- vals[12] = *curX;
-
- if ( readFromStack[11] )
- vals[13] = vals[11] + cf2_stack_getReal( opStack, index );
- else
- vals[13] = *curY;
- }
-
- for ( j = 0; j < 2; j++ )
- cf2_glyphpath_curveTo( glyphPath, vals[j * 6 + 2],
- vals[j * 6 + 3],
- vals[j * 6 + 4],
- vals[j * 6 + 5],
- vals[j * 6 + 6],
- vals[j * 6 + 7] );
-
- cf2_stack_clear( opStack );
-
- *curX = vals[12];
- *curY = vals[13];
- }
-
-
- /* Blend numOperands on the stack, */
- /* store results into the first numBlends values, */
- /* then pop remaining arguments. */
- static void
- cf2_doBlend( const CFF_Blend blend,
- CF2_Stack opStack,
- CF2_UInt numBlends )
- {
- CF2_UInt delta;
- CF2_UInt base;
- CF2_UInt i, j;
- CF2_UInt numOperands = (CF2_UInt)( numBlends * blend->lenBV );
-
-
- base = cf2_stack_count( opStack ) - numOperands;
- delta = base + numBlends;
-
- for ( i = 0; i < numBlends; i++ )
- {
- const CF2_Fixed* weight = &blend->BV[1];
-
- /* start with first term */
- CF2_Fixed sum = cf2_stack_getReal( opStack, i + base );
-
-
- for ( j = 1; j < blend->lenBV; j++ )
- sum += FT_MulFix( *weight++, cf2_stack_getReal( opStack, delta++ ) );
-
- /* store blended result */
- cf2_stack_setReal( opStack, i + base, sum );
- }
-
- /* leave only `numBlends' results on stack */
- cf2_stack_pop( opStack, numOperands - numBlends );
- }
-
-
- /*
- * `error' is a shared error code used by many objects in this
- * routine. Before the code continues from an error, it must check and
- * record the error in `*error'. The idea is that this shared
- * error code will record the first error encountered. If testing
- * for an error anyway, the cost of `goto exit' is small, so we do it,
- * even if continuing would be safe. In this case, `lastError' is
- * set, so the testing and storing can be done in one place, at `exit'.
- *
- * Continuing after an error is intended for objects which do their own
- * testing of `*error', e.g., array stack functions. This allows us to
- * avoid an extra test after the call.
- *
- * Unimplemented opcodes are ignored.
- *
- */
- FT_LOCAL_DEF( void )
- cf2_interpT2CharString( CF2_Font font,
- CF2_Buffer buf,
- CF2_OutlineCallbacks callbacks,
- const FT_Vector* translation,
- FT_Bool doingSeac,
- CF2_Fixed curX,
- CF2_Fixed curY,
- CF2_Fixed* width )
- {
- /* lastError is used for errors that are immediately tested */
- FT_Error lastError = FT_Err_Ok;
-
- /* pointer to parsed font object */
- CFF_Decoder* decoder = font->decoder;
-
- FT_Error* error = &font->error;
- FT_Memory memory = font->memory;
-
- CF2_Fixed scaleY = font->innerTransform.d;
- CF2_Fixed nominalWidthX = cf2_getNominalWidthX( decoder );
-
- /* save this for hinting seac accents */
- CF2_Fixed hintOriginY = curY;
-
- CF2_Stack opStack = NULL;
- FT_UInt stackSize;
- FT_Byte op1; /* first opcode byte */
-
- CF2_F16Dot16 storage[CF2_STORAGE_SIZE]; /* for `put' and `get' */
-
- /* instruction limit; 20,000,000 matches Avalon */
- FT_UInt32 instructionLimit = 20000000UL;
-
- CF2_ArrStackRec subrStack;
-
- FT_Bool haveWidth;
- CF2_Buffer charstring = NULL;
-
- CF2_Int charstringIndex = -1; /* initialize to empty */
-
- /* TODO: placeholders for hint structures */
-
- /* objects used for hinting */
- CF2_ArrStackRec hStemHintArray;
- CF2_ArrStackRec vStemHintArray;
-
- CF2_HintMaskRec hintMask;
- CF2_GlyphPathRec glyphPath;
-
-
- FT_ZERO( &storage );
-
- /* initialize the remaining objects */
- cf2_arrstack_init( &subrStack,
- memory,
- error,
- sizeof ( CF2_BufferRec ) );
- cf2_arrstack_init( &hStemHintArray,
- memory,
- error,
- sizeof ( CF2_StemHintRec ) );
- cf2_arrstack_init( &vStemHintArray,
- memory,
- error,
- sizeof ( CF2_StemHintRec ) );
-
- /* initialize CF2_StemHint arrays */
- cf2_hintmask_init( &hintMask, error );
-
- /* initialize path map to manage drawing operations */
-
- /* Note: last 4 params are used to handle `MoveToPermissive', which */
- /* may need to call `hintMap.Build' */
- /* TODO: MoveToPermissive is gone; are these still needed? */
- cf2_glyphpath_init( &glyphPath,
- font,
- callbacks,
- scaleY,
- /* hShift, */
- &hStemHintArray,
- &vStemHintArray,
- &hintMask,
- hintOriginY,
- &font->blues,
- translation );
-
- /*
- * Initialize state for width parsing. From the CFF Spec:
- *
- * The first stack-clearing operator, which must be one of hstem,
- * hstemhm, vstem, vstemhm, cntrmask, hintmask, hmoveto, vmoveto,
- * rmoveto, or endchar, takes an additional argument - the width (as
- * described earlier), which may be expressed as zero or one numeric
- * argument.
- *
- * What we implement here uses the first validly specified width, but
- * does not detect errors for specifying more than one width.
- *
- * If one of the above operators occurs without explicitly specifying
- * a width, we assume the default width.
- *
- * CFF2 charstrings always return the default width (0).
- *
- */
- haveWidth = font->isCFF2 ? TRUE : FALSE;
- *width = cf2_getDefaultWidthX( decoder );
-
- /*
- * Note: At this point, all pointers to resources must be NULL
- * and all local objects must be initialized.
- * There must be no branches to `exit:' above this point.
- *
- */
-
- /* allocate an operand stack */
- stackSize = font->isCFF2 ? cf2_getMaxstack( decoder )
- : CF2_OPERAND_STACK_SIZE;
- opStack = cf2_stack_init( memory, error, stackSize );
-
- if ( !opStack )
- {
- lastError = FT_THROW( Out_Of_Memory );
- goto exit;
- }
-
- /* initialize subroutine stack by placing top level charstring as */
- /* first element (max depth plus one for the charstring) */
- /* Note: Caller owns and must finalize the first charstring. */
- /* Our copy of it does not change that requirement. */
- cf2_arrstack_setCount( &subrStack, CF2_MAX_SUBR + 1 );
-
- charstring = (CF2_Buffer)cf2_arrstack_getBuffer( &subrStack );
- *charstring = *buf; /* structure copy */
-
- charstringIndex = 0; /* entry is valid now */
-
- /* catch errors so far */
- if ( *error )
- goto exit;
-
- /* main interpreter loop */
- while ( 1 )
- {
- if ( cf2_buf_isEnd( charstring ) )
- {
- /* If we've reached the end of the charstring, simulate a */
- /* cf2_cmdRETURN or cf2_cmdENDCHAR. */
- /* We do this for both CFF and CFF2. */
- if ( charstringIndex )
- op1 = cf2_cmdRETURN; /* end of buffer for subroutine */
- else
- op1 = cf2_cmdENDCHAR; /* end of buffer for top level charstring */
- }
- else
- {
- op1 = (FT_Byte)cf2_buf_readByte( charstring );
-
- /* Explicit RETURN and ENDCHAR in CFF2 should be ignored. */
- /* Note: Trace message will report 0 instead of 11 or 14. */
- if ( ( op1 == cf2_cmdRETURN || op1 == cf2_cmdENDCHAR ) &&
- font->isCFF2 )
- op1 = cf2_cmdRESERVED_0;
- }
-
- /* check for errors once per loop */
- if ( *error )
- goto exit;
-
- instructionLimit--;
- if ( instructionLimit == 0 )
- {
- lastError = FT_THROW( Invalid_Glyph_Format );
- goto exit;
- }
-
- switch( op1 )
- {
- case cf2_cmdRESERVED_0:
- case cf2_cmdRESERVED_2:
- case cf2_cmdRESERVED_9:
- case cf2_cmdRESERVED_13:
- case cf2_cmdRESERVED_17:
- /* we may get here if we have a prior error */
- FT_TRACE4(( " unknown op (%d)\n", op1 ));
- break;
-
- case cf2_cmdVSINDEX:
- FT_TRACE4(( " vsindex\n" ));
-
- if ( !font->isCFF2 )
- break; /* clear stack & ignore */
-
- if ( font->blend.usedBV )
- {
- /* vsindex not allowed after blend */
- lastError = FT_THROW( Invalid_Glyph_Format );
- goto exit;
- }
-
- {
- FT_Int temp = cf2_stack_popInt( opStack );
-
-
- if ( temp >= 0 )
- font->vsindex = (FT_UInt)temp;
- }
- break;
-
- case cf2_cmdBLEND:
- {
- FT_UInt numBlends;
-
-
- FT_TRACE4(( " blend\n" ));
-
- if ( !font->isCFF2 )
- break; /* clear stack & ignore */
-
- /* do we have a `blend' op in a non-variant font? */
- if ( !font->blend.font )
- {
- lastError = FT_THROW( Invalid_Glyph_Format );
- goto exit;
- }
-
- /* check cached blend vector */
- if ( cff_blend_check_vector( &font->blend,
- font->vsindex,
- font->lenNDV,
- font->NDV ) )
- {
- lastError = cff_blend_build_vector( &font->blend,
- font->vsindex,
- font->lenNDV,
- font->NDV );
- if ( lastError )
- goto exit;
- }
-
- /* do the blend */
- numBlends = (FT_UInt)cf2_stack_popInt( opStack );
- if ( numBlends > stackSize )
- {
- lastError = FT_THROW( Invalid_Glyph_Format );
- goto exit;
- }
-
- cf2_doBlend( &font->blend, opStack, numBlends );
-
- font->blend.usedBV = TRUE;
- }
- continue; /* do not clear the stack */
-
- case cf2_cmdHSTEMHM:
- case cf2_cmdHSTEM:
- FT_TRACE4(( op1 == cf2_cmdHSTEMHM ? " hstemhm\n" : " hstem\n" ));
-
- /* never add hints after the mask is computed */
- if ( cf2_hintmask_isValid( &hintMask ) )
- {
- FT_TRACE4(( "cf2_interpT2CharString:"
- " invalid horizontal hint mask\n" ));
- break;
- }
-
- cf2_doStems( font,
- opStack,
- &hStemHintArray,
- width,
- &haveWidth,
- 0 );
-
- if ( font->decoder->width_only )
- goto exit;
-
- break;
-
- case cf2_cmdVSTEMHM:
- case cf2_cmdVSTEM:
- FT_TRACE4(( op1 == cf2_cmdVSTEMHM ? " vstemhm\n" : " vstem\n" ));
-
- /* never add hints after the mask is computed */
- if ( cf2_hintmask_isValid( &hintMask ) )
- {
- FT_TRACE4(( "cf2_interpT2CharString:"
- " invalid vertical hint mask\n" ));
- break;
- }
-
- cf2_doStems( font,
- opStack,
- &vStemHintArray,
- width,
- &haveWidth,
- 0 );
-
- if ( font->decoder->width_only )
- goto exit;
-
- break;
-
- case cf2_cmdVMOVETO:
- FT_TRACE4(( " vmoveto\n" ));
-
- if ( cf2_stack_count( opStack ) > 1 && !haveWidth )
- *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;
-
- /* width is defined or default after this */
- haveWidth = TRUE;
-
- if ( font->decoder->width_only )
- goto exit;
-
- curY += cf2_stack_popFixed( opStack );
-
- cf2_glyphpath_moveTo( &glyphPath, curX, curY );
-
- break;
-
- case cf2_cmdRLINETO:
- {
- CF2_UInt index;
- CF2_UInt count = cf2_stack_count( opStack );
-
-
- FT_TRACE4(( " rlineto\n" ));
-
- for ( index = 0; index < count; index += 2 )
- {
- curX += cf2_stack_getReal( opStack, index + 0 );
- curY += cf2_stack_getReal( opStack, index + 1 );
-
- cf2_glyphpath_lineTo( &glyphPath, curX, curY );
- }
-
- cf2_stack_clear( opStack );
- }
- continue; /* no need to clear stack again */
-
- case cf2_cmdHLINETO:
- case cf2_cmdVLINETO:
- {
- CF2_UInt index;
- CF2_UInt count = cf2_stack_count( opStack );
-
- FT_Bool isX = FT_BOOL( op1 == cf2_cmdHLINETO );
-
-
- FT_TRACE4(( isX ? " hlineto\n" : " vlineto\n" ));
-
- for ( index = 0; index < count; index++ )
- {
- CF2_Fixed v = cf2_stack_getReal( opStack, index );
-
-
- if ( isX )
- curX += v;
- else
- curY += v;
-
- isX = !isX;
-
- cf2_glyphpath_lineTo( &glyphPath, curX, curY );
- }
-
- cf2_stack_clear( opStack );
- }
- continue;
-
- case cf2_cmdRCURVELINE:
- case cf2_cmdRRCURVETO:
- {
- CF2_UInt count = cf2_stack_count( opStack );
- CF2_UInt index = 0;
-
-
- FT_TRACE4(( op1 == cf2_cmdRCURVELINE ? " rcurveline\n"
- : " rrcurveto\n" ));
-
- while ( index + 6 <= count )
- {
- CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
- CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY;
- CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1;
- CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1;
- CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
- CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2;
-
-
- cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
-
- curX = x3;
- curY = y3;
- index += 6;
- }
-
- if ( op1 == cf2_cmdRCURVELINE )
- {
- curX += cf2_stack_getReal( opStack, index + 0 );
- curY += cf2_stack_getReal( opStack, index + 1 );
-
- cf2_glyphpath_lineTo( &glyphPath, curX, curY );
- }
-
- cf2_stack_clear( opStack );
- }
- continue; /* no need to clear stack again */
-
- case cf2_cmdCALLGSUBR:
- case cf2_cmdCALLSUBR:
- {
- CF2_Int subrNum;
-
-
- FT_TRACE4(( op1 == cf2_cmdCALLGSUBR ? " callgsubr"
- : " callsubr" ));
-
- if ( charstringIndex > CF2_MAX_SUBR )
- {
- /* max subr plus one for charstring */
- lastError = FT_THROW( Invalid_Glyph_Format );
- goto exit; /* overflow of stack */
- }
-
- /* push our current CFF charstring region on subrStack */
- charstring = (CF2_Buffer)
- cf2_arrstack_getPointer(
- &subrStack,
- (size_t)charstringIndex + 1 );
-
- /* set up the new CFF region and pointer */
- subrNum = cf2_stack_popInt( opStack );
-
- switch ( op1 )
- {
- case cf2_cmdCALLGSUBR:
- FT_TRACE4(( " (idx %d, entering level %d)\n",
- subrNum + decoder->globals_bias,
- charstringIndex + 1 ));
-
- if ( cf2_initGlobalRegionBuffer( decoder,
- subrNum,
- charstring ) )
- {
- lastError = FT_THROW( Invalid_Glyph_Format );
- goto exit; /* subroutine lookup or stream error */
- }
- break;
-
- default:
- /* cf2_cmdCALLSUBR */
- FT_TRACE4(( " (idx %d, entering level %d)\n",
- subrNum + decoder->locals_bias,
- charstringIndex + 1 ));
-
- if ( cf2_initLocalRegionBuffer( decoder,
- subrNum,
- charstring ) )
- {
- lastError = FT_THROW( Invalid_Glyph_Format );
- goto exit; /* subroutine lookup or stream error */
- }
- }
-
- charstringIndex += 1; /* entry is valid now */
- }
- continue; /* do not clear the stack */
-
- case cf2_cmdRETURN:
- FT_TRACE4(( " return (leaving level %d)\n", charstringIndex ));
-
- if ( charstringIndex < 1 )
- {
- /* Note: cannot return from top charstring */
- lastError = FT_THROW( Invalid_Glyph_Format );
- goto exit; /* underflow of stack */
- }
-
- /* restore position in previous charstring */
- charstring = (CF2_Buffer)
- cf2_arrstack_getPointer(
- &subrStack,
- (CF2_UInt)--charstringIndex );
- continue; /* do not clear the stack */
-
- case cf2_cmdESC:
- {
- FT_Byte op2 = (FT_Byte)cf2_buf_readByte( charstring );
-
-
- /* first switch for 2-byte operators handles CFF2 */
- /* and opcodes that are reserved for both CFF and CFF2 */
- switch ( op2 )
- {
- case cf2_escHFLEX:
- {
- static const FT_Bool readFromStack[12] =
- {
- TRUE /* dx1 */, FALSE /* dy1 */,
- TRUE /* dx2 */, TRUE /* dy2 */,
- TRUE /* dx3 */, FALSE /* dy3 */,
- TRUE /* dx4 */, FALSE /* dy4 */,
- TRUE /* dx5 */, FALSE /* dy5 */,
- TRUE /* dx6 */, FALSE /* dy6 */
- };
-
-
- FT_TRACE4(( " hflex\n" ));
-
- cf2_doFlex( opStack,
- &curX,
- &curY,
- &glyphPath,
- readFromStack,
- FALSE /* doConditionalLastRead */ );
- }
- continue;
-
- case cf2_escFLEX:
- {
- static const FT_Bool readFromStack[12] =
- {
- TRUE /* dx1 */, TRUE /* dy1 */,
- TRUE /* dx2 */, TRUE /* dy2 */,
- TRUE /* dx3 */, TRUE /* dy3 */,
- TRUE /* dx4 */, TRUE /* dy4 */,
- TRUE /* dx5 */, TRUE /* dy5 */,
- TRUE /* dx6 */, TRUE /* dy6 */
- };
-
-
- FT_TRACE4(( " flex\n" ));
-
- cf2_doFlex( opStack,
- &curX,
- &curY,
- &glyphPath,
- readFromStack,
- FALSE /* doConditionalLastRead */ );
- }
- break; /* TODO: why is this not a continue? */
-
- case cf2_escHFLEX1:
- {
- static const FT_Bool readFromStack[12] =
- {
- TRUE /* dx1 */, TRUE /* dy1 */,
- TRUE /* dx2 */, TRUE /* dy2 */,
- TRUE /* dx3 */, FALSE /* dy3 */,
- TRUE /* dx4 */, FALSE /* dy4 */,
- TRUE /* dx5 */, TRUE /* dy5 */,
- TRUE /* dx6 */, FALSE /* dy6 */
- };
-
-
- FT_TRACE4(( " hflex1\n" ));
-
- cf2_doFlex( opStack,
- &curX,
- &curY,
- &glyphPath,
- readFromStack,
- FALSE /* doConditionalLastRead */ );
- }
- continue;
-
- case cf2_escFLEX1:
- {
- static const FT_Bool readFromStack[12] =
- {
- TRUE /* dx1 */, TRUE /* dy1 */,
- TRUE /* dx2 */, TRUE /* dy2 */,
- TRUE /* dx3 */, TRUE /* dy3 */,
- TRUE /* dx4 */, TRUE /* dy4 */,
- TRUE /* dx5 */, TRUE /* dy5 */,
- FALSE /* dx6 */, FALSE /* dy6 */
- };
-
-
- FT_TRACE4(( " flex1\n" ));
-
- cf2_doFlex( opStack,
- &curX,
- &curY,
- &glyphPath,
- readFromStack,
- TRUE /* doConditionalLastRead */ );
- }
- continue;
-
- /* these opcodes are reserved in both CFF & CFF2 */
- case cf2_escRESERVED_1:
- case cf2_escRESERVED_2:
- case cf2_escRESERVED_6:
- case cf2_escRESERVED_7:
- case cf2_escRESERVED_8:
- case cf2_escRESERVED_13:
- case cf2_escRESERVED_16:
- case cf2_escRESERVED_17:
- case cf2_escRESERVED_19:
- case cf2_escRESERVED_25:
- case cf2_escRESERVED_31:
- case cf2_escRESERVED_32:
- case cf2_escRESERVED_33:
- FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
- break;
-
- default:
- {
- if ( font->isCFF2 || op2 >= cf2_escRESERVED_38 )
- FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
- else
- {
- /* second switch for 2-byte operators handles just CFF */
- switch ( op2 )
- {
-
- case cf2_escDOTSECTION:
- /* something about `flip type of locking' -- ignore it */
- FT_TRACE4(( " dotsection\n" ));
-
- break;
-
- case cf2_escAND:
- {
- CF2_F16Dot16 arg1;
- CF2_F16Dot16 arg2;
-
-
- FT_TRACE4(( " and\n" ));
-
- arg2 = cf2_stack_popFixed( opStack );
- arg1 = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushInt( opStack, arg1 && arg2 );
- }
- continue; /* do not clear the stack */
-
- case cf2_escOR:
- {
- CF2_F16Dot16 arg1;
- CF2_F16Dot16 arg2;
-
-
- FT_TRACE4(( " or\n" ));
-
- arg2 = cf2_stack_popFixed( opStack );
- arg1 = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushInt( opStack, arg1 || arg2 );
- }
- continue; /* do not clear the stack */
-
- case cf2_escNOT:
- {
- CF2_F16Dot16 arg;
-
-
- FT_TRACE4(( " not\n" ));
-
- arg = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushInt( opStack, !arg );
- }
- continue; /* do not clear the stack */
-
- case cf2_escABS:
- {
- CF2_F16Dot16 arg;
-
-
- FT_TRACE4(( " abs\n" ));
-
- arg = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushFixed( opStack, FT_ABS( arg ) );
- }
- continue; /* do not clear the stack */
-
- case cf2_escADD:
- {
- CF2_F16Dot16 summand1;
- CF2_F16Dot16 summand2;
-
-
- FT_TRACE4(( " add\n" ));
-
- summand2 = cf2_stack_popFixed( opStack );
- summand1 = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushFixed( opStack, summand1 + summand2 );
- }
- continue; /* do not clear the stack */
-
- case cf2_escSUB:
- {
- CF2_F16Dot16 minuend;
- CF2_F16Dot16 subtrahend;
-
-
- FT_TRACE4(( " sub\n" ));
-
- subtrahend = cf2_stack_popFixed( opStack );
- minuend = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushFixed( opStack, minuend - subtrahend );
- }
- continue; /* do not clear the stack */
-
- case cf2_escDIV:
- {
- CF2_F16Dot16 dividend;
- CF2_F16Dot16 divisor;
-
-
- FT_TRACE4(( " div\n" ));
-
- divisor = cf2_stack_popFixed( opStack );
- dividend = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushFixed( opStack, FT_DivFix( dividend, divisor ) );
- }
- continue; /* do not clear the stack */
-
- case cf2_escNEG:
- {
- CF2_F16Dot16 arg;
-
-
- FT_TRACE4(( " neg\n" ));
-
- arg = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushFixed( opStack, -arg );
- }
- continue; /* do not clear the stack */
-
- case cf2_escEQ:
- {
- CF2_F16Dot16 arg1;
- CF2_F16Dot16 arg2;
-
-
- FT_TRACE4(( " eq\n" ));
-
- arg2 = cf2_stack_popFixed( opStack );
- arg1 = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushInt( opStack, arg1 == arg2 );
- }
- continue; /* do not clear the stack */
-
- case cf2_escDROP:
- FT_TRACE4(( " drop\n" ));
-
- (void)cf2_stack_popFixed( opStack );
- continue; /* do not clear the stack */
-
- case cf2_escPUT:
- {
- CF2_F16Dot16 val;
- CF2_Int idx;
-
-
- FT_TRACE4(( " put\n" ));
-
- idx = cf2_stack_popInt( opStack );
- val = cf2_stack_popFixed( opStack );
-
- if ( idx >= 0 && idx < CF2_STORAGE_SIZE )
- storage[idx] = val;
- }
- continue; /* do not clear the stack */
-
- case cf2_escGET:
- {
- CF2_Int idx;
-
-
- FT_TRACE4(( " get\n" ));
-
- idx = cf2_stack_popInt( opStack );
-
- if ( idx >= 0 && idx < CF2_STORAGE_SIZE )
- cf2_stack_pushFixed( opStack, storage[idx] );
- }
- continue; /* do not clear the stack */
-
- case cf2_escIFELSE:
- {
- CF2_F16Dot16 arg1;
- CF2_F16Dot16 arg2;
- CF2_F16Dot16 cond1;
- CF2_F16Dot16 cond2;
-
-
- FT_TRACE4(( " ifelse\n" ));
-
- cond2 = cf2_stack_popFixed( opStack );
- cond1 = cf2_stack_popFixed( opStack );
- arg2 = cf2_stack_popFixed( opStack );
- arg1 = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushFixed( opStack, cond1 <= cond2 ? arg1 : arg2 );
- }
- continue; /* do not clear the stack */
-
- case cf2_escRANDOM: /* in spec */
- FT_TRACE4(( " random\n" ));
-
- CF2_FIXME;
- break;
-
- case cf2_escMUL:
- {
- CF2_F16Dot16 factor1;
- CF2_F16Dot16 factor2;
-
-
- FT_TRACE4(( " mul\n" ));
-
- factor2 = cf2_stack_popFixed( opStack );
- factor1 = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushFixed( opStack, FT_MulFix( factor1, factor2 ) );
- }
- continue; /* do not clear the stack */
-
- case cf2_escSQRT:
- {
- CF2_F16Dot16 arg;
-
-
- FT_TRACE4(( " sqrt\n" ));
-
- arg = cf2_stack_popFixed( opStack );
- if ( arg > 0 )
- {
- FT_Fixed root = arg;
- FT_Fixed new_root;
-
-
- /* Babylonian method */
- for (;;)
- {
- new_root = ( root + FT_DivFix( arg, root ) + 1 ) >> 1;
- if ( new_root == root )
- break;
- root = new_root;
- }
- arg = new_root;
- }
- else
- arg = 0;
-
- cf2_stack_pushFixed( opStack, arg );
- }
- continue; /* do not clear the stack */
-
- case cf2_escDUP:
- {
- CF2_F16Dot16 arg;
-
-
- FT_TRACE4(( " dup\n" ));
-
- arg = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushFixed( opStack, arg );
- cf2_stack_pushFixed( opStack, arg );
- }
- continue; /* do not clear the stack */
-
- case cf2_escEXCH:
- {
- CF2_F16Dot16 arg1;
- CF2_F16Dot16 arg2;
-
-
- FT_TRACE4(( " exch\n" ));
-
- arg2 = cf2_stack_popFixed( opStack );
- arg1 = cf2_stack_popFixed( opStack );
-
- cf2_stack_pushFixed( opStack, arg2 );
- cf2_stack_pushFixed( opStack, arg1 );
- }
- continue; /* do not clear the stack */
-
- case cf2_escINDEX:
- {
- CF2_Int idx;
- CF2_UInt size;
-
-
- FT_TRACE4(( " index\n" ));
-
- idx = cf2_stack_popInt( opStack );
- size = cf2_stack_count( opStack );
-
- if ( size > 0 )
- {
- /* for `cf2_stack_getReal', index 0 is bottom of stack */
- CF2_UInt gr_idx;
-
-
- if ( idx < 0 )
- gr_idx = size - 1;
- else if ( (CF2_UInt)idx >= size )
- gr_idx = 0;
- else
- gr_idx = size - 1 - (CF2_UInt)idx;
-
- cf2_stack_pushFixed( opStack,
- cf2_stack_getReal( opStack, gr_idx ) );
- }
- }
- continue; /* do not clear the stack */
-
- case cf2_escROLL:
- {
- CF2_Int idx;
- CF2_Int count;
-
-
- FT_TRACE4(( " roll\n" ));
-
- idx = cf2_stack_popInt( opStack );
- count = cf2_stack_popInt( opStack );
-
- cf2_stack_roll( opStack, count, idx );
- }
- continue; /* do not clear the stack */
-
- } /* end of 2nd switch checking op2 */
- }
- }
- } /* end of 1st switch checking op2 */
- } /* case cf2_cmdESC */
-
- break;
-
- case cf2_cmdENDCHAR:
- FT_TRACE4(( " endchar\n" ));
-
- if ( cf2_stack_count( opStack ) == 1 ||
- cf2_stack_count( opStack ) == 5 )
- {
- if ( !haveWidth )
- *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;
- }
-
- /* width is defined or default after this */
- haveWidth = TRUE;
-
- if ( font->decoder->width_only )
- goto exit;
-
- /* close path if still open */
- cf2_glyphpath_closeOpenPath( &glyphPath );
-
- /* disable seac for CFF2 (charstring ending with args on stack) */
- if ( !font->isCFF2 && cf2_stack_count( opStack ) > 1 )
- {
- /* must be either 4 or 5 -- */
- /* this is a (deprecated) implied `seac' operator */
-
- CF2_Int achar;
- CF2_Int bchar;
- CF2_BufferRec component;
- CF2_Fixed dummyWidth; /* ignore component width */
- FT_Error error2;
-
-
- if ( doingSeac )
- {
- lastError = FT_THROW( Invalid_Glyph_Format );
- goto exit; /* nested seac */
- }
-
- achar = cf2_stack_popInt( opStack );
- bchar = cf2_stack_popInt( opStack );
-
- curY = cf2_stack_popFixed( opStack );
- curX = cf2_stack_popFixed( opStack );
-
- error2 = cf2_getSeacComponent( decoder, achar, &component );
- if ( error2 )
- {
- lastError = error2; /* pass FreeType error through */
- goto exit;
- }
- cf2_interpT2CharString( font,
- &component,
- callbacks,
- translation,
- TRUE,
- curX,
- curY,
- &dummyWidth );
- cf2_freeSeacComponent( decoder, &component );
-
- error2 = cf2_getSeacComponent( decoder, bchar, &component );
- if ( error2 )
- {
- lastError = error2; /* pass FreeType error through */
- goto exit;
- }
- cf2_interpT2CharString( font,
- &component,
- callbacks,
- translation,
- TRUE,
- 0,
- 0,
- &dummyWidth );
- cf2_freeSeacComponent( decoder, &component );
- }
- goto exit;
-
- case cf2_cmdCNTRMASK:
- case cf2_cmdHINTMASK:
- /* the final \n in the tracing message gets added in */
- /* `cf2_hintmask_read' (which also traces the mask bytes) */
- FT_TRACE4(( op1 == cf2_cmdCNTRMASK ? " cntrmask" : " hintmask" ));
-
- /* never add hints after the mask is computed */
- if ( cf2_stack_count( opStack ) > 1 &&
- cf2_hintmask_isValid( &hintMask ) )
- {
- FT_TRACE4(( "cf2_interpT2CharString: invalid hint mask\n" ));
- break;
- }
-
- /* if there are arguments on the stack, there this is an */
- /* implied cf2_cmdVSTEMHM */
- cf2_doStems( font,
- opStack,
- &vStemHintArray,
- width,
- &haveWidth,
- 0 );
-
- if ( font->decoder->width_only )
- goto exit;
-
- if ( op1 == cf2_cmdHINTMASK )
- {
- /* consume the hint mask bytes which follow the operator */
- cf2_hintmask_read( &hintMask,
- charstring,
- cf2_arrstack_size( &hStemHintArray ) +
- cf2_arrstack_size( &vStemHintArray ) );
- }
- else
- {
- /*
- * Consume the counter mask bytes which follow the operator:
- * Build a temporary hint map, just to place and lock those
- * stems participating in the counter mask. These are most
- * likely the dominant hstems, and are grouped together in a
- * few counter groups, not necessarily in correspondence
- * with the hint groups. This reduces the chances of
- * conflicts between hstems that are initially placed in
- * separate hint groups and then brought together. The
- * positions are copied back to `hStemHintArray', so we can
- * discard `counterMask' and `counterHintMap'.
- *
- */
- CF2_HintMapRec counterHintMap;
- CF2_HintMaskRec counterMask;
-
-
- cf2_hintmap_init( &counterHintMap,
- font,
- &glyphPath.initialHintMap,
- &glyphPath.hintMoves,
- scaleY );
- cf2_hintmask_init( &counterMask, error );
-
- cf2_hintmask_read( &counterMask,
- charstring,
- cf2_arrstack_size( &hStemHintArray ) +
- cf2_arrstack_size( &vStemHintArray ) );
- cf2_hintmap_build( &counterHintMap,
- &hStemHintArray,
- &vStemHintArray,
- &counterMask,
- 0,
- FALSE );
- }
- break;
-
- case cf2_cmdRMOVETO:
- FT_TRACE4(( " rmoveto\n" ));
-
- if ( cf2_stack_count( opStack ) > 2 && !haveWidth )
- *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;
-
- /* width is defined or default after this */
- haveWidth = TRUE;
-
- if ( font->decoder->width_only )
- goto exit;
-
- curY += cf2_stack_popFixed( opStack );
- curX += cf2_stack_popFixed( opStack );
-
- cf2_glyphpath_moveTo( &glyphPath, curX, curY );
-
- break;
-
- case cf2_cmdHMOVETO:
- FT_TRACE4(( " hmoveto\n" ));
-
- if ( cf2_stack_count( opStack ) > 1 && !haveWidth )
- *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;
-
- /* width is defined or default after this */
- haveWidth = TRUE;
-
- if ( font->decoder->width_only )
- goto exit;
-
- curX += cf2_stack_popFixed( opStack );
-
- cf2_glyphpath_moveTo( &glyphPath, curX, curY );
-
- break;
-
- case cf2_cmdRLINECURVE:
- {
- CF2_UInt count = cf2_stack_count( opStack );
- CF2_UInt index = 0;
-
-
- FT_TRACE4(( " rlinecurve\n" ));
-
- while ( index + 6 < count )
- {
- curX += cf2_stack_getReal( opStack, index + 0 );
- curY += cf2_stack_getReal( opStack, index + 1 );
-
- cf2_glyphpath_lineTo( &glyphPath, curX, curY );
- index += 2;
- }
-
- while ( index < count )
- {
- CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
- CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY;
- CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1;
- CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1;
- CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
- CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2;
-
-
- cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
-
- curX = x3;
- curY = y3;
- index += 6;
- }
-
- cf2_stack_clear( opStack );
- }
- continue; /* no need to clear stack again */
-
- case cf2_cmdVVCURVETO:
- {
- CF2_UInt count, count1 = cf2_stack_count( opStack );
- CF2_UInt index = 0;
-
-
- /* if `cf2_stack_count' isn't of the form 4n or 4n+1, */
- /* we enforce it by clearing the second bit */
- /* (and sorting the stack indexing to suit) */
- count = count1 & ~2U;
- index += count1 - count;
-
- FT_TRACE4(( " vvcurveto\n" ));
-
- while ( index < count )
- {
- CF2_Fixed x1, y1, x2, y2, x3, y3;
-
-
- if ( ( count - index ) & 1 )
- {
- x1 = cf2_stack_getReal( opStack, index ) + curX;
-
- index++;
- }
- else
- x1 = curX;
-
- y1 = cf2_stack_getReal( opStack, index + 0 ) + curY;
- x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
- y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
- x3 = x2;
- y3 = cf2_stack_getReal( opStack, index + 3 ) + y2;
-
- cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
-
- curX = x3;
- curY = y3;
- index += 4;
- }
-
- cf2_stack_clear( opStack );
- }
- continue; /* no need to clear stack again */
-
- case cf2_cmdHHCURVETO:
- {
- CF2_UInt count, count1 = cf2_stack_count( opStack );
- CF2_UInt index = 0;
-
-
- /* if `cf2_stack_count' isn't of the form 4n or 4n+1, */
- /* we enforce it by clearing the second bit */
- /* (and sorting the stack indexing to suit) */
- count = count1 & ~2U;
- index += count1 - count;
-
- FT_TRACE4(( " hhcurveto\n" ));
-
- while ( index < count )
- {
- CF2_Fixed x1, y1, x2, y2, x3, y3;
-
-
- if ( ( count - index ) & 1 )
- {
- y1 = cf2_stack_getReal( opStack, index ) + curY;
-
- index++;
- }
- else
- y1 = curY;
-
- x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
- x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
- y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
- x3 = cf2_stack_getReal( opStack, index + 3 ) + x2;
- y3 = y2;
-
- cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
-
- curX = x3;
- curY = y3;
- index += 4;
- }
-
- cf2_stack_clear( opStack );
- }
- continue; /* no need to clear stack again */
-
- case cf2_cmdVHCURVETO:
- case cf2_cmdHVCURVETO:
- {
- CF2_UInt count, count1 = cf2_stack_count( opStack );
- CF2_UInt index = 0;
-
- FT_Bool alternate = FT_BOOL( op1 == cf2_cmdHVCURVETO );
-
-
- /* if `cf2_stack_count' isn't of the form 8n, 8n+1, */
- /* 8n+4, or 8n+5, we enforce it by clearing the */
- /* second bit */
- /* (and sorting the stack indexing to suit) */
- count = count1 & ~2U;
- index += count1 - count;
-
- FT_TRACE4(( alternate ? " hvcurveto\n" : " vhcurveto\n" ));
-
- while ( index < count )
- {
- CF2_Fixed x1, x2, x3, y1, y2, y3;
-
-
- if ( alternate )
- {
- x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
- y1 = curY;
- x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
- y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
- y3 = cf2_stack_getReal( opStack, index + 3 ) + y2;
-
- if ( count - index == 5 )
- {
- x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
-
- index++;
- }
- else
- x3 = x2;
-
- alternate = FALSE;
- }
- else
- {
- x1 = curX;
- y1 = cf2_stack_getReal( opStack, index + 0 ) + curY;
- x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
- y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
- x3 = cf2_stack_getReal( opStack, index + 3 ) + x2;
-
- if ( count - index == 5 )
- {
- y3 = cf2_stack_getReal( opStack, index + 4 ) + y2;
-
- index++;
- }
- else
- y3 = y2;
-
- alternate = TRUE;
- }
-
- cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
-
- curX = x3;
- curY = y3;
- index += 4;
- }
-
- cf2_stack_clear( opStack );
- }
- continue; /* no need to clear stack again */
-
- case cf2_cmdEXTENDEDNMBR:
- {
- CF2_Int v;
-
- CF2_Int byte1 = cf2_buf_readByte( charstring );
- CF2_Int byte2 = cf2_buf_readByte( charstring );
-
-
- v = (FT_Short)( ( byte1 << 8 ) |
- byte2 );
-
- FT_TRACE4(( " %d", v ));
-
- cf2_stack_pushInt( opStack, v );
- }
- continue;
-
- default:
- /* numbers */
- {
- if ( /* op1 >= 32 && */ op1 <= 246 )
- {
- CF2_Int v;
-
-
- v = op1 - 139;
-
- FT_TRACE4(( " %d", v ));
-
- /* -107 .. 107 */
- cf2_stack_pushInt( opStack, v );
- }
-
- else if ( /* op1 >= 247 && */ op1 <= 250 )
- {
- CF2_Int v;
-
-
- v = op1;
- v -= 247;
- v *= 256;
- v += cf2_buf_readByte( charstring );
- v += 108;
-
- FT_TRACE4(( " %d", v ));
-
- /* 108 .. 1131 */
- cf2_stack_pushInt( opStack, v );
- }
-
- else if ( /* op1 >= 251 && */ op1 <= 254 )
- {
- CF2_Int v;
-
-
- v = op1;
- v -= 251;
- v *= 256;
- v += cf2_buf_readByte( charstring );
- v = -v - 108;
-
- FT_TRACE4(( " %d", v ));
-
- /* -1131 .. -108 */
- cf2_stack_pushInt( opStack, v );
- }
-
- else /* op1 == 255 */
- {
- CF2_Fixed v;
-
- FT_UInt32 byte1 = (FT_UInt32)cf2_buf_readByte( charstring );
- FT_UInt32 byte2 = (FT_UInt32)cf2_buf_readByte( charstring );
- FT_UInt32 byte3 = (FT_UInt32)cf2_buf_readByte( charstring );
- FT_UInt32 byte4 = (FT_UInt32)cf2_buf_readByte( charstring );
-
-
- v = (CF2_Fixed)( ( byte1 << 24 ) |
- ( byte2 << 16 ) |
- ( byte3 << 8 ) |
- byte4 );
-
- FT_TRACE4(( " %.5f", v / 65536.0 ));
-
- cf2_stack_pushFixed( opStack, v );
- }
- }
- continue; /* don't clear stack */
-
- } /* end of switch statement checking `op1' */
-
- cf2_stack_clear( opStack );
-
- } /* end of main interpreter loop */
-
- /* we get here if the charstring ends without cf2_cmdENDCHAR */
- FT_TRACE4(( "cf2_interpT2CharString:"
- " charstring ends without ENDCHAR\n" ));
-
- exit:
- /* check whether last error seen is also the first one */
- cf2_setError( error, lastError );
-
- if ( *error )
- FT_TRACE4(( "charstring error %d\n", *error ));
-
- /* free resources from objects we've used */
- cf2_glyphpath_finalize( &glyphPath );
- cf2_arrstack_finalize( &vStemHintArray );
- cf2_arrstack_finalize( &hStemHintArray );
- cf2_arrstack_finalize( &subrStack );
- cf2_stack_free( opStack );
-
- FT_TRACE4(( "\n" ));
-
- return;
- }
-
-
-/* END */
diff --git a/modules/freetype2/src/cff/cff.c b/modules/freetype2/src/cff/cff.c
index 86ca1be04..1a755d5da 100644
--- a/modules/freetype2/src/cff/cff.c
+++ b/modules/freetype2/src/cff/cff.c
@@ -4,7 +4,7 @@
/* */
/* FreeType OpenType driver component (body only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,25 +17,14 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "cffpic.c"
+#include "cffcmap.c"
#include "cffdrivr.c"
+#include "cffgload.c"
#include "cffparse.c"
+#include "cffpic.c"
#include "cffload.c"
#include "cffobjs.c"
-#include "cffgload.c"
-#include "cffcmap.c"
-
-#include "cf2arrst.c"
-#include "cf2blues.c"
-#include "cf2error.c"
-#include "cf2font.c"
-#include "cf2ft.c"
-#include "cf2hints.c"
-#include "cf2intrp.c"
-#include "cf2read.c"
-#include "cf2stack.c"
/* END */
diff --git a/modules/freetype2/src/cff/cffcmap.c b/modules/freetype2/src/cff/cffcmap.c
index 695ba69d9..e45ae1127 100644
--- a/modules/freetype2/src/cff/cffcmap.c
+++ b/modules/freetype2/src/cff/cffcmap.c
@@ -4,7 +4,7 @@
/* */
/* CFF character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cff/cffcmap.h b/modules/freetype2/src/cff/cffcmap.h
index 23795d509..856a43dd1 100644
--- a/modules/freetype2/src/cff/cffcmap.h
+++ b/modules/freetype2/src/cff/cffcmap.h
@@ -4,7 +4,7 @@
/* */
/* CFF character mapping table (cmap) support (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,7 +19,7 @@
#ifndef CFFCMAP_H_
#define CFFCMAP_H_
-#include "cffobjs.h"
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
FT_BEGIN_HEADER
diff --git a/modules/freetype2/src/cff/cffdrivr.c b/modules/freetype2/src/cff/cffdrivr.c
index 31825286e..df896848d 100644
--- a/modules/freetype2/src/cff/cffdrivr.c
+++ b/modules/freetype2/src/cff/cffdrivr.c
@@ -4,7 +4,7 @@
/* */
/* OpenType font driver implementation (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,19 +21,24 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include FT_INTERNAL_POSTSCRIPT_PROPS_H
#include FT_SERVICE_CID_H
#include FT_SERVICE_POSTSCRIPT_INFO_H
#include FT_SERVICE_POSTSCRIPT_NAME_H
#include FT_SERVICE_TT_CMAP_H
+#include FT_SERVICE_CFF_TABLE_LOAD_H
#include "cffdrivr.h"
#include "cffgload.h"
#include "cffload.h"
#include "cffcmap.h"
#include "cffparse.h"
+#include "cffobjs.h"
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
#include FT_SERVICE_MULTIPLE_MASTERS_H
+#include FT_SERVICE_METRICS_VARIATIONS_H
#endif
#include "cfferrs.h"
@@ -42,7 +47,7 @@
#include FT_SERVICE_FONT_FORMAT_H
#include FT_SERVICE_GLYPH_DICT_H
#include FT_SERVICE_PROPERTIES_H
-#include FT_CFF_DRIVER_H
+#include FT_DRIVER_H
/*************************************************************************/
@@ -213,8 +218,8 @@
{
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
/* no fast retrieval for blended MM fonts without VVAR table */
- if ( !ttface->is_default_instance &&
- !( ttface->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
+ if ( ( FT_IS_NAMED_INSTANCE( face ) || FT_IS_VARIATION( face ) ) &&
+ !( ttface->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
return FT_THROW( Unimplemented_Feature );
#endif
@@ -236,8 +241,10 @@
&dummy,
&ah );
- FT_TRACE5(( " idx %d: advance height %d font units\n",
- start + nn, ah ));
+ FT_TRACE5(( " idx %d: advance height %d font unit%s\n",
+ start + nn,
+ ah,
+ ah == 1 ? "" : "s" ));
advances[nn] = ah;
}
}
@@ -245,8 +252,8 @@
{
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
/* no fast retrieval for blended MM fonts without HVAR table */
- if ( !ttface->is_default_instance &&
- !( ttface->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
+ if ( ( FT_IS_NAMED_INSTANCE( face ) || FT_IS_VARIATION( face ) ) &&
+ !( ttface->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
return FT_THROW( Unimplemented_Feature );
#endif
@@ -265,8 +272,10 @@
&dummy,
&aw );
- FT_TRACE5(( " idx %d: advance width %d font units\n",
- start + nn, aw ));
+ FT_TRACE5(( " idx %d: advance width %d font unit%s\n",
+ start + nn,
+ aw,
+ aw == 1 ? "" : "s" ));
advances[nn] = aw;
}
}
@@ -492,11 +501,89 @@
}
+ static FT_Error
+ cff_ps_get_font_extra( CFF_Face face,
+ PS_FontExtraRec* afont_extra )
+ {
+ CFF_Font cff = (CFF_Font)face->extra.data;
+ FT_Error error = FT_Err_Ok;
+
+
+ if ( cff && cff->font_extra == NULL )
+ {
+ CFF_FontRecDict dict = &cff->top_font.font_dict;
+ PS_FontExtraRec* font_extra = NULL;
+ FT_Memory memory = face->root.memory;
+ FT_String* embedded_postscript;
+
+
+ if ( FT_ALLOC( font_extra, sizeof ( *font_extra ) ) )
+ goto Fail;
+
+ font_extra->fs_type = 0U;
+
+ embedded_postscript = cff_index_get_sid_string(
+ cff,
+ dict->embedded_postscript );
+ if ( embedded_postscript )
+ {
+ FT_String* start_fstype;
+ FT_String* start_def;
+
+
+ /* Identify the XYZ integer in `/FSType XYZ def' substring. */
+ if ( ( start_fstype = ft_strstr( embedded_postscript,
+ "/FSType" ) ) != NULL &&
+ ( start_def = ft_strstr( start_fstype +
+ sizeof ( "/FSType" ) - 1,
+ "def" ) ) != NULL )
+ {
+ FT_String* s;
+
+
+ for ( s = start_fstype + sizeof ( "/FSType" ) - 1;
+ s != start_def;
+ s++ )
+ {
+ if ( *s >= '0' && *s <= '9' )
+ {
+ if ( font_extra->fs_type >= ( FT_USHORT_MAX - 9 ) / 10 )
+ {
+ /* Overflow - ignore the FSType value. */
+ font_extra->fs_type = 0U;
+ break;
+ }
+
+ font_extra->fs_type *= 10;
+ font_extra->fs_type += (FT_UShort)( *s - '0' );
+ }
+ else if ( *s != ' ' && *s != '\n' && *s != '\r' )
+ {
+ /* Non-whitespace character between `/FSType' and next `def' */
+ /* - ignore the FSType value. */
+ font_extra->fs_type = 0U;
+ break;
+ }
+ }
+ }
+ }
+
+ cff->font_extra = font_extra;
+ }
+
+ if ( cff )
+ *afont_extra = *cff->font_extra;
+
+ Fail:
+ return error;
+ }
+
+
FT_DEFINE_SERVICE_PSINFOREC(
cff_service_ps_info,
(PS_GetFontInfoFunc) cff_ps_get_font_info, /* ps_get_font_info */
- (PS_GetFontExtraFunc) NULL, /* ps_get_font_extra */
+ (PS_GetFontExtraFunc) cff_ps_get_font_extra, /* ps_get_font_extra */
(PS_HasGlyphNamesFunc) cff_ps_has_glyph_names, /* ps_has_glyph_names */
/* unsupported with CFF fonts */
(PS_GetFontPrivateFunc)NULL, /* ps_get_font_private */
@@ -734,208 +821,12 @@
* PROPERTY SERVICE
*
*/
- static FT_Error
- cff_property_set( FT_Module module, /* CFF_Driver */
- const char* property_name,
- const void* value,
- FT_Bool value_is_string )
- {
- FT_Error error = FT_Err_Ok;
- CFF_Driver driver = (CFF_Driver)module;
-
-#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
- FT_UNUSED( value_is_string );
-#endif
-
-
- if ( !ft_strcmp( property_name, "darkening-parameters" ) )
- {
- FT_Int* darken_params;
- FT_Int x1, y1, x2, y2, x3, y3, x4, y4;
-
-#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
- FT_Int dp[8];
-
-
- if ( value_is_string )
- {
- const char* s = (const char*)value;
- char* ep;
- int i;
-
-
- /* eight comma-separated numbers */
- for ( i = 0; i < 7; i++ )
- {
- dp[i] = (FT_Int)ft_strtol( s, &ep, 10 );
- if ( *ep != ',' || s == ep )
- return FT_THROW( Invalid_Argument );
-
- s = ep + 1;
- }
-
- dp[7] = (FT_Int)ft_strtol( s, &ep, 10 );
- if ( !( *ep == '\0' || *ep == ' ' ) || s == ep )
- return FT_THROW( Invalid_Argument );
-
- darken_params = dp;
- }
- else
-#endif
- darken_params = (FT_Int*)value;
-
- x1 = darken_params[0];
- y1 = darken_params[1];
- x2 = darken_params[2];
- y2 = darken_params[3];
- x3 = darken_params[4];
- y3 = darken_params[5];
- x4 = darken_params[6];
- y4 = darken_params[7];
-
- if ( x1 < 0 || x2 < 0 || x3 < 0 || x4 < 0 ||
- y1 < 0 || y2 < 0 || y3 < 0 || y4 < 0 ||
- x1 > x2 || x2 > x3 || x3 > x4 ||
- y1 > 500 || y2 > 500 || y3 > 500 || y4 > 500 )
- return FT_THROW( Invalid_Argument );
-
- driver->darken_params[0] = x1;
- driver->darken_params[1] = y1;
- driver->darken_params[2] = x2;
- driver->darken_params[3] = y2;
- driver->darken_params[4] = x3;
- driver->darken_params[5] = y3;
- driver->darken_params[6] = x4;
- driver->darken_params[7] = y4;
-
- return error;
- }
- else if ( !ft_strcmp( property_name, "hinting-engine" ) )
- {
-#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
- if ( value_is_string )
- {
- const char* s = (const char*)value;
-
-
- if ( !ft_strcmp( s, "adobe" ) )
- driver->hinting_engine = FT_CFF_HINTING_ADOBE;
-#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
- else if ( !ft_strcmp( s, "freetype" ) )
- driver->hinting_engine = FT_CFF_HINTING_FREETYPE;
-#endif
- else
- return FT_THROW( Invalid_Argument );
- }
- else
-#endif
- {
- FT_UInt* hinting_engine = (FT_UInt*)value;
-
- if ( *hinting_engine == FT_CFF_HINTING_ADOBE
-#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
- || *hinting_engine == FT_CFF_HINTING_FREETYPE
-#endif
- )
- driver->hinting_engine = *hinting_engine;
- else
- error = FT_ERR( Unimplemented_Feature );
-
- return error;
- }
- }
- else if ( !ft_strcmp( property_name, "no-stem-darkening" ) )
- {
-#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
- if ( value_is_string )
- {
- const char* s = (const char*)value;
- long nsd = ft_strtol( s, NULL, 10 );
-
-
- if ( nsd == 0 )
- driver->no_stem_darkening = 0;
- else if ( nsd == 1 )
- driver->no_stem_darkening = 1;
- else
- return FT_THROW( Invalid_Argument );
- }
- else
-#endif
- {
- FT_Bool* no_stem_darkening = (FT_Bool*)value;
-
-
- driver->no_stem_darkening = *no_stem_darkening;
- }
-
- return error;
- }
-
- FT_TRACE0(( "cff_property_set: missing property `%s'\n",
- property_name ));
- return FT_THROW( Missing_Property );
- }
-
-
- static FT_Error
- cff_property_get( FT_Module module, /* CFF_Driver */
- const char* property_name,
- const void* value )
- {
- FT_Error error = FT_Err_Ok;
- CFF_Driver driver = (CFF_Driver)module;
-
-
- if ( !ft_strcmp( property_name, "darkening-parameters" ) )
- {
- FT_Int* darken_params = driver->darken_params;
- FT_Int* val = (FT_Int*)value;
-
-
- val[0] = darken_params[0];
- val[1] = darken_params[1];
- val[2] = darken_params[2];
- val[3] = darken_params[3];
- val[4] = darken_params[4];
- val[5] = darken_params[5];
- val[6] = darken_params[6];
- val[7] = darken_params[7];
-
- return error;
- }
- else if ( !ft_strcmp( property_name, "hinting-engine" ) )
- {
- FT_UInt hinting_engine = driver->hinting_engine;
- FT_UInt* val = (FT_UInt*)value;
-
-
- *val = hinting_engine;
-
- return error;
- }
- else if ( !ft_strcmp( property_name, "no-stem-darkening" ) )
- {
- FT_Bool no_stem_darkening = driver->no_stem_darkening;
- FT_Bool* val = (FT_Bool*)value;
-
-
- *val = no_stem_darkening;
-
- return error;
- }
-
- FT_TRACE0(( "cff_property_get: missing property `%s'\n",
- property_name ));
- return FT_THROW( Missing_Property );
- }
-
FT_DEFINE_SERVICE_PROPERTIESREC(
cff_service_properties,
- (FT_Properties_SetFunc)cff_property_set, /* set_property */
- (FT_Properties_GetFunc)cff_property_get ) /* get_property */
+ (FT_Properties_SetFunc)ps_property_set, /* set_property */
+ (FT_Properties_GetFunc)ps_property_get ) /* get_property */
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
@@ -1004,6 +895,17 @@
}
+ static FT_Error
+ cff_set_instance( CFF_Face face,
+ FT_UInt instance_index )
+ {
+ FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
+
+
+ return mm->set_instance( FT_FACE( face ), instance_index );
+ }
+
+
FT_DEFINE_SERVICE_MULTIMASTERSREC(
cff_service_multi_masters,
@@ -1014,13 +916,73 @@
(FT_Get_MM_Var_Func) cff_get_mm_var, /* get_mm_var */
(FT_Set_Var_Design_Func)cff_set_var_design, /* set_var_design */
(FT_Get_Var_Design_Func)cff_get_var_design, /* get_var_design */
+ (FT_Set_Instance_Func) cff_set_instance, /* set_instance */
(FT_Get_Var_Blend_Func) cff_get_var_blend, /* get_var_blend */
(FT_Done_Blend_Func) cff_done_blend /* done_blend */
)
+
+
+ /*
+ * METRICS VARIATIONS SERVICE
+ *
+ */
+
+ static FT_Error
+ cff_hadvance_adjust( CFF_Face face,
+ FT_UInt gindex,
+ FT_Int *avalue )
+ {
+ FT_Service_MetricsVariations var = (FT_Service_MetricsVariations)face->var;
+
+
+ return var->hadvance_adjust( FT_FACE( face ), gindex, avalue );
+ }
+
+
+ static void
+ cff_metrics_adjust( CFF_Face face )
+ {
+ FT_Service_MetricsVariations var = (FT_Service_MetricsVariations)face->var;
+
+
+ var->metrics_adjust( FT_FACE( face ) );
+ }
+
+
+ FT_DEFINE_SERVICE_METRICSVARIATIONSREC(
+ cff_service_metrics_variations,
+
+ (FT_HAdvance_Adjust_Func)cff_hadvance_adjust, /* hadvance_adjust */
+ (FT_LSB_Adjust_Func) NULL, /* lsb_adjust */
+ (FT_RSB_Adjust_Func) NULL, /* rsb_adjust */
+
+ (FT_VAdvance_Adjust_Func)NULL, /* vadvance_adjust */
+ (FT_TSB_Adjust_Func) NULL, /* tsb_adjust */
+ (FT_BSB_Adjust_Func) NULL, /* bsb_adjust */
+ (FT_VOrg_Adjust_Func) NULL, /* vorg_adjust */
+
+ (FT_Metrics_Adjust_Func) cff_metrics_adjust /* metrics_adjust */
+ )
#endif
+ /*
+ * CFFLOAD SERVICE
+ *
+ */
+
+ FT_DEFINE_SERVICE_CFFLOADREC(
+ cff_service_cff_load,
+
+ (FT_Get_Standard_Encoding_Func)cff_get_standard_encoding,
+ (FT_Load_Private_Dict_Func) cff_load_private_dict,
+ (FT_FD_Select_Get_Func) cff_fd_select_get,
+ (FT_Blend_Check_Vector_Func) cff_blend_check_vector,
+ (FT_Blend_Build_Vector_Func) cff_blend_build_vector
+ )
+
+
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -1035,20 +997,22 @@
#if !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES && \
defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
- FT_DEFINE_SERVICEDESCREC8(
+ FT_DEFINE_SERVICEDESCREC10(
cff_services,
FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_CFF,
FT_SERVICE_ID_MULTI_MASTERS, &CFF_SERVICE_MULTI_MASTERS_GET,
+ FT_SERVICE_ID_METRICS_VARIATIONS, &CFF_SERVICE_METRICS_VAR_GET,
FT_SERVICE_ID_POSTSCRIPT_INFO, &CFF_SERVICE_PS_INFO_GET,
FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,
FT_SERVICE_ID_GLYPH_DICT, &CFF_SERVICE_GLYPH_DICT_GET,
FT_SERVICE_ID_TT_CMAP, &CFF_SERVICE_GET_CMAP_INFO_GET,
FT_SERVICE_ID_CID, &CFF_SERVICE_CID_INFO_GET,
- FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET
+ FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET,
+ FT_SERVICE_ID_CFF_LOAD, &CFF_SERVICE_CFF_LOAD_GET
)
#elif !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES
- FT_DEFINE_SERVICEDESCREC7(
+ FT_DEFINE_SERVICEDESCREC8(
cff_services,
FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_CFF,
@@ -1057,22 +1021,25 @@
FT_SERVICE_ID_GLYPH_DICT, &CFF_SERVICE_GLYPH_DICT_GET,
FT_SERVICE_ID_TT_CMAP, &CFF_SERVICE_GET_CMAP_INFO_GET,
FT_SERVICE_ID_CID, &CFF_SERVICE_CID_INFO_GET,
- FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET
+ FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET,
+ FT_SERVICE_ID_CFF_LOAD, &CFF_SERVICE_CFF_LOAD_GET
)
#elif defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
- FT_DEFINE_SERVICEDESCREC7(
+ FT_DEFINE_SERVICEDESCREC9(
cff_services,
FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_CFF,
FT_SERVICE_ID_MULTI_MASTERS, &CFF_SERVICE_MULTI_MASTERS_GET,
+ FT_SERVICE_ID_METRICS_VARIATIONS, &CFF_SERVICE_METRICS_VAR_GET,
FT_SERVICE_ID_POSTSCRIPT_INFO, &CFF_SERVICE_PS_INFO_GET,
FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,
FT_SERVICE_ID_TT_CMAP, &CFF_SERVICE_GET_CMAP_INFO_GET,
FT_SERVICE_ID_CID, &CFF_SERVICE_CID_INFO_GET,
- FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET
+ FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET,
+ FT_SERVICE_ID_CFF_LOAD, &CFF_SERVICE_CFF_LOAD_GET
)
#else
- FT_DEFINE_SERVICEDESCREC6(
+ FT_DEFINE_SERVICEDESCREC7(
cff_services,
FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_CFF,
@@ -1080,7 +1047,8 @@
FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,
FT_SERVICE_ID_TT_CMAP, &CFF_SERVICE_GET_CMAP_INFO_GET,
FT_SERVICE_ID_CID, &CFF_SERVICE_CID_INFO_GET,
- FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET
+ FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET,
+ FT_SERVICE_ID_CFF_LOAD, &CFF_SERVICE_CFF_LOAD_GET
)
#endif
@@ -1139,7 +1107,7 @@
FT_MODULE_DRIVER_HAS_HINTER |
FT_MODULE_DRIVER_HINTS_LIGHTLY,
- sizeof ( CFF_DriverRec ),
+ sizeof ( PS_DriverRec ),
"cff",
0x10000L,
0x20000L,
diff --git a/modules/freetype2/src/cff/cffdrivr.h b/modules/freetype2/src/cff/cffdrivr.h
index d7b059837..ad7c3ad70 100644
--- a/modules/freetype2/src/cff/cffdrivr.h
+++ b/modules/freetype2/src/cff/cffdrivr.h
@@ -4,7 +4,7 @@
/* */
/* High-level OpenType driver interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cff/cfferrs.h b/modules/freetype2/src/cff/cfferrs.h
index e7fc6eb71..b2e1bfaf9 100644
--- a/modules/freetype2/src/cff/cfferrs.h
+++ b/modules/freetype2/src/cff/cfferrs.h
@@ -4,7 +4,7 @@
/* */
/* CFF error codes (specification only). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cff/cffgload.c b/modules/freetype2/src/cff/cffgload.c
index d8084f865..c58471ce8 100644
--- a/modules/freetype2/src/cff/cffgload.c
+++ b/modules/freetype2/src/cff/cffgload.c
@@ -4,7 +4,7 @@
/* */
/* OpenType Glyph Loader (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,13 +20,13 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
+#include FT_INTERNAL_CALC_H
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
#include FT_OUTLINE_H
-#include FT_CFF_DRIVER_H
+#include FT_DRIVER_H
-#include "cffobjs.h"
#include "cffload.h"
#include "cffgload.h"
-#include "cf2ft.h" /* for cf2_decoder_parse_charstrings */
#include "cfferrs.h"
@@ -41,618 +41,6 @@
#define FT_COMPONENT trace_cffgload
-#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
-
- typedef enum CFF_Operator_
- {
- cff_op_unknown = 0,
-
- cff_op_rmoveto,
- cff_op_hmoveto,
- cff_op_vmoveto,
-
- cff_op_rlineto,
- cff_op_hlineto,
- cff_op_vlineto,
-
- cff_op_rrcurveto,
- cff_op_hhcurveto,
- cff_op_hvcurveto,
- cff_op_rcurveline,
- cff_op_rlinecurve,
- cff_op_vhcurveto,
- cff_op_vvcurveto,
-
- cff_op_flex,
- cff_op_hflex,
- cff_op_hflex1,
- cff_op_flex1,
-
- cff_op_endchar,
-
- cff_op_hstem,
- cff_op_vstem,
- cff_op_hstemhm,
- cff_op_vstemhm,
-
- cff_op_hintmask,
- cff_op_cntrmask,
- cff_op_dotsection, /* deprecated, acts as no-op */
-
- cff_op_abs,
- cff_op_add,
- cff_op_sub,
- cff_op_div,
- cff_op_neg,
- cff_op_random,
- cff_op_mul,
- cff_op_sqrt,
-
- cff_op_blend,
-
- cff_op_drop,
- cff_op_exch,
- cff_op_index,
- cff_op_roll,
- cff_op_dup,
-
- cff_op_put,
- cff_op_get,
- cff_op_store,
- cff_op_load,
-
- cff_op_and,
- cff_op_or,
- cff_op_not,
- cff_op_eq,
- cff_op_ifelse,
-
- cff_op_callsubr,
- cff_op_callgsubr,
- cff_op_return,
-
- /* Type 1 opcodes: invalid but seen in real life */
- cff_op_hsbw,
- cff_op_closepath,
- cff_op_callothersubr,
- cff_op_pop,
- cff_op_seac,
- cff_op_sbw,
- cff_op_setcurrentpoint,
-
- /* do not remove */
- cff_op_max
-
- } CFF_Operator;
-
-
-#define CFF_COUNT_CHECK_WIDTH 0x80
-#define CFF_COUNT_EXACT 0x40
-#define CFF_COUNT_CLEAR_STACK 0x20
-
- /* count values which have the `CFF_COUNT_CHECK_WIDTH' flag set are */
- /* used for checking the width and requested numbers of arguments */
- /* only; they are set to zero afterwards */
-
- /* the other two flags are informative only and unused currently */
-
- static const FT_Byte cff_argument_counts[] =
- {
- 0, /* unknown */
-
- 2 | CFF_COUNT_CHECK_WIDTH | CFF_COUNT_EXACT, /* rmoveto */
- 1 | CFF_COUNT_CHECK_WIDTH | CFF_COUNT_EXACT,
- 1 | CFF_COUNT_CHECK_WIDTH | CFF_COUNT_EXACT,
-
- 0 | CFF_COUNT_CLEAR_STACK, /* rlineto */
- 0 | CFF_COUNT_CLEAR_STACK,
- 0 | CFF_COUNT_CLEAR_STACK,
-
- 0 | CFF_COUNT_CLEAR_STACK, /* rrcurveto */
- 0 | CFF_COUNT_CLEAR_STACK,
- 0 | CFF_COUNT_CLEAR_STACK,
- 0 | CFF_COUNT_CLEAR_STACK,
- 0 | CFF_COUNT_CLEAR_STACK,
- 0 | CFF_COUNT_CLEAR_STACK,
- 0 | CFF_COUNT_CLEAR_STACK,
-
- 13, /* flex */
- 7,
- 9,
- 11,
-
- 0 | CFF_COUNT_CHECK_WIDTH, /* endchar */
-
- 2 | CFF_COUNT_CHECK_WIDTH, /* hstem */
- 2 | CFF_COUNT_CHECK_WIDTH,
- 2 | CFF_COUNT_CHECK_WIDTH,
- 2 | CFF_COUNT_CHECK_WIDTH,
-
- 0 | CFF_COUNT_CHECK_WIDTH, /* hintmask */
- 0 | CFF_COUNT_CHECK_WIDTH, /* cntrmask */
- 0, /* dotsection */
-
- 1, /* abs */
- 2,
- 2,
- 2,
- 1,
- 0,
- 2,
- 1,
-
- 1, /* blend */
-
- 1, /* drop */
- 2,
- 1,
- 2,
- 1,
-
- 2, /* put */
- 1,
- 4,
- 3,
-
- 2, /* and */
- 2,
- 1,
- 2,
- 4,
-
- 1, /* callsubr */
- 1,
- 0,
-
- 2, /* hsbw */
- 0,
- 0,
- 0,
- 5, /* seac */
- 4, /* sbw */
- 2 /* setcurrentpoint */
- };
-
-#endif /* CFF_CONFIG_OPTION_OLD_ENGINE */
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /********** *********/
- /********** *********/
- /********** GENERIC CHARSTRING PARSING *********/
- /********** *********/
- /********** *********/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* cff_builder_init */
- /* */
- /* <Description> */
- /* Initializes a given glyph builder. */
- /* */
- /* <InOut> */
- /* builder :: A pointer to the glyph builder to initialize. */
- /* */
- /* <Input> */
- /* face :: The current face object. */
- /* */
- /* size :: The current size object. */
- /* */
- /* glyph :: The current glyph object. */
- /* */
- /* hinting :: Whether hinting is active. */
- /* */
- static void
- cff_builder_init( CFF_Builder* builder,
- TT_Face face,
- CFF_Size size,
- CFF_GlyphSlot glyph,
- FT_Bool hinting )
- {
- builder->path_begun = 0;
- builder->load_points = 1;
-
- builder->face = face;
- builder->glyph = glyph;
- builder->memory = face->root.memory;
-
- if ( glyph )
- {
- FT_GlyphLoader loader = glyph->root.internal->loader;
-
-
- builder->loader = loader;
- builder->base = &loader->base.outline;
- builder->current = &loader->current.outline;
- FT_GlyphLoader_Rewind( loader );
-
- builder->hints_globals = NULL;
- builder->hints_funcs = NULL;
-
- if ( hinting && size )
- {
- CFF_Internal internal = (CFF_Internal)size->root.internal;
-
-
- builder->hints_globals = (void *)internal->topfont;
- builder->hints_funcs = glyph->root.internal->glyph_hints;
- }
- }
-
- builder->pos_x = 0;
- builder->pos_y = 0;
-
- builder->left_bearing.x = 0;
- builder->left_bearing.y = 0;
- builder->advance.x = 0;
- builder->advance.y = 0;
- }
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* cff_builder_done */
- /* */
- /* <Description> */
- /* Finalizes a given glyph builder. Its contents can still be used */
- /* after the call, but the function saves important information */
- /* within the corresponding glyph slot. */
- /* */
- /* <Input> */
- /* builder :: A pointer to the glyph builder to finalize. */
- /* */
- static void
- cff_builder_done( CFF_Builder* builder )
- {
- CFF_GlyphSlot glyph = builder->glyph;
-
-
- if ( glyph )
- glyph->root.outline = *builder->base;
- }
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* cff_compute_bias */
- /* */
- /* <Description> */
- /* Computes the bias value in dependence of the number of glyph */
- /* subroutines. */
- /* */
- /* <Input> */
- /* in_charstring_type :: The `CharstringType' value of the top DICT */
- /* dictionary. */
- /* */
- /* num_subrs :: The number of glyph subroutines. */
- /* */
- /* <Return> */
- /* The bias value. */
- static FT_Int
- cff_compute_bias( FT_Int in_charstring_type,
- FT_UInt num_subrs )
- {
- FT_Int result;
-
-
- if ( in_charstring_type == 1 )
- result = 0;
- else if ( num_subrs < 1240 )
- result = 107;
- else if ( num_subrs < 33900U )
- result = 1131;
- else
- result = 32768U;
-
- return result;
- }
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* cff_decoder_init */
- /* */
- /* <Description> */
- /* Initializes a given glyph decoder. */
- /* */
- /* <InOut> */
- /* decoder :: A pointer to the glyph builder to initialize. */
- /* */
- /* <Input> */
- /* face :: The current face object. */
- /* */
- /* size :: The current size object. */
- /* */
- /* slot :: The current glyph object. */
- /* */
- /* hinting :: Whether hinting is active. */
- /* */
- /* hint_mode :: The hinting mode. */
- /* */
- FT_LOCAL_DEF( void )
- cff_decoder_init( CFF_Decoder* decoder,
- TT_Face face,
- CFF_Size size,
- CFF_GlyphSlot slot,
- FT_Bool hinting,
- FT_Render_Mode hint_mode )
- {
- CFF_Font cff = (CFF_Font)face->extra.data;
-
-
- /* clear everything */
- FT_ZERO( decoder );
-
- /* initialize builder */
- cff_builder_init( &decoder->builder, face, size, slot, hinting );
-
- /* initialize Type2 decoder */
- decoder->cff = cff;
- decoder->num_globals = cff->global_subrs_index.count;
- decoder->globals = cff->global_subrs;
- decoder->globals_bias = cff_compute_bias(
- cff->top_font.font_dict.charstring_type,
- decoder->num_globals );
-
- decoder->hint_mode = hint_mode;
- }
-
-
- /* this function is used to select the subfont */
- /* and the locals subrs array */
- FT_LOCAL_DEF( FT_Error )
- cff_decoder_prepare( CFF_Decoder* decoder,
- CFF_Size size,
- FT_UInt glyph_index )
- {
- CFF_Builder *builder = &decoder->builder;
- CFF_Font cff = (CFF_Font)builder->face->extra.data;
- CFF_SubFont sub = &cff->top_font;
- FT_Error error = FT_Err_Ok;
-
-
- /* manage CID fonts */
- if ( cff->num_subfonts )
- {
- FT_Byte fd_index = cff_fd_select_get( &cff->fd_select, glyph_index );
-
-
- if ( fd_index >= cff->num_subfonts )
- {
- FT_TRACE4(( "cff_decoder_prepare: invalid CID subfont index\n" ));
- error = FT_THROW( Invalid_File_Format );
- goto Exit;
- }
-
- FT_TRACE3(( " in subfont %d:\n", fd_index ));
-
- sub = cff->subfonts[fd_index];
-
- if ( builder->hints_funcs && size )
- {
- CFF_Internal internal = (CFF_Internal)size->root.internal;
-
-
- /* for CFFs without subfonts, this value has already been set */
- builder->hints_globals = (void *)internal->subfonts[fd_index];
- }
- }
-
- decoder->num_locals = sub->local_subrs_index.count;
- decoder->locals = sub->local_subrs;
- decoder->locals_bias = cff_compute_bias(
- decoder->cff->top_font.font_dict.charstring_type,
- decoder->num_locals );
-
- decoder->glyph_width = sub->private_dict.default_width;
- decoder->nominal_width = sub->private_dict.nominal_width;
-
- decoder->current_subfont = sub; /* for Adobe's CFF handler */
-
- Exit:
- return error;
- }
-
-
- /* check that there is enough space for `count' more points */
- FT_LOCAL_DEF( FT_Error )
- cff_check_points( CFF_Builder* builder,
- FT_Int count )
- {
- return FT_GLYPHLOADER_CHECK_POINTS( builder->loader, count, 0 );
- }
-
-
- /* add a new point, do not check space */
- FT_LOCAL_DEF( void )
- cff_builder_add_point( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y,
- FT_Byte flag )
- {
- FT_Outline* outline = builder->current;
-
-
- if ( builder->load_points )
- {
- FT_Vector* point = outline->points + outline->n_points;
- FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points;
-
-#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
- CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face );
-
-
- if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE )
- {
- point->x = x >> 16;
- point->y = y >> 16;
- }
- else
-#endif
- {
- /* cf2_decoder_parse_charstrings uses 16.16 coordinates */
- point->x = x >> 10;
- point->y = y >> 10;
- }
- *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );
- }
-
- outline->n_points++;
- }
-
-
- /* check space for a new on-curve point, then add it */
- FT_LOCAL_DEF( FT_Error )
- cff_builder_add_point1( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y )
- {
- FT_Error error;
-
-
- error = cff_check_points( builder, 1 );
- if ( !error )
- cff_builder_add_point( builder, x, y, 1 );
-
- return error;
- }
-
-
- /* check space for a new contour, then add it */
- static FT_Error
- cff_builder_add_contour( CFF_Builder* builder )
- {
- FT_Outline* outline = builder->current;
- FT_Error error;
-
-
- if ( !builder->load_points )
- {
- outline->n_contours++;
- return FT_Err_Ok;
- }
-
- error = FT_GLYPHLOADER_CHECK_POINTS( builder->loader, 0, 1 );
- if ( !error )
- {
- if ( outline->n_contours > 0 )
- outline->contours[outline->n_contours - 1] =
- (short)( outline->n_points - 1 );
-
- outline->n_contours++;
- }
-
- return error;
- }
-
-
- /* if a path was begun, add its first on-curve point */
- FT_LOCAL_DEF( FT_Error )
- cff_builder_start_point( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y )
- {
- FT_Error error = FT_Err_Ok;
-
-
- /* test whether we are building a new contour */
- if ( !builder->path_begun )
- {
- builder->path_begun = 1;
- error = cff_builder_add_contour( builder );
- if ( !error )
- error = cff_builder_add_point1( builder, x, y );
- }
-
- return error;
- }
-
-
- /* close the current contour */
- FT_LOCAL_DEF( void )
- cff_builder_close_contour( CFF_Builder* builder )
- {
- FT_Outline* outline = builder->current;
- FT_Int first;
-
-
- if ( !outline )
- return;
-
- first = outline->n_contours <= 1
- ? 0 : outline->contours[outline->n_contours - 2] + 1;
-
- /* We must not include the last point in the path if it */
- /* is located on the first point. */
- if ( outline->n_points > 1 )
- {
- FT_Vector* p1 = outline->points + first;
- FT_Vector* p2 = outline->points + outline->n_points - 1;
- FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points - 1;
-
-
- /* `delete' last point only if it coincides with the first */
- /* point and if it is not a control point (which can happen). */
- if ( p1->x == p2->x && p1->y == p2->y )
- if ( *control == FT_CURVE_TAG_ON )
- outline->n_points--;
- }
-
- if ( outline->n_contours > 0 )
- {
- /* Don't add contours only consisting of one point, i.e., */
- /* check whether begin point and last point are the same. */
- if ( first == outline->n_points - 1 )
- {
- outline->n_contours--;
- outline->n_points--;
- }
- else
- outline->contours[outline->n_contours - 1] =
- (short)( outline->n_points - 1 );
- }
- }
-
-
- FT_LOCAL_DEF( FT_Int )
- cff_lookup_glyph_by_stdcharcode( CFF_Font cff,
- FT_Int charcode )
- {
- FT_UInt n;
- FT_UShort glyph_sid;
-
-
- /* CID-keyed fonts don't have glyph names */
- if ( !cff->charset.sids )
- return -1;
-
- /* check range of standard char code */
- if ( charcode < 0 || charcode > 255 )
- return -1;
-
- /* Get code to SID mapping from `cff_standard_encoding'. */
- glyph_sid = cff_get_standard_encoding( (FT_UInt)charcode );
-
- for ( n = 0; n < cff->num_glyphs; n++ )
- {
- if ( cff->charset.sids[n] == glyph_sid )
- return (FT_Int)n;
- }
-
- return -1;
- }
-
-
FT_LOCAL_DEF( FT_Error )
cff_get_glyph_data( TT_Face face,
FT_UInt glyph_index,
@@ -724,1936 +112,6 @@
}
-#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
-
- static FT_Error
- cff_operator_seac( CFF_Decoder* decoder,
- FT_Pos asb,
- FT_Pos adx,
- FT_Pos ady,
- FT_Int bchar,
- FT_Int achar )
- {
- FT_Error error;
- CFF_Builder* builder = &decoder->builder;
- FT_Int bchar_index, achar_index;
- TT_Face face = decoder->builder.face;
- FT_Vector left_bearing, advance;
- FT_Byte* charstring;
- FT_ULong charstring_len;
- FT_Pos glyph_width;
-
-
- if ( decoder->seac )
- {
- FT_ERROR(( "cff_operator_seac: invalid nested seac\n" ));
- return FT_THROW( Syntax_Error );
- }
-
- adx += decoder->builder.left_bearing.x;
- ady += decoder->builder.left_bearing.y;
-
-#ifdef FT_CONFIG_OPTION_INCREMENTAL
- /* Incremental fonts don't necessarily have valid charsets. */
- /* They use the character code, not the glyph index, in this case. */
- if ( face->root.internal->incremental_interface )
- {
- bchar_index = bchar;
- achar_index = achar;
- }
- else
-#endif /* FT_CONFIG_OPTION_INCREMENTAL */
- {
- CFF_Font cff = (CFF_Font)(face->extra.data);
-
-
- bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar );
- achar_index = cff_lookup_glyph_by_stdcharcode( cff, achar );
- }
-
- if ( bchar_index < 0 || achar_index < 0 )
- {
- FT_ERROR(( "cff_operator_seac:"
- " invalid seac character code arguments\n" ));
- return FT_THROW( Syntax_Error );
- }
-
- /* If we are trying to load a composite glyph, do not load the */
- /* accent character and return the array of subglyphs. */
- if ( builder->no_recurse )
- {
- FT_GlyphSlot glyph = (FT_GlyphSlot)builder->glyph;
- FT_GlyphLoader loader = glyph->internal->loader;
- FT_SubGlyph subg;
-
-
- /* reallocate subglyph array if necessary */
- error = FT_GlyphLoader_CheckSubGlyphs( loader, 2 );
- if ( error )
- goto Exit;
-
- subg = loader->current.subglyphs;
-
- /* subglyph 0 = base character */
- subg->index = bchar_index;
- subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES |
- FT_SUBGLYPH_FLAG_USE_MY_METRICS;
- subg->arg1 = 0;
- subg->arg2 = 0;
- subg++;
-
- /* subglyph 1 = accent character */
- subg->index = achar_index;
- subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES;
- subg->arg1 = (FT_Int)( adx >> 16 );
- subg->arg2 = (FT_Int)( ady >> 16 );
-
- /* set up remaining glyph fields */
- glyph->num_subglyphs = 2;
- glyph->subglyphs = loader->base.subglyphs;
- glyph->format = FT_GLYPH_FORMAT_COMPOSITE;
-
- loader->current.num_subglyphs = 2;
- }
-
- FT_GlyphLoader_Prepare( builder->loader );
-
- /* First load `bchar' in builder */
- error = cff_get_glyph_data( face, (FT_UInt)bchar_index,
- &charstring, &charstring_len );
- if ( !error )
- {
- /* the seac operator must not be nested */
- decoder->seac = TRUE;
- error = cff_decoder_parse_charstrings( decoder, charstring,
- charstring_len, 0 );
- decoder->seac = FALSE;
-
- cff_free_glyph_data( face, &charstring, charstring_len );
-
- if ( error )
- goto Exit;
- }
-
- /* Save the left bearing, advance and glyph width of the base */
- /* character as they will be erased by the next load. */
-
- left_bearing = builder->left_bearing;
- advance = builder->advance;
- glyph_width = decoder->glyph_width;
-
- builder->left_bearing.x = 0;
- builder->left_bearing.y = 0;
-
- builder->pos_x = adx - asb;
- builder->pos_y = ady;
-
- /* Now load `achar' on top of the base outline. */
- error = cff_get_glyph_data( face, (FT_UInt)achar_index,
- &charstring, &charstring_len );
- if ( !error )
- {
- /* the seac operator must not be nested */
- decoder->seac = TRUE;
- error = cff_decoder_parse_charstrings( decoder, charstring,
- charstring_len, 0 );
- decoder->seac = FALSE;
-
- cff_free_glyph_data( face, &charstring, charstring_len );
-
- if ( error )
- goto Exit;
- }
-
- /* Restore the left side bearing, advance and glyph width */
- /* of the base character. */
- builder->left_bearing = left_bearing;
- builder->advance = advance;
- decoder->glyph_width = glyph_width;
-
- builder->pos_x = 0;
- builder->pos_y = 0;
-
- Exit:
- return error;
- }
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* cff_decoder_parse_charstrings */
- /* */
- /* <Description> */
- /* Parses a given Type 2 charstrings program. */
- /* */
- /* <InOut> */
- /* decoder :: The current Type 1 decoder. */
- /* */
- /* <Input> */
- /* charstring_base :: The base of the charstring stream. */
- /* */
- /* charstring_len :: The length in bytes of the charstring stream. */
- /* */
- /* in_dict :: Set to 1 if function is called from top or */
- /* private DICT (needed for Multiple Master CFFs). */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_LOCAL_DEF( FT_Error )
- cff_decoder_parse_charstrings( CFF_Decoder* decoder,
- FT_Byte* charstring_base,
- FT_ULong charstring_len,
- FT_Bool in_dict )
- {
- FT_Error error;
- CFF_Decoder_Zone* zone;
- FT_Byte* ip;
- FT_Byte* limit;
- CFF_Builder* builder = &decoder->builder;
- FT_Pos x, y;
- FT_Fixed seed;
- FT_Fixed* stack;
- FT_Int charstring_type =
- decoder->cff->top_font.font_dict.charstring_type;
- FT_UShort num_designs =
- decoder->cff->top_font.font_dict.num_designs;
- FT_UShort num_axes =
- decoder->cff->top_font.font_dict.num_axes;
-
- T2_Hints_Funcs hinter;
-
-
- /* set default width */
- decoder->num_hints = 0;
- decoder->read_width = 1;
-
- /* compute random seed from stack address of parameter */
- seed = (FT_Fixed)( ( (FT_Offset)(char*)&seed ^
- (FT_Offset)(char*)&decoder ^
- (FT_Offset)(char*)&charstring_base ) &
- FT_ULONG_MAX );
- seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFFL;
- if ( seed == 0 )
- seed = 0x7384;
-
- /* initialize the decoder */
- decoder->top = decoder->stack;
- decoder->zone = decoder->zones;
- zone = decoder->zones;
- stack = decoder->top;
-
- hinter = (T2_Hints_Funcs)builder->hints_funcs;
-
- builder->path_begun = 0;
-
- zone->base = charstring_base;
- limit = zone->limit = charstring_base + charstring_len;
- ip = zone->cursor = zone->base;
-
- error = FT_Err_Ok;
-
- x = builder->pos_x;
- y = builder->pos_y;
-
- /* begin hints recording session, if any */
- if ( hinter )
- hinter->open( hinter->hints );
-
- /* now execute loop */
- while ( ip < limit )
- {
- CFF_Operator op;
- FT_Byte v;
-
-
- /********************************************************************/
- /* */
- /* Decode operator or operand */
- /* */
- v = *ip++;
- if ( v >= 32 || v == 28 )
- {
- FT_Int shift = 16;
- FT_Int32 val;
-
-
- /* this is an operand, push it on the stack */
-
- /* if we use shifts, all computations are done with unsigned */
- /* values; the conversion to a signed value is the last step */
- if ( v == 28 )
- {
- if ( ip + 1 >= limit )
- goto Syntax_Error;
- val = (FT_Short)( ( (FT_UShort)ip[0] << 8 ) | ip[1] );
- ip += 2;
- }
- else if ( v < 247 )
- val = (FT_Int32)v - 139;
- else if ( v < 251 )
- {
- if ( ip >= limit )
- goto Syntax_Error;
- val = ( (FT_Int32)v - 247 ) * 256 + *ip++ + 108;
- }
- else if ( v < 255 )
- {
- if ( ip >= limit )
- goto Syntax_Error;
- val = -( (FT_Int32)v - 251 ) * 256 - *ip++ - 108;
- }
- else
- {
- if ( ip + 3 >= limit )
- goto Syntax_Error;
- val = (FT_Int32)( ( (FT_UInt32)ip[0] << 24 ) |
- ( (FT_UInt32)ip[1] << 16 ) |
- ( (FT_UInt32)ip[2] << 8 ) |
- (FT_UInt32)ip[3] );
- ip += 4;
- if ( charstring_type == 2 )
- shift = 0;
- }
- if ( decoder->top - stack >= CFF_MAX_OPERANDS )
- goto Stack_Overflow;
-
- val = (FT_Int32)( (FT_UInt32)val << shift );
- *decoder->top++ = val;
-
-#ifdef FT_DEBUG_LEVEL_TRACE
- if ( !( val & 0xFFFFL ) )
- FT_TRACE4(( " %hd", (FT_Short)( (FT_UInt32)val >> 16 ) ));
- else
- FT_TRACE4(( " %.5f", val / 65536.0 ));
-#endif
-
- }
- else
- {
- /* The specification says that normally arguments are to be taken */
- /* from the bottom of the stack. However, this seems not to be */
- /* correct, at least for Acroread 7.0.8 on GNU/Linux: It pops the */
- /* arguments similar to a PS interpreter. */
-
- FT_Fixed* args = decoder->top;
- FT_Int num_args = (FT_Int)( args - decoder->stack );
- FT_Int req_args;
-
-
- /* find operator */
- op = cff_op_unknown;
-
- switch ( v )
- {
- case 1:
- op = cff_op_hstem;
- break;
- case 3:
- op = cff_op_vstem;
- break;
- case 4:
- op = cff_op_vmoveto;
- break;
- case 5:
- op = cff_op_rlineto;
- break;
- case 6:
- op = cff_op_hlineto;
- break;
- case 7:
- op = cff_op_vlineto;
- break;
- case 8:
- op = cff_op_rrcurveto;
- break;
- case 9:
- op = cff_op_closepath;
- break;
- case 10:
- op = cff_op_callsubr;
- break;
- case 11:
- op = cff_op_return;
- break;
- case 12:
- {
- if ( ip >= limit )
- goto Syntax_Error;
- v = *ip++;
-
- switch ( v )
- {
- case 0:
- op = cff_op_dotsection;
- break;
- case 1: /* this is actually the Type1 vstem3 operator */
- op = cff_op_vstem;
- break;
- case 2: /* this is actually the Type1 hstem3 operator */
- op = cff_op_hstem;
- break;
- case 3:
- op = cff_op_and;
- break;
- case 4:
- op = cff_op_or;
- break;
- case 5:
- op = cff_op_not;
- break;
- case 6:
- op = cff_op_seac;
- break;
- case 7:
- op = cff_op_sbw;
- break;
- case 8:
- op = cff_op_store;
- break;
- case 9:
- op = cff_op_abs;
- break;
- case 10:
- op = cff_op_add;
- break;
- case 11:
- op = cff_op_sub;
- break;
- case 12:
- op = cff_op_div;
- break;
- case 13:
- op = cff_op_load;
- break;
- case 14:
- op = cff_op_neg;
- break;
- case 15:
- op = cff_op_eq;
- break;
- case 16:
- op = cff_op_callothersubr;
- break;
- case 17:
- op = cff_op_pop;
- break;
- case 18:
- op = cff_op_drop;
- break;
- case 20:
- op = cff_op_put;
- break;
- case 21:
- op = cff_op_get;
- break;
- case 22:
- op = cff_op_ifelse;
- break;
- case 23:
- op = cff_op_random;
- break;
- case 24:
- op = cff_op_mul;
- break;
- case 26:
- op = cff_op_sqrt;
- break;
- case 27:
- op = cff_op_dup;
- break;
- case 28:
- op = cff_op_exch;
- break;
- case 29:
- op = cff_op_index;
- break;
- case 30:
- op = cff_op_roll;
- break;
- case 33:
- op = cff_op_setcurrentpoint;
- break;
- case 34:
- op = cff_op_hflex;
- break;
- case 35:
- op = cff_op_flex;
- break;
- case 36:
- op = cff_op_hflex1;
- break;
- case 37:
- op = cff_op_flex1;
- break;
- default:
- FT_TRACE4(( " unknown op (12, %d)\n", v ));
- break;
- }
- }
- break;
- case 13:
- op = cff_op_hsbw;
- break;
- case 14:
- op = cff_op_endchar;
- break;
- case 16:
- op = cff_op_blend;
- break;
- case 18:
- op = cff_op_hstemhm;
- break;
- case 19:
- op = cff_op_hintmask;
- break;
- case 20:
- op = cff_op_cntrmask;
- break;
- case 21:
- op = cff_op_rmoveto;
- break;
- case 22:
- op = cff_op_hmoveto;
- break;
- case 23:
- op = cff_op_vstemhm;
- break;
- case 24:
- op = cff_op_rcurveline;
- break;
- case 25:
- op = cff_op_rlinecurve;
- break;
- case 26:
- op = cff_op_vvcurveto;
- break;
- case 27:
- op = cff_op_hhcurveto;
- break;
- case 29:
- op = cff_op_callgsubr;
- break;
- case 30:
- op = cff_op_vhcurveto;
- break;
- case 31:
- op = cff_op_hvcurveto;
- break;
- default:
- FT_TRACE4(( " unknown op (%d)\n", v ));
- break;
- }
-
- if ( op == cff_op_unknown )
- continue;
-
- /* in Multiple Master CFFs, T2 charstrings can appear in */
- /* dictionaries, but some operators are prohibited */
- if ( in_dict )
- {
- switch ( op )
- {
- case cff_op_hstem:
- case cff_op_vstem:
- case cff_op_vmoveto:
- case cff_op_rlineto:
- case cff_op_hlineto:
- case cff_op_vlineto:
- case cff_op_rrcurveto:
- case cff_op_hstemhm:
- case cff_op_hintmask:
- case cff_op_cntrmask:
- case cff_op_rmoveto:
- case cff_op_hmoveto:
- case cff_op_vstemhm:
- case cff_op_rcurveline:
- case cff_op_rlinecurve:
- case cff_op_vvcurveto:
- case cff_op_hhcurveto:
- case cff_op_vhcurveto:
- case cff_op_hvcurveto:
- case cff_op_hflex:
- case cff_op_flex:
- case cff_op_hflex1:
- case cff_op_flex1:
- case cff_op_callsubr:
- case cff_op_callgsubr:
- goto MM_Error;
-
- default:
- break;
- }
- }
-
- /* check arguments */
- req_args = cff_argument_counts[op];
- if ( req_args & CFF_COUNT_CHECK_WIDTH )
- {
- if ( num_args > 0 && decoder->read_width )
- {
- /* If `nominal_width' is non-zero, the number is really a */
- /* difference against `nominal_width'. Else, the number here */
- /* is truly a width, not a difference against `nominal_width'. */
- /* If the font does not set `nominal_width', then */
- /* `nominal_width' defaults to zero, and so we can set */
- /* `glyph_width' to `nominal_width' plus number on the stack */
- /* -- for either case. */
-
- FT_Int set_width_ok;
-
-
- switch ( op )
- {
- case cff_op_hmoveto:
- case cff_op_vmoveto:
- set_width_ok = num_args & 2;
- break;
-
- case cff_op_hstem:
- case cff_op_vstem:
- case cff_op_hstemhm:
- case cff_op_vstemhm:
- case cff_op_rmoveto:
- case cff_op_hintmask:
- case cff_op_cntrmask:
- set_width_ok = num_args & 1;
- break;
-
- case cff_op_endchar:
- /* If there is a width specified for endchar, we either have */
- /* 1 argument or 5 arguments. We like to argue. */
- set_width_ok = in_dict
- ? 0
- : ( ( num_args == 5 ) || ( num_args == 1 ) );
- break;
-
- default:
- set_width_ok = 0;
- break;
- }
-
- if ( set_width_ok )
- {
- decoder->glyph_width = decoder->nominal_width +
- ( stack[0] >> 16 );
-
- if ( decoder->width_only )
- {
- /* we only want the advance width; stop here */
- break;
- }
-
- /* Consumed an argument. */
- num_args--;
- }
- }
-
- decoder->read_width = 0;
- req_args = 0;
- }
-
- req_args &= 0x000F;
- if ( num_args < req_args )
- goto Stack_Underflow;
- args -= req_args;
- num_args -= req_args;
-
- /* At this point, `args' points to the first argument of the */
- /* operand in case `req_args' isn't zero. Otherwise, we have */
- /* to adjust `args' manually. */
-
- /* Note that we only pop arguments from the stack which we */
- /* really need and can digest so that we can continue in case */
- /* of superfluous stack elements. */
-
- switch ( op )
- {
- case cff_op_hstem:
- case cff_op_vstem:
- case cff_op_hstemhm:
- case cff_op_vstemhm:
- /* the number of arguments is always even here */
- FT_TRACE4((
- op == cff_op_hstem ? " hstem\n" :
- ( op == cff_op_vstem ? " vstem\n" :
- ( op == cff_op_hstemhm ? " hstemhm\n" : " vstemhm\n" ) ) ));
-
- if ( hinter )
- hinter->stems( hinter->hints,
- ( op == cff_op_hstem || op == cff_op_hstemhm ),
- num_args / 2,
- args - ( num_args & ~1 ) );
-
- decoder->num_hints += num_args / 2;
- args = stack;
- break;
-
- case cff_op_hintmask:
- case cff_op_cntrmask:
- FT_TRACE4(( op == cff_op_hintmask ? " hintmask" : " cntrmask" ));
-
- /* implement vstem when needed -- */
- /* the specification doesn't say it, but this also works */
- /* with the 'cntrmask' operator */
- /* */
- if ( num_args > 0 )
- {
- if ( hinter )
- hinter->stems( hinter->hints,
- 0,
- num_args / 2,
- args - ( num_args & ~1 ) );
-
- decoder->num_hints += num_args / 2;
- }
-
- /* In a valid charstring there must be at least one byte */
- /* after `hintmask' or `cntrmask' (e.g., for a `return' */
- /* instruction). Additionally, there must be space for */
- /* `num_hints' bits. */
-
- if ( ( ip + ( ( decoder->num_hints + 7 ) >> 3 ) ) >= limit )
- goto Syntax_Error;
-
- if ( hinter )
- {
- if ( op == cff_op_hintmask )
- hinter->hintmask( hinter->hints,
- (FT_UInt)builder->current->n_points,
- (FT_UInt)decoder->num_hints,
- ip );
- else
- hinter->counter( hinter->hints,
- (FT_UInt)decoder->num_hints,
- ip );
- }
-
-#ifdef FT_DEBUG_LEVEL_TRACE
- {
- FT_UInt maskbyte;
-
-
- FT_TRACE4(( " (maskbytes:" ));
-
- for ( maskbyte = 0;
- maskbyte < (FT_UInt)( ( decoder->num_hints + 7 ) >> 3 );
- maskbyte++, ip++ )
- FT_TRACE4(( " 0x%02X", *ip ));
-
- FT_TRACE4(( ")\n" ));
- }
-#else
- ip += ( decoder->num_hints + 7 ) >> 3;
-#endif
- args = stack;
- break;
-
- case cff_op_rmoveto:
- FT_TRACE4(( " rmoveto\n" ));
-
- cff_builder_close_contour( builder );
- builder->path_begun = 0;
- x += args[-2];
- y += args[-1];
- args = stack;
- break;
-
- case cff_op_vmoveto:
- FT_TRACE4(( " vmoveto\n" ));
-
- cff_builder_close_contour( builder );
- builder->path_begun = 0;
- y += args[-1];
- args = stack;
- break;
-
- case cff_op_hmoveto:
- FT_TRACE4(( " hmoveto\n" ));
-
- cff_builder_close_contour( builder );
- builder->path_begun = 0;
- x += args[-1];
- args = stack;
- break;
-
- case cff_op_rlineto:
- FT_TRACE4(( " rlineto\n" ));
-
- if ( cff_builder_start_point( builder, x, y ) ||
- cff_check_points( builder, num_args / 2 ) )
- goto Fail;
-
- if ( num_args < 2 )
- goto Stack_Underflow;
-
- args -= num_args & ~1;
- while ( args < decoder->top )
- {
- x += args[0];
- y += args[1];
- cff_builder_add_point( builder, x, y, 1 );
- args += 2;
- }
- args = stack;
- break;
-
- case cff_op_hlineto:
- case cff_op_vlineto:
- {
- FT_Int phase = ( op == cff_op_hlineto );
-
-
- FT_TRACE4(( op == cff_op_hlineto ? " hlineto\n"
- : " vlineto\n" ));
-
- if ( num_args < 0 )
- goto Stack_Underflow;
-
- /* there exist subsetted fonts (found in PDFs) */
- /* which call `hlineto' without arguments */
- if ( num_args == 0 )
- break;
-
- if ( cff_builder_start_point( builder, x, y ) ||
- cff_check_points( builder, num_args ) )
- goto Fail;
-
- args = stack;
- while ( args < decoder->top )
- {
- if ( phase )
- x += args[0];
- else
- y += args[0];
-
- if ( cff_builder_add_point1( builder, x, y ) )
- goto Fail;
-
- args++;
- phase ^= 1;
- }
- args = stack;
- }
- break;
-
- case cff_op_rrcurveto:
- {
- FT_Int nargs;
-
-
- FT_TRACE4(( " rrcurveto\n" ));
-
- if ( num_args < 6 )
- goto Stack_Underflow;
-
- nargs = num_args - num_args % 6;
-
- if ( cff_builder_start_point( builder, x, y ) ||
- cff_check_points( builder, nargs / 2 ) )
- goto Fail;
-
- args -= nargs;
- while ( args < decoder->top )
- {
- x += args[0];
- y += args[1];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[2];
- y += args[3];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[4];
- y += args[5];
- cff_builder_add_point( builder, x, y, 1 );
- args += 6;
- }
- args = stack;
- }
- break;
-
- case cff_op_vvcurveto:
- {
- FT_Int nargs;
-
-
- FT_TRACE4(( " vvcurveto\n" ));
-
- if ( num_args < 4 )
- goto Stack_Underflow;
-
- /* if num_args isn't of the form 4n or 4n+1, */
- /* we enforce it by clearing the second bit */
-
- nargs = num_args & ~2;
-
- if ( cff_builder_start_point( builder, x, y ) )
- goto Fail;
-
- args -= nargs;
-
- if ( nargs & 1 )
- {
- x += args[0];
- args++;
- nargs--;
- }
-
- if ( cff_check_points( builder, 3 * ( nargs / 4 ) ) )
- goto Fail;
-
- while ( args < decoder->top )
- {
- y += args[0];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[1];
- y += args[2];
- cff_builder_add_point( builder, x, y, 0 );
- y += args[3];
- cff_builder_add_point( builder, x, y, 1 );
- args += 4;
- }
- args = stack;
- }
- break;
-
- case cff_op_hhcurveto:
- {
- FT_Int nargs;
-
-
- FT_TRACE4(( " hhcurveto\n" ));
-
- if ( num_args < 4 )
- goto Stack_Underflow;
-
- /* if num_args isn't of the form 4n or 4n+1, */
- /* we enforce it by clearing the second bit */
-
- nargs = num_args & ~2;
-
- if ( cff_builder_start_point( builder, x, y ) )
- goto Fail;
-
- args -= nargs;
- if ( nargs & 1 )
- {
- y += args[0];
- args++;
- nargs--;
- }
-
- if ( cff_check_points( builder, 3 * ( nargs / 4 ) ) )
- goto Fail;
-
- while ( args < decoder->top )
- {
- x += args[0];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[1];
- y += args[2];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[3];
- cff_builder_add_point( builder, x, y, 1 );
- args += 4;
- }
- args = stack;
- }
- break;
-
- case cff_op_vhcurveto:
- case cff_op_hvcurveto:
- {
- FT_Int phase;
- FT_Int nargs;
-
-
- FT_TRACE4(( op == cff_op_vhcurveto ? " vhcurveto\n"
- : " hvcurveto\n" ));
-
- if ( cff_builder_start_point( builder, x, y ) )
- goto Fail;
-
- if ( num_args < 4 )
- goto Stack_Underflow;
-
- /* if num_args isn't of the form 8n, 8n+1, 8n+4, or 8n+5, */
- /* we enforce it by clearing the second bit */
-
- nargs = num_args & ~2;
-
- args -= nargs;
- if ( cff_check_points( builder, ( nargs / 4 ) * 3 ) )
- goto Stack_Underflow;
-
- phase = ( op == cff_op_hvcurveto );
-
- while ( nargs >= 4 )
- {
- nargs -= 4;
- if ( phase )
- {
- x += args[0];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[1];
- y += args[2];
- cff_builder_add_point( builder, x, y, 0 );
- y += args[3];
- if ( nargs == 1 )
- x += args[4];
- cff_builder_add_point( builder, x, y, 1 );
- }
- else
- {
- y += args[0];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[1];
- y += args[2];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[3];
- if ( nargs == 1 )
- y += args[4];
- cff_builder_add_point( builder, x, y, 1 );
- }
- args += 4;
- phase ^= 1;
- }
- args = stack;
- }
- break;
-
- case cff_op_rlinecurve:
- {
- FT_Int num_lines;
- FT_Int nargs;
-
-
- FT_TRACE4(( " rlinecurve\n" ));
-
- if ( num_args < 8 )
- goto Stack_Underflow;
-
- nargs = num_args & ~1;
- num_lines = ( nargs - 6 ) / 2;
-
- if ( cff_builder_start_point( builder, x, y ) ||
- cff_check_points( builder, num_lines + 3 ) )
- goto Fail;
-
- args -= nargs;
-
- /* first, add the line segments */
- while ( num_lines > 0 )
- {
- x += args[0];
- y += args[1];
- cff_builder_add_point( builder, x, y, 1 );
- args += 2;
- num_lines--;
- }
-
- /* then the curve */
- x += args[0];
- y += args[1];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[2];
- y += args[3];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[4];
- y += args[5];
- cff_builder_add_point( builder, x, y, 1 );
- args = stack;
- }
- break;
-
- case cff_op_rcurveline:
- {
- FT_Int num_curves;
- FT_Int nargs;
-
-
- FT_TRACE4(( " rcurveline\n" ));
-
- if ( num_args < 8 )
- goto Stack_Underflow;
-
- nargs = num_args - 2;
- nargs = nargs - nargs % 6 + 2;
- num_curves = ( nargs - 2 ) / 6;
-
- if ( cff_builder_start_point( builder, x, y ) ||
- cff_check_points( builder, num_curves * 3 + 2 ) )
- goto Fail;
-
- args -= nargs;
-
- /* first, add the curves */
- while ( num_curves > 0 )
- {
- x += args[0];
- y += args[1];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[2];
- y += args[3];
- cff_builder_add_point( builder, x, y, 0 );
- x += args[4];
- y += args[5];
- cff_builder_add_point( builder, x, y, 1 );
- args += 6;
- num_curves--;
- }
-
- /* then the final line */
- x += args[0];
- y += args[1];
- cff_builder_add_point( builder, x, y, 1 );
- args = stack;
- }
- break;
-
- case cff_op_hflex1:
- {
- FT_Pos start_y;
-
-
- FT_TRACE4(( " hflex1\n" ));
-
- /* adding five more points: 4 control points, 1 on-curve point */
- /* -- make sure we have enough space for the start point if it */
- /* needs to be added */
- if ( cff_builder_start_point( builder, x, y ) ||
- cff_check_points( builder, 6 ) )
- goto Fail;
-
- /* record the starting point's y position for later use */
- start_y = y;
-
- /* first control point */
- x += args[0];
- y += args[1];
- cff_builder_add_point( builder, x, y, 0 );
-
- /* second control point */
- x += args[2];
- y += args[3];
- cff_builder_add_point( builder, x, y, 0 );
-
- /* join point; on curve, with y-value the same as the last */
- /* control point's y-value */
- x += args[4];
- cff_builder_add_point( builder, x, y, 1 );
-
- /* third control point, with y-value the same as the join */
- /* point's y-value */
- x += args[5];
- cff_builder_add_point( builder, x, y, 0 );
-
- /* fourth control point */
- x += args[6];
- y += args[7];
- cff_builder_add_point( builder, x, y, 0 );
-
- /* ending point, with y-value the same as the start */
- x += args[8];
- y = start_y;
- cff_builder_add_point( builder, x, y, 1 );
-
- args = stack;
- break;
- }
-
- case cff_op_hflex:
- {
- FT_Pos start_y;
-
-
- FT_TRACE4(( " hflex\n" ));
-
- /* adding six more points; 4 control points, 2 on-curve points */
- if ( cff_builder_start_point( builder, x, y ) ||
- cff_check_points( builder, 6 ) )
- goto Fail;
-
- /* record the starting point's y-position for later use */
- start_y = y;
-
- /* first control point */
- x += args[0];
- cff_builder_add_point( builder, x, y, 0 );
-
- /* second control point */
- x += args[1];
- y += args[2];
- cff_builder_add_point( builder, x, y, 0 );
-
- /* join point; on curve, with y-value the same as the last */
- /* control point's y-value */
- x += args[3];
- cff_builder_add_point( builder, x, y, 1 );
-
- /* third control point, with y-value the same as the join */
- /* point's y-value */
- x += args[4];
- cff_builder_add_point( builder, x, y, 0 );
-
- /* fourth control point */
- x += args[5];
- y = start_y;
- cff_builder_add_point( builder, x, y, 0 );
-
- /* ending point, with y-value the same as the start point's */
- /* y-value -- we don't add this point, though */
- x += args[6];
- cff_builder_add_point( builder, x, y, 1 );
-
- args = stack;
- break;
- }
-
- case cff_op_flex1:
- {
- FT_Pos start_x, start_y; /* record start x, y values for */
- /* alter use */
- FT_Fixed dx = 0, dy = 0; /* used in horizontal/vertical */
- /* algorithm below */
- FT_Int horizontal, count;
- FT_Fixed* temp;
-
-
- FT_TRACE4(( " flex1\n" ));
-
- /* adding six more points; 4 control points, 2 on-curve points */
- if ( cff_builder_start_point( builder, x, y ) ||
- cff_check_points( builder, 6 ) )
- goto Fail;
-
- /* record the starting point's x, y position for later use */
- start_x = x;
- start_y = y;
-
- /* XXX: figure out whether this is supposed to be a horizontal */
- /* or vertical flex; the Type 2 specification is vague... */
-
- temp = args;
-
- /* grab up to the last argument */
- for ( count = 5; count > 0; count-- )
- {
- dx += temp[0];
- dy += temp[1];
- temp += 2;
- }
-
- if ( dx < 0 )
- dx = -dx;
- if ( dy < 0 )
- dy = -dy;
-
- /* strange test, but here it is... */
- horizontal = ( dx > dy );
-
- for ( count = 5; count > 0; count-- )
- {
- x += args[0];
- y += args[1];
- cff_builder_add_point( builder, x, y,
- (FT_Bool)( count == 3 ) );
- args += 2;
- }
-
- /* is last operand an x- or y-delta? */
- if ( horizontal )
- {
- x += args[0];
- y = start_y;
- }
- else
- {
- x = start_x;
- y += args[0];
- }
-
- cff_builder_add_point( builder, x, y, 1 );
-
- args = stack;
- break;
- }
-
- case cff_op_flex:
- {
- FT_UInt count;
-
-
- FT_TRACE4(( " flex\n" ));
-
- if ( cff_builder_start_point( builder, x, y ) ||
- cff_check_points( builder, 6 ) )
- goto Fail;
-
- for ( count = 6; count > 0; count-- )
- {
- x += args[0];
- y += args[1];
- cff_builder_add_point( builder, x, y,
- (FT_Bool)( count == 4 || count == 1 ) );
- args += 2;
- }
-
- args = stack;
- }
- break;
-
- case cff_op_seac:
- FT_TRACE4(( " seac\n" ));
-
- error = cff_operator_seac( decoder,
- args[0], args[1], args[2],
- (FT_Int)( args[3] >> 16 ),
- (FT_Int)( args[4] >> 16 ) );
-
- /* add current outline to the glyph slot */
- FT_GlyphLoader_Add( builder->loader );
-
- /* return now! */
- FT_TRACE4(( "\n" ));
- return error;
-
- case cff_op_endchar:
- /* in dictionaries, `endchar' simply indicates end of data */
- if ( in_dict )
- return error;
-
- FT_TRACE4(( " endchar\n" ));
-
- /* We are going to emulate the seac operator. */
- if ( num_args >= 4 )
- {
- /* Save glyph width so that the subglyphs don't overwrite it. */
- FT_Pos glyph_width = decoder->glyph_width;
-
-
- error = cff_operator_seac( decoder,
- 0L, args[-4], args[-3],
- (FT_Int)( args[-2] >> 16 ),
- (FT_Int)( args[-1] >> 16 ) );
-
- decoder->glyph_width = glyph_width;
- }
- else
- {
- cff_builder_close_contour( builder );
-
- /* close hints recording session */
- if ( hinter )
- {
- if ( hinter->close( hinter->hints,
- (FT_UInt)builder->current->n_points ) )
- goto Syntax_Error;
-
- /* apply hints to the loaded glyph outline now */
- error = hinter->apply( hinter->hints,
- builder->current,
- (PSH_Globals)builder->hints_globals,
- decoder->hint_mode );
- if ( error )
- goto Fail;
- }
-
- /* add current outline to the glyph slot */
- FT_GlyphLoader_Add( builder->loader );
- }
-
- /* return now! */
- FT_TRACE4(( "\n" ));
- return error;
-
- case cff_op_abs:
- FT_TRACE4(( " abs\n" ));
-
- if ( args[0] < 0 )
- args[0] = -args[0];
- args++;
- break;
-
- case cff_op_add:
- FT_TRACE4(( " add\n" ));
-
- args[0] += args[1];
- args++;
- break;
-
- case cff_op_sub:
- FT_TRACE4(( " sub\n" ));
-
- args[0] -= args[1];
- args++;
- break;
-
- case cff_op_div:
- FT_TRACE4(( " div\n" ));
-
- args[0] = FT_DivFix( args[0], args[1] );
- args++;
- break;
-
- case cff_op_neg:
- FT_TRACE4(( " neg\n" ));
-
- args[0] = -args[0];
- args++;
- break;
-
- case cff_op_random:
- {
- FT_Fixed Rand;
-
-
- FT_TRACE4(( " rand\n" ));
-
- Rand = seed;
- if ( Rand >= 0x8000L )
- Rand++;
-
- args[0] = Rand;
- seed = FT_MulFix( seed, 0x10000L - seed );
- if ( seed == 0 )
- seed += 0x2873;
- args++;
- }
- break;
-
- case cff_op_mul:
- FT_TRACE4(( " mul\n" ));
-
- args[0] = FT_MulFix( args[0], args[1] );
- args++;
- break;
-
- case cff_op_sqrt:
- FT_TRACE4(( " sqrt\n" ));
-
- if ( args[0] > 0 )
- {
- FT_Fixed root = args[0];
- FT_Fixed new_root;
-
-
- for (;;)
- {
- new_root = ( root + FT_DivFix( args[0], root ) + 1 ) >> 1;
- if ( new_root == root )
- break;
- root = new_root;
- }
- args[0] = new_root;
- }
- else
- args[0] = 0;
- args++;
- break;
-
- case cff_op_drop:
- /* nothing */
- FT_TRACE4(( " drop\n" ));
-
- break;
-
- case cff_op_exch:
- {
- FT_Fixed tmp;
-
-
- FT_TRACE4(( " exch\n" ));
-
- tmp = args[0];
- args[0] = args[1];
- args[1] = tmp;
- args += 2;
- }
- break;
-
- case cff_op_index:
- {
- FT_Int idx = (FT_Int)( args[0] >> 16 );
-
-
- FT_TRACE4(( " index\n" ));
-
- if ( idx < 0 )
- idx = 0;
- else if ( idx > num_args - 2 )
- idx = num_args - 2;
- args[0] = args[-( idx + 1 )];
- args++;
- }
- break;
-
- case cff_op_roll:
- {
- FT_Int count = (FT_Int)( args[0] >> 16 );
- FT_Int idx = (FT_Int)( args[1] >> 16 );
-
-
- FT_TRACE4(( " roll\n" ));
-
- if ( count <= 0 )
- count = 1;
-
- args -= count;
- if ( args < stack )
- goto Stack_Underflow;
-
- if ( idx >= 0 )
- {
- while ( idx > 0 )
- {
- FT_Fixed tmp = args[count - 1];
- FT_Int i;
-
-
- for ( i = count - 2; i >= 0; i-- )
- args[i + 1] = args[i];
- args[0] = tmp;
- idx--;
- }
- }
- else
- {
- while ( idx < 0 )
- {
- FT_Fixed tmp = args[0];
- FT_Int i;
-
-
- for ( i = 0; i < count - 1; i++ )
- args[i] = args[i + 1];
- args[count - 1] = tmp;
- idx++;
- }
- }
- args += count;
- }
- break;
-
- case cff_op_dup:
- FT_TRACE4(( " dup\n" ));
-
- args[1] = args[0];
- args += 2;
- break;
-
- case cff_op_put:
- {
- FT_Fixed val = args[0];
- FT_Int idx = (FT_Int)( args[1] >> 16 );
-
-
- FT_TRACE4(( " put\n" ));
-
- /* the Type2 specification before version 16-March-2000 */
- /* didn't give a hard-coded size limit of the temporary */
- /* storage array; instead, an argument of the */
- /* `MultipleMaster' operator set the size */
- if ( idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS )
- decoder->buildchar[idx] = val;
- }
- break;
-
- case cff_op_get:
- {
- FT_Int idx = (FT_Int)( args[0] >> 16 );
- FT_Fixed val = 0;
-
-
- FT_TRACE4(( " get\n" ));
-
- if ( idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS )
- val = decoder->buildchar[idx];
-
- args[0] = val;
- args++;
- }
- break;
-
- case cff_op_store:
- /* this operator was removed from the Type2 specification */
- /* in version 16-March-2000 */
-
- /* since we currently don't handle interpolation of multiple */
- /* master fonts, this is a no-op */
- FT_TRACE4(( " store\n"));
- break;
-
- case cff_op_load:
- /* this operator was removed from the Type2 specification */
- /* in version 16-March-2000 */
- {
- FT_Int reg_idx = (FT_Int)args[0];
- FT_Int idx = (FT_Int)args[1];
- FT_Int count = (FT_Int)args[2];
-
-
- FT_TRACE4(( " load\n" ));
-
- /* since we currently don't handle interpolation of multiple */
- /* master fonts, we store a vector [1 0 0 ...] in the */
- /* temporary storage array regardless of the Registry index */
- if ( reg_idx >= 0 && reg_idx <= 2 &&
- idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS &&
- count >= 0 && count <= num_axes )
- {
- FT_Int end, i;
-
-
- end = FT_MIN( idx + count, CFF_MAX_TRANS_ELEMENTS );
-
- if ( idx < end )
- decoder->buildchar[idx] = 1 << 16;
-
- for ( i = idx + 1; i < end; i++ )
- decoder->buildchar[i] = 0;
- }
- }
- break;
-
- case cff_op_blend:
- /* this operator was removed from the Type2 specification */
- /* in version 16-March-2000 */
- {
- FT_Int num_results = (FT_Int)( args[0] >> 16 );
-
-
- FT_TRACE4(( " blend\n" ));
-
- if ( num_results < 0 )
- goto Syntax_Error;
-
- if ( num_results * (FT_Int)num_designs > num_args )
- goto Stack_Underflow;
-
- /* since we currently don't handle interpolation of multiple */
- /* master fonts, return the `num_results' values of the */
- /* first master */
- args -= num_results * ( num_designs - 1 );
- num_args -= num_results * ( num_designs - 1 );
- }
- break;
-
- case cff_op_dotsection:
- /* this operator is deprecated and ignored by the parser */
- FT_TRACE4(( " dotsection\n" ));
- break;
-
- case cff_op_closepath:
- /* this is an invalid Type 2 operator; however, there */
- /* exist fonts which are incorrectly converted from probably */
- /* Type 1 to CFF, and some parsers seem to accept it */
-
- FT_TRACE4(( " closepath (invalid op)\n" ));
-
- args = stack;
- break;
-
- case cff_op_hsbw:
- /* this is an invalid Type 2 operator; however, there */
- /* exist fonts which are incorrectly converted from probably */
- /* Type 1 to CFF, and some parsers seem to accept it */
-
- FT_TRACE4(( " hsbw (invalid op)\n" ));
-
- decoder->glyph_width = decoder->nominal_width + ( args[1] >> 16 );
-
- decoder->builder.left_bearing.x = args[0];
- decoder->builder.left_bearing.y = 0;
-
- x = decoder->builder.pos_x + args[0];
- y = decoder->builder.pos_y;
- args = stack;
- break;
-
- case cff_op_sbw:
- /* this is an invalid Type 2 operator; however, there */
- /* exist fonts which are incorrectly converted from probably */
- /* Type 1 to CFF, and some parsers seem to accept it */
-
- FT_TRACE4(( " sbw (invalid op)\n" ));
-
- decoder->glyph_width = decoder->nominal_width + ( args[2] >> 16 );
-
- decoder->builder.left_bearing.x = args[0];
- decoder->builder.left_bearing.y = args[1];
-
- x = decoder->builder.pos_x + args[0];
- y = decoder->builder.pos_y + args[1];
- args = stack;
- break;
-
- case cff_op_setcurrentpoint:
- /* this is an invalid Type 2 operator; however, there */
- /* exist fonts which are incorrectly converted from probably */
- /* Type 1 to CFF, and some parsers seem to accept it */
-
- FT_TRACE4(( " setcurrentpoint (invalid op)\n" ));
-
- x = decoder->builder.pos_x + args[0];
- y = decoder->builder.pos_y + args[1];
- args = stack;
- break;
-
- case cff_op_callothersubr:
- /* this is an invalid Type 2 operator; however, there */
- /* exist fonts which are incorrectly converted from probably */
- /* Type 1 to CFF, and some parsers seem to accept it */
-
- FT_TRACE4(( " callothersubr (invalid op)\n" ));
-
- /* subsequent `pop' operands should add the arguments, */
- /* this is the implementation described for `unknown' other */
- /* subroutines in the Type1 spec. */
- /* */
- /* XXX Fix return arguments (see discussion below). */
- args -= 2 + ( args[-2] >> 16 );
- if ( args < stack )
- goto Stack_Underflow;
- break;
-
- case cff_op_pop:
- /* this is an invalid Type 2 operator; however, there */
- /* exist fonts which are incorrectly converted from probably */
- /* Type 1 to CFF, and some parsers seem to accept it */
-
- FT_TRACE4(( " pop (invalid op)\n" ));
-
- /* XXX Increasing `args' is wrong: After a certain number of */
- /* `pop's we get a stack overflow. Reason for doing it is */
- /* code like this (actually found in a CFF font): */
- /* */
- /* 17 1 3 callothersubr */
- /* pop */
- /* callsubr */
- /* */
- /* Since we handle `callothersubr' as a no-op, and */
- /* `callsubr' needs at least one argument, `pop' can't be a */
- /* no-op too as it basically should be. */
- /* */
- /* The right solution would be to provide real support for */
- /* `callothersubr' as done in `t1decode.c', however, given */
- /* the fact that CFF fonts with `pop' are invalid, it is */
- /* questionable whether it is worth the time. */
- args++;
- break;
-
- case cff_op_and:
- {
- FT_Fixed cond = ( args[0] && args[1] );
-
-
- FT_TRACE4(( " and\n" ));
-
- args[0] = cond ? 0x10000L : 0;
- args++;
- }
- break;
-
- case cff_op_or:
- {
- FT_Fixed cond = ( args[0] || args[1] );
-
-
- FT_TRACE4(( " or\n" ));
-
- args[0] = cond ? 0x10000L : 0;
- args++;
- }
- break;
-
- case cff_op_not:
- {
- FT_Fixed cond = !args[0];
-
-
- FT_TRACE4(( " not\n" ));
-
- args[0] = cond ? 0x10000L : 0;
- args++;
- }
- break;
-
- case cff_op_eq:
- {
- FT_Fixed cond = ( args[0] == args[1] );
-
-
- FT_TRACE4(( " eq\n" ));
-
- args[0] = cond ? 0x10000L : 0;
- args++;
- }
- break;
-
- case cff_op_ifelse:
- {
- FT_Fixed cond = ( args[2] <= args[3] );
-
-
- FT_TRACE4(( " ifelse\n" ));
-
- if ( !cond )
- args[0] = args[1];
- args++;
- }
- break;
-
- case cff_op_callsubr:
- {
- FT_UInt idx = (FT_UInt)( ( args[0] >> 16 ) +
- decoder->locals_bias );
-
-
- FT_TRACE4(( " callsubr (idx %d, entering level %d)\n",
- idx,
- zone - decoder->zones + 1 ));
-
- if ( idx >= decoder->num_locals )
- {
- FT_ERROR(( "cff_decoder_parse_charstrings:"
- " invalid local subr index\n" ));
- goto Syntax_Error;
- }
-
- if ( zone - decoder->zones >= CFF_MAX_SUBRS_CALLS )
- {
- FT_ERROR(( "cff_decoder_parse_charstrings:"
- " too many nested subrs\n" ));
- goto Syntax_Error;
- }
-
- zone->cursor = ip; /* save current instruction pointer */
-
- zone++;
- zone->base = decoder->locals[idx];
- zone->limit = decoder->locals[idx + 1];
- zone->cursor = zone->base;
-
- if ( !zone->base || zone->limit == zone->base )
- {
- FT_ERROR(( "cff_decoder_parse_charstrings:"
- " invoking empty subrs\n" ));
- goto Syntax_Error;
- }
-
- decoder->zone = zone;
- ip = zone->base;
- limit = zone->limit;
- }
- break;
-
- case cff_op_callgsubr:
- {
- FT_UInt idx = (FT_UInt)( ( args[0] >> 16 ) +
- decoder->globals_bias );
-
-
- FT_TRACE4(( " callgsubr (idx %d, entering level %d)\n",
- idx,
- zone - decoder->zones + 1 ));
-
- if ( idx >= decoder->num_globals )
- {
- FT_ERROR(( "cff_decoder_parse_charstrings:"
- " invalid global subr index\n" ));
- goto Syntax_Error;
- }
-
- if ( zone - decoder->zones >= CFF_MAX_SUBRS_CALLS )
- {
- FT_ERROR(( "cff_decoder_parse_charstrings:"
- " too many nested subrs\n" ));
- goto Syntax_Error;
- }
-
- zone->cursor = ip; /* save current instruction pointer */
-
- zone++;
- zone->base = decoder->globals[idx];
- zone->limit = decoder->globals[idx + 1];
- zone->cursor = zone->base;
-
- if ( !zone->base || zone->limit == zone->base )
- {
- FT_ERROR(( "cff_decoder_parse_charstrings:"
- " invoking empty subrs\n" ));
- goto Syntax_Error;
- }
-
- decoder->zone = zone;
- ip = zone->base;
- limit = zone->limit;
- }
- break;
-
- case cff_op_return:
- FT_TRACE4(( " return (leaving level %d)\n",
- decoder->zone - decoder->zones ));
-
- if ( decoder->zone <= decoder->zones )
- {
- FT_ERROR(( "cff_decoder_parse_charstrings:"
- " unexpected return\n" ));
- goto Syntax_Error;
- }
-
- decoder->zone--;
- zone = decoder->zone;
- ip = zone->cursor;
- limit = zone->limit;
- break;
-
- default:
- FT_ERROR(( "Unimplemented opcode: %d", ip[-1] ));
-
- if ( ip[-1] == 12 )
- FT_ERROR(( " %d", ip[0] ));
- FT_ERROR(( "\n" ));
-
- return FT_THROW( Unimplemented_Feature );
- }
-
- decoder->top = args;
-
- if ( decoder->top - stack >= CFF_MAX_OPERANDS )
- goto Stack_Overflow;
-
- } /* general operator processing */
-
- } /* while ip < limit */
-
- FT_TRACE4(( "..end..\n\n" ));
-
- Fail:
- return error;
-
- MM_Error:
- FT_TRACE4(( "cff_decoder_parse_charstrings:"
- " invalid opcode found in top DICT charstring\n"));
- return FT_THROW( Invalid_File_Format );
-
- Syntax_Error:
- FT_TRACE4(( "cff_decoder_parse_charstrings: syntax error\n" ));
- return FT_THROW( Invalid_File_Format );
-
- Stack_Underflow:
- FT_TRACE4(( "cff_decoder_parse_charstrings: stack underflow\n" ));
- return FT_THROW( Too_Few_Arguments );
-
- Stack_Overflow:
- FT_TRACE4(( "cff_decoder_parse_charstrings: stack overflow\n" ));
- return FT_THROW( Stack_Overflow );
- }
-
-#endif /* CFF_CONFIG_OPTION_OLD_ENGINE */
-
-
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -2684,11 +142,14 @@
FT_Int glyph_index;
CFF_Font cff = (CFF_Font)face->other;
+ PSAux_Service psaux = (PSAux_Service)face->psaux;
+ const CFF_Decoder_Funcs decoder_funcs = psaux->cff_decoder_funcs;
+
*max_advance = 0;
/* Initialize load decoder */
- cff_decoder_init( &decoder, face, 0, 0, 0, 0 );
+ decoder_funcs->init( &decoder, face, 0, 0, 0, 0, 0, 0 );
decoder.builder.metrics_only = 1;
decoder.builder.load_points = 0;
@@ -2707,12 +168,12 @@
&charstring, &charstring_len );
if ( !error )
{
- error = cff_decoder_prepare( &decoder, size, glyph_index );
+ error = decoder_funcs->prepare( &decoder, size, glyph_index );
if ( !error )
- error = cff_decoder_parse_charstrings( &decoder,
- charstring,
- charstring_len,
- 0 );
+ error = decoder_funcs->parse_charstrings_old( &decoder,
+ charstring,
+ charstring_len,
+ 0 );
cff_free_glyph_data( face, &charstring, &charstring_len );
}
@@ -2738,10 +199,14 @@
{
FT_Error error;
CFF_Decoder decoder;
+ PS_Decoder psdecoder;
TT_Face face = (TT_Face)glyph->root.face;
FT_Bool hinting, scaled, force_scaling;
CFF_Font cff = (CFF_Font)face->extra.data;
+ PSAux_Service psaux = (PSAux_Service)face->psaux;
+ const CFF_Decoder_Funcs decoder_funcs = psaux->cff_decoder_funcs;
+
FT_Matrix font_matrix;
FT_Vector font_offset;
@@ -2931,7 +396,7 @@
{
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
- CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( face );
+ PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( face );
#endif
@@ -2939,8 +404,10 @@
FT_ULong charstring_len;
- cff_decoder_init( &decoder, face, size, glyph, hinting,
- FT_LOAD_TARGET_MODE( load_flags ) );
+ decoder_funcs->init( &decoder, face, size, glyph, hinting,
+ FT_LOAD_TARGET_MODE( load_flags ),
+ cff_get_glyph_data,
+ cff_free_glyph_data );
/* this is for pure CFFs */
if ( load_flags & FT_LOAD_ADVANCE_ONLY )
@@ -2955,23 +422,25 @@
if ( error )
goto Glyph_Build_Finished;
- error = cff_decoder_prepare( &decoder, size, glyph_index );
+ error = decoder_funcs->prepare( &decoder, size, glyph_index );
if ( error )
goto Glyph_Build_Finished;
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
/* choose which CFF renderer to use */
- if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE )
- error = cff_decoder_parse_charstrings( &decoder,
- charstring,
- charstring_len,
- 0 );
+ if ( driver->hinting_engine == FT_HINTING_FREETYPE )
+ error = decoder_funcs->parse_charstrings_old( &decoder,
+ charstring,
+ charstring_len,
+ 0 );
else
#endif
{
- error = cf2_decoder_parse_charstrings( &decoder,
- charstring,
- charstring_len );
+ psaux->ps_decoder_init( &psdecoder, &decoder, FALSE );
+
+ error = decoder_funcs->parse_charstrings( &psdecoder,
+ charstring,
+ charstring_len );
/* Adobe's engine uses 16.16 numbers everywhere; */
/* as a consequence, glyphs larger than 2000ppem get rejected */
@@ -2984,9 +453,9 @@
force_scaling = TRUE;
glyph->hint = hinting;
- error = cf2_decoder_parse_charstrings( &decoder,
- charstring,
- charstring_len );
+ error = decoder_funcs->parse_charstrings( &psdecoder,
+ charstring,
+ charstring_len );
}
}
@@ -3024,7 +493,7 @@
Glyph_Build_Finished:
/* save new glyph tables, if no error */
if ( !error )
- cff_builder_done( &decoder.builder );
+ decoder.builder.funcs.done( &decoder.builder );
/* XXX: anything to do for broken glyph entry? */
}
diff --git a/modules/freetype2/src/cff/cffgload.h b/modules/freetype2/src/cff/cffgload.h
index b875fbed9..803f3974f 100644
--- a/modules/freetype2/src/cff/cffgload.h
+++ b/modules/freetype2/src/cff/cffgload.h
@@ -4,7 +4,7 @@
/* */
/* OpenType Glyph Loader (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,119 +22,11 @@
#include <ft2build.h>
#include FT_FREETYPE_H
-#include "cffobjs.h"
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
FT_BEGIN_HEADER
-
-#define CFF_MAX_OPERANDS 48
-#define CFF_MAX_SUBRS_CALLS 16 /* maximum subroutine nesting; */
- /* only 10 are allowed but there exist */
- /* fonts like `HiraKakuProN-W3.ttf' */
- /* (Hiragino Kaku Gothic ProN W3; */
- /* 8.2d6e1; 2014-12-19) that exceed */
- /* this limit */
-#define CFF_MAX_TRANS_ELEMENTS 32
-
-
- /*************************************************************************/
- /* */
- /* <Structure> */
- /* CFF_Builder */
- /* */
- /* <Description> */
- /* A structure used during glyph loading to store its outline. */
- /* */
- /* <Fields> */
- /* memory :: The current memory object. */
- /* */
- /* face :: The current face object. */
- /* */
- /* glyph :: The current glyph slot. */
- /* */
- /* loader :: The current glyph loader. */
- /* */
- /* base :: The base glyph outline. */
- /* */
- /* current :: The current glyph outline. */
- /* */
- /* pos_x :: The horizontal translation (if composite glyph). */
- /* */
- /* pos_y :: The vertical translation (if composite glyph). */
- /* */
- /* left_bearing :: The left side bearing point. */
- /* */
- /* advance :: The horizontal advance vector. */
- /* */
- /* bbox :: Unused. */
- /* */
- /* path_begun :: A flag which indicates that a new path has begun. */
- /* */
- /* load_points :: If this flag is not set, no points are loaded. */
- /* */
- /* no_recurse :: Set but not used. */
- /* */
- /* metrics_only :: A boolean indicating that we only want to compute */
- /* the metrics of a given glyph, not load all of its */
- /* points. */
- /* */
- /* hints_funcs :: Auxiliary pointer for hinting. */
- /* */
- /* hints_globals :: Auxiliary pointer for hinting. */
- /* */
- typedef struct CFF_Builder_
- {
- FT_Memory memory;
- TT_Face face;
- CFF_GlyphSlot glyph;
- FT_GlyphLoader loader;
- FT_Outline* base;
- FT_Outline* current;
-
- FT_Pos pos_x;
- FT_Pos pos_y;
-
- FT_Vector left_bearing;
- FT_Vector advance;
-
- FT_BBox bbox; /* bounding box */
- FT_Bool path_begun;
- FT_Bool load_points;
- FT_Bool no_recurse;
-
- FT_Bool metrics_only;
-
- void* hints_funcs; /* hinter-specific */
- void* hints_globals; /* hinter-specific */
-
- } CFF_Builder;
-
-
- FT_LOCAL( FT_Error )
- cff_check_points( CFF_Builder* builder,
- FT_Int count );
-
- FT_LOCAL( void )
- cff_builder_add_point( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y,
- FT_Byte flag );
- FT_LOCAL( FT_Error )
- cff_builder_add_point1( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y );
- FT_LOCAL( FT_Error )
- cff_builder_start_point( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y );
- FT_LOCAL( void )
- cff_builder_close_contour( CFF_Builder* builder );
-
-
- FT_LOCAL( FT_Int )
- cff_lookup_glyph_by_stdcharcode( CFF_Font cff,
- FT_Int charcode );
FT_LOCAL( FT_Error )
cff_get_glyph_data( TT_Face face,
FT_UInt glyph_index,
@@ -146,74 +38,6 @@ FT_BEGIN_HEADER
FT_ULong length );
- /* execution context charstring zone */
-
- typedef struct CFF_Decoder_Zone_
- {
- FT_Byte* base;
- FT_Byte* limit;
- FT_Byte* cursor;
-
- } CFF_Decoder_Zone;
-
-
- typedef struct CFF_Decoder_
- {
- CFF_Builder builder;
- CFF_Font cff;
-
- FT_Fixed stack[CFF_MAX_OPERANDS + 1];
- FT_Fixed* top;
-
- CFF_Decoder_Zone zones[CFF_MAX_SUBRS_CALLS + 1];
- CFF_Decoder_Zone* zone;
-
- FT_Int flex_state;
- FT_Int num_flex_vectors;
- FT_Vector flex_vectors[7];
-
- FT_Pos glyph_width;
- FT_Pos nominal_width;
-
- FT_Bool read_width;
- FT_Bool width_only;
- FT_Int num_hints;
- FT_Fixed buildchar[CFF_MAX_TRANS_ELEMENTS];
-
- FT_UInt num_locals;
- FT_UInt num_globals;
-
- FT_Int locals_bias;
- FT_Int globals_bias;
-
- FT_Byte** locals;
- FT_Byte** globals;
-
- FT_Byte** glyph_names; /* for pure CFF fonts only */
- FT_UInt num_glyphs; /* number of glyphs in font */
-
- FT_Render_Mode hint_mode;
-
- FT_Bool seac;
-
- CFF_SubFont current_subfont; /* for current glyph_index */
-
- } CFF_Decoder;
-
-
- FT_LOCAL( void )
- cff_decoder_init( CFF_Decoder* decoder,
- TT_Face face,
- CFF_Size size,
- CFF_GlyphSlot slot,
- FT_Bool hinting,
- FT_Render_Mode hint_mode );
-
- FT_LOCAL( FT_Error )
- cff_decoder_prepare( CFF_Decoder* decoder,
- CFF_Size size,
- FT_UInt glyph_index );
-
#if 0 /* unused until we support pure CFF fonts */
/* Compute the maximum advance width of a font through quick parsing */
@@ -223,13 +47,6 @@ FT_BEGIN_HEADER
#endif /* 0 */
-#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
- FT_LOCAL( FT_Error )
- cff_decoder_parse_charstrings( CFF_Decoder* decoder,
- FT_Byte* charstring_base,
- FT_ULong charstring_len,
- FT_Bool in_dict );
-#endif
FT_LOCAL( FT_Error )
cff_slot_load( CFF_GlyphSlot glyph,
diff --git a/modules/freetype2/src/cff/cffload.c b/modules/freetype2/src/cff/cffload.c
index c1e6b14db..1c6fe5156 100644
--- a/modules/freetype2/src/cff/cffload.c
+++ b/modules/freetype2/src/cff/cffload.c
@@ -4,7 +4,7 @@
/* */
/* OpenType and CFF data/program tables loader (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,7 @@
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
#include FT_TYPE1_TABLES_H
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
#include FT_MULTIPLE_MASTERS_H
@@ -1113,7 +1114,7 @@
/* convert 2.14 to Fixed */
- #define FT_fdot14ToFixed( x ) ( ( (FT_Fixed)( (FT_Int16)(x) ) ) << 2 )
+ #define FT_fdot14ToFixed( x ) ( (FT_Fixed)( (FT_ULong)(x) << 2 ) )
static FT_Error
@@ -1297,7 +1298,9 @@
if ( numOperands > count )
{
- FT_TRACE4(( " cff_blend_doBlend: Stack underflow %d args\n", count ));
+ FT_TRACE4(( " cff_blend_doBlend: Stack underflow %d argument%s\n",
+ count,
+ count == 1 ? "" : "s" ));
error = FT_THROW( Stack_Underflow );
goto Exit;
@@ -1307,6 +1310,10 @@
size = 5 * numBlends; /* add 5 bytes per entry */
if ( subFont->blend_used + size > subFont->blend_alloc )
{
+ FT_Byte* blend_stack_old = subFont->blend_stack;
+ FT_Byte* blend_top_old = subFont->blend_top;
+
+
/* increase or allocate `blend_stack' and reset `blend_top'; */
/* prepare to append `numBlends' values to the buffer */
if ( FT_REALLOC( subFont->blend_stack,
@@ -1316,6 +1323,22 @@
subFont->blend_top = subFont->blend_stack + subFont->blend_used;
subFont->blend_alloc += size;
+
+ /* iterate over the parser stack and adjust pointers */
+ /* if the reallocated buffer has a different address */
+ if ( blend_stack_old &&
+ subFont->blend_stack != blend_stack_old )
+ {
+ FT_PtrDist offset = subFont->blend_stack - blend_stack_old;
+ FT_Byte** p;
+
+
+ for ( p = parser->stack; p < parser->top; p++ )
+ {
+ if ( *p >= blend_stack_old && *p < blend_top_old )
+ *p += offset;
+ }
+ }
}
subFont->blend_used += size;
@@ -1325,28 +1348,27 @@
for ( i = 0; i < numBlends; i++ )
{
const FT_Int32* weight = &blend->BV[1];
- FT_Int32 sum;
+ FT_UInt32 sum;
/* convert inputs to 16.16 fixed point */
- sum = cff_parse_num( parser, &parser->stack[i + base] ) << 16;
+ sum = cff_parse_num( parser, &parser->stack[i + base] ) * 0x10000;
for ( j = 1; j < blend->lenBV; j++ )
- sum += FT_MulFix( *weight++,
- cff_parse_num( parser,
- &parser->stack[delta++] ) << 16 );
+ sum += cff_parse_num( parser, &parser->stack[delta++] ) * *weight++;
/* point parser stack to new value on blend_stack */
parser->stack[i + base] = subFont->blend_top;
- /* Push blended result as Type 2 5-byte fixed point number (except */
- /* that host byte order is used). This will not conflict with */
- /* actual DICTs because 255 is a reserved opcode in both CFF and */
- /* CFF2 DICTs. See `cff_parse_num' for decode of this, which rounds */
- /* to an integer. */
- *subFont->blend_top++ = 255;
- *((FT_UInt32*)subFont->blend_top) = (FT_UInt32)sum; /* write 4 bytes */
- subFont->blend_top += 4;
+ /* Push blended result as Type 2 5-byte fixed point number. This */
+ /* will not conflict with actual DICTs because 255 is a reserved */
+ /* opcode in both CFF and CFF2 DICTs. See `cff_parse_num' for */
+ /* decode of this, which rounds to an integer. */
+ *subFont->blend_top++ = 255;
+ *subFont->blend_top++ = (FT_Byte)( sum >> 24 );
+ *subFont->blend_top++ = (FT_Byte)( sum >> 16 );
+ *subFont->blend_top++ = (FT_Byte)( sum >> 8 );
+ *subFont->blend_top++ = (FT_Byte)sum;
}
/* leave only numBlends results on parser stack */
@@ -1442,10 +1464,15 @@
/* Note: `lenNDV' could be zero. */
/* In that case, build default blend vector (1,0,0...). */
- /* In the normal case, initialize each component to 1 */
- /* before inner loop. */
- if ( lenNDV != 0 )
- blend->BV[master] = FT_FIXED_ONE; /* default */
+ if ( !lenNDV )
+ {
+ blend->BV[master] = 0;
+ continue;
+ }
+
+ /* In the normal case, initialize each component to 1 */
+ /* before inner loop. */
+ blend->BV[master] = FT_FIXED_ONE; /* default */
/* inner loop steps through axes in this region */
for ( j = 0; j < lenNDV; j++ )
@@ -1508,12 +1535,12 @@
lenNDV * sizeof ( *NDV ) ) )
goto Exit;
- blend->lenNDV = lenNDV;
FT_MEM_COPY( blend->lastNDV,
NDV,
lenNDV * sizeof ( *NDV ) );
}
+ blend->lenNDV = lenNDV;
blend->builtBV = TRUE;
Exit:
@@ -1529,13 +1556,13 @@
FT_UInt lenNDV,
FT_Fixed* NDV )
{
- if ( !blend->builtBV ||
- blend->lastVsindex != vsindex ||
- blend->lenNDV != lenNDV ||
- ( lenNDV &&
- memcmp( NDV,
- blend->lastNDV,
- lenNDV * sizeof ( *NDV ) ) != 0 ) )
+ if ( !blend->builtBV ||
+ blend->lastVsindex != vsindex ||
+ blend->lenNDV != lenNDV ||
+ ( lenNDV &&
+ ft_memcmp( NDV,
+ blend->lastNDV,
+ lenNDV * sizeof ( *NDV ) ) != 0 ) )
{
/* need to build blend vector */
return TRUE;
@@ -1551,12 +1578,17 @@
cff_get_var_blend( CFF_Face face,
FT_UInt *num_coords,
FT_Fixed* *coords,
+ FT_Fixed* *normalizedcoords,
FT_MM_Var* *mm_var )
{
FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
- return mm->get_var_blend( FT_FACE( face ), num_coords, coords, mm_var );
+ return mm->get_var_blend( FT_FACE( face ),
+ num_coords,
+ coords,
+ normalizedcoords,
+ mm_var );
}
@@ -1566,7 +1598,8 @@
FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
- mm->done_blend( FT_FACE( face ) );
+ if (mm)
+ mm->done_blend( FT_FACE( face ) );
}
#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
@@ -1864,7 +1897,8 @@
subfont->lenNDV = lenNDV;
subfont->NDV = NDV;
- stackSize = font->cff2 ? font->top_font.font_dict.maxstack
+ /* add 1 for the operator */
+ stackSize = font->cff2 ? font->top_font.font_dict.maxstack + 1
: CFF_MAX_STACK_DEPTH + 1;
if ( cff_parser_init( &parser,
@@ -1892,6 +1926,31 @@
/* ensure that `num_blue_values' is even */
priv->num_blue_values &= ~1;
+ /* sanitize `initialRandomSeed' to be a positive value, if necessary; */
+ /* this is not mandated by the specification but by our implementation */
+ if ( priv->initial_random_seed < 0 )
+ priv->initial_random_seed = -priv->initial_random_seed;
+ else if ( priv->initial_random_seed == 0 )
+ priv->initial_random_seed = 987654321;
+
+ /* some sanitizing to avoid overflows later on; */
+ /* the upper limits are ad-hoc values */
+ if ( priv->blue_shift > 1000 || priv->blue_shift < 0 )
+ {
+ FT_TRACE2(( "cff_load_private_dict:"
+ " setting unlikely BlueShift value %d to default (7)\n",
+ priv->blue_shift ));
+ priv->blue_shift = 7;
+ }
+
+ if ( priv->blue_fuzz > 1000 || priv->blue_fuzz < 0 )
+ {
+ FT_TRACE2(( "cff_load_private_dict:"
+ " setting unlikely BlueFuzz value %d to default (1)\n",
+ priv->blue_fuzz ));
+ priv->blue_fuzz = 1;
+ }
+
Exit:
/* clean up */
cff_blend_clear( subfont ); /* clear blend stack */
@@ -1916,7 +1975,8 @@
FT_Stream stream,
FT_ULong base_offset,
FT_UInt code,
- CFF_Font font )
+ CFF_Font font,
+ CFF_Face face )
{
FT_Error error;
CFF_ParserRec parser;
@@ -1925,6 +1985,8 @@
CFF_FontRecDict top = &subfont->font_dict;
CFF_Private priv = &subfont->private_dict;
+ PSAux_Service psaux = (PSAux_Service)face->psaux;
+
FT_Bool cff2 = FT_BOOL( code == CFF2_CODE_TOPDICT ||
code == CFF2_CODE_FONTDICT );
FT_UInt stackSize = cff2 ? CFF2_DEFAULT_STACK
@@ -2013,6 +2075,56 @@
if ( error )
goto Exit;
+ if ( !cff2 )
+ {
+ /*
+ * Initialize the random number generator.
+ *
+ * . If we have a face-specific seed, use it.
+ * If non-zero, update it to a positive value.
+ *
+ * . Otherwise, use the seed from the CFF driver.
+ * If non-zero, update it to a positive value.
+ *
+ * . If the random value is zero, use the seed given by the subfont's
+ * `initialRandomSeed' value.
+ *
+ */
+ if ( face->root.internal->random_seed == -1 )
+ {
+ PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( face );
+
+
+ subfont->random = (FT_UInt32)driver->random_seed;
+ if ( driver->random_seed )
+ {
+ do
+ {
+ driver->random_seed =
+ (FT_Int32)psaux->cff_random( (FT_UInt32)driver->random_seed );
+
+ } while ( driver->random_seed < 0 );
+ }
+ }
+ else
+ {
+ subfont->random = (FT_UInt32)face->root.internal->random_seed;
+ if ( face->root.internal->random_seed )
+ {
+ do
+ {
+ face->root.internal->random_seed =
+ (FT_Int32)psaux->cff_random(
+ (FT_UInt32)face->root.internal->random_seed );
+
+ } while ( face->root.internal->random_seed < 0 );
+ }
+ }
+
+ if ( !subfont->random )
+ subfont->random = (FT_UInt32)priv->initial_random_seed;
+ }
+
/* read the local subrs, if any */
if ( priv->local_subrs_offset )
{
@@ -2058,6 +2170,7 @@
FT_Stream stream,
FT_Int face_index,
CFF_Font font,
+ CFF_Face face,
FT_Bool pure_cff,
FT_Bool cff2 )
{
@@ -2178,6 +2291,18 @@
goto Exit;
}
+ /* if we have an empty font name, */
+ /* it must be the only font in the CFF */
+ if ( font->name_index.count > 1 &&
+ font->name_index.data_size < font->name_index.count )
+ {
+ /* for pure CFFs, we still haven't checked enough bytes */
+ /* to be sure that it is a CFF at all */
+ error = pure_cff ? FT_THROW( Unknown_File_Format )
+ : FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
+
if ( FT_SET_ERROR( cff_index_init( &font->font_dict_index,
stream, 0, cff2 ) ) ||
FT_SET_ERROR( cff_index_init( &string_index,
@@ -2189,6 +2314,15 @@
&font->string_pool,
&font->string_pool_size ) ) )
goto Exit;
+
+ /* there must be a Top DICT index entry for each name index entry */
+ if ( font->name_index.count > font->font_dict_index.count )
+ {
+ FT_ERROR(( "cff_font_load:"
+ " not enough entries in Top DICT index\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
}
font->num_strings = string_index.count;
@@ -2236,7 +2370,8 @@
stream,
base_offset,
cff2 ? CFF2_CODE_TOPDICT : CFF_CODE_TOPDICT,
- font );
+ font,
+ face );
if ( error )
goto Exit;
@@ -2303,7 +2438,8 @@
base_offset,
cff2 ? CFF2_CODE_FONTDICT
: CFF_CODE_TOPDICT,
- font );
+ font,
+ face );
if ( error )
goto Fail_CID;
}
@@ -2420,6 +2556,8 @@
font->cf2_instance.finalizer( font->cf2_instance.data );
FT_FREE( font->cf2_instance.data );
}
+
+ FT_FREE( font->font_extra );
}
diff --git a/modules/freetype2/src/cff/cffload.h b/modules/freetype2/src/cff/cffload.h
index dc3a2c523..14d14e211 100644
--- a/modules/freetype2/src/cff/cffload.h
+++ b/modules/freetype2/src/cff/cffload.h
@@ -4,7 +4,7 @@
/* */
/* OpenType & CFF data/program tables loader (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,9 +21,9 @@
#include <ft2build.h>
-#include "cfftypes.h"
+#include FT_INTERNAL_CFF_TYPES_H
#include "cffparse.h"
-#include "cffobjs.h" /* for CFF_Face */
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H /* for CFF_Face */
FT_BEGIN_HEADER
@@ -66,6 +66,7 @@ FT_BEGIN_HEADER
FT_Stream stream,
FT_Int face_index,
CFF_Font font,
+ CFF_Face face,
FT_Bool pure_cff,
FT_Bool cff2 );
@@ -108,6 +109,7 @@ FT_BEGIN_HEADER
cff_get_var_blend( CFF_Face face,
FT_UInt *num_coords,
FT_Fixed* *coords,
+ FT_Fixed* *normalizedcoords,
FT_MM_Var* *mm_var );
FT_LOCAL( void )
diff --git a/modules/freetype2/src/cff/cffobjs.c b/modules/freetype2/src/cff/cffobjs.c
index 926effc52..a2d7aec65 100644
--- a/modules/freetype2/src/cff/cffobjs.c
+++ b/modules/freetype2/src/cff/cffobjs.c
@@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -25,8 +25,15 @@
#include FT_TRUETYPE_IDS_H
#include FT_TRUETYPE_TAGS_H
#include FT_INTERNAL_SFNT_H
-#include FT_CFF_DRIVER_H
+#include FT_DRIVER_H
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#include FT_MULTIPLE_MASTERS_H
+#include FT_SERVICE_MULTIPLE_MASTERS_H
+#include FT_SERVICE_METRICS_VARIATIONS_H
+#endif
+
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
#include "cffobjs.h"
#include "cffload.h"
#include "cffcmap.h"
@@ -34,6 +41,9 @@
#include "cfferrs.h"
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include FT_SERVICE_CFF_TABLE_LOAD_H
+
/*************************************************************************/
/* */
@@ -49,9 +59,6 @@
/* */
/* SIZE FUNCTIONS */
/* */
- /* Note that we store the global hints in the size's `internal' root */
- /* field. */
- /* */
/*************************************************************************/
@@ -75,10 +82,11 @@
FT_LOCAL_DEF( void )
cff_size_done( FT_Size cffsize ) /* CFF_Size */
{
+ FT_Memory memory = cffsize->face->memory;
CFF_Size size = (CFF_Size)cffsize;
CFF_Face face = (CFF_Face)size->root.face;
CFF_Font font = (CFF_Font)face->extra.data;
- CFF_Internal internal = (CFF_Internal)cffsize->internal;
+ CFF_Internal internal = (CFF_Internal)cffsize->internal->module_data;
if ( internal )
@@ -98,7 +106,7 @@
funcs->destroy( internal->subfonts[i - 1] );
}
- /* `internal' is freed by destroy_size (in ftobjs.c) */
+ FT_FREE( internal );
}
}
@@ -194,7 +202,7 @@
goto Exit;
}
- cffsize->internal = (FT_Size_Internal)(void*)internal;
+ cffsize->internal->module_data = internal;
}
size->strike_index = 0xFFFFFFFFUL;
@@ -224,7 +232,7 @@
{
CFF_Face face = (CFF_Face)size->face;
CFF_Font font = (CFF_Font)face->extra.data;
- CFF_Internal internal = (CFF_Internal)size->internal;
+ CFF_Internal internal = (CFF_Internal)size->internal->module_data;
FT_Long top_upm = (FT_Long)font->top_font.font_dict.units_per_em;
FT_UInt i;
@@ -296,7 +304,7 @@
{
CFF_Face cffface = (CFF_Face)size->face;
CFF_Font font = (CFF_Font)cffface->extra.data;
- CFF_Internal internal = (CFF_Internal)size->internal;
+ CFF_Internal internal = (CFF_Internal)size->internal->module_data;
FT_Long top_upm = (FT_Long)font->top_font.font_dict.units_per_em;
FT_UInt i;
@@ -405,7 +413,7 @@
remove_subset_prefix( FT_String* name )
{
FT_Int32 idx = 0;
- FT_Int32 length = (FT_Int32)strlen( name ) + 1;
+ FT_Int32 length = (FT_Int32)ft_strlen( name ) + 1;
FT_Bool continue_search = 1;
@@ -442,8 +450,8 @@
FT_Int32 family_name_length, style_name_length;
- family_name_length = (FT_Int32)strlen( family_name );
- style_name_length = (FT_Int32)strlen( style_name );
+ family_name_length = (FT_Int32)ft_strlen( family_name );
+ style_name_length = (FT_Int32)ft_strlen( style_name );
if ( family_name_length > style_name_length )
{
@@ -490,14 +498,16 @@
SFNT_Service sfnt;
FT_Service_PsCMaps psnames;
PSHinter_Service pshinter;
+ PSAux_Service psaux;
+ FT_Service_CFFLoad cffload;
FT_Bool pure_cff = 1;
FT_Bool cff2 = 0;
FT_Bool sfnt_format = 0;
FT_Library library = cffface->driver->root.library;
- sfnt = (SFNT_Service)FT_Get_Module_Interface(
- library, "sfnt" );
+ sfnt = (SFNT_Service)FT_Get_Module_Interface( library,
+ "sfnt" );
if ( !sfnt )
{
FT_ERROR(( "cff_face_init: cannot access `sfnt' module\n" ));
@@ -507,8 +517,20 @@
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
- pshinter = (PSHinter_Service)FT_Get_Module_Interface(
- library, "pshinter" );
+ pshinter = (PSHinter_Service)FT_Get_Module_Interface( library,
+ "pshinter" );
+
+ psaux = (PSAux_Service)FT_Get_Module_Interface( library,
+ "psaux" );
+ if ( !psaux )
+ {
+ FT_ERROR(( "cff_face_init: cannot access `psaux' module\n" ));
+ error = FT_THROW( Missing_Module );
+ goto Exit;
+ }
+ face->psaux = psaux;
+
+ FT_FACE_FIND_GLOBAL_SERVICE( face, cffload, CFF_LOAD );
FT_TRACE2(( "CFF driver\n" ));
@@ -517,6 +539,7 @@
goto Exit;
/* check whether we have a valid OpenType file */
+ FT_TRACE2(( " " ));
error = sfnt->init_face( stream, face, face_index, num_params, params );
if ( !error )
{
@@ -559,8 +582,8 @@
error = face->goto_table( face, TTAG_CFF2, stream, 0 );
if ( !error )
{
- cff2 = 1;
- face->isCFF2 = cff2;
+ cff2 = 1;
+ face->is_cff2 = cff2;
}
if ( FT_ERR_EQ( error, Table_Missing ) )
@@ -594,6 +617,7 @@
stream,
face_index,
cff,
+ face,
pure_cff,
cff2 );
if ( error )
@@ -609,6 +633,7 @@
cff->pshinter = pshinter;
cff->psnames = psnames;
+ cff->cffload = cffload;
cffface->face_index = face_index & 0xFFFF;
@@ -683,62 +708,28 @@
}
#endif /* FT_DEBUG_LEVEL_TRACE */
-
-
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-
- {
- FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
-
- FT_Int instance_index = face_index >> 16;
-
-
- if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
- mm &&
- instance_index > 0 )
{
- FT_MM_Var* mm_var;
+ FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
+ FT_Service_MetricsVariations var = (FT_Service_MetricsVariations)face->var;
+ FT_UInt instance_index = (FT_UInt)face_index >> 16;
- error = mm->get_mm_var( cffface, NULL );
- if ( error )
- goto Exit;
-
- mm->get_var_blend( cffface, NULL, NULL, &mm_var );
- if ( mm_var->namedstyle )
+ if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
+ mm &&
+ instance_index > 0 )
{
- FT_Var_Named_Style* named_style;
- FT_String* style_name;
-
-
- /* in `face_index', the instance index starts with value 1 */
- named_style = mm_var->namedstyle + instance_index - 1;
- error = sfnt->get_name( face,
- (FT_UShort)named_style->strid,
- &style_name );
+ error = mm->set_instance( cffface, instance_index );
if ( error )
goto Exit;
- /* set style name; if already set, replace it */
- if ( face->root.style_name )
- FT_FREE( face->root.style_name );
- face->root.style_name = style_name;
-
- /* finally, select the named instance */
- error = mm->set_var_design( cffface,
- mm_var->num_axis,
- named_style->coords );
- if ( error )
- goto Exit;
+ if ( var )
+ var->metrics_adjust( cffface );
}
}
- }
-
#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
-
-
if ( !dict->has_font_matrix )
dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM;
@@ -877,7 +868,8 @@
cffface->height = (FT_Short)( ( cffface->units_per_EM * 12 ) / 10 );
if ( cffface->height < cffface->ascender - cffface->descender )
- cffface->height = (FT_Short)( cffface->ascender - cffface->descender );
+ cffface->height = (FT_Short)( cffface->ascender -
+ cffface->descender );
cffface->underline_position =
(FT_Short)( dict->underline_position >> 16 );
@@ -885,28 +877,33 @@
(FT_Short)( dict->underline_thickness >> 16 );
/* retrieve font family & style name */
- cffface->family_name = cff_index_get_name(
- cff,
- (FT_UInt)( face_index & 0xFFFF ) );
+ if ( dict->family_name )
+ {
+ char* family_name;
+
+
+ family_name = cff_index_get_sid_string( cff, dict->family_name );
+ if ( family_name )
+ cffface->family_name = cff_strcpy( memory, family_name );
+ }
+
+ if ( !cffface->family_name )
+ {
+ cffface->family_name = cff_index_get_name(
+ cff,
+ (FT_UInt)( face_index & 0xFFFF ) );
+ if ( cffface->family_name )
+ remove_subset_prefix( cffface->family_name );
+ }
+
if ( cffface->family_name )
{
char* full = cff_index_get_sid_string( cff,
dict->full_name );
char* fullp = full;
char* family = cffface->family_name;
- char* family_name = NULL;
- remove_subset_prefix( cffface->family_name );
-
- if ( dict->family_name )
- {
- family_name = cff_index_get_sid_string( cff,
- dict->family_name );
- if ( family_name )
- family = family_name;
- }
-
/* We try to extract the style name from the full name. */
/* We need to ignore spaces and dashes during the search. */
if ( full && family )
@@ -1021,7 +1018,6 @@
cffface->style_flags = flags;
}
-
#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
/* CID-keyed CFF fonts don't have glyph names -- the SFNT loader */
/* has unset this flag because of the 3.0 `post' table. */
@@ -1032,7 +1028,6 @@
if ( dict->cid_registry != 0xFFFFU && pure_cff )
cffface->face_flags |= FT_FACE_FLAG_CID_KEYED;
-
/*******************************************************************/
/* */
/* Compute char maps. */
@@ -1162,14 +1157,16 @@
FT_LOCAL_DEF( FT_Error )
cff_driver_init( FT_Module module ) /* CFF_Driver */
{
- CFF_Driver driver = (CFF_Driver)module;
+ PS_Driver driver = (PS_Driver)module;
+
+ FT_UInt32 seed;
/* set default property values, cf. `ftcffdrv.h' */
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
- driver->hinting_engine = FT_CFF_HINTING_FREETYPE;
+ driver->hinting_engine = FT_HINTING_FREETYPE;
#else
- driver->hinting_engine = FT_CFF_HINTING_ADOBE;
+ driver->hinting_engine = FT_HINTING_ADOBE;
#endif
driver->no_stem_darkening = TRUE;
@@ -1183,6 +1180,18 @@
driver->darken_params[6] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4;
driver->darken_params[7] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4;
+ /* compute random seed from some memory addresses */
+ seed = (FT_UInt32)( (FT_Offset)(char*)&seed ^
+ (FT_Offset)(char*)&module ^
+ (FT_Offset)(char*)module->memory );
+ seed = seed ^ ( seed >> 10 ) ^ ( seed >> 20 );
+
+ driver->random_seed = (FT_Int32)seed;
+ if ( driver->random_seed < 0 )
+ driver->random_seed = -driver->random_seed;
+ else if ( driver->random_seed == 0 )
+ driver->random_seed = 123456789;
+
return FT_Err_Ok;
}
diff --git a/modules/freetype2/src/cff/cffobjs.h b/modules/freetype2/src/cff/cffobjs.h
index 9dc77536b..616a25b3b 100644
--- a/modules/freetype2/src/cff/cffobjs.h
+++ b/modules/freetype2/src/cff/cffobjs.h
@@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,111 +21,11 @@
#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include "cfftypes.h"
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
FT_BEGIN_HEADER
- /*************************************************************************/
- /* */
- /* <Type> */
- /* CFF_Driver */
- /* */
- /* <Description> */
- /* A handle to an OpenType driver object. */
- /* */
- typedef struct CFF_DriverRec_* CFF_Driver;
-
- typedef TT_Face CFF_Face;
-
-
- /*************************************************************************/
- /* */
- /* <Type> */
- /* CFF_Size */
- /* */
- /* <Description> */
- /* A handle to an OpenType size object. */
- /* */
- typedef struct CFF_SizeRec_
- {
- FT_SizeRec root;
- FT_ULong strike_index; /* 0xFFFFFFFF to indicate invalid */
-
- } CFF_SizeRec, *CFF_Size;
-
-
- /*************************************************************************/
- /* */
- /* <Type> */
- /* CFF_GlyphSlot */
- /* */
- /* <Description> */
- /* A handle to an OpenType glyph slot object. */
- /* */
- typedef struct CFF_GlyphSlotRec_
- {
- FT_GlyphSlotRec root;
-
- FT_Bool hint;
- FT_Bool scaled;
-
- FT_Fixed x_scale;
- FT_Fixed y_scale;
-
- } CFF_GlyphSlotRec, *CFF_GlyphSlot;
-
-
- /*************************************************************************/
- /* */
- /* <Type> */
- /* CFF_Internal */
- /* */
- /* <Description> */
- /* The interface to the `internal' field of `FT_Size'. */
- /* */
- typedef struct CFF_InternalRec_
- {
- PSH_Globals topfont;
- PSH_Globals subfonts[CFF_MAX_CID_FONTS];
-
- } CFF_InternalRec, *CFF_Internal;
-
-
- /*************************************************************************/
- /* */
- /* Subglyph transformation record. */
- /* */
- typedef struct CFF_Transform_
- {
- FT_Fixed xx, xy; /* transformation matrix coefficients */
- FT_Fixed yx, yy;
- FT_F26Dot6 ox, oy; /* offsets */
-
- } CFF_Transform;
-
-
- /***********************************************************************/
- /* */
- /* CFF driver class. */
- /* */
- typedef struct CFF_DriverRec_
- {
- FT_DriverRec root;
-
- FT_UInt hinting_engine;
- FT_Bool no_stem_darkening;
-
- FT_Int darken_params[8];
-
- } CFF_DriverRec;
-
-
FT_LOCAL( FT_Error )
cff_size_init( FT_Size size ); /* CFF_Size */
@@ -171,10 +71,10 @@ FT_BEGIN_HEADER
/* Driver functions */
/* */
FT_LOCAL( FT_Error )
- cff_driver_init( FT_Module module ); /* CFF_Driver */
+ cff_driver_init( FT_Module module ); /* PS_Driver */
FT_LOCAL( void )
- cff_driver_done( FT_Module module ); /* CFF_Driver */
+ cff_driver_done( FT_Module module ); /* PS_Driver */
FT_END_HEADER
diff --git a/modules/freetype2/src/cff/cffparse.c b/modules/freetype2/src/cff/cffparse.c
index ee538c360..b9611cf54 100644
--- a/modules/freetype2/src/cff/cffparse.c
+++ b/modules/freetype2/src/cff/cffparse.c
@@ -4,7 +4,7 @@
/* */
/* CFF token stream parser (body) */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,10 +20,11 @@
#include "cffparse.h"
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_CALC_H
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
#include "cfferrs.h"
#include "cffpic.h"
-#include "cffgload.h"
#include "cffload.h"
@@ -156,6 +157,22 @@
1000000000L
};
+ /* maximum values allowed for multiplying */
+ /* with the corresponding `power_tens' element */
+ static const FT_Long power_ten_limits[] =
+ {
+ FT_LONG_MAX / 1L,
+ FT_LONG_MAX / 10L,
+ FT_LONG_MAX / 100L,
+ FT_LONG_MAX / 1000L,
+ FT_LONG_MAX / 10000L,
+ FT_LONG_MAX / 100000L,
+ FT_LONG_MAX / 1000000L,
+ FT_LONG_MAX / 10000000L,
+ FT_LONG_MAX / 100000000L,
+ FT_LONG_MAX / 1000000000L,
+ };
+
/* read a real */
static FT_Fixed
@@ -448,9 +465,21 @@
/* 16.16 fixed point is used internally for CFF2 blend results. */
/* Since these are trusted values, a limit check is not needed. */
- /* After the 255, 4 bytes are in host order. */
- /* Blend result is rounded to integer. */
- return (FT_Long)( *( (FT_UInt32 *) ( d[0] + 1 ) ) + 0x8000U ) >> 16;
+ /* After the 255, 4 bytes give the number. */
+ /* The blend value is converted to integer, with rounding; */
+ /* due to the right-shift we don't need the lowest byte. */
+#if 0
+ return (FT_Short)(
+ ( ( ( (FT_UInt32)*( d[0] + 1 ) << 24 ) |
+ ( (FT_UInt32)*( d[0] + 2 ) << 16 ) |
+ ( (FT_UInt32)*( d[0] + 3 ) << 8 ) |
+ (FT_UInt32)*( d[0] + 4 ) ) + 0x8000U ) >> 16 );
+#else
+ return (FT_Short)(
+ ( ( ( (FT_UInt32)*( d[0] + 1 ) << 16 ) |
+ ( (FT_UInt32)*( d[0] + 2 ) << 8 ) |
+ (FT_UInt32)*( d[0] + 3 ) ) + 0x80U ) >> 8 );
+#endif
}
else
@@ -472,7 +501,15 @@
if ( scaling )
+ {
+ if ( FT_ABS( val ) > power_ten_limits[scaling] )
+ {
+ val = val > 0 ? 0x7FFFFFFFL : -0x7FFFFFFFL;
+ goto Overflow;
+ }
+
val *= power_tens[scaling];
+ }
if ( val > 0x7FFF )
{
@@ -882,8 +919,6 @@
FT_Error error;
- error = FT_ERR( Stack_Underflow );
-
if ( !priv || !priv->subfont )
{
error = FT_THROW( Invalid_File_Format );
@@ -914,7 +949,9 @@
goto Exit;
}
- FT_TRACE4(( " %d values blended\n", numBlends ));
+ FT_TRACE4(( " %d value%s blended\n",
+ numBlends,
+ numBlends == 1 ? "" : "s" ));
error = cff_blend_doBlend( subFont, parser, numBlends );
@@ -1113,6 +1150,8 @@
#define CFF_FIELD_DELTA( code, name, max, id ) i++;
#undef CFF_FIELD_CALLBACK
#define CFF_FIELD_CALLBACK( code, name, id ) i++;
+#undef CFF_FIELD_BLEND
+#define CFF_FIELD_BLEND( code, id ) i++;
#include "cfftoken.h"
@@ -1160,6 +1199,17 @@
clazz[i].count_offset = FT_FIELD_OFFSET( num_ ## name_ ); \
i++;
+#undef CFF_FIELD_BLEND
+#define CFF_FIELD_BLEND( code_, id_ ) \
+ clazz[i].kind = cff_kind_blend; \
+ clazz[i].code = code_ | CFFCODE; \
+ clazz[i].offset = 0; \
+ clazz[i].size = 0; \
+ clazz[i].reader = cff_parse_blend; \
+ clazz[i].array_max = 0; \
+ clazz[i].count_offset = 0; \
+ i++;
+
#include "cfftoken.h"
clazz[i].kind = 0;
@@ -1210,6 +1260,18 @@
clazz[i].id = id_; \
i++;
+#undef CFF_FIELD_BLEND
+#define CFF_FIELD_BLEND( code_, id_ ) \
+ clazz[i].kind = cff_kind_blend; \
+ clazz[i].code = code_ | CFFCODE; \
+ clazz[i].offset = 0; \
+ clazz[i].size = 0; \
+ clazz[i].reader = cff_parse_blend; \
+ clazz[i].array_max = 0; \
+ clazz[i].count_offset = 0; \
+ clazz[i].id = id_; \
+ i++;
+
#include "cfftoken.h"
clazz[i].kind = 0;
@@ -1239,9 +1301,14 @@
FT_Byte* start,
FT_Byte* limit )
{
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ PSAux_Service psaux;
+#endif
+
FT_Byte* p = start;
FT_Error error = FT_Err_Ok;
FT_Library library = parser->library;
+
FT_UNUSED( library );
@@ -1328,10 +1395,16 @@
cff_rec.top_font.font_dict.num_axes = parser->num_axes;
decoder.cff = &cff_rec;
- error = cff_decoder_parse_charstrings( &decoder,
- charstring_base,
- charstring_len,
- 1 );
+ psaux = (PSAux_Service)FT_Get_Module_Interface( library, "psaux" );
+ if ( !psaux )
+ {
+ FT_ERROR(( "cff_parser_run: cannot access `psaux' module\n" ));
+ error = FT_THROW( Missing_Module );
+ goto Exit;
+ }
+
+ error = psaux->cff_decoder_funcs->parse_charstrings_old(
+ &decoder, charstring_base, charstring_len, 1 );
/* Now copy the stack data in the temporary decoder object, */
/* converting it back to charstring number representations */
@@ -1550,7 +1623,7 @@
val = 0;
while ( num_args > 0 )
{
- val += cff_parse_num( parser, data++ );
+ val = ADD_LONG( val, cff_parse_num( parser, data++ ) );
switch ( field->size )
{
case (8 / FT_CHAR_BIT):
diff --git a/modules/freetype2/src/cff/cffparse.h b/modules/freetype2/src/cff/cffparse.h
index 6088fec21..8a8caeca4 100644
--- a/modules/freetype2/src/cff/cffparse.h
+++ b/modules/freetype2/src/cff/cffparse.h
@@ -4,7 +4,7 @@
/* */
/* CFF token stream parser (specification) */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,7 +21,7 @@
#include <ft2build.h>
-#include "cfftypes.h"
+#include FT_INTERNAL_CFF_TYPES_H
#include FT_INTERNAL_OBJECTS_H
@@ -31,8 +31,16 @@ FT_BEGIN_HEADER
/* CFF uses constant parser stack size; */
/* CFF2 can increase from default 193 */
#define CFF_MAX_STACK_DEPTH 96
+
+ /*
+ * There are plans to remove the `maxstack' operator in a forthcoming
+ * revision of the CFF2 specification, increasing the (then static) stack
+ * size to 513. By making the default stack size equal to the maximum
+ * stack size, the operator is essentially disabled, which has the
+ * desired effect in FreeType.
+ */
#define CFF2_MAX_STACK 513
-#define CFF2_DEFAULT_STACK 193
+#define CFF2_DEFAULT_STACK 513
#define CFF_CODE_TOPDICT 0x1000
#define CFF_CODE_PRIVATE 0x2000
diff --git a/modules/freetype2/src/cff/cffpic.c b/modules/freetype2/src/cff/cffpic.c
index a0bc34fd5..08b74c7cf 100644
--- a/modules/freetype2/src/cff/cffpic.c
+++ b/modules/freetype2/src/cff/cffpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for cff module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cff/cffpic.h b/modules/freetype2/src/cff/cffpic.h
index 4737b9e38..8ba4203a8 100644
--- a/modules/freetype2/src/cff/cffpic.h
+++ b/modules/freetype2/src/cff/cffpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for cff module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,7 +22,6 @@
#include FT_INTERNAL_PIC_H
-
#ifndef FT_CONFIG_OPTION_PIC
#define CFF_SERVICE_PS_INFO_GET cff_service_ps_info
@@ -33,6 +32,8 @@
#define CFF_SERVICE_PROPERTIES_GET cff_service_properties
#define CFF_SERVICES_GET cff_services
#define CFF_SERVICE_MULTI_MASTERS_GET cff_service_multi_masters
+#define CFF_SERVICE_METRICS_VAR_GET cff_service_metrics_variations
+#define CFF_SERVICE_CFF_LOAD_GET cff_service_cff_load
#define CFF_CMAP_ENCODING_CLASS_REC_GET cff_cmap_encoding_class_rec
#define CFF_CMAP_UNICODE_CLASS_REC_GET cff_cmap_unicode_class_rec
#define CFF_FIELD_HANDLERS_GET cff_field_handlers
@@ -46,22 +47,27 @@
#include FT_SERVICE_TT_CMAP_H
#include FT_SERVICE_CID_H
#include FT_SERVICE_PROPERTIES_H
+#include FT_SERVICE_MULTIPLE_MASTERS_H
+#include FT_SERVICE_METRICS_VARIATIONS_H
FT_BEGIN_HEADER
typedef struct CffModulePIC_
{
- FT_ServiceDescRec* cff_services;
- CFF_Field_Handler* cff_field_handlers;
- FT_Service_PsInfoRec cff_service_ps_info;
- FT_Service_GlyphDictRec cff_service_glyph_dict;
- FT_Service_PsFontNameRec cff_service_ps_name;
- FT_Service_TTCMapsRec cff_service_get_cmap_info;
- FT_Service_CIDRec cff_service_cid_info;
- FT_Service_PropertiesRec cff_service_properties;
- FT_CMap_ClassRec cff_cmap_encoding_class_rec;
- FT_CMap_ClassRec cff_cmap_unicode_class_rec;
+ FT_ServiceDescRec* cff_services;
+ CFF_Field_Handler* cff_field_handlers;
+ FT_Service_PsInfoRec cff_service_ps_info;
+ FT_Service_GlyphDictRec cff_service_glyph_dict;
+ FT_Service_PsFontNameRec cff_service_ps_name;
+ FT_Service_TTCMapsRec cff_service_get_cmap_info;
+ FT_Service_CIDRec cff_service_cid_info;
+ FT_Service_PropertiesRec cff_service_properties;
+ FT_Service_MultiMastersRec cff_service_multi_masters;
+ FT_Service_MetricsVariationsRec cff_service_metrics_variations;
+ FT_Service_CFFLoadRec cff_service_cff_load;
+ FT_CMap_ClassRec cff_cmap_encoding_class_rec;
+ FT_CMap_ClassRec cff_cmap_unicode_class_rec;
} CffModulePIC;
@@ -83,6 +89,12 @@ FT_BEGIN_HEADER
( GET_PIC( library )->cff_service_properties )
#define CFF_SERVICES_GET \
( GET_PIC( library )->cff_services )
+#define CFF_SERVICE_MULTI_MASTERS_GET \
+ ( GET_PIC( library )->cff_service_multi_masters )
+#define CFF_SERVICE_METRICS_VAR_GET \
+ ( GET_PIC( library )->cff_service_metrics_variations )
+#define CFF_SERVICE_CFF_LOAD_GET \
+ ( GET_PIC( library )->cff_service_cff_load )
#define CFF_CMAP_ENCODING_CLASS_REC_GET \
( GET_PIC( library )->cff_cmap_encoding_class_rec )
#define CFF_CMAP_UNICODE_CLASS_REC_GET \
diff --git a/modules/freetype2/src/cff/cfftoken.h b/modules/freetype2/src/cff/cfftoken.h
index fd41c6c71..fec1ca20b 100644
--- a/modules/freetype2/src/cff/cfftoken.h
+++ b/modules/freetype2/src/cff/cfftoken.h
@@ -4,7 +4,7 @@
/* */
/* CFF token definitions (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cff/module.mk b/modules/freetype2/src/cff/module.mk
index 1b4781afe..8013d5dca 100644
--- a/modules/freetype2/src/cff/module.mk
+++ b/modules/freetype2/src/cff/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/cff/rules.mk b/modules/freetype2/src/cff/rules.mk
index 92f68b1ed..bce672927 100644
--- a/modules/freetype2/src/cff/rules.mk
+++ b/modules/freetype2/src/cff/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -32,27 +32,14 @@ CFF_DRV_SRC := $(CFF_DIR)/cffcmap.c \
$(CFF_DIR)/cffload.c \
$(CFF_DIR)/cffobjs.c \
$(CFF_DIR)/cffparse.c \
- $(CFF_DIR)/cffpic.c \
- $(CFF_DIR)/cf2arrst.c \
- $(CFF_DIR)/cf2blues.c \
- $(CFF_DIR)/cf2error.c \
- $(CFF_DIR)/cf2font.c \
- $(CFF_DIR)/cf2ft.c \
- $(CFF_DIR)/cf2hints.c \
- $(CFF_DIR)/cf2intrp.c \
- $(CFF_DIR)/cf2read.c \
- $(CFF_DIR)/cf2stack.c
+ $(CFF_DIR)/cffpic.c
# CFF driver headers
#
CFF_DRV_H := $(CFF_DRV_SRC:%.c=%.h) \
$(CFF_DIR)/cfferrs.h \
- $(CFF_DIR)/cfftoken.h \
- $(CFF_DIR)/cfftypes.h \
- $(CFF_DIR)/cf2fixed.h \
- $(CFF_DIR)/cf2glue.h \
- $(CFF_DIR)/cf2types.h
+ $(CFF_DIR)/cfftoken.h
# CFF driver object(s)
diff --git a/modules/freetype2/src/cid/Jamfile b/modules/freetype2/src/cid/Jamfile
index 4b4eea17d..1c232fda3 100644
--- a/modules/freetype2/src/cid/Jamfile
+++ b/modules/freetype2/src/cid/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/cid Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/cid/ciderrs.h b/modules/freetype2/src/cid/ciderrs.h
index 1dc98c7cd..a5a86e3fc 100644
--- a/modules/freetype2/src/cid/ciderrs.h
+++ b/modules/freetype2/src/cid/ciderrs.h
@@ -4,7 +4,7 @@
/* */
/* CID error codes (specification only). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cid/cidgload.c b/modules/freetype2/src/cid/cidgload.c
index c7b95593e..d14f9a2cc 100644
--- a/modules/freetype2/src/cid/cidgload.c
+++ b/modules/freetype2/src/cid/cidgload.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 Glyph Loader (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,6 +24,10 @@
#include FT_OUTLINE_H
#include FT_INTERNAL_CALC_H
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include FT_INTERNAL_CFF_TYPES_H
+#include FT_DRIVER_H
+
#include "ciderrs.h"
@@ -52,9 +56,11 @@
FT_ULong glyph_length = 0;
PSAux_Service psaux = (PSAux_Service)face->psaux;
+ FT_Bool force_scaling = FALSE;
+
#ifdef FT_CONFIG_OPTION_INCREMENTAL
- FT_Incremental_InterfaceRec *inc =
- face->root.internal->incremental_interface;
+ FT_Incremental_InterfaceRec *inc =
+ face->root.internal->incremental_interface;
#endif
@@ -169,9 +175,57 @@
if ( decoder->lenIV >= 0 )
psaux->t1_decrypt( charstring, glyph_length, 4330 );
- error = decoder->funcs.parse_charstrings(
- decoder, charstring + cs_offset,
- glyph_length - cs_offset );
+ /* choose which renderer to use */
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+ if ( ( (PS_Driver)FT_FACE_DRIVER( face ) )->hinting_engine ==
+ FT_HINTING_FREETYPE ||
+ decoder->builder.metrics_only )
+ error = psaux->t1_decoder_funcs->parse_charstrings_old(
+ decoder,
+ charstring + cs_offset,
+ glyph_length - cs_offset );
+#else
+ if ( decoder->builder.metrics_only )
+ error = psaux->t1_decoder_funcs->parse_metrics(
+ decoder,
+ charstring + cs_offset,
+ glyph_length - cs_offset );
+#endif
+ else
+ {
+ PS_Decoder psdecoder;
+ CFF_SubFontRec subfont;
+
+
+ psaux->ps_decoder_init( &psdecoder, decoder, TRUE );
+
+ psaux->t1_make_subfont( FT_FACE( face ),
+ &dict->private_dict,
+ &subfont );
+ psdecoder.current_subfont = &subfont;
+
+ error = psaux->t1_decoder_funcs->parse_charstrings(
+ &psdecoder,
+ charstring + cs_offset,
+ glyph_length - cs_offset );
+
+ /* Adobe's engine uses 16.16 numbers everywhere; */
+ /* as a consequence, glyphs larger than 2000ppem get rejected */
+ if ( FT_ERR_EQ( error, Glyph_Too_Big ) )
+ {
+ /* this time, we retry unhinted and scale up the glyph later on */
+ /* (the engine uses and sets the hardcoded value 0x10000 / 64 = */
+ /* 0x400 for both `x_scale' and `y_scale' in this case) */
+ ((CID_GlyphSlot)decoder->builder.glyph)->hint = FALSE;
+
+ force_scaling = TRUE;
+
+ error = psaux->t1_decoder_funcs->parse_charstrings(
+ &psdecoder,
+ charstring + cs_offset,
+ glyph_length - cs_offset );
+ }
+ }
}
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -200,6 +254,8 @@
Exit:
FT_FREE( charstring );
+ ((CID_GlyphSlot)decoder->builder.glyph)->scaled = force_scaling;
+
return error;
}
@@ -288,10 +344,12 @@
T1_DecoderRec decoder;
CID_Face face = (CID_Face)cidglyph->face;
FT_Bool hinting;
+ FT_Bool scaled;
PSAux_Service psaux = (PSAux_Service)face->psaux;
FT_Matrix font_matrix;
FT_Vector font_offset;
+ FT_Bool must_finish_decoder = FALSE;
if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
@@ -311,7 +369,10 @@
hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
( load_flags & FT_LOAD_NO_HINTING ) == 0 );
+ scaled = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 );
+ glyph->hint = hinting;
+ glyph->scaled = scaled;
cidglyph->format = FT_GLYPH_FORMAT_OUTLINE;
error = psaux->t1_decoder_funcs->init( &decoder,
@@ -329,6 +390,8 @@
/* TODO: initialize decoder.len_buildchar and decoder.buildchar */
/* if we ever support CID-keyed multiple master fonts */
+ must_finish_decoder = TRUE;
+
/* set up the decoder */
decoder.builder.no_recurse = FT_BOOL(
( ( load_flags & FT_LOAD_NO_RECURSE ) != 0 ) );
@@ -337,12 +400,18 @@
if ( error )
goto Exit;
+ /* copy flags back for forced scaling */
+ hinting = glyph->hint;
+ scaled = glyph->scaled;
+
font_matrix = decoder.font_matrix;
font_offset = decoder.font_offset;
/* save new glyph tables */
psaux->t1_decoder_funcs->done( &decoder );
+ must_finish_decoder = FALSE;
+
/* now set the metrics -- this is rather simple, as */
/* the left side bearing is the xMin, and the top side */
/* bearing the yMax */
@@ -410,7 +479,7 @@
metrics->vertAdvance += font_offset.y;
}
- if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )
+ if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 || scaled )
{
/* scale the outline and the metrics */
FT_Int n;
@@ -451,6 +520,10 @@
}
Exit:
+
+ if ( must_finish_decoder )
+ psaux->t1_decoder_funcs->done( &decoder );
+
return error;
}
diff --git a/modules/freetype2/src/cid/cidgload.h b/modules/freetype2/src/cid/cidgload.h
index 62d664b3a..4811852ae 100644
--- a/modules/freetype2/src/cid/cidgload.h
+++ b/modules/freetype2/src/cid/cidgload.h
@@ -4,7 +4,7 @@
/* */
/* OpenType Glyph Loader (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cid/cidload.c b/modules/freetype2/src/cid/cidload.c
index fc2a3cfe7..27cd09b3c 100644
--- a/modules/freetype2/src/cid/cidload.c
+++ b/modules/freetype2/src/cid/cidload.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 font loader (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -461,6 +461,9 @@
FT_Byte* p;
+ if ( !num_subrs )
+ continue;
+
/* reallocate offsets array if needed */
if ( num_subrs + 1 > max_offsets )
{
diff --git a/modules/freetype2/src/cid/cidload.h b/modules/freetype2/src/cid/cidload.h
index 680f0d8fc..3f8bd0862 100644
--- a/modules/freetype2/src/cid/cidload.h
+++ b/modules/freetype2/src/cid/cidload.h
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 font loader (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cid/cidobjs.c b/modules/freetype2/src/cid/cidobjs.c
index 2d2600fd4..77afe1c87 100644
--- a/modules/freetype2/src/cid/cidobjs.c
+++ b/modules/freetype2/src/cid/cidobjs.c
@@ -4,7 +4,7 @@
/* */
/* CID objects manager (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -26,6 +26,7 @@
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+#include FT_DRIVER_H
#include "ciderrs.h"
@@ -113,16 +114,16 @@
CID_Size size = (CID_Size)cidsize;
- if ( cidsize->internal )
+ if ( cidsize->internal->module_data )
{
PSH_Globals_Funcs funcs;
funcs = cid_size_get_globals_funcs( size );
if ( funcs )
- funcs->destroy( (PSH_Globals)cidsize->internal );
+ funcs->destroy( (PSH_Globals)cidsize->internal->module_data );
- cidsize->internal = NULL;
+ cidsize->internal->module_data = NULL;
}
}
@@ -145,7 +146,7 @@
error = funcs->create( cidsize->face->memory, priv, &globals );
if ( !error )
- cidsize->internal = (FT_Size_Internal)(void*)globals;
+ cidsize->internal->module_data = globals;
}
return error;
@@ -164,7 +165,7 @@
funcs = cid_size_get_globals_funcs( (CID_Size)size );
if ( funcs )
- funcs->set_scale( (PSH_Globals)size->internal,
+ funcs->set_scale( (PSH_Globals)size->internal->module_data,
size->metrics.x_scale,
size->metrics.y_scale,
0, 0 );
@@ -463,9 +464,42 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- cid_driver_init( FT_Module driver )
+ cid_driver_init( FT_Module module )
{
- FT_UNUSED( driver );
+ PS_Driver driver = (PS_Driver)module;
+
+ FT_UInt32 seed;
+
+
+ /* set default property values, cf. `ftt1drv.h' */
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+ driver->hinting_engine = FT_HINTING_FREETYPE;
+#else
+ driver->hinting_engine = FT_HINTING_ADOBE;
+#endif
+
+ driver->no_stem_darkening = TRUE;
+
+ driver->darken_params[0] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1;
+ driver->darken_params[1] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1;
+ driver->darken_params[2] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2;
+ driver->darken_params[3] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2;
+ driver->darken_params[4] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3;
+ driver->darken_params[5] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3;
+ driver->darken_params[6] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4;
+ driver->darken_params[7] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4;
+
+ /* compute random seed from some memory addresses */
+ seed = (FT_UInt32)( (FT_Offset)(char*)&seed ^
+ (FT_Offset)(char*)&module ^
+ (FT_Offset)(char*)module->memory );
+ seed = seed ^ ( seed >> 10 ) ^ ( seed >> 20 );
+
+ driver->random_seed = (FT_Int32)seed;
+ if ( driver->random_seed < 0 )
+ driver->random_seed = -driver->random_seed;
+ else if ( driver->random_seed == 0 )
+ driver->random_seed = 123456789;
return FT_Err_Ok;
}
diff --git a/modules/freetype2/src/cid/cidobjs.h b/modules/freetype2/src/cid/cidobjs.h
index 5dd377a9f..0221f017d 100644
--- a/modules/freetype2/src/cid/cidobjs.h
+++ b/modules/freetype2/src/cid/cidobjs.h
@@ -4,7 +4,7 @@
/* */
/* CID objects manager (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cid/cidparse.c b/modules/freetype2/src/cid/cidparse.c
index 1b27b2e95..b1c7f3cb2 100644
--- a/modules/freetype2/src/cid/cidparse.c
+++ b/modules/freetype2/src/cid/cidparse.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 parser (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cid/cidparse.h b/modules/freetype2/src/cid/cidparse.h
index 7268dc6ae..61602f767 100644
--- a/modules/freetype2/src/cid/cidparse.h
+++ b/modules/freetype2/src/cid/cidparse.h
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 parser (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cid/cidriver.c b/modules/freetype2/src/cid/cidriver.c
index 257365681..d9faf353e 100644
--- a/modules/freetype2/src/cid/cidriver.c
+++ b/modules/freetype2/src/cid/cidriver.c
@@ -4,7 +4,7 @@
/* */
/* CID driver interface (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,6 +20,7 @@
#include "cidriver.h"
#include "cidgload.h"
#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_POSTSCRIPT_PROPS_H
#include "ciderrs.h"
@@ -27,6 +28,10 @@
#include FT_SERVICE_FONT_FORMAT_H
#include FT_SERVICE_POSTSCRIPT_INFO_H
#include FT_SERVICE_CID_H
+#include FT_SERVICE_PROPERTIES_H
+#include FT_DRIVER_H
+
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
/*************************************************************************/
@@ -168,6 +173,18 @@
/*
+ * PROPERTY SERVICE
+ *
+ */
+
+ FT_DEFINE_SERVICE_PROPERTIESREC(
+ cid_service_properties,
+
+ (FT_Properties_SetFunc)ps_property_set, /* set_property */
+ (FT_Properties_GetFunc)ps_property_get ) /* get_property */
+
+
+ /*
* SERVICE LIST
*
*/
@@ -178,6 +195,7 @@
{ FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &cid_service_ps_name },
{ FT_SERVICE_ID_POSTSCRIPT_INFO, &cid_service_ps_info },
{ FT_SERVICE_ID_CID, &cid_service_cid_info },
+ { FT_SERVICE_ID_PROPERTIES, &cid_service_properties },
{ NULL, NULL }
};
@@ -200,7 +218,7 @@
FT_MODULE_FONT_DRIVER |
FT_MODULE_DRIVER_SCALABLE |
FT_MODULE_DRIVER_HAS_HINTER,
- sizeof ( FT_DriverRec ),
+ sizeof ( PS_DriverRec ),
"t1cid", /* module name */
0x10000L, /* version 1.0 of driver */
diff --git a/modules/freetype2/src/cid/cidriver.h b/modules/freetype2/src/cid/cidriver.h
index a359a7890..59d9ded90 100644
--- a/modules/freetype2/src/cid/cidriver.h
+++ b/modules/freetype2/src/cid/cidriver.h
@@ -4,7 +4,7 @@
/* */
/* High-level CID driver interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cid/cidtoken.h b/modules/freetype2/src/cid/cidtoken.h
index 9c773fd09..b0e2dac6a 100644
--- a/modules/freetype2/src/cid/cidtoken.h
+++ b/modules/freetype2/src/cid/cidtoken.h
@@ -4,7 +4,7 @@
/* */
/* CID token definitions (specification only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cid/module.mk b/modules/freetype2/src/cid/module.mk
index d9585d781..9010e339a 100644
--- a/modules/freetype2/src/cid/module.mk
+++ b/modules/freetype2/src/cid/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/cid/rules.mk b/modules/freetype2/src/cid/rules.mk
index f33aab00d..94333bda0 100644
--- a/modules/freetype2/src/cid/rules.mk
+++ b/modules/freetype2/src/cid/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/cid/type1cid.c b/modules/freetype2/src/cid/type1cid.c
index de3bdf770..61770e3f1 100644
--- a/modules/freetype2/src/cid/type1cid.c
+++ b/modules/freetype2/src/cid/type1cid.c
@@ -4,7 +4,7 @@
/* */
/* FreeType OpenType driver component (body only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,13 +17,13 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "cidparse.c"
+
+#include "cidgload.c"
#include "cidload.c"
#include "cidobjs.c"
+#include "cidparse.c"
#include "cidriver.c"
-#include "cidgload.c"
/* END */
diff --git a/modules/freetype2/src/gxvalid/Jamfile b/modules/freetype2/src/gxvalid/Jamfile
index 9738677e0..74f3c51ff 100644
--- a/modules/freetype2/src/gxvalid/Jamfile
+++ b/modules/freetype2/src/gxvalid/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/gxvalid Jamfile
#
-# Copyright 2005-2016 by
+# Copyright 2005-2018 by
# suzuki toshiya, Masatake YAMATO and Red Hat K.K.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/gxvalid/README b/modules/freetype2/src/gxvalid/README
index d3ac49c3e..af8128e0e 100644
--- a/modules/freetype2/src/gxvalid/README
+++ b/modules/freetype2/src/gxvalid/README
@@ -9,7 +9,7 @@ gxvalid: TrueType GX validator
additional tables in TrueType font which are used by `QuickDraw GX
Text', Apple Advanced Typography (AAT). In addition, gxvalid can
validates `kern' tables which have been extended for AAT. Like the
- otvalid module, gxvalid uses Freetype 2's validator framework
+ otvalid module, gxvalid uses FreeType 2's validator framework
(ftvalid).
You can link gxvalid with your program; before running your own layout
@@ -287,11 +287,11 @@ gxvalid: TrueType GX validator
4-5. invalid feature number (117/183)
-------------------------------------
- The GX/AAT extension can include 255 different layout features, but
- popular layout features are predefined (see
- http://developer.apple.com/fonts/Registry/index.html). Some fonts
- include feature numbers which are incompatible with the predefined
- feature registry.
+ The GX/AAT extension can include 255 different layout features,
+ but popular layout features are predefined (see
+ https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html).
+ Some fonts include feature numbers which are incompatible with the
+ predefined feature registry.
In our survey, there are 140 fonts including `feat' table.
@@ -413,7 +413,7 @@ gxvalid: TrueType GX validator
format assured for Windows and OS/2 support is only subtable
format 0. The Microsoft TrueType specification also describes
subtable format 2, but does not mention which platforms support
- it. Aubtable formats 1, 3, and higher are documented as reserved
+ it. Subtable formats 1, 3, and higher are documented as reserved
for future use. Therefore, the classic version can store subtable
formats 0 and 2, at least. `ttfdump.exe', a font tool provided by
Microsoft, ignores the subtable format written in the subtable
@@ -518,7 +518,7 @@ gxvalid: TrueType GX validator
------------------------------------------------------------------------
-Copyright 2004-2016 by
+Copyright 2004-2018 by
suzuki toshiya, Masatake YAMATO, Red hat K.K.,
David Turner, Robert Wilhelm, and Werner Lemberg.
diff --git a/modules/freetype2/src/gxvalid/gxvalid.c b/modules/freetype2/src/gxvalid/gxvalid.c
index 7fb868cad..d0577a247 100644
--- a/modules/freetype2/src/gxvalid/gxvalid.c
+++ b/modules/freetype2/src/gxvalid/gxvalid.c
@@ -4,7 +4,7 @@
/* */
/* FreeType validator for TrueTypeGX/AAT tables (body only). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -16,15 +16,17 @@
/* */
/***************************************************************************/
-#define FT_MAKE_OPTION_SINGLE_OBJECT
+#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
-#include "gxvfeat.c"
-#include "gxvcommn.c"
#include "gxvbsln.c"
-#include "gxvtrak.c"
+#include "gxvcommn.c"
+#include "gxvfeat.c"
#include "gxvjust.c"
+#include "gxvkern.c"
+#include "gxvlcar.c"
+#include "gxvmod.c"
#include "gxvmort.c"
#include "gxvmort0.c"
#include "gxvmort1.c"
@@ -37,11 +39,9 @@
#include "gxvmorx2.c"
#include "gxvmorx4.c"
#include "gxvmorx5.c"
-#include "gxvkern.c"
#include "gxvopbd.c"
#include "gxvprop.c"
-#include "gxvlcar.c"
-#include "gxvmod.c"
+#include "gxvtrak.c"
/* END */
diff --git a/modules/freetype2/src/gxvalid/gxvalid.h b/modules/freetype2/src/gxvalid/gxvalid.h
index 7a3ab795e..19f037998 100644
--- a/modules/freetype2/src/gxvalid/gxvalid.h
+++ b/modules/freetype2/src/gxvalid/gxvalid.h
@@ -2,9 +2,9 @@
/* */
/* gxvalid.h */
/* */
-/* TrueTyeeGX/AAT table validation (specification only). */
+/* TrueTypeGX/AAT table validation (specification only). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvbsln.c b/modules/freetype2/src/gxvalid/gxvbsln.c
index 493b20c31..c367d3848 100644
--- a/modules/freetype2/src/gxvalid/gxvbsln.c
+++ b/modules/freetype2/src/gxvalid/gxvbsln.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT bsln table validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvcommn.c b/modules/freetype2/src/gxvalid/gxvcommn.c
index b324bc602..b96601108 100644
--- a/modules/freetype2/src/gxvalid/gxvcommn.c
+++ b/modules/freetype2/src/gxvalid/gxvcommn.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT common tables validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -454,7 +454,7 @@
}
- /* ================= Segment Single Format 2 Loolup Table ============== */
+ /* ================= Segment Single Format 2 Lookup Table ============== */
/*
* Apple spec says:
*
diff --git a/modules/freetype2/src/gxvalid/gxvcommn.h b/modules/freetype2/src/gxvalid/gxvcommn.h
index 9470c8412..8e4ff9caf 100644
--- a/modules/freetype2/src/gxvalid/gxvcommn.h
+++ b/modules/freetype2/src/gxvalid/gxvcommn.h
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT common tables validation (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxverror.h b/modules/freetype2/src/gxvalid/gxverror.h
index 2e53355ce..d1151258a 100644
--- a/modules/freetype2/src/gxvalid/gxverror.h
+++ b/modules/freetype2/src/gxvalid/gxverror.h
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT validation module error codes (specification only). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvfeat.c b/modules/freetype2/src/gxvalid/gxvfeat.c
index 5bff7c261..2c805d1d1 100644
--- a/modules/freetype2/src/gxvalid/gxvfeat.c
+++ b/modules/freetype2/src/gxvalid/gxvfeat.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT feat table validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvfeat.h b/modules/freetype2/src/gxvalid/gxvfeat.h
index 284bada89..2d943806c 100644
--- a/modules/freetype2/src/gxvalid/gxvfeat.h
+++ b/modules/freetype2/src/gxvalid/gxvfeat.h
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT feat table validation (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvfgen.c b/modules/freetype2/src/gxvalid/gxvfgen.c
index 667dac3cd..840c0f352 100644
--- a/modules/freetype2/src/gxvalid/gxvfgen.c
+++ b/modules/freetype2/src/gxvalid/gxvfgen.c
@@ -5,7 +5,7 @@
/* Generate feature registry data for gxv `feat' validator. */
/* This program is derived from gxfeatreg.c in gxlayout. */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* This file may only be used, */
@@ -21,7 +21,7 @@
/* gxfeatreg.c */
/* */
/* Database of font features pre-defined by Apple Computer, Inc. */
-/* http://developer.apple.com/fonts/Registry/ */
+/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html */
/* (body). */
/* */
/* Copyright 2003 by */
diff --git a/modules/freetype2/src/gxvalid/gxvjust.c b/modules/freetype2/src/gxvalid/gxvjust.c
index 20d29bfbc..00c429319 100644
--- a/modules/freetype2/src/gxvalid/gxvjust.c
+++ b/modules/freetype2/src/gxvalid/gxvjust.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT just table validation (body). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvkern.c b/modules/freetype2/src/gxvalid/gxvkern.c
index ee1ab36f7..9c0efd7a4 100644
--- a/modules/freetype2/src/gxvalid/gxvkern.c
+++ b/modules/freetype2/src/gxvalid/gxvkern.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT kern table validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvlcar.c b/modules/freetype2/src/gxvalid/gxvlcar.c
index d31b6410b..0f261a9ac 100644
--- a/modules/freetype2/src/gxvalid/gxvlcar.c
+++ b/modules/freetype2/src/gxvalid/gxvlcar.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT lcar table validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmod.c b/modules/freetype2/src/gxvalid/gxvmod.c
index 32fd84e14..1a3c86292 100644
--- a/modules/freetype2/src/gxvalid/gxvmod.c
+++ b/modules/freetype2/src/gxvalid/gxvmod.c
@@ -4,7 +4,7 @@
/* */
/* FreeType's TrueTypeGX/AAT validation module implementation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmod.h b/modules/freetype2/src/gxvalid/gxvmod.h
index 8b82e9107..745c62e10 100644
--- a/modules/freetype2/src/gxvalid/gxvmod.h
+++ b/modules/freetype2/src/gxvalid/gxvmod.h
@@ -5,7 +5,7 @@
/* FreeType's TrueTypeGX/AAT validation module implementation */
/* (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmort.c b/modules/freetype2/src/gxvalid/gxvmort.c
index 120939204..b361cb2b9 100644
--- a/modules/freetype2/src/gxvalid/gxvmort.c
+++ b/modules/freetype2/src/gxvalid/gxvmort.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT mort table validation (body). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmort.h b/modules/freetype2/src/gxvalid/gxvmort.h
index 5fd228212..d8030645e 100644
--- a/modules/freetype2/src/gxvalid/gxvmort.h
+++ b/modules/freetype2/src/gxvalid/gxvmort.h
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT common definition for mort table (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmort0.c b/modules/freetype2/src/gxvalid/gxvmort0.c
index e11f5ddc4..95cf53d5e 100644
--- a/modules/freetype2/src/gxvalid/gxvmort0.c
+++ b/modules/freetype2/src/gxvalid/gxvmort0.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT mort table validation */
/* body for type0 (Indic Script Rearrangement) subtable. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmort1.c b/modules/freetype2/src/gxvalid/gxvmort1.c
index fd761d069..a7683a17b 100644
--- a/modules/freetype2/src/gxvalid/gxvmort1.c
+++ b/modules/freetype2/src/gxvalid/gxvmort1.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT mort table validation */
/* body for type1 (Contextual Substitution) subtable. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmort2.c b/modules/freetype2/src/gxvalid/gxvmort2.c
index 08455dec6..c23c2775a 100644
--- a/modules/freetype2/src/gxvalid/gxvmort2.c
+++ b/modules/freetype2/src/gxvalid/gxvmort2.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT mort table validation */
/* body for type2 (Ligature Substitution) subtable. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmort4.c b/modules/freetype2/src/gxvalid/gxvmort4.c
index 6f7bbb871..9d21a5fc2 100644
--- a/modules/freetype2/src/gxvalid/gxvmort4.c
+++ b/modules/freetype2/src/gxvalid/gxvmort4.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT mort table validation */
/* body for type4 (Non-Contextual Glyph Substitution) subtable. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmort5.c b/modules/freetype2/src/gxvalid/gxvmort5.c
index 54ddbe2b1..42cb428aa 100644
--- a/modules/freetype2/src/gxvalid/gxvmort5.c
+++ b/modules/freetype2/src/gxvalid/gxvmort5.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT mort table validation */
/* body for type5 (Contextual Glyph Insertion) subtable. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmorx.c b/modules/freetype2/src/gxvalid/gxvmorx.c
index b626993f2..9fd6e6b97 100644
--- a/modules/freetype2/src/gxvalid/gxvmorx.c
+++ b/modules/freetype2/src/gxvalid/gxvmorx.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT morx table validation (body). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmorx.h b/modules/freetype2/src/gxvalid/gxvmorx.h
index 9ba25c14a..6d9925e92 100644
--- a/modules/freetype2/src/gxvalid/gxvmorx.h
+++ b/modules/freetype2/src/gxvalid/gxvmorx.h
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT common definition for morx table (specification). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmorx0.c b/modules/freetype2/src/gxvalid/gxvmorx0.c
index 4abb7368f..302261b7f 100644
--- a/modules/freetype2/src/gxvalid/gxvmorx0.c
+++ b/modules/freetype2/src/gxvalid/gxvmorx0.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT morx table validation */
/* body for type0 (Indic Script Rearrangement) subtable. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmorx1.c b/modules/freetype2/src/gxvalid/gxvmorx1.c
index e581848c2..890ca74b1 100644
--- a/modules/freetype2/src/gxvalid/gxvmorx1.c
+++ b/modules/freetype2/src/gxvalid/gxvmorx1.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT morx table validation */
/* body for type1 (Contextual Substitution) subtable. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmorx2.c b/modules/freetype2/src/gxvalid/gxvmorx2.c
index 9495cca48..3135031d4 100644
--- a/modules/freetype2/src/gxvalid/gxvmorx2.c
+++ b/modules/freetype2/src/gxvalid/gxvmorx2.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT morx table validation */
/* body for type2 (Ligature Substitution) subtable. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmorx4.c b/modules/freetype2/src/gxvalid/gxvmorx4.c
index 3b7731bbc..1e2397b0c 100644
--- a/modules/freetype2/src/gxvalid/gxvmorx4.c
+++ b/modules/freetype2/src/gxvalid/gxvmorx4.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT morx table validation */
/* body for "morx" type4 (Non-Contextual Glyph Substitution) subtable. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvmorx5.c b/modules/freetype2/src/gxvalid/gxvmorx5.c
index 0e96166c0..db4f9290c 100644
--- a/modules/freetype2/src/gxvalid/gxvmorx5.c
+++ b/modules/freetype2/src/gxvalid/gxvmorx5.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT morx table validation */
/* body for type5 (Contextual Glyph Insertion) subtable. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvopbd.c b/modules/freetype2/src/gxvalid/gxvopbd.c
index e3ba082e1..e2c167ea5 100644
--- a/modules/freetype2/src/gxvalid/gxvopbd.c
+++ b/modules/freetype2/src/gxvalid/gxvopbd.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT opbd table validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvprop.c b/modules/freetype2/src/gxvalid/gxvprop.c
index 61b3aeee3..a67b6bdd0 100644
--- a/modules/freetype2/src/gxvalid/gxvprop.c
+++ b/modules/freetype2/src/gxvalid/gxvprop.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT prop table validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/gxvtrak.c b/modules/freetype2/src/gxvalid/gxvtrak.c
index 0f07c04e2..d501b5014 100644
--- a/modules/freetype2/src/gxvalid/gxvtrak.c
+++ b/modules/freetype2/src/gxvalid/gxvtrak.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT trak table validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
diff --git a/modules/freetype2/src/gxvalid/module.mk b/modules/freetype2/src/gxvalid/module.mk
index b431384a5..b64879dce 100644
--- a/modules/freetype2/src/gxvalid/module.mk
+++ b/modules/freetype2/src/gxvalid/module.mk
@@ -2,7 +2,7 @@
# FreeType 2 gxvalid module definition
#
-# Copyright 2004-2016 by
+# Copyright 2004-2018 by
# suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
diff --git a/modules/freetype2/src/gxvalid/rules.mk b/modules/freetype2/src/gxvalid/rules.mk
index 424f2a637..3a17c030a 100644
--- a/modules/freetype2/src/gxvalid/rules.mk
+++ b/modules/freetype2/src/gxvalid/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2004-2016 by
+# Copyright 2004-2018 by
# suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
diff --git a/modules/freetype2/src/gzip/Jamfile b/modules/freetype2/src/gzip/Jamfile
index ca994c3e1..a7b4c8c95 100644
--- a/modules/freetype2/src/gzip/Jamfile
+++ b/modules/freetype2/src/gzip/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/gzip Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/gzip/ftgzip.c b/modules/freetype2/src/gzip/ftgzip.c
index 74b467faa..f8011c2dd 100644
--- a/modules/freetype2/src/gzip/ftgzip.c
+++ b/modules/freetype2/src/gzip/ftgzip.c
@@ -8,7 +8,7 @@
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/gzip/rules.mk b/modules/freetype2/src/gzip/rules.mk
index 16af8c02d..1a2e48beb 100644
--- a/modules/freetype2/src/gzip/rules.mk
+++ b/modules/freetype2/src/gzip/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -34,8 +34,8 @@ endif
# gzip support sources
#
-# All source and header files get loaded by `ftgzip.c' only if SYTEM_ZLIB is
-# not defined (regardless whether we have a `single' or a `multi' build).
+# All source and header files get loaded by `ftgzip.c' only if SYSTEM_ZLIB
+# is not defined (regardless whether we have a `single' or a `multi' build).
# However, it doesn't harm if we add everything as a dependency
# unconditionally.
#
diff --git a/modules/freetype2/src/lzw/Jamfile b/modules/freetype2/src/lzw/Jamfile
index b7ec3b17e..cb83aa4a5 100644
--- a/modules/freetype2/src/lzw/Jamfile
+++ b/modules/freetype2/src/lzw/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/lzw Jamfile
#
-# Copyright 2004-2016 by
+# Copyright 2004-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/lzw/ftlzw.c b/modules/freetype2/src/lzw/ftlzw.c
index 6f5f89708..cb46f93c6 100644
--- a/modules/freetype2/src/lzw/ftlzw.c
+++ b/modules/freetype2/src/lzw/ftlzw.c
@@ -8,7 +8,7 @@
/* be used to parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* Albert Chin-A-Young. */
/* */
/* based on code in `src/gzip/ftgzip.c' */
diff --git a/modules/freetype2/src/lzw/ftzopen.c b/modules/freetype2/src/lzw/ftzopen.c
index a2cc453d6..2b868ba9f 100644
--- a/modules/freetype2/src/lzw/ftzopen.c
+++ b/modules/freetype2/src/lzw/ftzopen.c
@@ -8,7 +8,7 @@
/* be used to parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* David Turner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/lzw/ftzopen.h b/modules/freetype2/src/lzw/ftzopen.h
index 1c38f1ab3..4fd267eb9 100644
--- a/modules/freetype2/src/lzw/ftzopen.h
+++ b/modules/freetype2/src/lzw/ftzopen.h
@@ -8,7 +8,7 @@
/* be used to parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* David Turner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/lzw/rules.mk b/modules/freetype2/src/lzw/rules.mk
index 13e41b976..18933c41c 100644
--- a/modules/freetype2/src/lzw/rules.mk
+++ b/modules/freetype2/src/lzw/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2004-2016 by
+# Copyright 2004-2018 by
# Albert Chin-A-Young.
#
# based on `src/lzw/rules.mk'
diff --git a/modules/freetype2/src/otvalid/Jamfile b/modules/freetype2/src/otvalid/Jamfile
index eded89ab9..21b8e0cb0 100644
--- a/modules/freetype2/src/otvalid/Jamfile
+++ b/modules/freetype2/src/otvalid/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/otvalid Jamfile
#
-# Copyright 2004-2016 by
+# Copyright 2004-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/otvalid/module.mk b/modules/freetype2/src/otvalid/module.mk
index b929cdbab..34f3dab32 100644
--- a/modules/freetype2/src/otvalid/module.mk
+++ b/modules/freetype2/src/otvalid/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2004-2016 by
+# Copyright 2004-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/otvalid/otvalid.c b/modules/freetype2/src/otvalid/otvalid.c
index 932a974a3..4423ca101 100644
--- a/modules/freetype2/src/otvalid/otvalid.c
+++ b/modules/freetype2/src/otvalid/otvalid.c
@@ -4,7 +4,7 @@
/* */
/* FreeType validator for OpenType tables (body only). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -15,8 +15,8 @@
/* */
/***************************************************************************/
-#define FT_MAKE_OPTION_SINGLE_OBJECT
+#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
#include "otvbase.c"
@@ -28,4 +28,5 @@
#include "otvmath.c"
#include "otvmod.c"
+
/* END */
diff --git a/modules/freetype2/src/otvalid/otvalid.h b/modules/freetype2/src/otvalid/otvalid.h
index 93438a063..d7801abae 100644
--- a/modules/freetype2/src/otvalid/otvalid.h
+++ b/modules/freetype2/src/otvalid/otvalid.h
@@ -4,7 +4,7 @@
/* */
/* OpenType table validation (specification only). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/otvalid/otvbase.c b/modules/freetype2/src/otvalid/otvbase.c
index e86e8bb2f..a01d45c70 100644
--- a/modules/freetype2/src/otvalid/otvbase.c
+++ b/modules/freetype2/src/otvalid/otvbase.c
@@ -4,7 +4,7 @@
/* */
/* OpenType BASE table validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -284,22 +284,41 @@
OTV_Validator otvalid = &otvalidrec;
FT_Bytes p = table;
FT_UInt table_size;
+ FT_UShort version;
OTV_OPTIONAL_TABLE( HorizAxis );
OTV_OPTIONAL_TABLE( VertAxis );
+ OTV_OPTIONAL_TABLE32( itemVarStore );
+
otvalid->root = ftvalid;
FT_TRACE3(( "validating BASE table\n" ));
OTV_INIT;
- OTV_LIMIT_CHECK( 6 );
+ OTV_LIMIT_CHECK( 4 );
- if ( FT_NEXT_ULONG( p ) != 0x10000UL ) /* Version */
+ if ( FT_NEXT_USHORT( p ) != 1 ) /* majorVersion */
FT_INVALID_FORMAT;
- table_size = 6;
+ version = FT_NEXT_USHORT( p ); /* minorVersion */
+
+ table_size = 8;
+ switch ( version )
+ {
+ case 0:
+ OTV_LIMIT_CHECK( 4 );
+ break;
+
+ case 1:
+ OTV_LIMIT_CHECK( 8 );
+ table_size += 4;
+ break;
+
+ default:
+ FT_INVALID_FORMAT;
+ }
OTV_OPTIONAL_OFFSET( HorizAxis );
OTV_SIZE_CHECK( HorizAxis );
@@ -311,6 +330,14 @@
if ( VertAxis )
otv_Axis_validate( table + VertAxis, otvalid );
+ if ( version > 0 )
+ {
+ OTV_OPTIONAL_OFFSET32( itemVarStore );
+ OTV_SIZE_CHECK32( itemVarStore );
+ if ( itemVarStore )
+ OTV_TRACE(( " [omitting itemVarStore validation]\n" )); /* XXX */
+ }
+
FT_TRACE4(( "\n" ));
}
diff --git a/modules/freetype2/src/otvalid/otvcommn.c b/modules/freetype2/src/otvalid/otvcommn.c
index 6a684441d..0ccfb03c0 100644
--- a/modules/freetype2/src/otvalid/otvcommn.c
+++ b/modules/freetype2/src/otvalid/otvcommn.c
@@ -4,7 +4,7 @@
/* */
/* OpenType common tables validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -313,19 +313,26 @@
OTV_NAME_ENTER( "Device" );
- OTV_LIMIT_CHECK( 8 );
+ OTV_LIMIT_CHECK( 6 );
StartSize = FT_NEXT_USHORT( p );
EndSize = FT_NEXT_USHORT( p );
DeltaFormat = FT_NEXT_USHORT( p );
- if ( DeltaFormat < 1 || DeltaFormat > 3 )
- FT_INVALID_FORMAT;
+ if ( DeltaFormat == 0x8000U )
+ {
+ /* VariationIndex, nothing to do */
+ }
+ else
+ {
+ if ( DeltaFormat < 1 || DeltaFormat > 3 )
+ FT_INVALID_FORMAT;
- if ( EndSize < StartSize )
- FT_INVALID_DATA;
+ if ( EndSize < StartSize )
+ FT_INVALID_DATA;
- count = EndSize - StartSize + 1;
- OTV_LIMIT_CHECK( ( 1 << DeltaFormat ) * count / 8 ); /* DeltaValue */
+ count = EndSize - StartSize + 1;
+ OTV_LIMIT_CHECK( ( 1 << DeltaFormat ) * count / 8 ); /* DeltaValue */
+ }
OTV_EXIT;
}
@@ -347,7 +354,7 @@
OTV_Validator otvalid )
{
FT_Bytes p = table;
- FT_UInt LookupType, SubTableCount;
+ FT_UInt LookupType, LookupFlag, SubTableCount;
OTV_Validate_Func validate;
@@ -355,7 +362,7 @@
OTV_LIMIT_CHECK( 6 );
LookupType = FT_NEXT_USHORT( p );
- p += 2; /* skip LookupFlag */
+ LookupFlag = FT_NEXT_USHORT( p );
SubTableCount = FT_NEXT_USHORT( p );
OTV_TRACE(( " (type %d)\n", LookupType ));
@@ -373,6 +380,9 @@
for ( ; SubTableCount > 0; SubTableCount-- )
validate( table + FT_NEXT_USHORT( p ), otvalid );
+ if ( LookupFlag & 0x10 )
+ OTV_LIMIT_CHECK( 2 ); /* MarkFilteringSet */
+
OTV_EXIT;
}
diff --git a/modules/freetype2/src/otvalid/otvcommn.h b/modules/freetype2/src/otvalid/otvcommn.h
index 44e0c6379..a392784cf 100644
--- a/modules/freetype2/src/otvalid/otvcommn.h
+++ b/modules/freetype2/src/otvalid/otvcommn.h
@@ -4,7 +4,7 @@
/* */
/* OpenType common tables validation (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -67,29 +67,38 @@ FT_BEGIN_HEADER
#undef FT_INVALID_
-#define FT_INVALID_( _error ) \
+#define FT_INVALID_( _error ) \
ft_validator_error( otvalid->root, FT_THROW( _error ) )
#define OTV_OPTIONAL_TABLE( _table ) FT_UShort _table; \
FT_Bytes _table ## _p
+#define OTV_OPTIONAL_TABLE32( _table ) FT_ULong _table; \
+ FT_Bytes _table ## _p
+
#define OTV_OPTIONAL_OFFSET( _offset ) \
FT_BEGIN_STMNT \
_offset ## _p = p; \
_offset = FT_NEXT_USHORT( p ); \
FT_END_STMNT
-#define OTV_LIMIT_CHECK( _count ) \
- FT_BEGIN_STMNT \
+#define OTV_OPTIONAL_OFFSET32( _offset ) \
+ FT_BEGIN_STMNT \
+ _offset ## _p = p; \
+ _offset = FT_NEXT_ULONG( p ); \
+ FT_END_STMNT
+
+#define OTV_LIMIT_CHECK( _count ) \
+ FT_BEGIN_STMNT \
if ( p + (_count) > otvalid->root->limit ) \
- FT_INVALID_TOO_SHORT; \
+ FT_INVALID_TOO_SHORT; \
FT_END_STMNT
#define OTV_SIZE_CHECK( _size ) \
FT_BEGIN_STMNT \
if ( _size > 0 && _size < table_size ) \
{ \
- if ( otvalid->root->level == FT_VALIDATE_PARANOID ) \
+ if ( otvalid->root->level == FT_VALIDATE_PARANOID ) \
FT_INVALID_OFFSET; \
else \
{ \
@@ -102,12 +111,33 @@ FT_BEGIN_HEADER
" set to zero.\n" \
"\n", #_size )); \
\
- /* always assume 16bit entities */ \
_size = pp[0] = pp[1] = 0; \
} \
} \
FT_END_STMNT
+#define OTV_SIZE_CHECK32( _size ) \
+ FT_BEGIN_STMNT \
+ if ( _size > 0 && _size < table_size ) \
+ { \
+ if ( otvalid->root->level == FT_VALIDATE_PARANOID ) \
+ FT_INVALID_OFFSET; \
+ else \
+ { \
+ /* strip off `const' */ \
+ FT_Byte* pp = (FT_Byte*)_size ## _p; \
+ \
+ \
+ FT_TRACE3(( "\n" \
+ "Invalid offset to optional table `%s'" \
+ " set to zero.\n" \
+ "\n", #_size )); \
+ \
+ _size = pp[0] = pp[1] = pp[2] = pp[3] = 0; \
+ } \
+ } \
+ FT_END_STMNT
+
#define OTV_NAME_(x) #x
#define OTV_NAME(x) OTV_NAME_(x)
@@ -146,11 +176,11 @@ FT_BEGIN_HEADER
#define OTV_INIT otvalid->debug_indent = 0
-#define OTV_ENTER \
- FT_BEGIN_STMNT \
- otvalid->debug_indent += 2; \
- FT_TRACE4(( "%*.s", otvalid->debug_indent, 0 )); \
- FT_TRACE4(( "%s table\n", \
+#define OTV_ENTER \
+ FT_BEGIN_STMNT \
+ otvalid->debug_indent += 2; \
+ FT_TRACE4(( "%*.s", otvalid->debug_indent, 0 )); \
+ FT_TRACE4(( "%s table\n", \
otvalid->debug_function_name[otvalid->nesting_level] )); \
FT_END_STMNT
diff --git a/modules/freetype2/src/otvalid/otverror.h b/modules/freetype2/src/otvalid/otverror.h
index e7c8db0d5..2fcf42e38 100644
--- a/modules/freetype2/src/otvalid/otverror.h
+++ b/modules/freetype2/src/otvalid/otverror.h
@@ -4,7 +4,7 @@
/* */
/* OpenType validation module error codes (specification only). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/otvalid/otvgdef.c b/modules/freetype2/src/otvalid/otvgdef.c
index f19e300e5..08f317154 100644
--- a/modules/freetype2/src/otvalid/otvgdef.c
+++ b/modules/freetype2/src/otvalid/otvgdef.c
@@ -4,7 +4,7 @@
/* */
/* OpenType GDEF table validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -68,7 +68,7 @@
OTV_LIMIT_CHECK( GlyphCount * 2 );
otvalid->nesting_level++;
- func = otvalid->func[otvalid->nesting_level];
+ func = otvalid->func[otvalid->nesting_level];
otvalid->extra1 = 0;
for ( ; GlyphCount > 0; GlyphCount-- )
@@ -136,6 +136,40 @@
/*************************************************************************/
/*************************************************************************/
/***** *****/
+ /***** MARK GLYPH SETS *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ static void
+ otv_MarkGlyphSets_validate( FT_Bytes table,
+ OTV_Validator otvalid )
+ {
+ FT_Bytes p = table;
+ FT_UInt MarkGlyphSetCount;
+
+
+ OTV_NAME_ENTER( "MarkGlyphSets" );
+
+ p += 2; /* skip Format */
+
+ OTV_LIMIT_CHECK( 2 );
+ MarkGlyphSetCount = FT_NEXT_USHORT( p );
+
+ OTV_TRACE(( " (MarkGlyphSetCount = %d)\n", MarkGlyphSetCount ));
+
+ OTV_LIMIT_CHECK( MarkGlyphSetCount * 4 ); /* CoverageOffsets */
+
+ for ( ; MarkGlyphSetCount > 0; MarkGlyphSetCount-- )
+ otv_Coverage_validate( table + FT_NEXT_ULONG( p ), otvalid, -1 );
+
+ OTV_EXIT;
+ }
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
/***** GDEF TABLE *****/
/***** *****/
/*************************************************************************/
@@ -152,14 +186,18 @@
{
OTV_ValidatorRec otvalidrec;
OTV_Validator otvalid = &otvalidrec;
- FT_Bytes p = table;
+ FT_Bytes p = table;
FT_UInt table_size;
- FT_Bool need_MarkAttachClassDef;
+ FT_UShort version;
+ FT_Bool need_MarkAttachClassDef = 1;
OTV_OPTIONAL_TABLE( GlyphClassDef );
OTV_OPTIONAL_TABLE( AttachListOffset );
OTV_OPTIONAL_TABLE( LigCaretListOffset );
OTV_OPTIONAL_TABLE( MarkAttachClassDef );
+ OTV_OPTIONAL_TABLE( MarkGlyphSetsDef );
+
+ OTV_OPTIONAL_TABLE32( itemVarStore );
otvalid->root = ftvalid;
@@ -167,24 +205,49 @@
FT_TRACE3(( "validating GDEF table\n" ));
OTV_INIT;
- OTV_LIMIT_CHECK( 12 );
+ OTV_LIMIT_CHECK( 4 );
- if ( FT_NEXT_ULONG( p ) != 0x10000UL ) /* Version */
+ if ( FT_NEXT_USHORT( p ) != 1 ) /* majorVersion */
FT_INVALID_FORMAT;
- /* MarkAttachClassDef has been added to the OpenType */
- /* specification without increasing GDEF's version, */
- /* so we use this ugly hack to find out whether the */
- /* table is needed actually. */
+ version = FT_NEXT_USHORT( p ); /* minorVersion */
- need_MarkAttachClassDef = FT_BOOL(
- otv_GSUBGPOS_have_MarkAttachmentType_flag( gsub ) ||
- otv_GSUBGPOS_have_MarkAttachmentType_flag( gpos ) );
+ table_size = 10;
+ switch ( version )
+ {
+ case 0:
+ /* MarkAttachClassDef has been added to the OpenType */
+ /* specification without increasing GDEF's version, */
+ /* so we use this ugly hack to find out whether the */
+ /* table is needed actually. */
+
+ need_MarkAttachClassDef = FT_BOOL(
+ otv_GSUBGPOS_have_MarkAttachmentType_flag( gsub ) ||
+ otv_GSUBGPOS_have_MarkAttachmentType_flag( gpos ) );
+
+ if ( need_MarkAttachClassDef )
+ {
+ OTV_LIMIT_CHECK( 8 );
+ table_size += 2;
+ }
+ else
+ OTV_LIMIT_CHECK( 6 ); /* OpenType < 1.2 */
- if ( need_MarkAttachClassDef )
- table_size = 12; /* OpenType >= 1.2 */
- else
- table_size = 10; /* OpenType < 1.2 */
+ break;
+
+ case 2:
+ OTV_LIMIT_CHECK( 10 );
+ table_size += 4;
+ break;
+
+ case 3:
+ OTV_LIMIT_CHECK( 14 );
+ table_size += 8;
+ break;
+
+ default:
+ FT_INVALID_FORMAT;
+ }
otvalid->glyph_count = glyph_count;
@@ -217,6 +280,22 @@
otv_ClassDef_validate( table + MarkAttachClassDef, otvalid );
}
+ if ( version > 0 )
+ {
+ OTV_OPTIONAL_OFFSET( MarkGlyphSetsDef );
+ OTV_SIZE_CHECK( MarkGlyphSetsDef );
+ if ( MarkGlyphSetsDef )
+ otv_MarkGlyphSets_validate( table + MarkGlyphSetsDef, otvalid );
+ }
+
+ if ( version > 2 )
+ {
+ OTV_OPTIONAL_OFFSET32( itemVarStore );
+ OTV_SIZE_CHECK32( itemVarStore );
+ if ( itemVarStore )
+ OTV_TRACE(( " [omitting itemVarStore validation]\n" )); /* XXX */
+ }
+
FT_TRACE4(( "\n" ));
}
diff --git a/modules/freetype2/src/otvalid/otvgpos.c b/modules/freetype2/src/otvalid/otvgpos.c
index e904ea5d6..696b35cae 100644
--- a/modules/freetype2/src/otvalid/otvgpos.c
+++ b/modules/freetype2/src/otvalid/otvgpos.c
@@ -4,7 +4,7 @@
/* */
/* OpenType GPOS table validation (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -130,7 +130,7 @@
otv_MarkArray_validate( table + Array1, otvalid );
otvalid->nesting_level++;
- func = otvalid->func[otvalid->nesting_level];
+ func = otvalid->func[otvalid->nesting_level];
otvalid->extra1 = ClassCount;
func( table + Array2, otvalid );
@@ -218,10 +218,6 @@
OTV_LIMIT_CHECK( 2 );
OTV_OPTIONAL_OFFSET( device );
- /* XXX: this value is usually too small, especially if the current */
- /* ValueRecord is part of an array -- getting the correct table */
- /* size is probably not worth the trouble */
-
table_size = p - otvalid->extra3;
OTV_SIZE_CHECK( device );
@@ -271,7 +267,7 @@
case 3:
{
- FT_UInt table_size;
+ FT_UInt table_size;
OTV_OPTIONAL_TABLE( XDeviceTable );
OTV_OPTIONAL_TABLE( YDeviceTable );
@@ -426,6 +422,8 @@
/*************************************************************************/
/*************************************************************************/
+ /* sets otvalid->extra3 (pointer to base table) */
+
static void
otv_PairSet_validate( FT_Bytes table,
FT_UInt format1,
@@ -438,6 +436,8 @@
OTV_NAME_ENTER( "PairSet" );
+ otvalid->extra3 = table;
+
OTV_LIMIT_CHECK( 2 );
PairValueCount = FT_NEXT_USHORT( p );
@@ -483,8 +483,6 @@
OTV_TRACE(( " (format %d)\n", PosFormat ));
- otvalid->extra3 = table;
-
switch ( PosFormat )
{
case 1: /* PairPosFormat1 */
@@ -537,7 +535,9 @@
otv_ClassDef_validate( table + ClassDef2, otvalid );
OTV_LIMIT_CHECK( ClassCount1 * ClassCount2 *
- ( len_value1 + len_value2 ) );
+ ( len_value1 + len_value2 ) );
+
+ otvalid->extra3 = table;
/* Class1Record */
for ( ; ClassCount1 > 0; ClassCount1-- )
@@ -985,20 +985,42 @@
{
OTV_ValidatorRec validrec;
OTV_Validator otvalid = &validrec;
- FT_Bytes p = table;
+ FT_Bytes p = table;
+ FT_UInt table_size;
+ FT_UShort version;
FT_UInt ScriptList, FeatureList, LookupList;
+ OTV_OPTIONAL_TABLE32( featureVariations );
+
otvalid->root = ftvalid;
FT_TRACE3(( "validating GPOS table\n" ));
OTV_INIT;
- OTV_LIMIT_CHECK( 10 );
+ OTV_LIMIT_CHECK( 4 );
- if ( FT_NEXT_ULONG( p ) != 0x10000UL ) /* Version */
+ if ( FT_NEXT_USHORT( p ) != 1 ) /* majorVersion */
FT_INVALID_FORMAT;
+ version = FT_NEXT_USHORT( p ); /* minorVersion */
+
+ table_size = 10;
+ switch ( version )
+ {
+ case 0:
+ OTV_LIMIT_CHECK( 6 );
+ break;
+
+ case 1:
+ OTV_LIMIT_CHECK( 10 );
+ table_size += 4;
+ break;
+
+ default:
+ FT_INVALID_FORMAT;
+ }
+
ScriptList = FT_NEXT_USHORT( p );
FeatureList = FT_NEXT_USHORT( p );
LookupList = FT_NEXT_USHORT( p );
@@ -1014,6 +1036,14 @@
otv_ScriptList_validate( table + ScriptList, table + FeatureList,
otvalid );
+ if ( version > 0 )
+ {
+ OTV_OPTIONAL_OFFSET32( featureVariations );
+ OTV_SIZE_CHECK32( featureVariations );
+ if ( featureVariations )
+ OTV_TRACE(( " [omitting featureVariations validation]\n" )); /* XXX */
+ }
+
FT_TRACE4(( "\n" ));
}
diff --git a/modules/freetype2/src/otvalid/otvgpos.h b/modules/freetype2/src/otvalid/otvgpos.h
index 2c09e64f9..95f9ac3ee 100644
--- a/modules/freetype2/src/otvalid/otvgpos.h
+++ b/modules/freetype2/src/otvalid/otvgpos.h
@@ -4,7 +4,7 @@
/* */
/* OpenType GPOS table validator (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/otvalid/otvgsub.c b/modules/freetype2/src/otvalid/otvgsub.c
index c2b28569f..d35ea67f3 100644
--- a/modules/freetype2/src/otvalid/otvgsub.c
+++ b/modules/freetype2/src/otvalid/otvgsub.c
@@ -4,7 +4,7 @@
/* */
/* OpenType GSUB table validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -552,18 +552,40 @@
OTV_ValidatorRec otvalidrec;
OTV_Validator otvalid = &otvalidrec;
FT_Bytes p = table;
+ FT_UInt table_size;
+ FT_UShort version;
FT_UInt ScriptList, FeatureList, LookupList;
+ OTV_OPTIONAL_TABLE32( featureVariations );
+
otvalid->root = ftvalid;
FT_TRACE3(( "validating GSUB table\n" ));
OTV_INIT;
- OTV_LIMIT_CHECK( 10 );
+ OTV_LIMIT_CHECK( 4 );
+
+ if ( FT_NEXT_USHORT( p ) != 1 ) /* majorVersion */
+ FT_INVALID_FORMAT;
+
+ version = FT_NEXT_USHORT( p ); /* minorVersion */
+
+ table_size = 10;
+ switch ( version )
+ {
+ case 0:
+ OTV_LIMIT_CHECK( 6 );
+ break;
+
+ case 1:
+ OTV_LIMIT_CHECK( 10 );
+ table_size += 4;
+ break;
- if ( FT_NEXT_ULONG( p ) != 0x10000UL ) /* Version */
+ default:
FT_INVALID_FORMAT;
+ }
ScriptList = FT_NEXT_USHORT( p );
FeatureList = FT_NEXT_USHORT( p );
@@ -580,6 +602,14 @@
otv_ScriptList_validate( table + ScriptList, table + FeatureList,
otvalid );
+ if ( version > 0 )
+ {
+ OTV_OPTIONAL_OFFSET32( featureVariations );
+ OTV_SIZE_CHECK32( featureVariations );
+ if ( featureVariations )
+ OTV_TRACE(( " [omitting featureVariations validation]\n" )); /* XXX */
+ }
+
FT_TRACE4(( "\n" ));
}
diff --git a/modules/freetype2/src/otvalid/otvjstf.c b/modules/freetype2/src/otvalid/otvjstf.c
index e19c1c121..94d4af90f 100644
--- a/modules/freetype2/src/otvalid/otvjstf.c
+++ b/modules/freetype2/src/otvalid/otvjstf.c
@@ -4,7 +4,7 @@
/* */
/* OpenType JSTF table validation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/otvalid/otvmath.c b/modules/freetype2/src/otvalid/otvmath.c
index 47e2f87c1..b9800f60a 100644
--- a/modules/freetype2/src/otvalid/otvmath.c
+++ b/modules/freetype2/src/otvalid/otvmath.c
@@ -4,7 +4,7 @@
/* */
/* OpenType MATH table validation (body). */
/* */
-/* Copyright 2007-2016 by */
+/* Copyright 2007-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* Written by George Williams. */
diff --git a/modules/freetype2/src/otvalid/otvmod.c b/modules/freetype2/src/otvalid/otvmod.c
index aed5e9c6f..89ee449d1 100644
--- a/modules/freetype2/src/otvalid/otvmod.c
+++ b/modules/freetype2/src/otvalid/otvmod.c
@@ -4,7 +4,7 @@
/* */
/* FreeType's OpenType validation module implementation (body). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/otvalid/otvmod.h b/modules/freetype2/src/otvalid/otvmod.h
index e464030ab..6917bccee 100644
--- a/modules/freetype2/src/otvalid/otvmod.h
+++ b/modules/freetype2/src/otvalid/otvmod.h
@@ -5,7 +5,7 @@
/* FreeType's OpenType validation module implementation */
/* (specification). */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/otvalid/rules.mk b/modules/freetype2/src/otvalid/rules.mk
index 077447fcb..d4fc72374 100644
--- a/modules/freetype2/src/otvalid/rules.mk
+++ b/modules/freetype2/src/otvalid/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2004-2016 by
+# Copyright 2004-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/pcf/Jamfile b/modules/freetype2/src/pcf/Jamfile
index 9ebe6a2cb..7b92b12dd 100644
--- a/modules/freetype2/src/pcf/Jamfile
+++ b/modules/freetype2/src/pcf/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/pcf Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/pcf/README b/modules/freetype2/src/pcf/README
index 10eff15fb..09ea970ed 100644
--- a/modules/freetype2/src/pcf/README
+++ b/modules/freetype2/src/pcf/README
@@ -41,8 +41,8 @@ value given as argument into the corresponding glyph number.
Known problems
**************
-- dealing explicitly with encodings breaks the uniformity of freetype2
- api.
+- dealing explicitly with encodings breaks the uniformity of FreeType 2
+ API.
- except for encodings properties, client applications have no
visibility of the PCF_Face object. This means that applications
diff --git a/modules/freetype2/src/pcf/pcf.c b/modules/freetype2/src/pcf/pcf.c
index 11d5b7b2a..8ffd6e280 100644
--- a/modules/freetype2/src/pcf/pcf.c
+++ b/modules/freetype2/src/pcf/pcf.c
@@ -26,11 +26,11 @@ THE SOFTWARE.
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
-
#include <ft2build.h>
-#include "pcfutil.c"
-#include "pcfread.c"
+
#include "pcfdrivr.c"
+#include "pcfread.c"
+#include "pcfutil.c"
+
/* END */
diff --git a/modules/freetype2/src/pcf/pcf.h b/modules/freetype2/src/pcf/pcf.h
index c726e5ec6..f0390cb1e 100644
--- a/modules/freetype2/src/pcf/pcf.h
+++ b/modules/freetype2/src/pcf/pcf.h
@@ -163,6 +163,15 @@ FT_BEGIN_HEADER
} PCF_FaceRec, *PCF_Face;
+ typedef struct PCF_DriverRec_
+ {
+ FT_DriverRec root;
+
+ FT_Bool no_long_family_names;
+
+ } PCF_DriverRec, *PCF_Driver;
+
+
/* macros for pcf font format */
#define LSBFirst 0
diff --git a/modules/freetype2/src/pcf/pcfdrivr.c b/modules/freetype2/src/pcf/pcfdrivr.c
index d60cc3ee5..0119d9485 100644
--- a/modules/freetype2/src/pcf/pcfdrivr.c
+++ b/modules/freetype2/src/pcf/pcfdrivr.c
@@ -49,6 +49,8 @@ THE SOFTWARE.
#include FT_SERVICE_BDF_H
#include FT_SERVICE_FONT_FORMAT_H
+#include FT_SERVICE_PROPERTIES_H
+#include FT_DRIVER_H
/*************************************************************************/
@@ -286,6 +288,7 @@ THE SOFTWARE.
/* this didn't work, try gzip support! */
+ FT_TRACE2(( " ... try gzip stream\n" ));
error2 = FT_Stream_OpenGzip( &face->comp_stream, stream );
if ( FT_ERR_EQ( error2, Unimplemented_Feature ) )
goto Fail;
@@ -301,6 +304,7 @@ THE SOFTWARE.
/* this didn't work, try LZW support! */
+ FT_TRACE2(( " ... try LZW stream\n" ));
error3 = FT_Stream_OpenLZW( &face->comp_stream, stream );
if ( FT_ERR_EQ( error3, Unimplemented_Feature ) )
goto Fail;
@@ -316,6 +320,7 @@ THE SOFTWARE.
/* this didn't work, try Bzip2 support! */
+ FT_TRACE2(( " ... try Bzip2 stream\n" ));
error4 = FT_Stream_OpenBzip2( &face->comp_stream, stream );
if ( FT_ERR_EQ( error4, Unimplemented_Feature ) )
goto Fail;
@@ -382,7 +387,11 @@ THE SOFTWARE.
if ( !ft_strcmp( s, "10646" ) ||
( !ft_strcmp( s, "8859" ) &&
!ft_strcmp( face->charset_encoding, "1" ) ) )
- unicode_charmap = 1;
+ unicode_charmap = 1;
+ /* another name for ASCII */
+ else if ( !ft_strcmp( s, "646.1991" ) &&
+ !ft_strcmp( face->charset_encoding, "IRV" ) )
+ unicode_charmap = 1;
}
}
@@ -404,12 +413,6 @@ THE SOFTWARE.
}
error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL );
-
-#if 0
- /* Select default charmap */
- if ( pcfface->num_charmaps )
- pcfface->charmap = pcfface->charmaps[0];
-#endif
}
}
@@ -521,11 +524,6 @@ THE SOFTWARE.
bitmap->num_grays = 1;
bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
- FT_TRACE6(( "BIT_ORDER %d ; BYTE_ORDER %d ; GLYPH_PAD %d\n",
- PCF_BIT_ORDER( face->bitmapsFormat ),
- PCF_BYTE_ORDER( face->bitmapsFormat ),
- PCF_GLYPH_PAD( face->bitmapsFormat ) ));
-
switch ( PCF_GLYPH_PAD( face->bitmapsFormat ) )
{
case 1:
@@ -627,19 +625,23 @@ THE SOFTWARE.
}
else
{
- if ( prop->value.l > 0x7FFFFFFFL || prop->value.l < ( -1 - 0x7FFFFFFFL ) )
+ if ( prop->value.l > 0x7FFFFFFFL ||
+ prop->value.l < ( -1 - 0x7FFFFFFFL ) )
{
- FT_TRACE1(( "pcf_get_bdf_property: " ));
- FT_TRACE1(( "too large integer 0x%x is truncated\n" ));
+ FT_TRACE1(( "pcf_get_bdf_property:" ));
+ FT_TRACE1(( " too large integer 0x%x is truncated\n" ));
}
- /* Apparently, the PCF driver loads all properties as signed integers!
- * This really doesn't seem to be a problem, because this is
- * sufficient for any meaningful values.
+
+ /*
+ * The PCF driver loads all properties as signed integers.
+ * This really doesn't seem to be a problem, because this is
+ * sufficient for any meaningful values.
*/
aproperty->type = BDF_PROPERTY_TYPE_INTEGER;
aproperty->u.integer = (FT_Int32)prop->value.l;
}
- return 0;
+
+ return FT_Err_Ok;
}
return FT_THROW( Invalid_Argument );
@@ -654,7 +656,7 @@ THE SOFTWARE.
*acharset_encoding = face->charset_encoding;
*acharset_registry = face->charset_registry;
- return 0;
+ return FT_Err_Ok;
}
@@ -665,6 +667,116 @@ THE SOFTWARE.
};
+ /*
+ * PROPERTY SERVICE
+ *
+ */
+ static FT_Error
+ pcf_property_set( FT_Module module, /* PCF_Driver */
+ const char* property_name,
+ const void* value,
+ FT_Bool value_is_string )
+ {
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+ FT_Error error = FT_Err_Ok;
+ PCF_Driver driver = (PCF_Driver)module;
+
+#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+ FT_UNUSED( value_is_string );
+#endif
+
+
+ if ( !ft_strcmp( property_name, "no-long-family-names" ) )
+ {
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+ if ( value_is_string )
+ {
+ const char* s = (const char*)value;
+ long lfn = ft_strtol( s, NULL, 10 );
+
+
+ if ( lfn == 0 )
+ driver->no_long_family_names = 0;
+ else if ( lfn == 1 )
+ driver->no_long_family_names = 1;
+ else
+ return FT_THROW( Invalid_Argument );
+ }
+ else
+#endif
+ {
+ FT_Bool* no_long_family_names = (FT_Bool*)value;
+
+
+ driver->no_long_family_names = *no_long_family_names;
+ }
+
+ return error;
+ }
+
+#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+ FT_UNUSED( module );
+ FT_UNUSED( value );
+ FT_UNUSED( value_is_string );
+#ifndef FT_DEBUG_LEVEL_TRACE
+ FT_UNUSED( property_name );
+#endif
+
+#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+ FT_TRACE0(( "pcf_property_set: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+ static FT_Error
+ pcf_property_get( FT_Module module, /* PCF_Driver */
+ const char* property_name,
+ const void* value )
+ {
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+ FT_Error error = FT_Err_Ok;
+ PCF_Driver driver = (PCF_Driver)module;
+
+
+ if ( !ft_strcmp( property_name, "no-long-family-names" ) )
+ {
+ FT_Bool no_long_family_names = driver->no_long_family_names;
+ FT_Bool* val = (FT_Bool*)value;
+
+
+ *val = no_long_family_names;
+
+ return error;
+ }
+
+#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+ FT_UNUSED( module );
+ FT_UNUSED( value );
+#ifndef FT_DEBUG_LEVEL_TRACE
+ FT_UNUSED( property_name );
+#endif
+
+#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+ FT_TRACE0(( "pcf_property_get: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+ FT_DEFINE_SERVICE_PROPERTIESREC(
+ pcf_service_properties,
+
+ (FT_Properties_SetFunc)pcf_property_set, /* set_property */
+ (FT_Properties_GetFunc)pcf_property_get ) /* get_property */
+
+
/*
*
* SERVICE LIST
@@ -675,6 +787,7 @@ THE SOFTWARE.
{
{ FT_SERVICE_ID_BDF, &pcf_service_bdf },
{ FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_PCF },
+ { FT_SERVICE_ID_PROPERTIES, &pcf_service_properties },
{ NULL, NULL }
};
@@ -689,22 +802,45 @@ THE SOFTWARE.
}
+ FT_CALLBACK_DEF( FT_Error )
+ pcf_driver_init( FT_Module module ) /* PCF_Driver */
+ {
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+ PCF_Driver driver = (PCF_Driver)module;
+
+
+ driver->no_long_family_names = 0;
+#else
+ FT_UNUSED( module );
+#endif
+
+ return FT_Err_Ok;
+ }
+
+
+ FT_CALLBACK_DEF( void )
+ pcf_driver_done( FT_Module module ) /* PCF_Driver */
+ {
+ FT_UNUSED( module );
+ }
+
+
FT_CALLBACK_TABLE_DEF
const FT_Driver_ClassRec pcf_driver_class =
{
{
FT_MODULE_FONT_DRIVER |
FT_MODULE_DRIVER_NO_OUTLINES,
- sizeof ( FT_DriverRec ),
+ sizeof ( PCF_DriverRec ),
"pcf",
0x10000L,
0x20000L,
- NULL, /* module-specific interface */
+ NULL, /* module-specific interface */
- NULL, /* FT_Module_Constructor module_init */
- NULL, /* FT_Module_Destructor module_done */
+ pcf_driver_init, /* FT_Module_Constructor module_init */
+ pcf_driver_done, /* FT_Module_Destructor module_done */
pcf_driver_requester /* FT_Module_Requester get_interface */
},
diff --git a/modules/freetype2/src/pcf/pcfread.c b/modules/freetype2/src/pcf/pcfread.c
index 95ee57018..537da0dc7 100644
--- a/modules/freetype2/src/pcf/pcfread.c
+++ b/modules/freetype2/src/pcf/pcfread.c
@@ -50,8 +50,15 @@ THE SOFTWARE.
#ifdef FT_DEBUG_LEVEL_TRACE
static const char* const tableNames[] =
{
- "prop", "accl", "mtrcs", "bmps", "imtrcs",
- "enc", "swidth", "names", "accel"
+ "properties",
+ "accelerators",
+ "metrics",
+ "bitmaps",
+ "ink metrics",
+ "encodings",
+ "swidths",
+ "glyph names",
+ "BDF accelerators"
};
#endif
@@ -109,22 +116,20 @@ THE SOFTWARE.
if ( stream->size < 16 )
return FT_THROW( Invalid_File_Format );
- /* We need 16 bytes per TOC entry. Additionally, as a */
- /* heuristic protection against gzip bombs (i.e., very */
- /* small input files that expand to insanely large */
- /* files), we limit the number of TOC entries to 1024. */
- if ( toc->count > stream->size >> 4 ||
- toc->count > 1024 )
+ /* we need 16 bytes per TOC entry, */
+ /* and there can be most 9 tables */
+ if ( toc->count > ( stream->size >> 4 ) ||
+ toc->count > 9 )
{
FT_TRACE0(( "pcf_read_TOC: adjusting number of tables"
" (from %d to %d)\n",
toc->count,
- FT_MIN( stream->size >> 4, 1024 ) ));
- toc->count = FT_MIN( stream->size >> 4, 1024 );
+ FT_MIN( stream->size >> 4, 9 ) ));
+ toc->count = FT_MIN( stream->size >> 4, 9 );
}
if ( FT_NEW_ARRAY( face->toc.tables, toc->count ) )
- return FT_THROW( Out_Of_Memory );
+ return error;
tables = face->toc.tables;
for ( n = 0; n < toc->count; n++ )
@@ -237,8 +242,8 @@ THE SOFTWARE.
if ( tables[i].type == (FT_UInt)( 1 << j ) )
name = tableNames[j];
- FT_TRACE4(( " %d: type=%s, format=0x%X, "
- "size=%ld (0x%lX), offset=%ld (0x%lX)\n",
+ FT_TRACE4(( " %d: type=%s, format=0x%X,"
+ " size=%ld (0x%lX), offset=%ld (0x%lX)\n",
i, name,
tables[i].format,
tables[i].size, tables[i].size,
@@ -348,6 +353,17 @@ THE SOFTWARE.
metric->attributes = 0;
}
+ FT_TRACE5(( " width=%d,"
+ " lsb=%d, rsb=%d,"
+ " ascent=%d, descent=%d,"
+ " attributes=%d\n",
+ metric->characterWidth,
+ metric->leftSideBearing,
+ metric->rightSideBearing,
+ metric->ascent,
+ metric->descent,
+ metric->attributes ));
+
Exit:
return error;
}
@@ -466,7 +482,7 @@ THE SOFTWARE.
{
PCF_ParseProperty props = NULL;
PCF_Property properties = NULL;
- FT_ULong nprops, i;
+ FT_ULong nprops, orig_nprops, i;
FT_ULong format, size;
FT_Error error;
FT_Memory memory = FT_FACE( face )->memory;
@@ -486,32 +502,43 @@ THE SOFTWARE.
if ( FT_READ_ULONG_LE( format ) )
goto Bail;
- FT_TRACE4(( "pcf_get_properties:\n" ));
-
- FT_TRACE4(( " format = %ld\n", format ));
+ FT_TRACE4(( "pcf_get_properties:\n"
+ " format: 0x%lX (%s)\n",
+ format,
+ PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB" ));
if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
goto Bail;
if ( PCF_BYTE_ORDER( format ) == MSBFirst )
- (void)FT_READ_ULONG( nprops );
+ (void)FT_READ_ULONG( orig_nprops );
else
- (void)FT_READ_ULONG_LE( nprops );
+ (void)FT_READ_ULONG_LE( orig_nprops );
if ( error )
goto Bail;
- FT_TRACE4(( " nprop = %d (truncate %d props)\n",
- (int)nprops, nprops - (FT_ULong)(int)nprops ));
-
- nprops = (FT_ULong)(int)nprops;
+ FT_TRACE4(( " number of properties: %ld\n", orig_nprops ));
/* rough estimate */
- if ( nprops > size / PCF_PROPERTY_SIZE )
+ if ( orig_nprops > size / PCF_PROPERTY_SIZE )
{
error = FT_THROW( Invalid_Table );
goto Bail;
}
+ /* as a heuristic limit to avoid excessive allocation in */
+ /* gzip bombs (i.e., very small, invalid input data that */
+ /* pretends to expand to an insanely large file) we only */
+ /* load the first 256 properties */
+ if ( orig_nprops > 256 )
+ {
+ FT_TRACE0(( "pcf_get_properties:"
+ " only loading first 256 properties\n" ));
+ nprops = 256;
+ }
+ else
+ nprops = orig_nprops;
+
face->nprops = (int)nprops;
if ( FT_NEW_ARRAY( props, nprops ) )
@@ -531,14 +558,23 @@ THE SOFTWARE.
}
}
+ /* this skip will only work if we really have an extremely large */
+ /* number of properties; it will fail for fake data, avoiding an */
+ /* unnecessarily large allocation later on */
+ if ( FT_STREAM_SKIP( ( orig_nprops - nprops ) * PCF_PROPERTY_SIZE ) )
+ {
+ error = FT_THROW( Invalid_Stream_Skip );
+ goto Bail;
+ }
+
/* pad the property array */
/* */
/* clever here - nprops is the same as the number of odd-units read, */
/* as only isStringProp are odd length (Keith Packard) */
/* */
- if ( nprops & 3 )
+ if ( orig_nprops & 3 )
{
- i = 4 - ( nprops & 3 );
+ i = 4 - ( orig_nprops & 3 );
if ( FT_STREAM_SKIP( i ) )
{
error = FT_THROW( Invalid_Stream_Skip );
@@ -553,15 +589,24 @@ THE SOFTWARE.
if ( error )
goto Bail;
- FT_TRACE4(( " string_size = %ld\n", string_size ));
+ FT_TRACE4(( " string size: %ld\n", string_size ));
/* rough estimate */
- if ( string_size > size - nprops * PCF_PROPERTY_SIZE )
+ if ( string_size > size - orig_nprops * PCF_PROPERTY_SIZE )
{
error = FT_THROW( Invalid_Table );
goto Bail;
}
+ /* the strings in the `strings' array are PostScript strings, */
+ /* which can have a maximum length of 65536 characters each */
+ if ( string_size > 16777472 ) /* 256 * (65536 + 1) */
+ {
+ FT_TRACE0(( "pcf_get_properties:"
+ " loading only 16777472 bytes of strings array\n" ));
+ string_size = 16777472;
+ }
+
/* allocate one more byte so that we have a final null byte */
if ( FT_NEW_ARRAY( strings, string_size + 1 ) )
goto Bail;
@@ -575,6 +620,7 @@ THE SOFTWARE.
face->properties = properties;
+ FT_TRACE4(( "\n" ));
for ( i = 0; i < nprops; i++ )
{
FT_Long name_offset = props[i].name;
@@ -637,7 +683,7 @@ THE SOFTWARE.
FT_Memory memory = FT_FACE( face )->memory;
FT_ULong format, size;
PCF_Metric metrics = NULL;
- FT_ULong nmetrics, i;
+ FT_ULong nmetrics, orig_nmetrics, i;
error = pcf_seek_to_table_type( stream,
@@ -652,6 +698,13 @@ THE SOFTWARE.
if ( FT_READ_ULONG_LE( format ) )
goto Bail;
+ FT_TRACE4(( "pcf_get_metrics:\n"
+ " format: 0x%lX (%s, %s)\n",
+ format,
+ PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB",
+ PCF_FORMAT_MATCH( format, PCF_COMPRESSED_METRICS ) ?
+ "compressed" : "uncompressed" ));
+
if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) &&
!PCF_FORMAT_MATCH( format, PCF_COMPRESSED_METRICS ) )
return FT_THROW( Invalid_File_Format );
@@ -659,61 +712,70 @@ THE SOFTWARE.
if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
{
if ( PCF_BYTE_ORDER( format ) == MSBFirst )
- (void)FT_READ_ULONG( nmetrics );
+ (void)FT_READ_ULONG( orig_nmetrics );
else
- (void)FT_READ_ULONG_LE( nmetrics );
+ (void)FT_READ_ULONG_LE( orig_nmetrics );
}
else
{
if ( PCF_BYTE_ORDER( format ) == MSBFirst )
- (void)FT_READ_USHORT( nmetrics );
+ (void)FT_READ_USHORT( orig_nmetrics );
else
- (void)FT_READ_USHORT_LE( nmetrics );
+ (void)FT_READ_USHORT_LE( orig_nmetrics );
}
if ( error )
return FT_THROW( Invalid_File_Format );
- face->nmetrics = nmetrics;
-
- if ( !nmetrics )
- return FT_THROW( Invalid_Table );
-
- FT_TRACE4(( "pcf_get_metrics:\n" ));
-
- FT_TRACE4(( " number of metrics: %d\n", nmetrics ));
+ FT_TRACE4(( " number of metrics: %ld\n", orig_nmetrics ));
/* rough estimate */
if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
{
- if ( nmetrics > size / PCF_METRIC_SIZE )
+ if ( orig_nmetrics > size / PCF_METRIC_SIZE )
return FT_THROW( Invalid_Table );
}
else
{
- if ( nmetrics > size / PCF_COMPRESSED_METRIC_SIZE )
+ if ( orig_nmetrics > size / PCF_COMPRESSED_METRIC_SIZE )
return FT_THROW( Invalid_Table );
}
+ if ( !orig_nmetrics )
+ return FT_THROW( Invalid_Table );
+
+ /* PCF is a format from ancient times; Unicode was in its */
+ /* infancy, and widely used two-byte character sets for CJK */
+ /* scripts (Big 5, GB 2312, JIS X 0208, etc.) did have at most */
+ /* 15000 characters. Even the more exotic CNS 11643 and CCCII */
+ /* standards, which were essentially three-byte character sets, */
+ /* provided less then 65536 assigned characters. */
+ /* */
+ /* While technically possible to have a larger number of glyphs */
+ /* in PCF files, we thus limit the number to 65536. */
+ if ( orig_nmetrics > 65536 )
+ {
+ FT_TRACE0(( "pcf_get_metrics:"
+ " only loading first 65536 metrics\n" ));
+ nmetrics = 65536;
+ }
+ else
+ nmetrics = orig_nmetrics;
+
+ face->nmetrics = nmetrics;
+
if ( FT_NEW_ARRAY( face->metrics, nmetrics ) )
- return FT_THROW( Out_Of_Memory );
+ return error;
metrics = face->metrics;
+
+ FT_TRACE4(( "\n" ));
for ( i = 0; i < nmetrics; i++, metrics++ )
{
+ FT_TRACE5(( " idx %ld:", i ));
error = pcf_get_metric( stream, format, metrics );
metrics->bits = 0;
- FT_TRACE5(( " idx %d: width=%d, "
- "lsb=%d, rsb=%d, ascent=%d, descent=%d, swidth=%d\n",
- i,
- metrics->characterWidth,
- metrics->leftSideBearing,
- metrics->rightSideBearing,
- metrics->ascent,
- metrics->descent,
- metrics->attributes ));
-
if ( error )
break;
@@ -721,7 +783,7 @@ THE SOFTWARE.
/* compute a glyph's bitmap dimensions, thus setting them to zero in */
/* case of an error disables this particular glyph only */
if ( metrics->rightSideBearing < metrics->leftSideBearing ||
- metrics->ascent + metrics->descent < 0 )
+ metrics->ascent < -metrics->descent )
{
metrics->characterWidth = 0;
metrics->leftSideBearing = 0;
@@ -751,7 +813,7 @@ THE SOFTWARE.
FT_Long* offsets = NULL;
FT_Long bitmapSizes[GLYPHPADOPTIONS];
FT_ULong format, size;
- FT_ULong nbitmaps, i, sizebitmaps = 0;
+ FT_ULong nbitmaps, orig_nbitmaps, i, sizebitmaps = 0;
error = pcf_seek_to_table_type( stream,
@@ -769,18 +831,42 @@ THE SOFTWARE.
format = FT_GET_ULONG_LE();
if ( PCF_BYTE_ORDER( format ) == MSBFirst )
- nbitmaps = FT_GET_ULONG();
+ orig_nbitmaps = FT_GET_ULONG();
else
- nbitmaps = FT_GET_ULONG_LE();
+ orig_nbitmaps = FT_GET_ULONG_LE();
FT_Stream_ExitFrame( stream );
+ FT_TRACE4(( "pcf_get_bitmaps:\n"
+ " format: 0x%lX\n"
+ " (%s, %s,\n"
+ " padding=%d bit%s, scanning=%d bit%s)\n",
+ format,
+ PCF_BYTE_ORDER( format ) == MSBFirst
+ ? "most significant byte first"
+ : "least significant byte first",
+ PCF_BIT_ORDER( format ) == MSBFirst
+ ? "most significant bit first"
+ : "least significant bit first",
+ 8 << PCF_GLYPH_PAD_INDEX( format ),
+ ( 8 << PCF_GLYPH_PAD_INDEX( format ) ) == 1 ? "" : "s",
+ 8 << PCF_SCAN_UNIT_INDEX( format ),
+ ( 8 << PCF_SCAN_UNIT_INDEX( format ) ) == 1 ? "" : "s" ));
+
if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
return FT_THROW( Invalid_File_Format );
- FT_TRACE4(( "pcf_get_bitmaps:\n" ));
+ FT_TRACE4(( " number of bitmaps: %ld\n", orig_nbitmaps ));
- FT_TRACE4(( " number of bitmaps: %d\n", nbitmaps ));
+ /* see comment in `pcf_get_metrics' */
+ if ( orig_nbitmaps > 65536 )
+ {
+ FT_TRACE0(( "pcf_get_bitmaps:"
+ " only loading first 65536 bitmaps\n" ));
+ nbitmaps = 65536;
+ }
+ else
+ nbitmaps = orig_nbitmaps;
if ( nbitmaps != face->nmetrics )
return FT_THROW( Invalid_File_Format );
@@ -788,6 +874,7 @@ THE SOFTWARE.
if ( FT_NEW_ARRAY( offsets, nbitmaps ) )
return error;
+ FT_TRACE5(( "\n" ));
for ( i = 0; i < nbitmaps; i++ )
{
if ( PCF_BYTE_ORDER( format ) == MSBFirst )
@@ -795,7 +882,7 @@ THE SOFTWARE.
else
(void)FT_READ_LONG_LE( offsets[i] );
- FT_TRACE5(( " bitmap %d: offset %ld (0x%lX)\n",
+ FT_TRACE5(( " bitmap %ld: offset %ld (0x%lX)\n",
i, offsets[i], offsets[i] ));
}
if ( error )
@@ -812,17 +899,19 @@ THE SOFTWARE.
sizebitmaps = (FT_ULong)bitmapSizes[PCF_GLYPH_PAD_INDEX( format )];
- FT_TRACE4(( " padding %d implies a size of %ld\n",
- i, bitmapSizes[i] ));
+ FT_TRACE4(( " %ld-bit padding implies a size of %ld\n",
+ 8 << i, bitmapSizes[i] ));
}
- FT_TRACE4(( " %d bitmaps, padding index %ld\n",
+ FT_TRACE4(( " %ld bitmaps, using %ld-bit padding\n",
nbitmaps,
- PCF_GLYPH_PAD_INDEX( format ) ));
- FT_TRACE4(( " bitmap size = %d\n", sizebitmaps ));
+ 8 << PCF_GLYPH_PAD_INDEX( format ) ));
+ FT_TRACE4(( " bitmap size: %ld\n", sizebitmaps ));
FT_UNUSED( sizebitmaps ); /* only used for debugging */
+ /* right now, we only check the bitmap offsets; */
+ /* actual bitmaps are only loaded on demand */
for ( i = 0; i < nbitmaps; i++ )
{
/* rough estimate */
@@ -830,7 +919,7 @@ THE SOFTWARE.
( (FT_ULong)offsets[i] > size ) )
{
FT_TRACE0(( "pcf_get_bitmaps:"
- " invalid offset to bitmap data of glyph %d\n", i ));
+ " invalid offset to bitmap data of glyph %ld\n", i ));
}
else
face->metrics[i].bits = stream->pos + (FT_ULong)offsets[i];
@@ -894,10 +983,20 @@ THE SOFTWARE.
FT_Stream_ExitFrame( stream );
+ FT_TRACE4(( "pcf_get_encodings:\n"
+ " format: 0x%lX (%s)\n",
+ format,
+ PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB" ));
+
if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
return FT_THROW( Invalid_File_Format );
- /* sanity checks */
+ FT_TRACE4(( " firstCol 0x%X, lastCol 0x%X\n"
+ " firstRow 0x%X, lastRow 0x%X\n",
+ firstCol, lastCol,
+ firstRow, lastRow ));
+
+ /* sanity checks; we limit numbers of rows and columns to 256 */
if ( firstCol < 0 ||
firstCol > lastCol ||
lastCol > 0xFF ||
@@ -906,21 +1005,18 @@ THE SOFTWARE.
lastRow > 0xFF )
return FT_THROW( Invalid_Table );
- FT_TRACE4(( "pdf_get_encodings:\n" ));
-
- FT_TRACE4(( " firstCol %d, lastCol %d, firstRow %d, lastRow %d\n",
- firstCol, lastCol, firstRow, lastRow ));
-
nencoding = (FT_ULong)( lastCol - firstCol + 1 ) *
(FT_ULong)( lastRow - firstRow + 1 );
if ( FT_NEW_ARRAY( encoding, nencoding ) )
- return FT_THROW( Out_Of_Memory );
+ return error;
error = FT_Stream_EnterFrame( stream, 2 * nencoding );
if ( error )
goto Bail;
+ FT_TRACE5(( "\n" ));
+
k = 0;
for ( i = firstRow; i <= lastRow; i++ )
{
@@ -1029,6 +1125,15 @@ THE SOFTWARE.
if ( FT_READ_ULONG_LE( format ) )
goto Bail;
+ FT_TRACE4(( "pcf_get_accel%s:\n"
+ " format: 0x%lX (%s, %s)\n",
+ type == PCF_BDF_ACCELERATORS ? " (getting BDF accelerators)"
+ : "",
+ format,
+ PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB",
+ PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) ?
+ "accelerated" : "not accelerated" ));
+
if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) &&
!PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) )
goto Bail;
@@ -1044,12 +1149,43 @@ THE SOFTWARE.
goto Bail;
}
+ FT_TRACE5(( " noOverlap=%s, constantMetrics=%s,"
+ " terminalFont=%s, constantWidth=%s\n"
+ " inkInside=%s, inkMetrics=%s, drawDirection=%s\n"
+ " fontAscent=%ld, fontDescent=%ld, maxOverlap=%ld\n",
+ accel->noOverlap ? "yes" : "no",
+ accel->constantMetrics ? "yes" : "no",
+ accel->terminalFont ? "yes" : "no",
+ accel->constantWidth ? "yes" : "no",
+ accel->inkInside ? "yes" : "no",
+ accel->inkMetrics ? "yes" : "no",
+ accel->drawDirection ? "RTL" : "LTR",
+ accel->fontAscent,
+ accel->fontDescent,
+ accel->maxOverlap ));
+
+ /* sanity checks */
+ if ( FT_ABS( accel->fontAscent ) > 0x7FFF )
+ {
+ accel->fontAscent = accel->fontAscent < 0 ? -0x7FFF : 0x7FFF;
+ FT_TRACE0(( "pfc_get_accel: clamping font ascent to value %d\n",
+ accel->fontAscent ));
+ }
+ if ( FT_ABS( accel->fontDescent ) > 0x7FFF )
+ {
+ accel->fontDescent = accel->fontDescent < 0 ? -0x7FFF : 0x7FFF;
+ FT_TRACE0(( "pfc_get_accel: clamping font descent to value %d\n",
+ accel->fontDescent ));
+ }
+
+ FT_TRACE5(( " minbounds:" ));
error = pcf_get_metric( stream,
format & ( ~PCF_FORMAT_MASK ),
&(accel->minbounds) );
if ( error )
goto Bail;
+ FT_TRACE5(( " maxbounds:" ));
error = pcf_get_metric( stream,
format & ( ~PCF_FORMAT_MASK ),
&(accel->maxbounds) );
@@ -1058,12 +1194,14 @@ THE SOFTWARE.
if ( PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) )
{
+ FT_TRACE5(( " ink minbounds:" ));
error = pcf_get_metric( stream,
format & ( ~PCF_FORMAT_MASK ),
&(accel->ink_minbounds) );
if ( error )
goto Bail;
+ FT_TRACE5(( " ink maxbounds:" ));
error = pcf_get_metric( stream,
format & ( ~PCF_FORMAT_MASK ),
&(accel->ink_maxbounds) );
@@ -1072,7 +1210,7 @@ THE SOFTWARE.
}
else
{
- accel->ink_minbounds = accel->minbounds; /* I'm not sure about this */
+ accel->ink_minbounds = accel->minbounds;
accel->ink_maxbounds = accel->maxbounds;
}
@@ -1271,57 +1409,75 @@ THE SOFTWARE.
prop = pcf_find_property( face, "FAMILY_NAME" );
if ( prop && prop->isString )
{
- /* Prepend the foundry name plus a space to the family name. */
- /* There are many fonts just called `Fixed' which look completely */
- /* different, and which have nothing to do with each other. When */
- /* selecting `Fixed' in KDE or Gnome one gets results that appear */
- /* rather random, the style changes often if one changes the size */
- /* and one cannot select some fonts at all. */
- /* */
- /* We also check whether we have `wide' characters; all put */
- /* together, we get family names like `Sony Fixed' or `Misc Fixed */
- /* Wide'. */
- PCF_Property foundry_prop, point_size_prop, average_width_prop;
-
- int l = ft_strlen( prop->value.atom ) + 1;
- int wide = 0;
-
-
- foundry_prop = pcf_find_property( face, "FOUNDRY" );
- point_size_prop = pcf_find_property( face, "POINT_SIZE" );
- average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" );
-
- if ( point_size_prop && average_width_prop )
+
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+ PCF_Driver driver = (PCF_Driver)FT_FACE_DRIVER( face );
+
+
+ if ( !driver->no_long_family_names )
{
- if ( average_width_prop->value.l >= point_size_prop->value.l )
+ /* Prepend the foundry name plus a space to the family name. */
+ /* There are many fonts just called `Fixed' which look */
+ /* completely different, and which have nothing to do with each */
+ /* other. When selecting `Fixed' in KDE or Gnome one gets */
+ /* results that appear rather random, the style changes often if */
+ /* one changes the size and one cannot select some fonts at all. */
+ /* */
+ /* We also check whether we have `wide' characters; all put */
+ /* together, we get family names like `Sony Fixed' or `Misc */
+ /* Fixed Wide'. */
+
+ PCF_Property foundry_prop, point_size_prop, average_width_prop;
+
+ int l = ft_strlen( prop->value.atom ) + 1;
+ int wide = 0;
+
+
+ foundry_prop = pcf_find_property( face, "FOUNDRY" );
+ point_size_prop = pcf_find_property( face, "POINT_SIZE" );
+ average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" );
+
+ if ( point_size_prop && average_width_prop )
{
- /* This font is at least square shaped or even wider */
- wide = 1;
- l += ft_strlen( " Wide" );
+ if ( average_width_prop->value.l >= point_size_prop->value.l )
+ {
+ /* This font is at least square shaped or even wider */
+ wide = 1;
+ l += ft_strlen( " Wide" );
+ }
}
- }
- if ( foundry_prop && foundry_prop->isString )
- {
- l += ft_strlen( foundry_prop->value.atom ) + 1;
+ if ( foundry_prop && foundry_prop->isString )
+ {
+ l += ft_strlen( foundry_prop->value.atom ) + 1;
- if ( FT_NEW_ARRAY( root->family_name, l ) )
- goto Exit;
+ if ( FT_NEW_ARRAY( root->family_name, l ) )
+ goto Exit;
+
+ ft_strcpy( root->family_name, foundry_prop->value.atom );
+ ft_strcat( root->family_name, " " );
+ ft_strcat( root->family_name, prop->value.atom );
+ }
+ else
+ {
+ if ( FT_NEW_ARRAY( root->family_name, l ) )
+ goto Exit;
+
+ ft_strcpy( root->family_name, prop->value.atom );
+ }
- ft_strcpy( root->family_name, foundry_prop->value.atom );
- ft_strcat( root->family_name, " " );
- ft_strcat( root->family_name, prop->value.atom );
+ if ( wide )
+ ft_strcat( root->family_name, " Wide" );
}
else
+
+#endif /* PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
{
- if ( FT_NEW_ARRAY( root->family_name, l ) )
+ if ( FT_STRDUP( root->family_name, prop->value.atom ) )
goto Exit;
-
- ft_strcpy( root->family_name, prop->value.atom );
}
-
- if ( wide )
- ft_strcat( root->family_name, " Wide" );
}
else
root->family_name = NULL;
@@ -1356,8 +1512,16 @@ THE SOFTWARE.
if ( face->accel.fontAscent + face->accel.fontDescent < 0 )
FT_TRACE0(( "pcf_load_font: negative height\n" ));
#endif
- bsize->height = FT_ABS( (FT_Short)( face->accel.fontAscent +
- face->accel.fontDescent ) );
+ if ( FT_ABS( face->accel.fontAscent +
+ face->accel.fontDescent ) > 0x7FFF )
+ {
+ bsize->height = 0x7FFF;
+ FT_TRACE0(( "pcf_load_font: clamping height to value %d\n",
+ bsize->height ));
+ }
+ else
+ bsize->height = FT_ABS( (FT_Short)( face->accel.fontAscent +
+ face->accel.fontDescent ) );
prop = pcf_find_property( face, "AVERAGE_WIDTH" );
if ( prop )
@@ -1366,10 +1530,20 @@ THE SOFTWARE.
if ( prop->value.l < 0 )
FT_TRACE0(( "pcf_load_font: negative average width\n" ));
#endif
- bsize->width = FT_ABS( (FT_Short)( ( prop->value.l ) + 5 ) / 10 );
+ if ( ( FT_ABS( prop->value.l ) > 0x7FFFL * 10 - 5 ) )
+ {
+ bsize->width = 0x7FFF;
+ FT_TRACE0(( "pcf_load_font: clamping average width to value %d\n",
+ bsize->width ));
+ }
+ else
+ bsize->width = FT_ABS( (FT_Short)( ( prop->value.l + 5 ) / 10 ) );
}
else
+ {
+ /* this is a heuristical value */
bsize->width = (FT_Short)FT_MulDiv( bsize->height, 2, 3 );
+ }
prop = pcf_find_property( face, "POINT_SIZE" );
if ( prop )
@@ -1379,9 +1553,16 @@ THE SOFTWARE.
FT_TRACE0(( "pcf_load_font: negative point size\n" ));
#endif
/* convert from 722.7 decipoints to 72 points per inch */
- bsize->size = FT_MulDiv( FT_ABS( prop->value.l ),
- 64 * 7200,
- 72270L );
+ if ( FT_ABS( prop->value.l ) > 0x504C2L ) /* 0x7FFF * 72270/7200 */
+ {
+ bsize->size = 0x7FFF;
+ FT_TRACE0(( "pcf_load_font: clamping point size to value %d\n",
+ bsize->size ));
+ }
+ else
+ bsize->size = FT_MulDiv( FT_ABS( prop->value.l ),
+ 64 * 7200,
+ 72270L );
}
prop = pcf_find_property( face, "PIXEL_SIZE" );
@@ -1391,7 +1572,14 @@ THE SOFTWARE.
if ( prop->value.l < 0 )
FT_TRACE0(( "pcf_load_font: negative pixel size\n" ));
#endif
- bsize->y_ppem = FT_ABS( (FT_Short)prop->value.l ) << 6;
+ if ( FT_ABS( prop->value.l ) > 0x7FFF )
+ {
+ bsize->y_ppem = 0x7FFF << 6;
+ FT_TRACE0(( "pcf_load_font: clamping pixel size to value %d\n",
+ bsize->y_ppem ));
+ }
+ else
+ bsize->y_ppem = FT_ABS( (FT_Short)prop->value.l ) << 6;
}
prop = pcf_find_property( face, "RESOLUTION_X" );
@@ -1401,7 +1589,14 @@ THE SOFTWARE.
if ( prop->value.l < 0 )
FT_TRACE0(( "pcf_load_font: negative X resolution\n" ));
#endif
- resolution_x = FT_ABS( (FT_Short)prop->value.l );
+ if ( FT_ABS( prop->value.l ) > 0x7FFF )
+ {
+ resolution_x = 0x7FFF;
+ FT_TRACE0(( "pcf_load_font: clamping X resolution to value %d\n",
+ resolution_x ));
+ }
+ else
+ resolution_x = FT_ABS( (FT_Short)prop->value.l );
}
prop = pcf_find_property( face, "RESOLUTION_Y" );
@@ -1411,7 +1606,14 @@ THE SOFTWARE.
if ( prop->value.l < 0 )
FT_TRACE0(( "pcf_load_font: negative Y resolution\n" ));
#endif
- resolution_y = FT_ABS( (FT_Short)prop->value.l );
+ if ( FT_ABS( prop->value.l ) > 0x7FFF )
+ {
+ resolution_y = 0x7FFF;
+ FT_TRACE0(( "pcf_load_font: clamping Y resolution to value %d\n",
+ resolution_y ));
+ }
+ else
+ resolution_y = FT_ABS( (FT_Short)prop->value.l );
}
if ( bsize->y_ppem == 0 )
diff --git a/modules/freetype2/src/pfr/Jamfile b/modules/freetype2/src/pfr/Jamfile
index a5b294b79..cb55a7ee8 100644
--- a/modules/freetype2/src/pfr/Jamfile
+++ b/modules/freetype2/src/pfr/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/pfr Jamfile
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/pfr/module.mk b/modules/freetype2/src/pfr/module.mk
index bf7808c72..27fec8e5f 100644
--- a/modules/freetype2/src/pfr/module.mk
+++ b/modules/freetype2/src/pfr/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/pfr/pfr.c b/modules/freetype2/src/pfr/pfr.c
index 1a433960a..1760882fc 100644
--- a/modules/freetype2/src/pfr/pfr.c
+++ b/modules/freetype2/src/pfr/pfr.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR driver component. */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -15,15 +15,16 @@
/* */
/***************************************************************************/
-#define FT_MAKE_OPTION_SINGLE_OBJECT
+#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
-#include "pfrload.c"
-#include "pfrgload.c"
#include "pfrcmap.c"
-#include "pfrobjs.c"
#include "pfrdrivr.c"
+#include "pfrgload.c"
+#include "pfrload.c"
+#include "pfrobjs.c"
#include "pfrsbit.c"
+
/* END */
diff --git a/modules/freetype2/src/pfr/pfrcmap.c b/modules/freetype2/src/pfr/pfrcmap.c
index f1f9c53b9..60643780a 100644
--- a/modules/freetype2/src/pfr/pfrcmap.c
+++ b/modules/freetype2/src/pfr/pfrcmap.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR cmap handling (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/pfrcmap.h b/modules/freetype2/src/pfr/pfrcmap.h
index 4a8a4d0a6..c70a0c83c 100644
--- a/modules/freetype2/src/pfr/pfrcmap.h
+++ b/modules/freetype2/src/pfr/pfrcmap.h
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR cmap handling (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/pfrdrivr.c b/modules/freetype2/src/pfr/pfrdrivr.c
index 2316cd3e7..6c7e50128 100644
--- a/modules/freetype2/src/pfr/pfrdrivr.c
+++ b/modules/freetype2/src/pfr/pfrdrivr.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR driver interface (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/pfrdrivr.h b/modules/freetype2/src/pfr/pfrdrivr.h
index 32b2d9eab..cab852789 100644
--- a/modules/freetype2/src/pfr/pfrdrivr.h
+++ b/modules/freetype2/src/pfr/pfrdrivr.h
@@ -4,7 +4,7 @@
/* */
/* High-level Type PFR driver interface (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/pfrerror.h b/modules/freetype2/src/pfr/pfrerror.h
index 9305f8fb5..7027c818e 100644
--- a/modules/freetype2/src/pfr/pfrerror.h
+++ b/modules/freetype2/src/pfr/pfrerror.h
@@ -4,7 +4,7 @@
/* */
/* PFR error codes (specification only). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/pfrgload.c b/modules/freetype2/src/pfr/pfrgload.c
index f9cd1f63b..b7990196b 100644
--- a/modules/freetype2/src/pfr/pfrgload.c
+++ b/modules/freetype2/src/pfr/pfrgload.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR glyph loader (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -756,8 +756,10 @@
count = glyph->num_subs - old_count;
- FT_TRACE4(( "compound glyph with %d elements (offset %lu):\n",
- count, offset ));
+ FT_TRACE4(( "compound glyph with %d element%s (offset %lu):\n",
+ count,
+ count == 1 ? "" : "s",
+ offset ));
/* now, load each individual glyph */
for ( n = 0; n < count; n++ )
@@ -810,7 +812,9 @@
/* proceed to next sub-glyph */
}
- FT_TRACE4(( "end compound glyph with %d elements\n", count ));
+ FT_TRACE4(( "end compound glyph with %d element%s\n",
+ count,
+ count == 1 ? "" : "s" ));
}
else
{
diff --git a/modules/freetype2/src/pfr/pfrgload.h b/modules/freetype2/src/pfr/pfrgload.h
index 908d4378a..01f48d770 100644
--- a/modules/freetype2/src/pfr/pfrgload.h
+++ b/modules/freetype2/src/pfr/pfrgload.h
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR glyph loader (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/pfrload.c b/modules/freetype2/src/pfr/pfrload.c
index aad759af1..2776da462 100644
--- a/modules/freetype2/src/pfr/pfrload.c
+++ b/modules/freetype2/src/pfr/pfrload.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR loader (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/pfrload.h b/modules/freetype2/src/pfr/pfrload.h
index 0f7a2bb23..36e809a76 100644
--- a/modules/freetype2/src/pfr/pfrload.h
+++ b/modules/freetype2/src/pfr/pfrload.h
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR loader (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/pfrobjs.c b/modules/freetype2/src/pfr/pfrobjs.c
index 0491d13df..737b97b5f 100644
--- a/modules/freetype2/src/pfr/pfrobjs.c
+++ b/modules/freetype2/src/pfr/pfrobjs.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR object methods (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -264,12 +264,6 @@
charmap.encoding = FT_ENCODING_UNICODE;
error = FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
-
-#if 0
- /* select default charmap */
- if ( pfrface->num_charmaps )
- pfrface->charmap = pfrface->charmaps[0];
-#endif
}
/* check whether we have loaded any kerning pairs */
diff --git a/modules/freetype2/src/pfr/pfrobjs.h b/modules/freetype2/src/pfr/pfrobjs.h
index 335aca885..59c709f58 100644
--- a/modules/freetype2/src/pfr/pfrobjs.h
+++ b/modules/freetype2/src/pfr/pfrobjs.h
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR object methods (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/pfrsbit.c b/modules/freetype2/src/pfr/pfrsbit.c
index f9dbf734b..ba909ddca 100644
--- a/modules/freetype2/src/pfr/pfrsbit.c
+++ b/modules/freetype2/src/pfr/pfrsbit.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR bitmap loader (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/pfrsbit.h b/modules/freetype2/src/pfr/pfrsbit.h
index 676ad55a9..07b27bc06 100644
--- a/modules/freetype2/src/pfr/pfrsbit.h
+++ b/modules/freetype2/src/pfr/pfrsbit.h
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR bitmap loader (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/pfrtypes.h b/modules/freetype2/src/pfr/pfrtypes.h
index bd6c2cd30..058d6aadc 100644
--- a/modules/freetype2/src/pfr/pfrtypes.h
+++ b/modules/freetype2/src/pfr/pfrtypes.h
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR data structures (specification only). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pfr/rules.mk b/modules/freetype2/src/pfr/rules.mk
index 39bb9e941..3acb79569 100644
--- a/modules/freetype2/src/pfr/rules.mk
+++ b/modules/freetype2/src/pfr/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/psaux/Jamfile b/modules/freetype2/src/psaux/Jamfile
index 9270eec68..a231d5974 100644
--- a/modules/freetype2/src/psaux/Jamfile
+++ b/modules/freetype2/src/psaux/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/psaux Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -22,6 +22,16 @@ SubDir FT2_TOP $(FT2_SRC_DIR) psaux ;
psobjs
t1cmap
t1decode
+ cffdecode
+ psarrst
+ psblues
+ pserror
+ psfont
+ psft
+ pshints
+ psintrp
+ psread
+ psstack
;
}
else
diff --git a/modules/freetype2/src/psaux/afmparse.c b/modules/freetype2/src/psaux/afmparse.c
index 9fb0ac0e2..0c33d5949 100644
--- a/modules/freetype2/src/psaux/afmparse.c
+++ b/modules/freetype2/src/psaux/afmparse.c
@@ -4,7 +4,7 @@
/* */
/* AFM parser (body). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,6 +20,8 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#ifndef T1_CONFIG_OPTION_NO_AFM
+
#include "afmparse.h"
#include "psconv.h"
@@ -973,5 +975,12 @@
return error;
}
+#else /* T1_CONFIG_OPTION_NO_AFM */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _afm_parse_dummy;
+
+#endif /* T1_CONFIG_OPTION_NO_AFM */
+
/* END */
diff --git a/modules/freetype2/src/psaux/afmparse.h b/modules/freetype2/src/psaux/afmparse.h
index 6d8b193ff..86f852a24 100644
--- a/modules/freetype2/src/psaux/afmparse.h
+++ b/modules/freetype2/src/psaux/afmparse.h
@@ -4,7 +4,7 @@
/* */
/* AFM parser (specification). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/psaux/cffdecode.c b/modules/freetype2/src/psaux/cffdecode.c
new file mode 100644
index 000000000..80d622c0e
--- /dev/null
+++ b/modules/freetype2/src/psaux/cffdecode.c
@@ -0,0 +1,2370 @@
+/***************************************************************************/
+/* */
+/* cffdecode.c */
+/* */
+/* PostScript CFF (Type 2) decoding routines (body). */
+/* */
+/* Copyright 2017-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_SERVICE_H
+#include FT_SERVICE_CFF_TABLE_LOAD_H
+
+#include "cffdecode.h"
+#include "psobjs.h"
+
+#include "psauxerr.h"
+
+
+ /*************************************************************************/
+ /* */
+ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+ /* messages during execution. */
+ /* */
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_cffdecode
+
+
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+
+ typedef enum CFF_Operator_
+ {
+ cff_op_unknown = 0,
+
+ cff_op_rmoveto,
+ cff_op_hmoveto,
+ cff_op_vmoveto,
+
+ cff_op_rlineto,
+ cff_op_hlineto,
+ cff_op_vlineto,
+
+ cff_op_rrcurveto,
+ cff_op_hhcurveto,
+ cff_op_hvcurveto,
+ cff_op_rcurveline,
+ cff_op_rlinecurve,
+ cff_op_vhcurveto,
+ cff_op_vvcurveto,
+
+ cff_op_flex,
+ cff_op_hflex,
+ cff_op_hflex1,
+ cff_op_flex1,
+
+ cff_op_endchar,
+
+ cff_op_hstem,
+ cff_op_vstem,
+ cff_op_hstemhm,
+ cff_op_vstemhm,
+
+ cff_op_hintmask,
+ cff_op_cntrmask,
+ cff_op_dotsection, /* deprecated, acts as no-op */
+
+ cff_op_abs,
+ cff_op_add,
+ cff_op_sub,
+ cff_op_div,
+ cff_op_neg,
+ cff_op_random,
+ cff_op_mul,
+ cff_op_sqrt,
+
+ cff_op_blend,
+
+ cff_op_drop,
+ cff_op_exch,
+ cff_op_index,
+ cff_op_roll,
+ cff_op_dup,
+
+ cff_op_put,
+ cff_op_get,
+ cff_op_store,
+ cff_op_load,
+
+ cff_op_and,
+ cff_op_or,
+ cff_op_not,
+ cff_op_eq,
+ cff_op_ifelse,
+
+ cff_op_callsubr,
+ cff_op_callgsubr,
+ cff_op_return,
+
+ /* Type 1 opcodes: invalid but seen in real life */
+ cff_op_hsbw,
+ cff_op_closepath,
+ cff_op_callothersubr,
+ cff_op_pop,
+ cff_op_seac,
+ cff_op_sbw,
+ cff_op_setcurrentpoint,
+
+ /* do not remove */
+ cff_op_max
+
+ } CFF_Operator;
+
+
+#define CFF_COUNT_CHECK_WIDTH 0x80
+#define CFF_COUNT_EXACT 0x40
+#define CFF_COUNT_CLEAR_STACK 0x20
+
+ /* count values which have the `CFF_COUNT_CHECK_WIDTH' flag set are */
+ /* used for checking the width and requested numbers of arguments */
+ /* only; they are set to zero afterwards */
+
+ /* the other two flags are informative only and unused currently */
+
+ static const FT_Byte cff_argument_counts[] =
+ {
+ 0, /* unknown */
+
+ 2 | CFF_COUNT_CHECK_WIDTH | CFF_COUNT_EXACT, /* rmoveto */
+ 1 | CFF_COUNT_CHECK_WIDTH | CFF_COUNT_EXACT,
+ 1 | CFF_COUNT_CHECK_WIDTH | CFF_COUNT_EXACT,
+
+ 0 | CFF_COUNT_CLEAR_STACK, /* rlineto */
+ 0 | CFF_COUNT_CLEAR_STACK,
+ 0 | CFF_COUNT_CLEAR_STACK,
+
+ 0 | CFF_COUNT_CLEAR_STACK, /* rrcurveto */
+ 0 | CFF_COUNT_CLEAR_STACK,
+ 0 | CFF_COUNT_CLEAR_STACK,
+ 0 | CFF_COUNT_CLEAR_STACK,
+ 0 | CFF_COUNT_CLEAR_STACK,
+ 0 | CFF_COUNT_CLEAR_STACK,
+ 0 | CFF_COUNT_CLEAR_STACK,
+
+ 13, /* flex */
+ 7,
+ 9,
+ 11,
+
+ 0 | CFF_COUNT_CHECK_WIDTH, /* endchar */
+
+ 2 | CFF_COUNT_CHECK_WIDTH, /* hstem */
+ 2 | CFF_COUNT_CHECK_WIDTH,
+ 2 | CFF_COUNT_CHECK_WIDTH,
+ 2 | CFF_COUNT_CHECK_WIDTH,
+
+ 0 | CFF_COUNT_CHECK_WIDTH, /* hintmask */
+ 0 | CFF_COUNT_CHECK_WIDTH, /* cntrmask */
+ 0, /* dotsection */
+
+ 1, /* abs */
+ 2,
+ 2,
+ 2,
+ 1,
+ 0,
+ 2,
+ 1,
+
+ 1, /* blend */
+
+ 1, /* drop */
+ 2,
+ 1,
+ 2,
+ 1,
+
+ 2, /* put */
+ 1,
+ 4,
+ 3,
+
+ 2, /* and */
+ 2,
+ 1,
+ 2,
+ 4,
+
+ 1, /* callsubr */
+ 1,
+ 0,
+
+ 2, /* hsbw */
+ 0,
+ 0,
+ 0,
+ 5, /* seac */
+ 4, /* sbw */
+ 2 /* setcurrentpoint */
+ };
+
+
+ static FT_Error
+ cff_operator_seac( CFF_Decoder* decoder,
+ FT_Pos asb,
+ FT_Pos adx,
+ FT_Pos ady,
+ FT_Int bchar,
+ FT_Int achar )
+ {
+ FT_Error error;
+ CFF_Builder* builder = &decoder->builder;
+ FT_Int bchar_index, achar_index;
+ TT_Face face = decoder->builder.face;
+ FT_Vector left_bearing, advance;
+ FT_Byte* charstring;
+ FT_ULong charstring_len;
+ FT_Pos glyph_width;
+
+
+ if ( decoder->seac )
+ {
+ FT_ERROR(( "cff_operator_seac: invalid nested seac\n" ));
+ return FT_THROW( Syntax_Error );
+ }
+
+ adx += decoder->builder.left_bearing.x;
+ ady += decoder->builder.left_bearing.y;
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ /* Incremental fonts don't necessarily have valid charsets. */
+ /* They use the character code, not the glyph index, in this case. */
+ if ( face->root.internal->incremental_interface )
+ {
+ bchar_index = bchar;
+ achar_index = achar;
+ }
+ else
+#endif /* FT_CONFIG_OPTION_INCREMENTAL */
+ {
+ CFF_Font cff = (CFF_Font)(face->extra.data);
+
+
+ bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar );
+ achar_index = cff_lookup_glyph_by_stdcharcode( cff, achar );
+ }
+
+ if ( bchar_index < 0 || achar_index < 0 )
+ {
+ FT_ERROR(( "cff_operator_seac:"
+ " invalid seac character code arguments\n" ));
+ return FT_THROW( Syntax_Error );
+ }
+
+ /* If we are trying to load a composite glyph, do not load the */
+ /* accent character and return the array of subglyphs. */
+ if ( builder->no_recurse )
+ {
+ FT_GlyphSlot glyph = (FT_GlyphSlot)builder->glyph;
+ FT_GlyphLoader loader = glyph->internal->loader;
+ FT_SubGlyph subg;
+
+
+ /* reallocate subglyph array if necessary */
+ error = FT_GlyphLoader_CheckSubGlyphs( loader, 2 );
+ if ( error )
+ goto Exit;
+
+ subg = loader->current.subglyphs;
+
+ /* subglyph 0 = base character */
+ subg->index = bchar_index;
+ subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES |
+ FT_SUBGLYPH_FLAG_USE_MY_METRICS;
+ subg->arg1 = 0;
+ subg->arg2 = 0;
+ subg++;
+
+ /* subglyph 1 = accent character */
+ subg->index = achar_index;
+ subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES;
+ subg->arg1 = (FT_Int)( adx >> 16 );
+ subg->arg2 = (FT_Int)( ady >> 16 );
+
+ /* set up remaining glyph fields */
+ glyph->num_subglyphs = 2;
+ glyph->subglyphs = loader->base.subglyphs;
+ glyph->format = FT_GLYPH_FORMAT_COMPOSITE;
+
+ loader->current.num_subglyphs = 2;
+ }
+
+ FT_GlyphLoader_Prepare( builder->loader );
+
+ /* First load `bchar' in builder */
+ error = decoder->get_glyph_callback( face, (FT_UInt)bchar_index,
+ &charstring, &charstring_len );
+ if ( !error )
+ {
+ /* the seac operator must not be nested */
+ decoder->seac = TRUE;
+ error = cff_decoder_parse_charstrings( decoder, charstring,
+ charstring_len, 0 );
+ decoder->seac = FALSE;
+
+ decoder->free_glyph_callback( face, &charstring, charstring_len );
+
+ if ( error )
+ goto Exit;
+ }
+
+ /* Save the left bearing, advance and glyph width of the base */
+ /* character as they will be erased by the next load. */
+
+ left_bearing = builder->left_bearing;
+ advance = builder->advance;
+ glyph_width = decoder->glyph_width;
+
+ builder->left_bearing.x = 0;
+ builder->left_bearing.y = 0;
+
+ builder->pos_x = adx - asb;
+ builder->pos_y = ady;
+
+ /* Now load `achar' on top of the base outline. */
+ error = decoder->get_glyph_callback( face, (FT_UInt)achar_index,
+ &charstring, &charstring_len );
+ if ( !error )
+ {
+ /* the seac operator must not be nested */
+ decoder->seac = TRUE;
+ error = cff_decoder_parse_charstrings( decoder, charstring,
+ charstring_len, 0 );
+ decoder->seac = FALSE;
+
+ decoder->free_glyph_callback( face, &charstring, charstring_len );
+
+ if ( error )
+ goto Exit;
+ }
+
+ /* Restore the left side bearing, advance and glyph width */
+ /* of the base character. */
+ builder->left_bearing = left_bearing;
+ builder->advance = advance;
+ decoder->glyph_width = glyph_width;
+
+ builder->pos_x = 0;
+ builder->pos_y = 0;
+
+ Exit:
+ return error;
+ }
+
+#endif /* CFF_CONFIG_OPTION_OLD_ENGINE */
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+ /********** *********/
+ /********** *********/
+ /********** GENERIC CHARSTRING PARSING *********/
+ /********** *********/
+ /********** *********/
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* cff_compute_bias */
+ /* */
+ /* <Description> */
+ /* Computes the bias value in dependence of the number of glyph */
+ /* subroutines. */
+ /* */
+ /* <Input> */
+ /* in_charstring_type :: The `CharstringType' value of the top DICT */
+ /* dictionary. */
+ /* */
+ /* num_subrs :: The number of glyph subroutines. */
+ /* */
+ /* <Return> */
+ /* The bias value. */
+ static FT_Int
+ cff_compute_bias( FT_Int in_charstring_type,
+ FT_UInt num_subrs )
+ {
+ FT_Int result;
+
+
+ if ( in_charstring_type == 1 )
+ result = 0;
+ else if ( num_subrs < 1240 )
+ result = 107;
+ else if ( num_subrs < 33900U )
+ result = 1131;
+ else
+ result = 32768U;
+
+ return result;
+ }
+
+
+ FT_LOCAL_DEF( FT_Int )
+ cff_lookup_glyph_by_stdcharcode( CFF_Font cff,
+ FT_Int charcode )
+ {
+ FT_UInt n;
+ FT_UShort glyph_sid;
+
+ FT_Service_CFFLoad cffload;
+
+
+ /* CID-keyed fonts don't have glyph names */
+ if ( !cff->charset.sids )
+ return -1;
+
+ /* check range of standard char code */
+ if ( charcode < 0 || charcode > 255 )
+ return -1;
+
+#if 0
+ /* retrieve cffload from list of current modules */
+ FT_Service_CFFLoad cffload;
+
+
+ FT_FACE_FIND_GLOBAL_SERVICE( face, cffload, CFF_LOAD );
+ if ( !cffload )
+ {
+ FT_ERROR(( "cff_lookup_glyph_by_stdcharcode:"
+ " the `cffload' module is not available\n" ));
+ return FT_THROW( Unimplemented_Feature );
+ }
+#endif
+
+ cffload = (FT_Service_CFFLoad)cff->cffload;
+
+ /* Get code to SID mapping from `cff_standard_encoding'. */
+ glyph_sid = cffload->get_standard_encoding( (FT_UInt)charcode );
+
+ for ( n = 0; n < cff->num_glyphs; n++ )
+ {
+ if ( cff->charset.sids[n] == glyph_sid )
+ return (FT_Int)n;
+ }
+
+ return -1;
+ }
+
+
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* cff_decoder_parse_charstrings */
+ /* */
+ /* <Description> */
+ /* Parses a given Type 2 charstrings program. */
+ /* */
+ /* <InOut> */
+ /* decoder :: The current Type 1 decoder. */
+ /* */
+ /* <Input> */
+ /* charstring_base :: The base of the charstring stream. */
+ /* */
+ /* charstring_len :: The length in bytes of the charstring stream. */
+ /* */
+ /* in_dict :: Set to 1 if function is called from top or */
+ /* private DICT (needed for Multiple Master CFFs). */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ FT_LOCAL_DEF( FT_Error )
+ cff_decoder_parse_charstrings( CFF_Decoder* decoder,
+ FT_Byte* charstring_base,
+ FT_ULong charstring_len,
+ FT_Bool in_dict )
+ {
+ FT_Error error;
+ CFF_Decoder_Zone* zone;
+ FT_Byte* ip;
+ FT_Byte* limit;
+ CFF_Builder* builder = &decoder->builder;
+ FT_Pos x, y;
+ FT_Fixed* stack;
+ FT_Int charstring_type =
+ decoder->cff->top_font.font_dict.charstring_type;
+ FT_UShort num_designs =
+ decoder->cff->top_font.font_dict.num_designs;
+ FT_UShort num_axes =
+ decoder->cff->top_font.font_dict.num_axes;
+
+ T2_Hints_Funcs hinter;
+
+
+ /* set default width */
+ decoder->num_hints = 0;
+ decoder->read_width = 1;
+
+ /* initialize the decoder */
+ decoder->top = decoder->stack;
+ decoder->zone = decoder->zones;
+ zone = decoder->zones;
+ stack = decoder->top;
+
+ hinter = (T2_Hints_Funcs)builder->hints_funcs;
+
+ builder->path_begun = 0;
+
+ zone->base = charstring_base;
+ limit = zone->limit = charstring_base + charstring_len;
+ ip = zone->cursor = zone->base;
+
+ error = FT_Err_Ok;
+
+ x = builder->pos_x;
+ y = builder->pos_y;
+
+ /* begin hints recording session, if any */
+ if ( hinter )
+ hinter->open( hinter->hints );
+
+ /* now execute loop */
+ while ( ip < limit )
+ {
+ CFF_Operator op;
+ FT_Byte v;
+
+
+ /********************************************************************/
+ /* */
+ /* Decode operator or operand */
+ /* */
+ v = *ip++;
+ if ( v >= 32 || v == 28 )
+ {
+ FT_Int shift = 16;
+ FT_Int32 val;
+
+
+ /* this is an operand, push it on the stack */
+
+ /* if we use shifts, all computations are done with unsigned */
+ /* values; the conversion to a signed value is the last step */
+ if ( v == 28 )
+ {
+ if ( ip + 1 >= limit )
+ goto Syntax_Error;
+ val = (FT_Short)( ( (FT_UShort)ip[0] << 8 ) | ip[1] );
+ ip += 2;
+ }
+ else if ( v < 247 )
+ val = (FT_Int32)v - 139;
+ else if ( v < 251 )
+ {
+ if ( ip >= limit )
+ goto Syntax_Error;
+ val = ( (FT_Int32)v - 247 ) * 256 + *ip++ + 108;
+ }
+ else if ( v < 255 )
+ {
+ if ( ip >= limit )
+ goto Syntax_Error;
+ val = -( (FT_Int32)v - 251 ) * 256 - *ip++ - 108;
+ }
+ else
+ {
+ if ( ip + 3 >= limit )
+ goto Syntax_Error;
+ val = (FT_Int32)( ( (FT_UInt32)ip[0] << 24 ) |
+ ( (FT_UInt32)ip[1] << 16 ) |
+ ( (FT_UInt32)ip[2] << 8 ) |
+ (FT_UInt32)ip[3] );
+ ip += 4;
+ if ( charstring_type == 2 )
+ shift = 0;
+ }
+ if ( decoder->top - stack >= CFF_MAX_OPERANDS )
+ goto Stack_Overflow;
+
+ val = (FT_Int32)( (FT_UInt32)val << shift );
+ *decoder->top++ = val;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( !( val & 0xFFFFL ) )
+ FT_TRACE4(( " %hd", (FT_Short)( (FT_UInt32)val >> 16 ) ));
+ else
+ FT_TRACE4(( " %.5f", val / 65536.0 ));
+#endif
+
+ }
+ else
+ {
+ /* The specification says that normally arguments are to be taken */
+ /* from the bottom of the stack. However, this seems not to be */
+ /* correct, at least for Acroread 7.0.8 on GNU/Linux: It pops the */
+ /* arguments similar to a PS interpreter. */
+
+ FT_Fixed* args = decoder->top;
+ FT_Int num_args = (FT_Int)( args - decoder->stack );
+ FT_Int req_args;
+
+
+ /* find operator */
+ op = cff_op_unknown;
+
+ switch ( v )
+ {
+ case 1:
+ op = cff_op_hstem;
+ break;
+ case 3:
+ op = cff_op_vstem;
+ break;
+ case 4:
+ op = cff_op_vmoveto;
+ break;
+ case 5:
+ op = cff_op_rlineto;
+ break;
+ case 6:
+ op = cff_op_hlineto;
+ break;
+ case 7:
+ op = cff_op_vlineto;
+ break;
+ case 8:
+ op = cff_op_rrcurveto;
+ break;
+ case 9:
+ op = cff_op_closepath;
+ break;
+ case 10:
+ op = cff_op_callsubr;
+ break;
+ case 11:
+ op = cff_op_return;
+ break;
+ case 12:
+ if ( ip >= limit )
+ goto Syntax_Error;
+ v = *ip++;
+
+ switch ( v )
+ {
+ case 0:
+ op = cff_op_dotsection;
+ break;
+ case 1: /* this is actually the Type1 vstem3 operator */
+ op = cff_op_vstem;
+ break;
+ case 2: /* this is actually the Type1 hstem3 operator */
+ op = cff_op_hstem;
+ break;
+ case 3:
+ op = cff_op_and;
+ break;
+ case 4:
+ op = cff_op_or;
+ break;
+ case 5:
+ op = cff_op_not;
+ break;
+ case 6:
+ op = cff_op_seac;
+ break;
+ case 7:
+ op = cff_op_sbw;
+ break;
+ case 8:
+ op = cff_op_store;
+ break;
+ case 9:
+ op = cff_op_abs;
+ break;
+ case 10:
+ op = cff_op_add;
+ break;
+ case 11:
+ op = cff_op_sub;
+ break;
+ case 12:
+ op = cff_op_div;
+ break;
+ case 13:
+ op = cff_op_load;
+ break;
+ case 14:
+ op = cff_op_neg;
+ break;
+ case 15:
+ op = cff_op_eq;
+ break;
+ case 16:
+ op = cff_op_callothersubr;
+ break;
+ case 17:
+ op = cff_op_pop;
+ break;
+ case 18:
+ op = cff_op_drop;
+ break;
+ case 20:
+ op = cff_op_put;
+ break;
+ case 21:
+ op = cff_op_get;
+ break;
+ case 22:
+ op = cff_op_ifelse;
+ break;
+ case 23:
+ op = cff_op_random;
+ break;
+ case 24:
+ op = cff_op_mul;
+ break;
+ case 26:
+ op = cff_op_sqrt;
+ break;
+ case 27:
+ op = cff_op_dup;
+ break;
+ case 28:
+ op = cff_op_exch;
+ break;
+ case 29:
+ op = cff_op_index;
+ break;
+ case 30:
+ op = cff_op_roll;
+ break;
+ case 33:
+ op = cff_op_setcurrentpoint;
+ break;
+ case 34:
+ op = cff_op_hflex;
+ break;
+ case 35:
+ op = cff_op_flex;
+ break;
+ case 36:
+ op = cff_op_hflex1;
+ break;
+ case 37:
+ op = cff_op_flex1;
+ break;
+ default:
+ FT_TRACE4(( " unknown op (12, %d)\n", v ));
+ break;
+ }
+ break;
+ case 13:
+ op = cff_op_hsbw;
+ break;
+ case 14:
+ op = cff_op_endchar;
+ break;
+ case 16:
+ op = cff_op_blend;
+ break;
+ case 18:
+ op = cff_op_hstemhm;
+ break;
+ case 19:
+ op = cff_op_hintmask;
+ break;
+ case 20:
+ op = cff_op_cntrmask;
+ break;
+ case 21:
+ op = cff_op_rmoveto;
+ break;
+ case 22:
+ op = cff_op_hmoveto;
+ break;
+ case 23:
+ op = cff_op_vstemhm;
+ break;
+ case 24:
+ op = cff_op_rcurveline;
+ break;
+ case 25:
+ op = cff_op_rlinecurve;
+ break;
+ case 26:
+ op = cff_op_vvcurveto;
+ break;
+ case 27:
+ op = cff_op_hhcurveto;
+ break;
+ case 29:
+ op = cff_op_callgsubr;
+ break;
+ case 30:
+ op = cff_op_vhcurveto;
+ break;
+ case 31:
+ op = cff_op_hvcurveto;
+ break;
+ default:
+ FT_TRACE4(( " unknown op (%d)\n", v ));
+ break;
+ }
+
+ if ( op == cff_op_unknown )
+ continue;
+
+ /* in Multiple Master CFFs, T2 charstrings can appear in */
+ /* dictionaries, but some operators are prohibited */
+ if ( in_dict )
+ {
+ switch ( op )
+ {
+ case cff_op_hstem:
+ case cff_op_vstem:
+ case cff_op_vmoveto:
+ case cff_op_rlineto:
+ case cff_op_hlineto:
+ case cff_op_vlineto:
+ case cff_op_rrcurveto:
+ case cff_op_hstemhm:
+ case cff_op_hintmask:
+ case cff_op_cntrmask:
+ case cff_op_rmoveto:
+ case cff_op_hmoveto:
+ case cff_op_vstemhm:
+ case cff_op_rcurveline:
+ case cff_op_rlinecurve:
+ case cff_op_vvcurveto:
+ case cff_op_hhcurveto:
+ case cff_op_vhcurveto:
+ case cff_op_hvcurveto:
+ case cff_op_hflex:
+ case cff_op_flex:
+ case cff_op_hflex1:
+ case cff_op_flex1:
+ case cff_op_callsubr:
+ case cff_op_callgsubr:
+ goto MM_Error;
+
+ default:
+ break;
+ }
+ }
+
+ /* check arguments */
+ req_args = cff_argument_counts[op];
+ if ( req_args & CFF_COUNT_CHECK_WIDTH )
+ {
+ if ( num_args > 0 && decoder->read_width )
+ {
+ /* If `nominal_width' is non-zero, the number is really a */
+ /* difference against `nominal_width'. Else, the number here */
+ /* is truly a width, not a difference against `nominal_width'. */
+ /* If the font does not set `nominal_width', then */
+ /* `nominal_width' defaults to zero, and so we can set */
+ /* `glyph_width' to `nominal_width' plus number on the stack */
+ /* -- for either case. */
+
+ FT_Int set_width_ok;
+
+
+ switch ( op )
+ {
+ case cff_op_hmoveto:
+ case cff_op_vmoveto:
+ set_width_ok = num_args & 2;
+ break;
+
+ case cff_op_hstem:
+ case cff_op_vstem:
+ case cff_op_hstemhm:
+ case cff_op_vstemhm:
+ case cff_op_rmoveto:
+ case cff_op_hintmask:
+ case cff_op_cntrmask:
+ set_width_ok = num_args & 1;
+ break;
+
+ case cff_op_endchar:
+ /* If there is a width specified for endchar, we either have */
+ /* 1 argument or 5 arguments. We like to argue. */
+ set_width_ok = in_dict
+ ? 0
+ : ( ( num_args == 5 ) || ( num_args == 1 ) );
+ break;
+
+ default:
+ set_width_ok = 0;
+ break;
+ }
+
+ if ( set_width_ok )
+ {
+ decoder->glyph_width = decoder->nominal_width +
+ ( stack[0] >> 16 );
+
+ if ( decoder->width_only )
+ {
+ /* we only want the advance width; stop here */
+ break;
+ }
+
+ /* Consumed an argument. */
+ num_args--;
+ }
+ }
+
+ decoder->read_width = 0;
+ req_args = 0;
+ }
+
+ req_args &= 0x000F;
+ if ( num_args < req_args )
+ goto Stack_Underflow;
+ args -= req_args;
+ num_args -= req_args;
+
+ /* At this point, `args' points to the first argument of the */
+ /* operand in case `req_args' isn't zero. Otherwise, we have */
+ /* to adjust `args' manually. */
+
+ /* Note that we only pop arguments from the stack which we */
+ /* really need and can digest so that we can continue in case */
+ /* of superfluous stack elements. */
+
+ switch ( op )
+ {
+ case cff_op_hstem:
+ case cff_op_vstem:
+ case cff_op_hstemhm:
+ case cff_op_vstemhm:
+ /* the number of arguments is always even here */
+ FT_TRACE4((
+ op == cff_op_hstem ? " hstem\n" :
+ ( op == cff_op_vstem ? " vstem\n" :
+ ( op == cff_op_hstemhm ? " hstemhm\n" : " vstemhm\n" ) ) ));
+
+ if ( hinter )
+ hinter->stems( hinter->hints,
+ ( op == cff_op_hstem || op == cff_op_hstemhm ),
+ num_args / 2,
+ args - ( num_args & ~1 ) );
+
+ decoder->num_hints += num_args / 2;
+ args = stack;
+ break;
+
+ case cff_op_hintmask:
+ case cff_op_cntrmask:
+ FT_TRACE4(( op == cff_op_hintmask ? " hintmask" : " cntrmask" ));
+
+ /* implement vstem when needed -- */
+ /* the specification doesn't say it, but this also works */
+ /* with the 'cntrmask' operator */
+ /* */
+ if ( num_args > 0 )
+ {
+ if ( hinter )
+ hinter->stems( hinter->hints,
+ 0,
+ num_args / 2,
+ args - ( num_args & ~1 ) );
+
+ decoder->num_hints += num_args / 2;
+ }
+
+ /* In a valid charstring there must be at least one byte */
+ /* after `hintmask' or `cntrmask' (e.g., for a `return' */
+ /* instruction). Additionally, there must be space for */
+ /* `num_hints' bits. */
+
+ if ( ( ip + ( ( decoder->num_hints + 7 ) >> 3 ) ) >= limit )
+ goto Syntax_Error;
+
+ if ( hinter )
+ {
+ if ( op == cff_op_hintmask )
+ hinter->hintmask( hinter->hints,
+ (FT_UInt)builder->current->n_points,
+ (FT_UInt)decoder->num_hints,
+ ip );
+ else
+ hinter->counter( hinter->hints,
+ (FT_UInt)decoder->num_hints,
+ ip );
+ }
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ FT_UInt maskbyte;
+
+
+ FT_TRACE4(( " (maskbytes:" ));
+
+ for ( maskbyte = 0;
+ maskbyte < (FT_UInt)( ( decoder->num_hints + 7 ) >> 3 );
+ maskbyte++, ip++ )
+ FT_TRACE4(( " 0x%02X", *ip ));
+
+ FT_TRACE4(( ")\n" ));
+ }
+#else
+ ip += ( decoder->num_hints + 7 ) >> 3;
+#endif
+ args = stack;
+ break;
+
+ case cff_op_rmoveto:
+ FT_TRACE4(( " rmoveto\n" ));
+
+ cff_builder_close_contour( builder );
+ builder->path_begun = 0;
+ x = ADD_LONG( x, args[-2] );
+ y = ADD_LONG( y, args[-1] );
+ args = stack;
+ break;
+
+ case cff_op_vmoveto:
+ FT_TRACE4(( " vmoveto\n" ));
+
+ cff_builder_close_contour( builder );
+ builder->path_begun = 0;
+ y = ADD_LONG( y, args[-1] );
+ args = stack;
+ break;
+
+ case cff_op_hmoveto:
+ FT_TRACE4(( " hmoveto\n" ));
+
+ cff_builder_close_contour( builder );
+ builder->path_begun = 0;
+ x = ADD_LONG( x, args[-1] );
+ args = stack;
+ break;
+
+ case cff_op_rlineto:
+ FT_TRACE4(( " rlineto\n" ));
+
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, num_args / 2 ) )
+ goto Fail;
+
+ if ( num_args < 2 )
+ goto Stack_Underflow;
+
+ args -= num_args & ~1;
+ while ( args < decoder->top )
+ {
+ x = ADD_LONG( x, args[0] );
+ y = ADD_LONG( y, args[1] );
+ cff_builder_add_point( builder, x, y, 1 );
+ args += 2;
+ }
+ args = stack;
+ break;
+
+ case cff_op_hlineto:
+ case cff_op_vlineto:
+ {
+ FT_Int phase = ( op == cff_op_hlineto );
+
+
+ FT_TRACE4(( op == cff_op_hlineto ? " hlineto\n"
+ : " vlineto\n" ));
+
+ if ( num_args < 0 )
+ goto Stack_Underflow;
+
+ /* there exist subsetted fonts (found in PDFs) */
+ /* which call `hlineto' without arguments */
+ if ( num_args == 0 )
+ break;
+
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, num_args ) )
+ goto Fail;
+
+ args = stack;
+ while ( args < decoder->top )
+ {
+ if ( phase )
+ x = ADD_LONG( x, args[0] );
+ else
+ y = ADD_LONG( y, args[0] );
+
+ if ( cff_builder_add_point1( builder, x, y ) )
+ goto Fail;
+
+ args++;
+ phase ^= 1;
+ }
+ args = stack;
+ }
+ break;
+
+ case cff_op_rrcurveto:
+ {
+ FT_Int nargs;
+
+
+ FT_TRACE4(( " rrcurveto\n" ));
+
+ if ( num_args < 6 )
+ goto Stack_Underflow;
+
+ nargs = num_args - num_args % 6;
+
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, nargs / 2 ) )
+ goto Fail;
+
+ args -= nargs;
+ while ( args < decoder->top )
+ {
+ x = ADD_LONG( x, args[0] );
+ y = ADD_LONG( y, args[1] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[2] );
+ y = ADD_LONG( y, args[3] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[4] );
+ y = ADD_LONG( y, args[5] );
+ cff_builder_add_point( builder, x, y, 1 );
+
+ args += 6;
+ }
+ args = stack;
+ }
+ break;
+
+ case cff_op_vvcurveto:
+ {
+ FT_Int nargs;
+
+
+ FT_TRACE4(( " vvcurveto\n" ));
+
+ if ( num_args < 4 )
+ goto Stack_Underflow;
+
+ /* if num_args isn't of the form 4n or 4n+1, */
+ /* we enforce it by clearing the second bit */
+
+ nargs = num_args & ~2;
+
+ if ( cff_builder_start_point( builder, x, y ) )
+ goto Fail;
+
+ args -= nargs;
+
+ if ( nargs & 1 )
+ {
+ x = ADD_LONG( x, args[0] );
+ args++;
+ nargs--;
+ }
+
+ if ( cff_check_points( builder, 3 * ( nargs / 4 ) ) )
+ goto Fail;
+
+ while ( args < decoder->top )
+ {
+ y = ADD_LONG( y, args[0] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[1] );
+ y = ADD_LONG( y, args[2] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ y = ADD_LONG( y, args[3] );
+ cff_builder_add_point( builder, x, y, 1 );
+
+ args += 4;
+ }
+ args = stack;
+ }
+ break;
+
+ case cff_op_hhcurveto:
+ {
+ FT_Int nargs;
+
+
+ FT_TRACE4(( " hhcurveto\n" ));
+
+ if ( num_args < 4 )
+ goto Stack_Underflow;
+
+ /* if num_args isn't of the form 4n or 4n+1, */
+ /* we enforce it by clearing the second bit */
+
+ nargs = num_args & ~2;
+
+ if ( cff_builder_start_point( builder, x, y ) )
+ goto Fail;
+
+ args -= nargs;
+ if ( nargs & 1 )
+ {
+ y = ADD_LONG( y, args[0] );
+ args++;
+ nargs--;
+ }
+
+ if ( cff_check_points( builder, 3 * ( nargs / 4 ) ) )
+ goto Fail;
+
+ while ( args < decoder->top )
+ {
+ x = ADD_LONG( x, args[0] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[1] );
+ y = ADD_LONG( y, args[2] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[3] );
+ cff_builder_add_point( builder, x, y, 1 );
+
+ args += 4;
+ }
+ args = stack;
+ }
+ break;
+
+ case cff_op_vhcurveto:
+ case cff_op_hvcurveto:
+ {
+ FT_Int phase;
+ FT_Int nargs;
+
+
+ FT_TRACE4(( op == cff_op_vhcurveto ? " vhcurveto\n"
+ : " hvcurveto\n" ));
+
+ if ( cff_builder_start_point( builder, x, y ) )
+ goto Fail;
+
+ if ( num_args < 4 )
+ goto Stack_Underflow;
+
+ /* if num_args isn't of the form 8n, 8n+1, 8n+4, or 8n+5, */
+ /* we enforce it by clearing the second bit */
+
+ nargs = num_args & ~2;
+
+ args -= nargs;
+ if ( cff_check_points( builder, ( nargs / 4 ) * 3 ) )
+ goto Stack_Underflow;
+
+ phase = ( op == cff_op_hvcurveto );
+
+ while ( nargs >= 4 )
+ {
+ nargs -= 4;
+ if ( phase )
+ {
+ x = ADD_LONG( x, args[0] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[1] );
+ y = ADD_LONG( y, args[2] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ y = ADD_LONG( y, args[3] );
+ if ( nargs == 1 )
+ x = ADD_LONG( x, args[4] );
+ cff_builder_add_point( builder, x, y, 1 );
+ }
+ else
+ {
+ y = ADD_LONG( y, args[0] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[1] );
+ y = ADD_LONG( y, args[2] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[3] );
+ if ( nargs == 1 )
+ y = ADD_LONG( y, args[4] );
+ cff_builder_add_point( builder, x, y, 1 );
+ }
+ args += 4;
+ phase ^= 1;
+ }
+ args = stack;
+ }
+ break;
+
+ case cff_op_rlinecurve:
+ {
+ FT_Int num_lines;
+ FT_Int nargs;
+
+
+ FT_TRACE4(( " rlinecurve\n" ));
+
+ if ( num_args < 8 )
+ goto Stack_Underflow;
+
+ nargs = num_args & ~1;
+ num_lines = ( nargs - 6 ) / 2;
+
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, num_lines + 3 ) )
+ goto Fail;
+
+ args -= nargs;
+
+ /* first, add the line segments */
+ while ( num_lines > 0 )
+ {
+ x = ADD_LONG( x, args[0] );
+ y = ADD_LONG( y, args[1] );
+ cff_builder_add_point( builder, x, y, 1 );
+
+ args += 2;
+ num_lines--;
+ }
+
+ /* then the curve */
+ x = ADD_LONG( x, args[0] );
+ y = ADD_LONG( y, args[1] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[2] );
+ y = ADD_LONG( y, args[3] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[4] );
+ y = ADD_LONG( y, args[5] );
+ cff_builder_add_point( builder, x, y, 1 );
+
+ args = stack;
+ }
+ break;
+
+ case cff_op_rcurveline:
+ {
+ FT_Int num_curves;
+ FT_Int nargs;
+
+
+ FT_TRACE4(( " rcurveline\n" ));
+
+ if ( num_args < 8 )
+ goto Stack_Underflow;
+
+ nargs = num_args - 2;
+ nargs = nargs - nargs % 6 + 2;
+ num_curves = ( nargs - 2 ) / 6;
+
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, num_curves * 3 + 2 ) )
+ goto Fail;
+
+ args -= nargs;
+
+ /* first, add the curves */
+ while ( num_curves > 0 )
+ {
+ x = ADD_LONG( x, args[0] );
+ y = ADD_LONG( y, args[1] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[2] );
+ y = ADD_LONG( y, args[3] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ x = ADD_LONG( x, args[4] );
+ y = ADD_LONG( y, args[5] );
+ cff_builder_add_point( builder, x, y, 1 );
+
+ args += 6;
+ num_curves--;
+ }
+
+ /* then the final line */
+ x = ADD_LONG( x, args[0] );
+ y = ADD_LONG( y, args[1] );
+ cff_builder_add_point( builder, x, y, 1 );
+
+ args = stack;
+ }
+ break;
+
+ case cff_op_hflex1:
+ {
+ FT_Pos start_y;
+
+
+ FT_TRACE4(( " hflex1\n" ));
+
+ /* adding five more points: 4 control points, 1 on-curve point */
+ /* -- make sure we have enough space for the start point if it */
+ /* needs to be added */
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, 6 ) )
+ goto Fail;
+
+ /* record the starting point's y position for later use */
+ start_y = y;
+
+ /* first control point */
+ x = ADD_LONG( x, args[0] );
+ y = ADD_LONG( y, args[1] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ /* second control point */
+ x = ADD_LONG( x, args[2] );
+ y = ADD_LONG( y, args[3] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ /* join point; on curve, with y-value the same as the last */
+ /* control point's y-value */
+ x = ADD_LONG( x, args[4] );
+ cff_builder_add_point( builder, x, y, 1 );
+
+ /* third control point, with y-value the same as the join */
+ /* point's y-value */
+ x = ADD_LONG( x, args[5] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ /* fourth control point */
+ x = ADD_LONG( x, args[6] );
+ y = ADD_LONG( y, args[7] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ /* ending point, with y-value the same as the start */
+ x = ADD_LONG( x, args[8] );
+ y = start_y;
+ cff_builder_add_point( builder, x, y, 1 );
+
+ args = stack;
+ break;
+ }
+
+ case cff_op_hflex:
+ {
+ FT_Pos start_y;
+
+
+ FT_TRACE4(( " hflex\n" ));
+
+ /* adding six more points; 4 control points, 2 on-curve points */
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, 6 ) )
+ goto Fail;
+
+ /* record the starting point's y-position for later use */
+ start_y = y;
+
+ /* first control point */
+ x = ADD_LONG( x, args[0] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ /* second control point */
+ x = ADD_LONG( x, args[1] );
+ y = ADD_LONG( y, args[2] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ /* join point; on curve, with y-value the same as the last */
+ /* control point's y-value */
+ x = ADD_LONG( x, args[3] );
+ cff_builder_add_point( builder, x, y, 1 );
+
+ /* third control point, with y-value the same as the join */
+ /* point's y-value */
+ x = ADD_LONG( x, args[4] );
+ cff_builder_add_point( builder, x, y, 0 );
+
+ /* fourth control point */
+ x = ADD_LONG( x, args[5] );
+ y = start_y;
+ cff_builder_add_point( builder, x, y, 0 );
+
+ /* ending point, with y-value the same as the start point's */
+ /* y-value -- we don't add this point, though */
+ x = ADD_LONG( x, args[6] );
+ cff_builder_add_point( builder, x, y, 1 );
+
+ args = stack;
+ break;
+ }
+
+ case cff_op_flex1:
+ {
+ FT_Pos start_x, start_y; /* record start x, y values for */
+ /* alter use */
+ FT_Fixed dx = 0, dy = 0; /* used in horizontal/vertical */
+ /* algorithm below */
+ FT_Int horizontal, count;
+ FT_Fixed* temp;
+
+
+ FT_TRACE4(( " flex1\n" ));
+
+ /* adding six more points; 4 control points, 2 on-curve points */
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, 6 ) )
+ goto Fail;
+
+ /* record the starting point's x, y position for later use */
+ start_x = x;
+ start_y = y;
+
+ /* XXX: figure out whether this is supposed to be a horizontal */
+ /* or vertical flex; the Type 2 specification is vague... */
+
+ temp = args;
+
+ /* grab up to the last argument */
+ for ( count = 5; count > 0; count-- )
+ {
+ dx = ADD_LONG( dx, temp[0] );
+ dy = ADD_LONG( dy, temp[1] );
+ temp += 2;
+ }
+
+ if ( dx < 0 )
+ dx = -dx;
+ if ( dy < 0 )
+ dy = -dy;
+
+ /* strange test, but here it is... */
+ horizontal = ( dx > dy );
+
+ for ( count = 5; count > 0; count-- )
+ {
+ x = ADD_LONG( x, args[0] );
+ y = ADD_LONG( y, args[1] );
+ cff_builder_add_point( builder, x, y,
+ (FT_Bool)( count == 3 ) );
+ args += 2;
+ }
+
+ /* is last operand an x- or y-delta? */
+ if ( horizontal )
+ {
+ x = ADD_LONG( x, args[0] );
+ y = start_y;
+ }
+ else
+ {
+ x = start_x;
+ y = ADD_LONG( y, args[0] );
+ }
+
+ cff_builder_add_point( builder, x, y, 1 );
+
+ args = stack;
+ break;
+ }
+
+ case cff_op_flex:
+ {
+ FT_UInt count;
+
+
+ FT_TRACE4(( " flex\n" ));
+
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, 6 ) )
+ goto Fail;
+
+ for ( count = 6; count > 0; count-- )
+ {
+ x = ADD_LONG( x, args[0] );
+ y = ADD_LONG( y, args[1] );
+ cff_builder_add_point( builder, x, y,
+ (FT_Bool)( count == 4 || count == 1 ) );
+ args += 2;
+ }
+
+ args = stack;
+ }
+ break;
+
+ case cff_op_seac:
+ FT_TRACE4(( " seac\n" ));
+
+ error = cff_operator_seac( decoder,
+ args[0], args[1], args[2],
+ (FT_Int)( args[3] >> 16 ),
+ (FT_Int)( args[4] >> 16 ) );
+
+ /* add current outline to the glyph slot */
+ FT_GlyphLoader_Add( builder->loader );
+
+ /* return now! */
+ FT_TRACE4(( "\n" ));
+ return error;
+
+ case cff_op_endchar:
+ /* in dictionaries, `endchar' simply indicates end of data */
+ if ( in_dict )
+ return error;
+
+ FT_TRACE4(( " endchar\n" ));
+
+ /* We are going to emulate the seac operator. */
+ if ( num_args >= 4 )
+ {
+ /* Save glyph width so that the subglyphs don't overwrite it. */
+ FT_Pos glyph_width = decoder->glyph_width;
+
+
+ error = cff_operator_seac( decoder,
+ 0L, args[-4], args[-3],
+ (FT_Int)( args[-2] >> 16 ),
+ (FT_Int)( args[-1] >> 16 ) );
+
+ decoder->glyph_width = glyph_width;
+ }
+ else
+ {
+ cff_builder_close_contour( builder );
+
+ /* close hints recording session */
+ if ( hinter )
+ {
+ if ( hinter->close( hinter->hints,
+ (FT_UInt)builder->current->n_points ) )
+ goto Syntax_Error;
+
+ /* apply hints to the loaded glyph outline now */
+ error = hinter->apply( hinter->hints,
+ builder->current,
+ (PSH_Globals)builder->hints_globals,
+ decoder->hint_mode );
+ if ( error )
+ goto Fail;
+ }
+
+ /* add current outline to the glyph slot */
+ FT_GlyphLoader_Add( builder->loader );
+ }
+
+ /* return now! */
+ FT_TRACE4(( "\n" ));
+ return error;
+
+ case cff_op_abs:
+ FT_TRACE4(( " abs\n" ));
+
+ if ( args[0] < 0 )
+ {
+ if ( args[0] == FT_LONG_MIN )
+ args[0] = FT_LONG_MAX;
+ else
+ args[0] = -args[0];
+ }
+ args++;
+ break;
+
+ case cff_op_add:
+ FT_TRACE4(( " add\n" ));
+
+ args[0] = ADD_LONG( args[0], args[1] );
+ args++;
+ break;
+
+ case cff_op_sub:
+ FT_TRACE4(( " sub\n" ));
+
+ args[0] = SUB_LONG( args[0], args[1] );
+ args++;
+ break;
+
+ case cff_op_div:
+ FT_TRACE4(( " div\n" ));
+
+ args[0] = FT_DivFix( args[0], args[1] );
+ args++;
+ break;
+
+ case cff_op_neg:
+ FT_TRACE4(( " neg\n" ));
+
+ if ( args[0] == FT_LONG_MIN )
+ args[0] = FT_LONG_MAX;
+ args[0] = -args[0];
+ args++;
+ break;
+
+ case cff_op_random:
+ FT_TRACE4(( " random\n" ));
+
+ /* only use the lower 16 bits of `random' */
+ /* to generate a number in the range (0;1] */
+ args[0] = (FT_Fixed)
+ ( ( decoder->current_subfont->random & 0xFFFF ) + 1 );
+ args++;
+
+ decoder->current_subfont->random =
+ cff_random( decoder->current_subfont->random );
+ break;
+
+ case cff_op_mul:
+ FT_TRACE4(( " mul\n" ));
+
+ args[0] = FT_MulFix( args[0], args[1] );
+ args++;
+ break;
+
+ case cff_op_sqrt:
+ FT_TRACE4(( " sqrt\n" ));
+
+ if ( args[0] > 0 )
+ {
+ FT_Fixed root = args[0];
+ FT_Fixed new_root;
+
+
+ for (;;)
+ {
+ new_root = ( root + FT_DivFix( args[0], root ) + 1 ) >> 1;
+ if ( new_root == root )
+ break;
+ root = new_root;
+ }
+ args[0] = new_root;
+ }
+ else
+ args[0] = 0;
+ args++;
+ break;
+
+ case cff_op_drop:
+ /* nothing */
+ FT_TRACE4(( " drop\n" ));
+
+ break;
+
+ case cff_op_exch:
+ {
+ FT_Fixed tmp;
+
+
+ FT_TRACE4(( " exch\n" ));
+
+ tmp = args[0];
+ args[0] = args[1];
+ args[1] = tmp;
+ args += 2;
+ }
+ break;
+
+ case cff_op_index:
+ {
+ FT_Int idx = (FT_Int)( args[0] >> 16 );
+
+
+ FT_TRACE4(( " index\n" ));
+
+ if ( idx < 0 )
+ idx = 0;
+ else if ( idx > num_args - 2 )
+ idx = num_args - 2;
+ args[0] = args[-( idx + 1 )];
+ args++;
+ }
+ break;
+
+ case cff_op_roll:
+ {
+ FT_Int count = (FT_Int)( args[0] >> 16 );
+ FT_Int idx = (FT_Int)( args[1] >> 16 );
+
+
+ FT_TRACE4(( " roll\n" ));
+
+ if ( count <= 0 )
+ count = 1;
+
+ args -= count;
+ if ( args < stack )
+ goto Stack_Underflow;
+
+ if ( idx >= 0 )
+ {
+ while ( idx > 0 )
+ {
+ FT_Fixed tmp = args[count - 1];
+ FT_Int i;
+
+
+ for ( i = count - 2; i >= 0; i-- )
+ args[i + 1] = args[i];
+ args[0] = tmp;
+ idx--;
+ }
+ }
+ else
+ {
+ while ( idx < 0 )
+ {
+ FT_Fixed tmp = args[0];
+ FT_Int i;
+
+
+ for ( i = 0; i < count - 1; i++ )
+ args[i] = args[i + 1];
+ args[count - 1] = tmp;
+ idx++;
+ }
+ }
+ args += count;
+ }
+ break;
+
+ case cff_op_dup:
+ FT_TRACE4(( " dup\n" ));
+
+ args[1] = args[0];
+ args += 2;
+ break;
+
+ case cff_op_put:
+ {
+ FT_Fixed val = args[0];
+ FT_Int idx = (FT_Int)( args[1] >> 16 );
+
+
+ FT_TRACE4(( " put\n" ));
+
+ /* the Type2 specification before version 16-March-2000 */
+ /* didn't give a hard-coded size limit of the temporary */
+ /* storage array; instead, an argument of the */
+ /* `MultipleMaster' operator set the size */
+ if ( idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS )
+ decoder->buildchar[idx] = val;
+ }
+ break;
+
+ case cff_op_get:
+ {
+ FT_Int idx = (FT_Int)( args[0] >> 16 );
+ FT_Fixed val = 0;
+
+
+ FT_TRACE4(( " get\n" ));
+
+ if ( idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS )
+ val = decoder->buildchar[idx];
+
+ args[0] = val;
+ args++;
+ }
+ break;
+
+ case cff_op_store:
+ /* this operator was removed from the Type2 specification */
+ /* in version 16-March-2000 */
+
+ /* since we currently don't handle interpolation of multiple */
+ /* master fonts, this is a no-op */
+ FT_TRACE4(( " store\n" ));
+ break;
+
+ case cff_op_load:
+ /* this operator was removed from the Type2 specification */
+ /* in version 16-March-2000 */
+ {
+ FT_Int reg_idx = (FT_Int)args[0];
+ FT_Int idx = (FT_Int)args[1];
+ FT_Int count = (FT_Int)args[2];
+
+
+ FT_TRACE4(( " load\n" ));
+
+ /* since we currently don't handle interpolation of multiple */
+ /* master fonts, we store a vector [1 0 0 ...] in the */
+ /* temporary storage array regardless of the Registry index */
+ if ( reg_idx >= 0 && reg_idx <= 2 &&
+ idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS &&
+ count >= 0 && count <= num_axes )
+ {
+ FT_Int end, i;
+
+
+ end = FT_MIN( idx + count, CFF_MAX_TRANS_ELEMENTS );
+
+ if ( idx < end )
+ decoder->buildchar[idx] = 1 << 16;
+
+ for ( i = idx + 1; i < end; i++ )
+ decoder->buildchar[i] = 0;
+ }
+ }
+ break;
+
+ case cff_op_blend:
+ /* this operator was removed from the Type2 specification */
+ /* in version 16-March-2000 */
+ {
+ FT_Int num_results = (FT_Int)( args[0] >> 16 );
+
+
+ FT_TRACE4(( " blend\n" ));
+
+ if ( num_results < 0 )
+ goto Syntax_Error;
+
+ if ( num_results * (FT_Int)num_designs > num_args )
+ goto Stack_Underflow;
+
+ /* since we currently don't handle interpolation of multiple */
+ /* master fonts, return the `num_results' values of the */
+ /* first master */
+ args -= num_results * ( num_designs - 1 );
+ num_args -= num_results * ( num_designs - 1 );
+ }
+ break;
+
+ case cff_op_dotsection:
+ /* this operator is deprecated and ignored by the parser */
+ FT_TRACE4(( " dotsection\n" ));
+ break;
+
+ case cff_op_closepath:
+ /* this is an invalid Type 2 operator; however, there */
+ /* exist fonts which are incorrectly converted from probably */
+ /* Type 1 to CFF, and some parsers seem to accept it */
+
+ FT_TRACE4(( " closepath (invalid op)\n" ));
+
+ args = stack;
+ break;
+
+ case cff_op_hsbw:
+ /* this is an invalid Type 2 operator; however, there */
+ /* exist fonts which are incorrectly converted from probably */
+ /* Type 1 to CFF, and some parsers seem to accept it */
+
+ FT_TRACE4(( " hsbw (invalid op)\n" ));
+
+ decoder->glyph_width =
+ ADD_LONG( decoder->nominal_width, ( args[1] >> 16 ) );
+
+ decoder->builder.left_bearing.x = args[0];
+ decoder->builder.left_bearing.y = 0;
+
+ x = ADD_LONG( decoder->builder.pos_x, args[0] );
+ y = decoder->builder.pos_y;
+ args = stack;
+ break;
+
+ case cff_op_sbw:
+ /* this is an invalid Type 2 operator; however, there */
+ /* exist fonts which are incorrectly converted from probably */
+ /* Type 1 to CFF, and some parsers seem to accept it */
+
+ FT_TRACE4(( " sbw (invalid op)\n" ));
+
+ decoder->glyph_width =
+ ADD_LONG( decoder->nominal_width, ( args[2] >> 16 ) );
+
+ decoder->builder.left_bearing.x = args[0];
+ decoder->builder.left_bearing.y = args[1];
+
+ x = ADD_LONG( decoder->builder.pos_x, args[0] );
+ y = ADD_LONG( decoder->builder.pos_y, args[1] );
+ args = stack;
+ break;
+
+ case cff_op_setcurrentpoint:
+ /* this is an invalid Type 2 operator; however, there */
+ /* exist fonts which are incorrectly converted from probably */
+ /* Type 1 to CFF, and some parsers seem to accept it */
+
+ FT_TRACE4(( " setcurrentpoint (invalid op)\n" ));
+
+ x = ADD_LONG( decoder->builder.pos_x, args[0] );
+ y = ADD_LONG( decoder->builder.pos_y, args[1] );
+ args = stack;
+ break;
+
+ case cff_op_callothersubr:
+ /* this is an invalid Type 2 operator; however, there */
+ /* exist fonts which are incorrectly converted from probably */
+ /* Type 1 to CFF, and some parsers seem to accept it */
+
+ FT_TRACE4(( " callothersubr (invalid op)\n" ));
+
+ /* subsequent `pop' operands should add the arguments, */
+ /* this is the implementation described for `unknown' other */
+ /* subroutines in the Type1 spec. */
+ /* */
+ /* XXX Fix return arguments (see discussion below). */
+ args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
+ break;
+
+ case cff_op_pop:
+ /* this is an invalid Type 2 operator; however, there */
+ /* exist fonts which are incorrectly converted from probably */
+ /* Type 1 to CFF, and some parsers seem to accept it */
+
+ FT_TRACE4(( " pop (invalid op)\n" ));
+
+ /* XXX Increasing `args' is wrong: After a certain number of */
+ /* `pop's we get a stack overflow. Reason for doing it is */
+ /* code like this (actually found in a CFF font): */
+ /* */
+ /* 17 1 3 callothersubr */
+ /* pop */
+ /* callsubr */
+ /* */
+ /* Since we handle `callothersubr' as a no-op, and */
+ /* `callsubr' needs at least one argument, `pop' can't be a */
+ /* no-op too as it basically should be. */
+ /* */
+ /* The right solution would be to provide real support for */
+ /* `callothersubr' as done in `t1decode.c', however, given */
+ /* the fact that CFF fonts with `pop' are invalid, it is */
+ /* questionable whether it is worth the time. */
+ args++;
+ break;
+
+ case cff_op_and:
+ {
+ FT_Fixed cond = ( args[0] && args[1] );
+
+
+ FT_TRACE4(( " and\n" ));
+
+ args[0] = cond ? 0x10000L : 0;
+ args++;
+ }
+ break;
+
+ case cff_op_or:
+ {
+ FT_Fixed cond = ( args[0] || args[1] );
+
+
+ FT_TRACE4(( " or\n" ));
+
+ args[0] = cond ? 0x10000L : 0;
+ args++;
+ }
+ break;
+
+ case cff_op_not:
+ {
+ FT_Fixed cond = !args[0];
+
+
+ FT_TRACE4(( " not\n" ));
+
+ args[0] = cond ? 0x10000L : 0;
+ args++;
+ }
+ break;
+
+ case cff_op_eq:
+ {
+ FT_Fixed cond = ( args[0] == args[1] );
+
+
+ FT_TRACE4(( " eq\n" ));
+
+ args[0] = cond ? 0x10000L : 0;
+ args++;
+ }
+ break;
+
+ case cff_op_ifelse:
+ {
+ FT_Fixed cond = ( args[2] <= args[3] );
+
+
+ FT_TRACE4(( " ifelse\n" ));
+
+ if ( !cond )
+ args[0] = args[1];
+ args++;
+ }
+ break;
+
+ case cff_op_callsubr:
+ {
+ FT_UInt idx = (FT_UInt)( ( args[0] >> 16 ) +
+ decoder->locals_bias );
+
+
+ FT_TRACE4(( " callsubr (idx %d, entering level %d)\n",
+ idx,
+ zone - decoder->zones + 1 ));
+
+ if ( idx >= decoder->num_locals )
+ {
+ FT_ERROR(( "cff_decoder_parse_charstrings:"
+ " invalid local subr index\n" ));
+ goto Syntax_Error;
+ }
+
+ if ( zone - decoder->zones >= CFF_MAX_SUBRS_CALLS )
+ {
+ FT_ERROR(( "cff_decoder_parse_charstrings:"
+ " too many nested subrs\n" ));
+ goto Syntax_Error;
+ }
+
+ zone->cursor = ip; /* save current instruction pointer */
+
+ zone++;
+ zone->base = decoder->locals[idx];
+ zone->limit = decoder->locals[idx + 1];
+ zone->cursor = zone->base;
+
+ if ( !zone->base || zone->limit == zone->base )
+ {
+ FT_ERROR(( "cff_decoder_parse_charstrings:"
+ " invoking empty subrs\n" ));
+ goto Syntax_Error;
+ }
+
+ decoder->zone = zone;
+ ip = zone->base;
+ limit = zone->limit;
+ }
+ break;
+
+ case cff_op_callgsubr:
+ {
+ FT_UInt idx = (FT_UInt)( ( args[0] >> 16 ) +
+ decoder->globals_bias );
+
+
+ FT_TRACE4(( " callgsubr (idx %d, entering level %d)\n",
+ idx,
+ zone - decoder->zones + 1 ));
+
+ if ( idx >= decoder->num_globals )
+ {
+ FT_ERROR(( "cff_decoder_parse_charstrings:"
+ " invalid global subr index\n" ));
+ goto Syntax_Error;
+ }
+
+ if ( zone - decoder->zones >= CFF_MAX_SUBRS_CALLS )
+ {
+ FT_ERROR(( "cff_decoder_parse_charstrings:"
+ " too many nested subrs\n" ));
+ goto Syntax_Error;
+ }
+
+ zone->cursor = ip; /* save current instruction pointer */
+
+ zone++;
+ zone->base = decoder->globals[idx];
+ zone->limit = decoder->globals[idx + 1];
+ zone->cursor = zone->base;
+
+ if ( !zone->base || zone->limit == zone->base )
+ {
+ FT_ERROR(( "cff_decoder_parse_charstrings:"
+ " invoking empty subrs\n" ));
+ goto Syntax_Error;
+ }
+
+ decoder->zone = zone;
+ ip = zone->base;
+ limit = zone->limit;
+ }
+ break;
+
+ case cff_op_return:
+ FT_TRACE4(( " return (leaving level %d)\n",
+ decoder->zone - decoder->zones ));
+
+ if ( decoder->zone <= decoder->zones )
+ {
+ FT_ERROR(( "cff_decoder_parse_charstrings:"
+ " unexpected return\n" ));
+ goto Syntax_Error;
+ }
+
+ decoder->zone--;
+ zone = decoder->zone;
+ ip = zone->cursor;
+ limit = zone->limit;
+ break;
+
+ default:
+ FT_ERROR(( "Unimplemented opcode: %d", ip[-1] ));
+
+ if ( ip[-1] == 12 )
+ FT_ERROR(( " %d", ip[0] ));
+ FT_ERROR(( "\n" ));
+
+ return FT_THROW( Unimplemented_Feature );
+ }
+
+ decoder->top = args;
+
+ if ( decoder->top - stack >= CFF_MAX_OPERANDS )
+ goto Stack_Overflow;
+
+ } /* general operator processing */
+
+ } /* while ip < limit */
+
+ FT_TRACE4(( "..end..\n\n" ));
+
+ Fail:
+ return error;
+
+ MM_Error:
+ FT_TRACE4(( "cff_decoder_parse_charstrings:"
+ " invalid opcode found in top DICT charstring\n"));
+ return FT_THROW( Invalid_File_Format );
+
+ Syntax_Error:
+ FT_TRACE4(( "cff_decoder_parse_charstrings: syntax error\n" ));
+ return FT_THROW( Invalid_File_Format );
+
+ Stack_Underflow:
+ FT_TRACE4(( "cff_decoder_parse_charstrings: stack underflow\n" ));
+ return FT_THROW( Too_Few_Arguments );
+
+ Stack_Overflow:
+ FT_TRACE4(( "cff_decoder_parse_charstrings: stack overflow\n" ));
+ return FT_THROW( Stack_Overflow );
+ }
+
+#endif /* CFF_CONFIG_OPTION_OLD_ENGINE */
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* cff_decoder_init */
+ /* */
+ /* <Description> */
+ /* Initializes a given glyph decoder. */
+ /* */
+ /* <InOut> */
+ /* decoder :: A pointer to the glyph builder to initialize. */
+ /* */
+ /* <Input> */
+ /* face :: The current face object. */
+ /* */
+ /* size :: The current size object. */
+ /* */
+ /* slot :: The current glyph object. */
+ /* */
+ /* hinting :: Whether hinting is active. */
+ /* */
+ /* hint_mode :: The hinting mode. */
+ /* */
+ FT_LOCAL_DEF( void )
+ cff_decoder_init( CFF_Decoder* decoder,
+ TT_Face face,
+ CFF_Size size,
+ CFF_GlyphSlot slot,
+ FT_Bool hinting,
+ FT_Render_Mode hint_mode,
+ CFF_Decoder_Get_Glyph_Callback get_callback,
+ CFF_Decoder_Free_Glyph_Callback free_callback )
+ {
+ CFF_Font cff = (CFF_Font)face->extra.data;
+
+
+ /* clear everything */
+ FT_ZERO( decoder );
+
+ /* initialize builder */
+ cff_builder_init( &decoder->builder, face, size, slot, hinting );
+
+ /* initialize Type2 decoder */
+ decoder->cff = cff;
+ decoder->num_globals = cff->global_subrs_index.count;
+ decoder->globals = cff->global_subrs;
+ decoder->globals_bias = cff_compute_bias(
+ cff->top_font.font_dict.charstring_type,
+ decoder->num_globals );
+
+ decoder->hint_mode = hint_mode;
+
+ decoder->get_glyph_callback = get_callback;
+ decoder->free_glyph_callback = free_callback;
+ }
+
+
+ /* this function is used to select the subfont */
+ /* and the locals subrs array */
+ FT_LOCAL_DEF( FT_Error )
+ cff_decoder_prepare( CFF_Decoder* decoder,
+ CFF_Size size,
+ FT_UInt glyph_index )
+ {
+ CFF_Builder *builder = &decoder->builder;
+ CFF_Font cff = (CFF_Font)builder->face->extra.data;
+ CFF_SubFont sub = &cff->top_font;
+ FT_Error error = FT_Err_Ok;
+
+ FT_Service_CFFLoad cffload = (FT_Service_CFFLoad)cff->cffload;
+
+
+ /* manage CID fonts */
+ if ( cff->num_subfonts )
+ {
+ FT_Byte fd_index = cffload->fd_select_get( &cff->fd_select,
+ glyph_index );
+
+
+ if ( fd_index >= cff->num_subfonts )
+ {
+ FT_TRACE4(( "cff_decoder_prepare: invalid CID subfont index\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
+
+ FT_TRACE3(( " in subfont %d:\n", fd_index ));
+
+ sub = cff->subfonts[fd_index];
+
+ if ( builder->hints_funcs && size )
+ {
+ FT_Size ftsize = FT_SIZE( size );
+ CFF_Internal internal = (CFF_Internal)ftsize->internal->module_data;
+
+
+ /* for CFFs without subfonts, this value has already been set */
+ builder->hints_globals = (void *)internal->subfonts[fd_index];
+ }
+ }
+
+ decoder->num_locals = sub->local_subrs_index.count;
+ decoder->locals = sub->local_subrs;
+ decoder->locals_bias = cff_compute_bias(
+ decoder->cff->top_font.font_dict.charstring_type,
+ decoder->num_locals );
+
+ decoder->glyph_width = sub->private_dict.default_width;
+ decoder->nominal_width = sub->private_dict.nominal_width;
+
+ decoder->current_subfont = sub;
+
+ Exit:
+ return error;
+ }
+
+
+/* END */
diff --git a/modules/freetype2/src/psaux/cffdecode.h b/modules/freetype2/src/psaux/cffdecode.h
new file mode 100644
index 000000000..0d4f5fef6
--- /dev/null
+++ b/modules/freetype2/src/psaux/cffdecode.h
@@ -0,0 +1,64 @@
+/***************************************************************************/
+/* */
+/* cffdecode.h */
+/* */
+/* PostScript CFF (Type 2) decoding routines (specification). */
+/* */
+/* Copyright 2017-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef CFFDECODE_H_
+#define CFFDECODE_H_
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
+
+
+FT_BEGIN_HEADER
+
+ FT_LOCAL( void )
+ cff_decoder_init( CFF_Decoder* decoder,
+ TT_Face face,
+ CFF_Size size,
+ CFF_GlyphSlot slot,
+ FT_Bool hinting,
+ FT_Render_Mode hint_mode,
+ CFF_Decoder_Get_Glyph_Callback get_callback,
+ CFF_Decoder_Free_Glyph_Callback free_callback );
+
+ FT_LOCAL( FT_Error )
+ cff_decoder_prepare( CFF_Decoder* decoder,
+ CFF_Size size,
+ FT_UInt glyph_index );
+
+
+ FT_LOCAL( FT_Int )
+ cff_lookup_glyph_by_stdcharcode( CFF_Font cff,
+ FT_Int charcode );
+
+
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ FT_LOCAL( FT_Error )
+ cff_decoder_parse_charstrings( CFF_Decoder* decoder,
+ FT_Byte* charstring_base,
+ FT_ULong charstring_len,
+ FT_Bool in_dict );
+#endif
+
+
+FT_END_HEADER
+
+#endif
+
+
+/* END */
diff --git a/modules/freetype2/src/psaux/module.mk b/modules/freetype2/src/psaux/module.mk
index 630c4f39d..6584d075a 100644
--- a/modules/freetype2/src/psaux/module.mk
+++ b/modules/freetype2/src/psaux/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/cff/cf2arrst.c b/modules/freetype2/src/psaux/psarrst.c
index 6796450fe..a8780947f 100644
--- a/modules/freetype2/src/cff/cf2arrst.c
+++ b/modules/freetype2/src/psaux/psarrst.c
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2arrst.c */
+/* psarrst.c */
/* */
/* Adobe's code for Array Stacks (body). */
/* */
@@ -36,13 +36,13 @@
/***************************************************************************/
-#include "cf2ft.h"
+#include "psft.h"
#include FT_INTERNAL_DEBUG_H
-#include "cf2glue.h"
-#include "cf2arrst.h"
+#include "psglue.h"
+#include "psarrst.h"
-#include "cf2error.h"
+#include "pserror.h"
/*
diff --git a/modules/freetype2/src/cff/cf2arrst.h b/modules/freetype2/src/psaux/psarrst.h
index 3c21a3b67..b3568eb61 100644
--- a/modules/freetype2/src/cff/cf2arrst.h
+++ b/modules/freetype2/src/psaux/psarrst.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2arrst.h */
+/* psarrst.h */
/* */
/* Adobe's code for Array Stacks (specification). */
/* */
@@ -36,11 +36,11 @@
/***************************************************************************/
-#ifndef CF2ARRST_H_
-#define CF2ARRST_H_
+#ifndef PSARRST_H_
+#define PSARRST_H_
-#include "cf2error.h"
+#include "pserror.h"
FT_BEGIN_HEADER
@@ -94,7 +94,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2ARRST_H_ */
+#endif /* PSARRST_H_ */
/* END */
diff --git a/modules/freetype2/src/psaux/psaux.c b/modules/freetype2/src/psaux/psaux.c
index 33b462ef1..fb447fcdb 100644
--- a/modules/freetype2/src/psaux/psaux.c
+++ b/modules/freetype2/src/psaux/psaux.c
@@ -4,7 +4,7 @@
/* */
/* FreeType auxiliary PostScript driver component (body only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,18 +17,25 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "psobjs.c"
-#include "psauxmod.c"
-#include "t1decode.c"
-#include "t1cmap.c"
-#ifndef T1_CONFIG_OPTION_NO_AFM
#include "afmparse.c"
-#endif
-
+#include "psauxmod.c"
#include "psconv.c"
+#include "psobjs.c"
+#include "t1cmap.c"
+#include "t1decode.c"
+#include "cffdecode.c"
+
+#include "psarrst.c"
+#include "psblues.c"
+#include "pserror.c"
+#include "psfont.c"
+#include "psft.c"
+#include "pshints.c"
+#include "psintrp.c"
+#include "psread.c"
+#include "psstack.c"
/* END */
diff --git a/modules/freetype2/src/psaux/psauxerr.h b/modules/freetype2/src/psaux/psauxerr.h
index 9739157fc..cc33fd2ee 100644
--- a/modules/freetype2/src/psaux/psauxerr.h
+++ b/modules/freetype2/src/psaux/psauxerr.h
@@ -4,7 +4,7 @@
/* */
/* PS auxiliary module error codes (specification only). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/psaux/psauxmod.c b/modules/freetype2/src/psaux/psauxmod.c
index b1b8b19c3..ee497085c 100644
--- a/modules/freetype2/src/psaux/psauxmod.c
+++ b/modules/freetype2/src/psaux/psauxmod.c
@@ -4,7 +4,7 @@
/* */
/* FreeType auxiliary PostScript module implementation (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,6 +21,8 @@
#include "psobjs.h"
#include "t1decode.h"
#include "t1cmap.h"
+#include "psft.h"
+#include "cffdecode.h"
#ifndef T1_CONFIG_OPTION_NO_AFM
#include "afmparse.h"
@@ -60,6 +62,14 @@
FT_CALLBACK_TABLE_DEF
+ const PS_Builder_FuncsRec ps_builder_funcs =
+ {
+ ps_builder_init, /* init */
+ ps_builder_done /* done */
+ };
+
+
+ FT_CALLBACK_TABLE_DEF
const T1_Builder_FuncsRec t1_builder_funcs =
{
t1_builder_init, /* init */
@@ -77,9 +87,14 @@
FT_CALLBACK_TABLE_DEF
const T1_Decoder_FuncsRec t1_decoder_funcs =
{
- t1_decoder_init, /* init */
- t1_decoder_done, /* done */
- t1_decoder_parse_charstrings /* parse_charstrings */
+ t1_decoder_init, /* init */
+ t1_decoder_done, /* done */
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+ t1_decoder_parse_charstrings, /* parse_charstrings_old */
+#else
+ t1_decoder_parse_metrics, /* parse_metrics */
+#endif
+ cf2_decoder_parse_charstrings /* parse_charstrings */
};
@@ -104,6 +119,34 @@
};
+ FT_CALLBACK_TABLE_DEF
+ const CFF_Builder_FuncsRec cff_builder_funcs =
+ {
+ cff_builder_init, /* init */
+ cff_builder_done, /* done */
+
+ cff_check_points, /* check_points */
+ cff_builder_add_point, /* add_point */
+ cff_builder_add_point1, /* add_point1 */
+ cff_builder_add_contour, /* add_contour */
+ cff_builder_start_point, /* start_point */
+ cff_builder_close_contour /* close_contour */
+ };
+
+
+ FT_CALLBACK_TABLE_DEF
+ const CFF_Decoder_FuncsRec cff_decoder_funcs =
+ {
+ cff_decoder_init, /* init */
+ cff_decoder_prepare, /* prepare */
+
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ cff_decoder_parse_charstrings, /* parse_charstrings_old */
+#endif
+ cf2_decoder_parse_charstrings /* parse_charstrings */
+ };
+
+
static
const PSAux_Interface psaux_interface =
{
@@ -112,6 +155,9 @@
&t1_builder_funcs,
&t1_decoder_funcs,
t1_decrypt,
+ cff_random,
+ ps_decoder_init,
+ t1_make_subfont,
(const T1_CMap_ClassesRec*) &t1_cmap_classes,
@@ -120,6 +166,8 @@
#else
0,
#endif
+
+ &cff_decoder_funcs,
};
diff --git a/modules/freetype2/src/psaux/psauxmod.h b/modules/freetype2/src/psaux/psauxmod.h
index b1dbb0690..f30978f02 100644
--- a/modules/freetype2/src/psaux/psauxmod.h
+++ b/modules/freetype2/src/psaux/psauxmod.h
@@ -4,7 +4,7 @@
/* */
/* FreeType auxiliary PostScript module implementation (specification). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,6 +23,8 @@
#include <ft2build.h>
#include FT_MODULE_H
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
+
FT_BEGIN_HEADER
@@ -31,6 +33,13 @@ FT_BEGIN_HEADER
#endif
+ FT_CALLBACK_TABLE
+ const CFF_Builder_FuncsRec cff_builder_funcs;
+
+ FT_CALLBACK_TABLE
+ const PS_Builder_FuncsRec ps_builder_funcs;
+
+
FT_EXPORT_VAR( const FT_Module_Class ) psaux_driver_class;
diff --git a/modules/freetype2/src/cff/cf2blues.c b/modules/freetype2/src/psaux/psblues.c
index 250f89e0d..ae39d03c7 100644
--- a/modules/freetype2/src/cff/cf2blues.c
+++ b/modules/freetype2/src/psaux/psblues.c
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2blues.c */
+/* psblues.c */
/* */
/* Adobe's code for handling Blue Zones (body). */
/* */
@@ -36,12 +36,12 @@
/***************************************************************************/
-#include "cf2ft.h"
+#include "psft.h"
#include FT_INTERNAL_DEBUG_H
-#include "cf2blues.h"
-#include "cf2hints.h"
-#include "cf2font.h"
+#include "psblues.h"
+#include "pshints.h"
+#include "psfont.h"
/*************************************************************************/
@@ -67,7 +67,7 @@
CF2_Font font )
{
/* pointer to parsed font object */
- CFF_Decoder* decoder = font->decoder;
+ PS_Decoder* decoder = font->decoder;
CF2_Fixed zoneHeight;
CF2_Fixed maxZoneHeight = 0;
@@ -194,8 +194,8 @@
blues->zone[blues->count].csTopEdge =
cf2_blueToFixed( blueValues[i + 1] );
- zoneHeight = blues->zone[blues->count].csTopEdge -
- blues->zone[blues->count].csBottomEdge;
+ zoneHeight = SUB_INT32( blues->zone[blues->count].csTopEdge,
+ blues->zone[blues->count].csBottomEdge );
if ( zoneHeight < 0 )
{
@@ -243,8 +243,8 @@
blues->zone[blues->count].csTopEdge =
cf2_blueToFixed( otherBlues[i + 1] );
- zoneHeight = blues->zone[blues->count].csTopEdge -
- blues->zone[blues->count].csBottomEdge;
+ zoneHeight = SUB_INT32( blues->zone[blues->count].csTopEdge,
+ blues->zone[blues->count].csBottomEdge );
if ( zoneHeight < 0 )
{
@@ -301,7 +301,7 @@
/* top edge */
flatFamilyEdge = cf2_blueToFixed( familyOtherBlues[j + 1] );
- diff = cf2_fixedAbs( flatEdge - flatFamilyEdge );
+ diff = cf2_fixedAbs( SUB_INT32( flatEdge, flatFamilyEdge ) );
if ( diff < minDiff && diff < csUnitsPerPixel )
{
@@ -319,7 +319,7 @@
/* top edge */
flatFamilyEdge = cf2_blueToFixed( familyBlues[1] );
- diff = cf2_fixedAbs( flatEdge - flatFamilyEdge );
+ diff = cf2_fixedAbs( SUB_INT32( flatEdge, flatFamilyEdge ) );
if ( diff < minDiff && diff < csUnitsPerPixel )
blues->zone[i].csFlatEdge = flatFamilyEdge;
@@ -342,7 +342,7 @@
/* adjust edges of top zone upward by twice darkening amount */
flatFamilyEdge += 2 * font->darkenY; /* bottom edge */
- diff = cf2_fixedAbs( flatEdge - flatFamilyEdge );
+ diff = cf2_fixedAbs( SUB_INT32( flatEdge, flatFamilyEdge ) );
if ( diff < minDiff && diff < csUnitsPerPixel )
{
@@ -408,8 +408,8 @@
/* Note: constant changed from 0.5 to 0.6 to avoid a problem with */
/* 10ppem Arial */
- blues->boost = cf2_floatToFixed( .6 ) -
- FT_MulDiv( cf2_floatToFixed ( .6 ),
+ blues->boost = cf2_doubleToFixed( .6 ) -
+ FT_MulDiv( cf2_doubleToFixed ( .6 ),
blues->scale,
blues->blueScale );
if ( blues->boost > 0x7FFF )
@@ -489,17 +489,18 @@
if ( blues->zone[i].bottomZone &&
cf2_hint_isBottom( bottomHintEdge ) )
{
- if ( ( blues->zone[i].csBottomEdge - csFuzz ) <=
- bottomHintEdge->csCoord &&
+ if ( SUB_INT32( blues->zone[i].csBottomEdge, csFuzz ) <=
+ bottomHintEdge->csCoord &&
bottomHintEdge->csCoord <=
- ( blues->zone[i].csTopEdge + csFuzz ) )
+ ADD_INT32( blues->zone[i].csTopEdge, csFuzz ) )
{
/* bottom edge captured by bottom zone */
if ( blues->suppressOvershoot )
dsNew = blues->zone[i].dsFlatEdge;
- else if ( ( blues->zone[i].csTopEdge - bottomHintEdge->csCoord ) >=
+ else if ( SUB_INT32( blues->zone[i].csTopEdge,
+ bottomHintEdge->csCoord ) >=
blues->blueShift )
{
/* guarantee minimum of 1 pixel overshoot */
@@ -514,7 +515,7 @@
dsNew = cf2_fixedRound( bottomHintEdge->dsCoord );
}
- dsMove = dsNew - bottomHintEdge->dsCoord;
+ dsMove = SUB_INT32( dsNew, bottomHintEdge->dsCoord );
captured = TRUE;
break;
@@ -523,17 +524,18 @@
if ( !blues->zone[i].bottomZone && cf2_hint_isTop( topHintEdge ) )
{
- if ( ( blues->zone[i].csBottomEdge - csFuzz ) <=
- topHintEdge->csCoord &&
+ if ( SUB_INT32( blues->zone[i].csBottomEdge, csFuzz ) <=
+ topHintEdge->csCoord &&
topHintEdge->csCoord <=
- ( blues->zone[i].csTopEdge + csFuzz ) )
+ ADD_INT32( blues->zone[i].csTopEdge, csFuzz ) )
{
/* top edge captured by top zone */
if ( blues->suppressOvershoot )
dsNew = blues->zone[i].dsFlatEdge;
- else if ( ( topHintEdge->csCoord - blues->zone[i].csBottomEdge ) >=
+ else if ( SUB_INT32( topHintEdge->csCoord,
+ blues->zone[i].csBottomEdge ) >=
blues->blueShift )
{
/* guarantee minimum of 1 pixel overshoot */
@@ -548,7 +550,7 @@
dsNew = cf2_fixedRound( topHintEdge->dsCoord );
}
- dsMove = dsNew - topHintEdge->dsCoord;
+ dsMove = SUB_INT32( dsNew, topHintEdge->dsCoord );
captured = TRUE;
break;
@@ -561,13 +563,14 @@
/* move both edges and flag them `locked' */
if ( cf2_hint_isValid( bottomHintEdge ) )
{
- bottomHintEdge->dsCoord += dsMove;
+ bottomHintEdge->dsCoord = ADD_INT32( bottomHintEdge->dsCoord,
+ dsMove );
cf2_hint_lock( bottomHintEdge );
}
if ( cf2_hint_isValid( topHintEdge ) )
{
- topHintEdge->dsCoord += dsMove;
+ topHintEdge->dsCoord = ADD_INT32( topHintEdge->dsCoord, dsMove );
cf2_hint_lock( topHintEdge );
}
}
diff --git a/modules/freetype2/src/cff/cf2blues.h b/modules/freetype2/src/psaux/psblues.h
index 96fb60f38..25ef6849c 100644
--- a/modules/freetype2/src/cff/cf2blues.h
+++ b/modules/freetype2/src/psaux/psblues.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2blues.h */
+/* psblues.h */
/* */
/* Adobe's code for handling Blue Zones (specification). */
/* */
@@ -65,11 +65,11 @@
*/
-#ifndef CF2BLUES_H_
-#define CF2BLUES_H_
+#ifndef PSBLUES_H_
+#define PSBLUES_H_
-#include "cf2glue.h"
+#include "psglue.h"
FT_BEGIN_HEADER
@@ -111,7 +111,7 @@ FT_BEGIN_HEADER
* Constant used for hint adjustment and for synthetic em box hint
* placement.
*/
-#define CF2_MIN_COUNTER cf2_floatToFixed( 0.5 )
+#define CF2_MIN_COUNTER cf2_doubleToFixed( 0.5 )
/* shared typedef is in cf2glue.h */
@@ -179,7 +179,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2BLUES_H_ */
+#endif /* PSBLUES_H_ */
/* END */
diff --git a/modules/freetype2/src/psaux/psconv.c b/modules/freetype2/src/psaux/psconv.c
index fdaca7fb5..a03385000 100644
--- a/modules/freetype2/src/psaux/psconv.c
+++ b/modules/freetype2/src/psaux/psconv.c
@@ -4,7 +4,7 @@
/* */
/* Some convenience conversions (body). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -111,6 +111,10 @@
p++;
if ( p == limit )
goto Bad;
+
+ /* only a single sign is allowed */
+ if ( *p == '-' || *p == '+' )
+ return 0;
}
num_limit = 0x7FFFFFFFL / base;
@@ -215,6 +219,10 @@
p++;
if ( p == limit )
goto Bad;
+
+ /* only a single sign is allowed */
+ if ( *p == '-' || *p == '+' )
+ return 0;
}
/* read the integer part */
diff --git a/modules/freetype2/src/psaux/psconv.h b/modules/freetype2/src/psaux/psconv.h
index 062de3641..d643ffcfc 100644
--- a/modules/freetype2/src/psaux/psconv.h
+++ b/modules/freetype2/src/psaux/psconv.h
@@ -4,7 +4,7 @@
/* */
/* Some convenience conversions (specification). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/cff/cf2error.c b/modules/freetype2/src/psaux/pserror.c
index e3dd69f50..9169e5222 100644
--- a/modules/freetype2/src/cff/cf2error.c
+++ b/modules/freetype2/src/psaux/pserror.c
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2error.c */
+/* pserror.c */
/* */
/* Adobe's code for error handling (body). */
/* */
@@ -36,8 +36,8 @@
/***************************************************************************/
-#include "cf2ft.h"
-#include "cf2error.h"
+#include "psft.h"
+#include "pserror.h"
FT_LOCAL_DEF( void )
diff --git a/modules/freetype2/src/cff/cf2error.h b/modules/freetype2/src/psaux/pserror.h
index 512edd1d2..13d52062b 100644
--- a/modules/freetype2/src/cff/cf2error.h
+++ b/modules/freetype2/src/psaux/pserror.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2error.h */
+/* pserror.h */
/* */
/* Adobe's code for error handling (specification). */
/* */
@@ -36,8 +36,8 @@
/***************************************************************************/
-#ifndef CF2ERROR_H_
-#define CF2ERROR_H_
+#ifndef PSERROR_H_
+#define PSERROR_H_
#include FT_MODULE_ERRORS_H
@@ -50,7 +50,7 @@
#include FT_ERRORS_H
-#include "cf2ft.h"
+#include "psft.h"
FT_BEGIN_HEADER
@@ -66,7 +66,7 @@ FT_BEGIN_HEADER
* model our error mechanism on a Java-like exception mechanism.
* When we assign an error code we are thus `throwing' an error.
*
- * The perservation of an error code is done by coding convention.
+ * The preservation of an error code is done by coding convention.
* Upon a function call if the error code is anything other than
* `FT_Err_Ok', which is guaranteed to be zero, we
* will return without altering that error. This will allow the
@@ -113,7 +113,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2ERROR_H_ */
+#endif /* PSERROR_H_ */
/* END */
diff --git a/modules/freetype2/src/cff/cf2fixed.h b/modules/freetype2/src/psaux/psfixed.h
index 2e4b5032f..219589e7f 100644
--- a/modules/freetype2/src/cff/cf2fixed.h
+++ b/modules/freetype2/src/psaux/psfixed.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2fixed.h */
+/* psfixed.h */
/* */
/* Adobe's code for Fixed Point Mathematics (specification only). */
/* */
@@ -36,8 +36,8 @@
/***************************************************************************/
-#ifndef CF2FIXED_H_
-#define CF2FIXED_H_
+#ifndef PSFIXED_H_
+#define PSFIXED_H_
FT_BEGIN_HEADER
@@ -63,10 +63,10 @@ FT_BEGIN_HEADER
( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )
#define cf2_fixedRound( x ) \
( (CF2_Fixed)( ( (FT_UInt32)(x) + 0x8000U ) & 0xFFFF0000UL ) )
-#define cf2_floatToFixed( f ) \
+#define cf2_doubleToFixed( f ) \
( (CF2_Fixed)( (f) * 65536.0 + 0.5 ) )
#define cf2_fixedAbs( x ) \
- ( (x) < 0 ? -(x) : (x) )
+ ( (x) < 0 ? NEG_INT32( x ) : (x) )
#define cf2_fixedFloor( x ) \
( (CF2_Fixed)( (FT_UInt32)(x) & 0xFFFF0000UL ) )
#define cf2_fixedFraction( x ) \
@@ -89,7 +89,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2FIXED_H_ */
+#endif /* PSFIXED_H_ */
/* END */
diff --git a/modules/freetype2/src/cff/cf2font.c b/modules/freetype2/src/psaux/psfont.c
index a86e3619b..dde67a739 100644
--- a/modules/freetype2/src/cff/cf2font.c
+++ b/modules/freetype2/src/psaux/psfont.c
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2font.c */
+/* psfont.c */
/* */
/* Adobe's code for font instances (body). */
/* */
@@ -39,12 +39,12 @@
#include <ft2build.h>
#include FT_INTERNAL_CALC_H
-#include "cf2ft.h"
+#include "psft.h"
-#include "cf2glue.h"
-#include "cf2font.h"
-#include "cf2error.h"
-#include "cf2intrp.h"
+#include "psglue.h"
+#include "psfont.h"
+#include "pserror.h"
+#include "psintrp.h"
/* Compute a stem darkening amount in character space. */
@@ -117,7 +117,7 @@
return;
/* protect against range problems and divide by zero */
- if ( emRatio < cf2_floatToFixed( .01 ) )
+ if ( emRatio < cf2_doubleToFixed( .01 ) )
return;
if ( stemDarkened )
@@ -243,7 +243,7 @@
const CF2_Matrix* transform )
{
/* pointer to parsed font object */
- CFF_Decoder* decoder = font->decoder;
+ PS_Decoder* decoder = font->decoder;
FT_Bool needExtraSetup = FALSE;
@@ -260,7 +260,6 @@
CF2_UInt lenNormalizedV = 0;
FT_Fixed* normalizedV = NULL;
-
/* clear previous error */
font->error = FT_Err_Ok;
@@ -273,46 +272,52 @@
needExtraSetup = TRUE;
}
- /* check for variation vectors */
- vstore = cf2_getVStore( decoder );
- hasVariations = ( vstore->dataCount != 0 );
-
- if ( hasVariations )
+ if ( !font->isT1 )
{
-#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- /* check whether Private DICT in this subfont needs to be reparsed */
- font->error = cf2_getNormalizedVector( decoder,
- &lenNormalizedV,
- &normalizedV );
- if ( font->error )
- return;
+ FT_Service_CFFLoad cffload = (FT_Service_CFFLoad)font->cffload;
+
+
+ /* check for variation vectors */
+ vstore = cf2_getVStore( decoder );
+ hasVariations = ( vstore->dataCount != 0 );
- if ( cff_blend_check_vector( &subFont->blend,
- subFont->private_dict.vsindex,
- lenNormalizedV,
- normalizedV ) )
+ if ( hasVariations )
{
- /* blend has changed, reparse */
- cff_load_private_dict( decoder->cff,
- subFont,
- lenNormalizedV,
- normalizedV );
- needExtraSetup = TRUE;
- }
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+ /* check whether Private DICT in this subfont needs to be reparsed */
+ font->error = cf2_getNormalizedVector( decoder,
+ &lenNormalizedV,
+ &normalizedV );
+ if ( font->error )
+ return;
+
+ if ( cffload->blend_check_vector( &subFont->blend,
+ subFont->private_dict.vsindex,
+ lenNormalizedV,
+ normalizedV ) )
+ {
+ /* blend has changed, reparse */
+ cffload->load_private_dict( decoder->cff,
+ subFont,
+ lenNormalizedV,
+ normalizedV );
+ needExtraSetup = TRUE;
+ }
#endif
- /* copy from subfont */
- font->blend.font = subFont->blend.font;
+ /* copy from subfont */
+ font->blend.font = subFont->blend.font;
- /* clear state of charstring blend */
- font->blend.usedBV = FALSE;
+ /* clear state of charstring blend */
+ font->blend.usedBV = FALSE;
- /* initialize value for charstring */
- font->vsindex = subFont->private_dict.vsindex;
+ /* initialize value for charstring */
+ font->vsindex = subFont->private_dict.vsindex;
- /* store vector inputs for blends in charstring */
- font->lenNDV = lenNormalizedV;
- font->NDV = normalizedV;
+ /* store vector inputs for blends in charstring */
+ font->lenNDV = lenNormalizedV;
+ font->NDV = normalizedV;
+ }
}
/* if ppem has changed, we need to recompute some cached data */
@@ -447,7 +452,7 @@
/* choose a constant for StdHW that depends on font contrast */
stdHW = cf2_getStdHW( decoder );
- if ( stdHW > 0 && font->stdVW > 2 * stdHW )
+ if ( stdHW > 0 && font->stdVW > MUL_INT32( 2, stdHW ) )
font->stdHW = FT_DivFix( cf2_intToFixed( 75 ), emRatio );
else
{
diff --git a/modules/freetype2/src/cff/cf2font.h b/modules/freetype2/src/psaux/psfont.h
index 17ecd17bb..e611ac4bd 100644
--- a/modules/freetype2/src/cff/cf2font.h
+++ b/modules/freetype2/src/psaux/psfont.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2font.h */
+/* psfont.h */
/* */
/* Adobe's code for font instances (specification). */
/* */
@@ -36,13 +36,14 @@
/***************************************************************************/
-#ifndef CF2FONT_H_
-#define CF2FONT_H_
+#ifndef PSFONT_H_
+#define PSFONT_H_
-#include "cf2ft.h"
-#include "cf2blues.h"
-#include "cffload.h"
+#include FT_SERVICE_CFF_TABLE_LOAD_H
+
+#include "psft.h"
+#include "psblues.h"
FT_BEGIN_HEADER
@@ -64,6 +65,7 @@ FT_BEGIN_HEADER
FT_Memory memory;
FT_Error error; /* shared error for this instance */
+ FT_Bool isT1;
FT_Bool isCFF2;
CF2_RenderingFlags renderingFlags;
@@ -89,7 +91,7 @@ FT_BEGIN_HEADER
/* FreeType related members */
CF2_OutlineRec outline; /* freetype glyph outline functions */
- CFF_Decoder* decoder;
+ PS_Decoder* decoder;
CFF_SubFont lastSubfont; /* FreeType parsed data; */
/* top font or subfont */
@@ -111,6 +113,8 @@ FT_BEGIN_HEADER
/* counterclockwise winding */
CF2_BluesRec blues; /* computed zone data */
+
+ FT_Service_CFFLoad cffload; /* pointer to cff functions */
};
@@ -124,7 +128,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2FONT_H_ */
+#endif /* PSFONT_H_ */
/* END */
diff --git a/modules/freetype2/src/cff/cf2ft.c b/modules/freetype2/src/psaux/psft.c
index c0d067e94..1f750174a 100644
--- a/modules/freetype2/src/cff/cf2ft.c
+++ b/modules/freetype2/src/psaux/psft.c
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2ft.c */
+/* psft.c */
/* */
/* FreeType Glue Component to Adobe's Interpreter (body). */
/* */
@@ -36,11 +36,20 @@
/***************************************************************************/
-#include "cf2ft.h"
+#include "psft.h"
#include FT_INTERNAL_DEBUG_H
-#include "cf2font.h"
-#include "cf2error.h"
+#include "psfont.h"
+#include "pserror.h"
+#include "psobjs.h"
+#include "cffdecode.h"
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#include FT_MULTIPLE_MASTERS_H
+#include FT_SERVICE_MULTIPLE_MASTERS_H
+#endif
+
+#include FT_SERVICE_CFF_TABLE_LOAD_H
#define CF2_MAX_SIZE cf2_intToFixed( 2000 ) /* max ppem */
@@ -83,12 +92,13 @@
cf2_setGlyphWidth( CF2_Outline outline,
CF2_Fixed width )
{
- CFF_Decoder* decoder = outline->decoder;
+ PS_Decoder* decoder = outline->decoder;
FT_ASSERT( decoder );
- decoder->glyph_width = cf2_fixedToInt( width );
+ if ( !decoder->builder.is_t1 )
+ *decoder->glyph_width = cf2_fixedToInt( width );
}
@@ -122,8 +132,8 @@
const CF2_CallbackParams params )
{
/* downcast the object pointer */
- CF2_Outline outline = (CF2_Outline)callbacks;
- CFF_Builder* builder;
+ CF2_Outline outline = (CF2_Outline)callbacks;
+ PS_Builder* builder;
(void)params; /* only used in debug mode */
@@ -134,7 +144,7 @@
builder = &outline->decoder->builder;
/* note: two successive moves simply close the contour twice */
- cff_builder_close_contour( builder );
+ ps_builder_close_contour( builder );
builder->path_begun = 0;
}
@@ -146,8 +156,8 @@
FT_Error error;
/* downcast the object pointer */
- CF2_Outline outline = (CF2_Outline)callbacks;
- CFF_Builder* builder;
+ CF2_Outline outline = (CF2_Outline)callbacks;
+ PS_Builder* builder;
FT_ASSERT( outline && outline->decoder );
@@ -159,9 +169,9 @@
{
/* record the move before the line; also check points and set */
/* `path_begun' */
- error = cff_builder_start_point( builder,
- params->pt0.x,
- params->pt0.y );
+ error = ps_builder_start_point( builder,
+ params->pt0.x,
+ params->pt0.y );
if ( error )
{
if ( !*callbacks->error )
@@ -170,10 +180,10 @@
}
}
- /* `cff_builder_add_point1' includes a check_points call for one point */
- error = cff_builder_add_point1( builder,
- params->pt1.x,
- params->pt1.y );
+ /* `ps_builder_add_point1' includes a check_points call for one point */
+ error = ps_builder_add_point1( builder,
+ params->pt1.x,
+ params->pt1.y );
if ( error )
{
if ( !*callbacks->error )
@@ -190,8 +200,8 @@
FT_Error error;
/* downcast the object pointer */
- CF2_Outline outline = (CF2_Outline)callbacks;
- CFF_Builder* builder;
+ CF2_Outline outline = (CF2_Outline)callbacks;
+ PS_Builder* builder;
FT_ASSERT( outline && outline->decoder );
@@ -203,9 +213,9 @@
{
/* record the move before the line; also check points and set */
/* `path_begun' */
- error = cff_builder_start_point( builder,
- params->pt0.x,
- params->pt0.y );
+ error = ps_builder_start_point( builder,
+ params->pt0.x,
+ params->pt0.y );
if ( error )
{
if ( !*callbacks->error )
@@ -215,7 +225,7 @@
}
/* prepare room for 3 points: 2 off-curve, 1 on-curve */
- error = cff_check_points( builder, 3 );
+ error = ps_builder_check_points( builder, 3 );
if ( error )
{
if ( !*callbacks->error )
@@ -223,15 +233,15 @@
return;
}
- cff_builder_add_point( builder,
- params->pt1.x,
- params->pt1.y, 0 );
- cff_builder_add_point( builder,
- params->pt2.x,
- params->pt2.y, 0 );
- cff_builder_add_point( builder,
- params->pt3.x,
- params->pt3.y, 1 );
+ ps_builder_add_point( builder,
+ params->pt1.x,
+ params->pt1.y, 0 );
+ ps_builder_add_point( builder,
+ params->pt2.x,
+ params->pt2.y, 0 );
+ ps_builder_add_point( builder,
+ params->pt3.x,
+ params->pt3.y, 1 );
}
@@ -253,11 +263,11 @@
/* get scaling and hint flag from GlyphSlot */
static void
- cf2_getScaleAndHintFlag( CFF_Decoder* decoder,
- CF2_Fixed* x_scale,
- CF2_Fixed* y_scale,
- FT_Bool* hinted,
- FT_Bool* scaled )
+ cf2_getScaleAndHintFlag( PS_Decoder* decoder,
+ CF2_Fixed* x_scale,
+ CF2_Fixed* y_scale,
+ FT_Bool* hinted,
+ FT_Bool* scaled )
{
FT_ASSERT( decoder && decoder->builder.glyph );
@@ -267,8 +277,8 @@
if ( *hinted )
{
- *x_scale = ( decoder->builder.glyph->x_scale + 32 ) / 64;
- *y_scale = ( decoder->builder.glyph->y_scale + 32 ) / 64;
+ *x_scale = ADD_INT32( decoder->builder.glyph->x_scale, 32 ) / 64;
+ *y_scale = ADD_INT32( decoder->builder.glyph->y_scale, 32 ) / 64;
}
else
{
@@ -284,47 +294,60 @@
/* get units per em from `FT_Face' */
/* TODO: should handle font matrix concatenation? */
static FT_UShort
- cf2_getUnitsPerEm( CFF_Decoder* decoder )
+ cf2_getUnitsPerEm( PS_Decoder* decoder )
{
FT_ASSERT( decoder && decoder->builder.face );
- FT_ASSERT( decoder->builder.face->root.units_per_EM );
+ FT_ASSERT( decoder->builder.face->units_per_EM );
- return decoder->builder.face->root.units_per_EM;
+ return decoder->builder.face->units_per_EM;
}
/* Main entry point: Render one glyph. */
FT_LOCAL_DEF( FT_Error )
- cf2_decoder_parse_charstrings( CFF_Decoder* decoder,
- FT_Byte* charstring_base,
- FT_ULong charstring_len )
+ cf2_decoder_parse_charstrings( PS_Decoder* decoder,
+ FT_Byte* charstring_base,
+ FT_ULong charstring_len )
{
FT_Memory memory;
FT_Error error = FT_Err_Ok;
CF2_Font font;
+ FT_Bool is_t1 = decoder->builder.is_t1;
- FT_ASSERT( decoder && decoder->cff );
+
+ FT_ASSERT( decoder &&
+ ( is_t1 || decoder->cff ) );
+
+ if ( is_t1 && !decoder->current_subfont )
+ {
+ FT_ERROR(( "cf2_decoder_parse_charstrings (Type 1): "
+ "SubFont missing. Use `t1_make_subfont' first\n" ));
+ return FT_THROW( Invalid_Table );
+ }
memory = decoder->builder.memory;
/* CF2 data is saved here across glyphs */
- font = (CF2_Font)decoder->cff->cf2_instance.data;
+ font = (CF2_Font)decoder->cf2_instance->data;
/* on first glyph, allocate instance structure */
- if ( !decoder->cff->cf2_instance.data )
+ if ( !decoder->cf2_instance->data )
{
- decoder->cff->cf2_instance.finalizer =
+ decoder->cf2_instance->finalizer =
(FT_Generic_Finalizer)cf2_free_instance;
- if ( FT_ALLOC( decoder->cff->cf2_instance.data,
+ if ( FT_ALLOC( decoder->cf2_instance->data,
sizeof ( CF2_FontRec ) ) )
return FT_THROW( Out_Of_Memory );
- font = (CF2_Font)decoder->cff->cf2_instance.data;
+ font = (CF2_Font)decoder->cf2_instance->data;
font->memory = memory;
+ if ( !is_t1 )
+ font->cffload = (FT_Service_CFFLoad)decoder->cff->cffload;
+
/* initialize a client outline, to be shared by each glyph rendered */
cf2_outline_init( &font->outline, font->memory, &font->error );
}
@@ -337,8 +360,13 @@
{
/* build parameters for Adobe engine */
- CFF_Builder* builder = &decoder->builder;
- CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face );
+ PS_Builder* builder = &decoder->builder;
+ PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( builder->face );
+
+ FT_Bool no_stem_darkening_driver =
+ driver->no_stem_darkening;
+ FT_Char no_stem_darkening_font =
+ builder->face->internal->no_stem_darkening;
/* local error */
FT_Error error2 = FT_Err_Ok;
@@ -367,13 +395,21 @@
&hinted,
&scaled );
- /* copy isCFF2 boolean from TT_Face to CF2_Font */
- font->isCFF2 = builder->face->isCFF2;
+ if ( is_t1 )
+ font->isCFF2 = FALSE;
+ else
+ {
+ /* copy isCFF2 boolean from TT_Face to CF2_Font */
+ font->isCFF2 = ((TT_Face)builder->face)->is_cff2;
+ }
+ font->isT1 = is_t1;
font->renderingFlags = 0;
if ( hinted )
font->renderingFlags |= CF2_FlagsHinted;
- if ( scaled && !driver->no_stem_darkening )
+ if ( scaled && ( !no_stem_darkening_font ||
+ ( no_stem_darkening_font < 0 &&
+ !no_stem_darkening_driver ) ) )
font->renderingFlags |= CF2_FlagsDarkened;
font->darkenParams[0] = driver->darken_params[0];
@@ -409,7 +445,7 @@
/* get pointer to current FreeType subfont (based on current glyphID) */
FT_LOCAL_DEF( CFF_SubFont )
- cf2_getSubfont( CFF_Decoder* decoder )
+ cf2_getSubfont( PS_Decoder* decoder )
{
FT_ASSERT( decoder && decoder->current_subfont );
@@ -419,7 +455,7 @@
/* get pointer to VStore structure */
FT_LOCAL_DEF( CFF_VStore )
- cf2_getVStore( CFF_Decoder* decoder )
+ cf2_getVStore( PS_Decoder* decoder )
{
FT_ASSERT( decoder && decoder->cff );
@@ -429,7 +465,7 @@
/* get maxstack value from CFF2 Top DICT */
FT_LOCAL_DEF( FT_UInt )
- cf2_getMaxstack( CFF_Decoder* decoder )
+ cf2_getMaxstack( PS_Decoder* decoder )
{
FT_ASSERT( decoder && decoder->cff );
@@ -443,25 +479,33 @@
/* */
/* Note: Uses FT_Fixed not CF2_Fixed for the vector. */
FT_LOCAL_DEF( FT_Error )
- cf2_getNormalizedVector( CFF_Decoder* decoder,
+ cf2_getNormalizedVector( PS_Decoder* decoder,
CF2_UInt *len,
FT_Fixed* *vec )
{
+ TT_Face face;
+ FT_Service_MultiMasters mm;
+
+
FT_ASSERT( decoder && decoder->builder.face );
FT_ASSERT( vec && len );
+ FT_ASSERT( !decoder->builder.is_t1 );
+
+ face = (TT_Face)decoder->builder.face;
+ mm = (FT_Service_MultiMasters)face->mm;
- return cff_get_var_blend( decoder->builder.face, len, vec, NULL );
+ return mm->get_var_blend( FT_FACE( face ), len, NULL, vec, NULL );
}
#endif
/* get `y_ppem' from `CFF_Size' */
FT_LOCAL_DEF( CF2_Fixed )
- cf2_getPpemY( CFF_Decoder* decoder )
+ cf2_getPpemY( PS_Decoder* decoder )
{
- FT_ASSERT( decoder &&
- decoder->builder.face &&
- decoder->builder.face->root.size );
+ FT_ASSERT( decoder &&
+ decoder->builder.face &&
+ decoder->builder.face->size );
/*
* Note that `y_ppem' can be zero if there wasn't a call to
@@ -473,7 +517,7 @@
*
*/
return cf2_intToFixed(
- decoder->builder.face->root.size->metrics.y_ppem );
+ decoder->builder.face->size->metrics.y_ppem );
}
@@ -481,7 +525,7 @@
/* FreeType stores these as integer font units */
/* (note: variable names seem swapped) */
FT_LOCAL_DEF( CF2_Fixed )
- cf2_getStdVW( CFF_Decoder* decoder )
+ cf2_getStdVW( PS_Decoder* decoder )
{
FT_ASSERT( decoder && decoder->current_subfont );
@@ -491,7 +535,7 @@
FT_LOCAL_DEF( CF2_Fixed )
- cf2_getStdHW( CFF_Decoder* decoder )
+ cf2_getStdHW( PS_Decoder* decoder )
{
FT_ASSERT( decoder && decoder->current_subfont );
@@ -502,10 +546,10 @@
/* note: FreeType stores 1000 times the actual value for `BlueScale' */
FT_LOCAL_DEF( void )
- cf2_getBlueMetrics( CFF_Decoder* decoder,
- CF2_Fixed* blueScale,
- CF2_Fixed* blueShift,
- CF2_Fixed* blueFuzz )
+ cf2_getBlueMetrics( PS_Decoder* decoder,
+ CF2_Fixed* blueScale,
+ CF2_Fixed* blueShift,
+ CF2_Fixed* blueFuzz )
{
FT_ASSERT( decoder && decoder->current_subfont );
@@ -522,9 +566,9 @@
/* get blue values counts and arrays; the FreeType parser has validated */
/* the counts and verified that each is an even number */
FT_LOCAL_DEF( void )
- cf2_getBlueValues( CFF_Decoder* decoder,
- size_t* count,
- FT_Pos* *data )
+ cf2_getBlueValues( PS_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data )
{
FT_ASSERT( decoder && decoder->current_subfont );
@@ -535,9 +579,9 @@
FT_LOCAL_DEF( void )
- cf2_getOtherBlues( CFF_Decoder* decoder,
- size_t* count,
- FT_Pos* *data )
+ cf2_getOtherBlues( PS_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data )
{
FT_ASSERT( decoder && decoder->current_subfont );
@@ -548,9 +592,9 @@
FT_LOCAL_DEF( void )
- cf2_getFamilyBlues( CFF_Decoder* decoder,
- size_t* count,
- FT_Pos* *data )
+ cf2_getFamilyBlues( PS_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data )
{
FT_ASSERT( decoder && decoder->current_subfont );
@@ -561,9 +605,9 @@
FT_LOCAL_DEF( void )
- cf2_getFamilyOtherBlues( CFF_Decoder* decoder,
- size_t* count,
- FT_Pos* *data )
+ cf2_getFamilyOtherBlues( PS_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data )
{
FT_ASSERT( decoder && decoder->current_subfont );
@@ -574,7 +618,7 @@
FT_LOCAL_DEF( CF2_Int )
- cf2_getLanguageGroup( CFF_Decoder* decoder )
+ cf2_getLanguageGroup( PS_Decoder* decoder )
{
FT_ASSERT( decoder && decoder->current_subfont );
@@ -585,9 +629,9 @@
/* convert unbiased subroutine index to `CF2_Buffer' and */
/* return 0 on success */
FT_LOCAL_DEF( CF2_Int )
- cf2_initGlobalRegionBuffer( CFF_Decoder* decoder,
- CF2_Int subrNum,
- CF2_Buffer buf )
+ cf2_initGlobalRegionBuffer( PS_Decoder* decoder,
+ CF2_Int subrNum,
+ CF2_Buffer buf )
{
CF2_UInt idx;
@@ -613,9 +657,9 @@
/* convert AdobeStandardEncoding code to CF2_Buffer; */
/* used for seac component */
FT_LOCAL_DEF( FT_Error )
- cf2_getSeacComponent( CFF_Decoder* decoder,
- CF2_Int code,
- CF2_Buffer buf )
+ cf2_getSeacComponent( PS_Decoder* decoder,
+ CF2_Int code,
+ CF2_Buffer buf )
{
CF2_Int gid;
FT_Byte* charstring;
@@ -624,13 +668,14 @@
FT_ASSERT( decoder );
+ FT_ASSERT( !decoder->builder.is_t1 );
FT_ZERO( buf );
#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* Incremental fonts don't necessarily have valid charsets. */
/* They use the character code, not the glyph index, in this case. */
- if ( decoder->builder.face->root.internal->incremental_interface )
+ if ( decoder->builder.face->internal->incremental_interface )
gid = code;
else
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
@@ -640,10 +685,10 @@
return FT_THROW( Invalid_Glyph_Format );
}
- error = cff_get_glyph_data( decoder->builder.face,
- (CF2_UInt)gid,
- &charstring,
- &len );
+ error = decoder->get_glyph_callback( (TT_Face)decoder->builder.face,
+ (CF2_UInt)gid,
+ &charstring,
+ &len );
/* TODO: for now, just pass the FreeType error through */
if ( error )
return error;
@@ -660,21 +705,92 @@
FT_LOCAL_DEF( void )
- cf2_freeSeacComponent( CFF_Decoder* decoder,
- CF2_Buffer buf )
+ cf2_freeSeacComponent( PS_Decoder* decoder,
+ CF2_Buffer buf )
{
FT_ASSERT( decoder );
+ FT_ASSERT( !decoder->builder.is_t1 );
- cff_free_glyph_data( decoder->builder.face,
- (FT_Byte**)&buf->start,
- (FT_ULong)( buf->end - buf->start ) );
+ decoder->free_glyph_callback( (TT_Face)decoder->builder.face,
+ (FT_Byte**)&buf->start,
+ (FT_ULong)( buf->end - buf->start ) );
+ }
+
+
+ FT_LOCAL_DEF( FT_Error )
+ cf2_getT1SeacComponent( PS_Decoder* decoder,
+ FT_UInt glyph_index,
+ CF2_Buffer buf )
+ {
+ FT_Data glyph_data;
+ FT_Error error = FT_Err_Ok;
+ T1_Face face = (T1_Face)decoder->builder.face;
+ T1_Font type1 = &face->type1;
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ FT_Incremental_InterfaceRec *inc =
+ face->root.internal->incremental_interface;
+
+
+ /* For incremental fonts get the character data using the */
+ /* callback function. */
+ if ( inc )
+ error = inc->funcs->get_glyph_data( inc->object,
+ glyph_index, &glyph_data );
+ else
+#endif
+ /* For ordinary fonts get the character data stored in the face record. */
+ {
+ glyph_data.pointer = type1->charstrings[glyph_index];
+ glyph_data.length = (FT_Int)type1->charstrings_len[glyph_index];
+ }
+
+ if ( !error )
+ {
+ FT_Byte* charstring_base = (FT_Byte*)glyph_data.pointer;
+ FT_ULong charstring_len = (FT_ULong)glyph_data.length;
+
+
+ FT_ASSERT( charstring_base + charstring_len >= charstring_base );
+
+ FT_ZERO( buf );
+ buf->start =
+ buf->ptr = charstring_base;
+ buf->end = charstring_base + charstring_len;
+ }
+
+ return error;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_freeT1SeacComponent( PS_Decoder* decoder,
+ CF2_Buffer buf )
+ {
+ T1_Face face;
+ FT_Data data;
+
+
+ FT_ASSERT( decoder );
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ face = (T1_Face)decoder->builder.face;
+
+ data.pointer = buf->start;
+ data.length = (FT_Int)( buf->end - buf->start );
+
+ if ( face->root.internal->incremental_interface )
+ face->root.internal->incremental_interface->funcs->free_glyph_data(
+ face->root.internal->incremental_interface->object,
+ &data );
+#endif /* FT_CONFIG_OPTION_INCREMENTAL */
}
FT_LOCAL_DEF( CF2_Int )
- cf2_initLocalRegionBuffer( CFF_Decoder* decoder,
- CF2_Int subrNum,
- CF2_Buffer buf )
+ cf2_initLocalRegionBuffer( PS_Decoder* decoder,
+ CF2_Int subrNum,
+ CF2_Buffer buf )
{
CF2_UInt idx;
@@ -689,16 +805,42 @@
FT_ASSERT( decoder->locals );
- buf->start =
- buf->ptr = decoder->locals[idx];
- buf->end = decoder->locals[idx + 1];
+ buf->start = decoder->locals[idx];
+
+ if ( decoder->builder.is_t1 )
+ {
+ /* The Type 1 driver stores subroutines without the seed bytes. */
+ /* The CID driver stores subroutines with seed bytes. This */
+ /* case is taken care of when decoder->subrs_len == 0. */
+ if ( decoder->locals_len )
+ buf->end = buf->start + decoder->locals_len[idx];
+ else
+ {
+ /* We are using subroutines from a CID font. We must adjust */
+ /* for the seed bytes. */
+ buf->start += ( decoder->lenIV >= 0 ? decoder->lenIV : 0 );
+ buf->end = decoder->locals[idx + 1];
+ }
+
+ if ( !buf->start )
+ {
+ FT_ERROR(( "cf2_initLocalRegionBuffer (Type 1 mode):"
+ " invoking empty subrs\n" ));
+ }
+ }
+ else
+ {
+ buf->end = decoder->locals[idx + 1];
+ }
+
+ buf->ptr = buf->start;
return FALSE; /* success */
}
FT_LOCAL_DEF( CF2_Fixed )
- cf2_getDefaultWidthX( CFF_Decoder* decoder )
+ cf2_getDefaultWidthX( PS_Decoder* decoder )
{
FT_ASSERT( decoder && decoder->current_subfont );
@@ -708,7 +850,7 @@
FT_LOCAL_DEF( CF2_Fixed )
- cf2_getNominalWidthX( CFF_Decoder* decoder )
+ cf2_getNominalWidthX( PS_Decoder* decoder )
{
FT_ASSERT( decoder && decoder->current_subfont );
@@ -720,7 +862,7 @@
FT_LOCAL_DEF( void )
cf2_outline_reset( CF2_Outline outline )
{
- CFF_Decoder* decoder = outline->decoder;
+ PS_Decoder* decoder = outline->decoder;
FT_ASSERT( decoder );
@@ -734,12 +876,12 @@
FT_LOCAL_DEF( void )
cf2_outline_close( CF2_Outline outline )
{
- CFF_Decoder* decoder = outline->decoder;
+ PS_Decoder* decoder = outline->decoder;
FT_ASSERT( decoder );
- cff_builder_close_contour( &decoder->builder );
+ ps_builder_close_contour( &decoder->builder );
FT_GlyphLoader_Add( decoder->builder.loader );
}
diff --git a/modules/freetype2/src/cff/cf2ft.h b/modules/freetype2/src/psaux/psft.h
index b054a6e95..ab172110b 100644
--- a/modules/freetype2/src/cff/cf2ft.h
+++ b/modules/freetype2/src/psaux/psft.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2ft.h */
+/* psft.h */
/* */
/* FreeType Glue Component to Adobe's Interpreter (specification). */
/* */
@@ -36,11 +36,11 @@
/***************************************************************************/
-#ifndef CF2FT_H_
-#define CF2FT_H_
+#ifndef PSFT_H_
+#define PSFT_H_
-#include "cf2types.h"
+#include "pstypes.h"
/* TODO: disable asserts for now */
@@ -49,88 +49,96 @@
#include FT_SYSTEM_H
-#include "cf2glue.h"
-#include "cffgload.h" /* for CFF_Decoder */
+#include "psglue.h"
+#include FT_INTERNAL_POSTSCRIPT_AUX_H /* for PS_Decoder */
FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- cf2_decoder_parse_charstrings( CFF_Decoder* decoder,
- FT_Byte* charstring_base,
- FT_ULong charstring_len );
+ cf2_decoder_parse_charstrings( PS_Decoder* decoder,
+ FT_Byte* charstring_base,
+ FT_ULong charstring_len );
FT_LOCAL( CFF_SubFont )
- cf2_getSubfont( CFF_Decoder* decoder );
+ cf2_getSubfont( PS_Decoder* decoder );
FT_LOCAL( CFF_VStore )
- cf2_getVStore( CFF_Decoder* decoder );
+ cf2_getVStore( PS_Decoder* decoder );
FT_LOCAL( FT_UInt )
- cf2_getMaxstack( CFF_Decoder* decoder );
+ cf2_getMaxstack( PS_Decoder* decoder );
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
FT_LOCAL( FT_Error )
- cf2_getNormalizedVector( CFF_Decoder* decoder,
- CF2_UInt *len,
- FT_Fixed* *vec );
+ cf2_getNormalizedVector( PS_Decoder* decoder,
+ CF2_UInt *len,
+ FT_Fixed* *vec );
#endif
FT_LOCAL( CF2_Fixed )
- cf2_getPpemY( CFF_Decoder* decoder );
+ cf2_getPpemY( PS_Decoder* decoder );
FT_LOCAL( CF2_Fixed )
- cf2_getStdVW( CFF_Decoder* decoder );
+ cf2_getStdVW( PS_Decoder* decoder );
FT_LOCAL( CF2_Fixed )
- cf2_getStdHW( CFF_Decoder* decoder );
+ cf2_getStdHW( PS_Decoder* decoder );
FT_LOCAL( void )
- cf2_getBlueMetrics( CFF_Decoder* decoder,
- CF2_Fixed* blueScale,
- CF2_Fixed* blueShift,
- CF2_Fixed* blueFuzz );
+ cf2_getBlueMetrics( PS_Decoder* decoder,
+ CF2_Fixed* blueScale,
+ CF2_Fixed* blueShift,
+ CF2_Fixed* blueFuzz );
FT_LOCAL( void )
- cf2_getBlueValues( CFF_Decoder* decoder,
- size_t* count,
- FT_Pos* *data );
+ cf2_getBlueValues( PS_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data );
FT_LOCAL( void )
- cf2_getOtherBlues( CFF_Decoder* decoder,
- size_t* count,
- FT_Pos* *data );
+ cf2_getOtherBlues( PS_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data );
FT_LOCAL( void )
- cf2_getFamilyBlues( CFF_Decoder* decoder,
- size_t* count,
- FT_Pos* *data );
+ cf2_getFamilyBlues( PS_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data );
FT_LOCAL( void )
- cf2_getFamilyOtherBlues( CFF_Decoder* decoder,
- size_t* count,
- FT_Pos* *data );
+ cf2_getFamilyOtherBlues( PS_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data );
FT_LOCAL( CF2_Int )
- cf2_getLanguageGroup( CFF_Decoder* decoder );
+ cf2_getLanguageGroup( PS_Decoder* decoder );
FT_LOCAL( CF2_Int )
- cf2_initGlobalRegionBuffer( CFF_Decoder* decoder,
- CF2_Int subrNum,
- CF2_Buffer buf );
+ cf2_initGlobalRegionBuffer( PS_Decoder* decoder,
+ CF2_Int subrNum,
+ CF2_Buffer buf );
FT_LOCAL( FT_Error )
- cf2_getSeacComponent( CFF_Decoder* decoder,
- CF2_Int code,
- CF2_Buffer buf );
+ cf2_getSeacComponent( PS_Decoder* decoder,
+ CF2_Int code,
+ CF2_Buffer buf );
FT_LOCAL( void )
- cf2_freeSeacComponent( CFF_Decoder* decoder,
- CF2_Buffer buf );
+ cf2_freeSeacComponent( PS_Decoder* decoder,
+ CF2_Buffer buf );
FT_LOCAL( CF2_Int )
- cf2_initLocalRegionBuffer( CFF_Decoder* decoder,
- CF2_Int subrNum,
- CF2_Buffer buf );
+ cf2_initLocalRegionBuffer( PS_Decoder* decoder,
+ CF2_Int subrNum,
+ CF2_Buffer buf );
FT_LOCAL( CF2_Fixed )
- cf2_getDefaultWidthX( CFF_Decoder* decoder );
+ cf2_getDefaultWidthX( PS_Decoder* decoder );
FT_LOCAL( CF2_Fixed )
- cf2_getNominalWidthX( CFF_Decoder* decoder );
+ cf2_getNominalWidthX( PS_Decoder* decoder );
+ FT_LOCAL( FT_Error )
+ cf2_getT1SeacComponent( PS_Decoder* decoder,
+ FT_UInt glyph_index,
+ CF2_Buffer buf );
+ FT_LOCAL( void )
+ cf2_freeT1SeacComponent( PS_Decoder* decoder,
+ CF2_Buffer buf );
+
/*
* FreeType client outline
*
@@ -139,7 +147,7 @@ FT_BEGIN_HEADER
typedef struct CF2_OutlineRec_
{
CF2_OutlineCallbacksRec root; /* base class must be first */
- CFF_Decoder* decoder;
+ PS_Decoder* decoder;
} CF2_OutlineRec, *CF2_Outline;
@@ -153,7 +161,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2FT_H_ */
+#endif /* PSFT_H_ */
/* END */
diff --git a/modules/freetype2/src/cff/cf2glue.h b/modules/freetype2/src/psaux/psglue.h
index 56a7c248f..5545e12a5 100644
--- a/modules/freetype2/src/cff/cf2glue.h
+++ b/modules/freetype2/src/psaux/psglue.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2glue.h */
+/* psglue.h */
/* */
/* Adobe's code for shared stuff (specification only). */
/* */
@@ -36,15 +36,15 @@
/***************************************************************************/
-#ifndef CF2GLUE_H_
-#define CF2GLUE_H_
+#ifndef PSGLUE_H_
+#define PSGLUE_H_
/* common includes for other modules */
-#include "cf2error.h"
-#include "cf2fixed.h"
-#include "cf2arrst.h"
-#include "cf2read.h"
+#include "pserror.h"
+#include "psfixed.h"
+#include "psarrst.h"
+#include "psread.h"
FT_BEGIN_HEADER
@@ -138,7 +138,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2GLUE_H_ */
+#endif /* PSGLUE_H_ */
/* END */
diff --git a/modules/freetype2/src/cff/cf2hints.c b/modules/freetype2/src/psaux/pshints.c
index c8f7dfeba..361519642 100644
--- a/modules/freetype2/src/cff/cf2hints.c
+++ b/modules/freetype2/src/psaux/pshints.c
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2hints.c */
+/* pshints.c */
/* */
/* Adobe's code for handling CFF hints (body). */
/* */
@@ -36,13 +36,13 @@
/***************************************************************************/
-#include "cf2ft.h"
+#include "psft.h"
#include FT_INTERNAL_DEBUG_H
-#include "cf2glue.h"
-#include "cf2font.h"
-#include "cf2hints.h"
-#include "cf2intrp.h"
+#include "psglue.h"
+#include "psfont.h"
+#include "pshints.h"
+#include "psintrp.h"
/*************************************************************************/
@@ -74,8 +74,8 @@
/* cross product of pt1 position from origin with pt2 position from */
/* pt1; we reduce the precision so that the result fits into 32 bits */
- return ( x1 >> 16 ) * ( ( y2 - y1 ) >> 16 ) -
- ( y1 >> 16 ) * ( ( x2 - x1 ) >> 16 );
+ return ( x1 >> 16 ) * ( SUB_INT32( y2, y1 ) >> 16 ) -
+ ( y1 >> 16 ) * ( SUB_INT32( x2, x1 ) >> 16 );
}
@@ -105,7 +105,7 @@
stemHintArray,
indexStemHint );
- width = stemHint->max - stemHint->min;
+ width = SUB_INT32( stemHint->max, stemHint->min );
if ( width == cf2_intToFixed( -21 ) )
{
@@ -185,11 +185,11 @@
/* darkening. Bottoms are not changed; tops are incremented by twice */
/* `darkenY'. */
if ( cf2_hint_isTop( hint ) )
- hint->csCoord += 2 * font->darkenY;
+ hint->csCoord = ADD_INT32( hint->csCoord, 2 * font->darkenY );
- hint->csCoord += hintOrigin;
- hint->scale = scale;
- hint->index = indexStemHint; /* index in original stem hint array */
+ hint->csCoord = ADD_INT32( hint->csCoord, hintOrigin );
+ hint->scale = scale;
+ hint->index = indexStemHint; /* index in original stem hint array */
/* if original stem hint has been used, use the same position */
if ( hint->flags != 0 && stemHint->used )
@@ -299,6 +299,36 @@
}
+ static void
+ cf2_hintmap_dump( CF2_HintMap hintmap )
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ CF2_UInt i;
+
+
+ FT_TRACE6(( " index csCoord dsCoord scale flags\n" ));
+
+ for ( i = 0; i < hintmap->count; i++ )
+ {
+ CF2_Hint hint = &hintmap->edge[i];
+
+
+ FT_TRACE6(( " %3d %7.2f %7.2f %5d %s%s%s%s\n",
+ hint->index,
+ hint->csCoord / 65536.0,
+ hint->dsCoord / ( hint->scale * 1.0 ),
+ hint->scale,
+ ( cf2_hint_isPair( hint ) ? "p" : "g" ),
+ ( cf2_hint_isTop( hint ) ? "t" : "b" ),
+ ( cf2_hint_isLocked( hint ) ? "L" : ""),
+ ( cf2_hint_isSynthetic( hint ) ? "S" : "" ) ));
+ }
+#else
+ FT_UNUSED( hintmap );
+#endif
+ }
+
+
/* transform character space coordinate to device space using hint map */
static CF2_Fixed
cf2_hintmap_map( CF2_HintMap hintmap,
@@ -314,6 +344,7 @@
/* start linear search from last hit */
CF2_UInt i = hintmap->lastIndex;
+
FT_ASSERT( hintmap->lastIndex < CF2_MAX_HINT_EDGES );
/* search up */
@@ -330,9 +361,10 @@
if ( i == 0 && csCoord < hintmap->edge[0].csCoord )
{
/* special case for points below first edge: use uniform scale */
- return FT_MulFix( csCoord - hintmap->edge[0].csCoord,
- hintmap->scale ) +
- hintmap->edge[0].dsCoord;
+ return ADD_INT32( FT_MulFix( SUB_INT32( csCoord,
+ hintmap->edge[0].csCoord ),
+ hintmap->scale ),
+ hintmap->edge[0].dsCoord );
}
else
{
@@ -340,9 +372,10 @@
* Note: entries with duplicate csCoord are allowed.
* Use edge[i], the highest entry where csCoord >= entry[i].csCoord
*/
- return FT_MulFix( csCoord - hintmap->edge[i].csCoord,
- hintmap->edge[i].scale ) +
- hintmap->edge[i].dsCoord;
+ return ADD_INT32( FT_MulFix( SUB_INT32( csCoord,
+ hintmap->edge[i].csCoord ),
+ hintmap->edge[i].scale ),
+ hintmap->edge[i].dsCoord );
}
}
}
@@ -437,14 +470,16 @@
/* is there room to move up? */
/* there is if we are at top of array or the next edge is at or */
/* beyond proposed move up? */
- if ( j >= hintmap->count - 1 ||
+ if ( j >= hintmap->count - 1 ||
hintmap->edge[j + 1].dsCoord >=
- hintmap->edge[j].dsCoord + moveUp + upMinCounter )
+ ADD_INT32( hintmap->edge[j].dsCoord,
+ moveUp + upMinCounter ) )
{
/* there is room to move up; is there also room to move down? */
- if ( i == 0 ||
+ if ( i == 0 ||
hintmap->edge[i - 1].dsCoord <=
- hintmap->edge[i].dsCoord + moveDown - downMinCounter )
+ ADD_INT32( hintmap->edge[i].dsCoord,
+ moveDown - downMinCounter ) )
{
/* move smaller absolute amount */
move = ( -moveDown < moveUp ) ? moveDown : moveUp; /* optimum */
@@ -455,9 +490,10 @@
else
{
/* is there room to move down? */
- if ( i == 0 ||
+ if ( i == 0 ||
hintmap->edge[i - 1].dsCoord <=
- hintmap->edge[i].dsCoord + moveDown - downMinCounter )
+ ADD_INT32( hintmap->edge[i].dsCoord,
+ moveDown - downMinCounter ) )
{
move = moveDown;
/* true if non-optimum move */
@@ -491,9 +527,11 @@
}
/* move the edge(s) */
- hintmap->edge[i].dsCoord += move;
+ hintmap->edge[i].dsCoord = ADD_INT32( hintmap->edge[i].dsCoord,
+ move );
if ( isPair )
- hintmap->edge[j].dsCoord += move;
+ hintmap->edge[j].dsCoord = ADD_INT32( hintmap->edge[j].dsCoord,
+ move );
}
/* assert there are no overlaps in device space */
@@ -507,18 +545,20 @@
{
if ( hintmap->edge[i].csCoord != hintmap->edge[i - 1].csCoord )
hintmap->edge[i - 1].scale =
- FT_DivFix(
- hintmap->edge[i].dsCoord - hintmap->edge[i - 1].dsCoord,
- hintmap->edge[i].csCoord - hintmap->edge[i - 1].csCoord );
+ FT_DivFix( SUB_INT32( hintmap->edge[i].dsCoord,
+ hintmap->edge[i - 1].dsCoord ),
+ SUB_INT32( hintmap->edge[i].csCoord,
+ hintmap->edge[i - 1].csCoord ) );
}
if ( isPair )
{
if ( hintmap->edge[j].csCoord != hintmap->edge[j - 1].csCoord )
hintmap->edge[j - 1].scale =
- FT_DivFix(
- hintmap->edge[j].dsCoord - hintmap->edge[j - 1].dsCoord,
- hintmap->edge[j].csCoord - hintmap->edge[j - 1].csCoord );
+ FT_DivFix( SUB_INT32( hintmap->edge[j].dsCoord,
+ hintmap->edge[j - 1].dsCoord ),
+ SUB_INT32( hintmap->edge[j].csCoord,
+ hintmap->edge[j - 1].csCoord ) );
i += 1; /* skip upper edge on next loop */
}
@@ -539,15 +579,18 @@
/* is there room to move up? */
if ( hintmap->edge[j + 1].dsCoord >=
- hintmap->edge[j].dsCoord + hintMove->moveUp + CF2_MIN_COUNTER )
+ ADD_INT32( hintmap->edge[j].dsCoord,
+ hintMove->moveUp + CF2_MIN_COUNTER ) )
{
/* there is more room now, move edge up */
- hintmap->edge[j].dsCoord += hintMove->moveUp;
+ hintmap->edge[j].dsCoord = ADD_INT32( hintmap->edge[j].dsCoord,
+ hintMove->moveUp );
if ( cf2_hint_isPair( &hintmap->edge[j] ) )
{
FT_ASSERT( j > 0 );
- hintmap->edge[j - 1].dsCoord += hintMove->moveUp;
+ hintmap->edge[j - 1].dsCoord =
+ ADD_INT32( hintmap->edge[j - 1].dsCoord, hintMove->moveUp );
}
}
}
@@ -599,6 +642,14 @@
break;
}
+ FT_TRACE7(( " Got hint at %.2f (%.2f)\n",
+ firstHintEdge->csCoord / 65536.0,
+ firstHintEdge->dsCoord / 65536.0 ));
+ if ( isPair )
+ FT_TRACE7(( " Got hint at %.2f (%.2f)\n",
+ secondHintEdge->csCoord / 65536.0,
+ secondHintEdge->dsCoord / 65536.0 ));
+
/*
* Discard any hints that overlap in character space. Most often, this
* is while building the initial map, where captured hints from all
@@ -635,18 +686,19 @@
{
/* Use hint map to position the center of stem, and nominal scale */
/* to position the two edges. This preserves the stem width. */
- CF2_Fixed midpoint = cf2_hintmap_map(
- hintmap->initialHintMap,
- ( secondHintEdge->csCoord +
- firstHintEdge->csCoord ) / 2 );
- CF2_Fixed halfWidth = FT_MulFix(
- ( secondHintEdge->csCoord -
- firstHintEdge->csCoord ) / 2,
- hintmap->scale );
-
-
- firstHintEdge->dsCoord = midpoint - halfWidth;
- secondHintEdge->dsCoord = midpoint + halfWidth;
+ CF2_Fixed midpoint =
+ cf2_hintmap_map(
+ hintmap->initialHintMap,
+ ADD_INT32( secondHintEdge->csCoord,
+ firstHintEdge->csCoord ) / 2 );
+ CF2_Fixed halfWidth =
+ FT_MulFix( SUB_INT32( secondHintEdge->csCoord,
+ firstHintEdge->csCoord ) / 2,
+ hintmap->scale );
+
+
+ firstHintEdge->dsCoord = SUB_INT32( midpoint, halfWidth );
+ secondHintEdge->dsCoord = ADD_INT32( midpoint, halfWidth );
}
else
firstHintEdge->dsCoord = cf2_hintmap_map( hintmap->initialHintMap,
@@ -715,13 +767,22 @@
/* insert first edge */
hintmap->edge[indexInsert] = *firstHintEdge; /* copy struct */
- hintmap->count += 1;
+ hintmap->count += 1;
+
+ FT_TRACE7(( " Inserting hint %.2f (%.2f)\n",
+ firstHintEdge->csCoord / 65536.0,
+ firstHintEdge->dsCoord / 65536.0 ));
if ( isPair )
{
/* insert second edge */
hintmap->edge[indexInsert + 1] = *secondHintEdge; /* copy struct */
hintmap->count += 1;
+
+ FT_TRACE7(( " Inserting hint %.2f (%.2f)\n",
+ secondHintEdge->csCoord / 65536.0,
+ secondHintEdge->dsCoord / 65536.0 ));
+
}
}
@@ -781,7 +842,15 @@
cf2_arrstack_size( hStemHintArray ) +
cf2_arrstack_size( vStemHintArray ) );
if ( !cf2_hintmask_isValid( hintMask ) )
- return; /* too many stem hints */
+ {
+ if ( font->isT1 )
+ {
+ /* no error, just continue unhinted */
+ *hintMask->error = FT_Err_Ok;
+ hintmap->hinted = FALSE;
+ }
+ return; /* too many stem hints */
+ }
}
/* begin by clearing the map */
@@ -797,7 +866,7 @@
/* Defense-in-depth. Should never return here. */
if ( bitCount > hintMask->bitCount )
- return;
+ return;
/* synthetic embox hints get highest priority */
if ( font->blues.doEmBoxHints )
@@ -956,6 +1025,12 @@
}
}
+ FT_TRACE6(( initialMap ? "flags: [p]air [g]host [t]op "
+ "[b]ottom [L]ocked [S]ynthetic\n"
+ "Initial hintmap\n"
+ : "Hints:\n" ));
+ cf2_hintmap_dump( hintmap );
+
/*
* Note: The following line is a convenient place to break when
* debugging hinting. Examine `hintmap->edge' for the list of
@@ -968,6 +1043,9 @@
/* adjust positions of hint edges that are not locked to blue zones */
cf2_hintmap_adjustHints( hintmap );
+ FT_TRACE6(( "(adjusted)\n" ));
+ cf2_hintmap_dump( hintmap );
+
/* save the position of all hints that were used in this hint map; */
/* if we use them again, we'll locate them in the same position */
if ( !initialMap )
@@ -1063,7 +1141,7 @@
cf2_fixedAbs( glyphpath->yOffset ) );
/* .1 character space unit */
- glyphpath->snapThreshold = cf2_floatToFixed( 0.1f );
+ glyphpath->snapThreshold = cf2_doubleToFixed( 0.1 );
glyphpath->moveIsPending = TRUE;
glyphpath->pathIsOpen = FALSE;
@@ -1095,16 +1173,20 @@
FT_Vector pt; /* hinted point in upright DS */
- pt.x = FT_MulFix( glyphpath->scaleX, x ) +
- FT_MulFix( glyphpath->scaleC, y );
+ pt.x = ADD_INT32( FT_MulFix( glyphpath->scaleX, x ),
+ FT_MulFix( glyphpath->scaleC, y ) );
pt.y = cf2_hintmap_map( hintmap, y );
- ppt->x = FT_MulFix( glyphpath->font->outerTransform.a, pt.x ) +
- FT_MulFix( glyphpath->font->outerTransform.c, pt.y ) +
- glyphpath->fractionalTranslation.x;
- ppt->y = FT_MulFix( glyphpath->font->outerTransform.b, pt.x ) +
- FT_MulFix( glyphpath->font->outerTransform.d, pt.y ) +
- glyphpath->fractionalTranslation.y;
+ ppt->x = ADD_INT32(
+ FT_MulFix( glyphpath->font->outerTransform.a, pt.x ),
+ ADD_INT32(
+ FT_MulFix( glyphpath->font->outerTransform.c, pt.y ),
+ glyphpath->fractionalTranslation.x ) );
+ ppt->y = ADD_INT32(
+ FT_MulFix( glyphpath->font->outerTransform.b, pt.x ),
+ ADD_INT32(
+ FT_MulFix( glyphpath->font->outerTransform.d, pt.y ),
+ glyphpath->fractionalTranslation.y ) );
}
@@ -1128,7 +1210,7 @@
* second segment.
* Let `w 'be the zero-based vector from `u1' to `v1'.
* `perp' is the `perpendicular dot product'; see
- * http://mathworld.wolfram.com/PerpDotProduct.html.
+ * https://mathworld.wolfram.com/PerpDotProduct.html.
* `s' is the parameter for the parametric line for the first segment
* (`u').
*
@@ -1154,12 +1236,12 @@
CF2_Fixed denominator, s;
- u.x = CF2_CS_SCALE( u2->x - u1->x );
- u.y = CF2_CS_SCALE( u2->y - u1->y );
- v.x = CF2_CS_SCALE( v2->x - v1->x );
- v.y = CF2_CS_SCALE( v2->y - v1->y );
- w.x = CF2_CS_SCALE( v1->x - u1->x );
- w.y = CF2_CS_SCALE( v1->y - u1->y );
+ u.x = CF2_CS_SCALE( SUB_INT32( u2->x, u1->x ) );
+ u.y = CF2_CS_SCALE( SUB_INT32( u2->y, u1->y ) );
+ v.x = CF2_CS_SCALE( SUB_INT32( v2->x, v1->x ) );
+ v.y = CF2_CS_SCALE( SUB_INT32( v2->y, v1->y ) );
+ w.x = CF2_CS_SCALE( SUB_INT32( v1->x, u1->x ) );
+ w.y = CF2_CS_SCALE( SUB_INT32( v1->y, u1->y ) );
denominator = cf2_perp( u, v );
@@ -1168,8 +1250,11 @@
s = FT_DivFix( cf2_perp( w, v ), denominator );
- intersection->x = u1->x + FT_MulFix( s, u2->x - u1->x );
- intersection->y = u1->y + FT_MulFix( s, u2->y - u1->y );
+ intersection->x = ADD_INT32( u1->x,
+ FT_MulFix( s, SUB_INT32( u2->x, u1->x ) ) );
+ intersection->y = ADD_INT32( u1->y,
+ FT_MulFix( s, SUB_INT32( u2->y, u1->y ) ) );
+
/*
* Special case snapping for horizontal and vertical lines.
@@ -1180,25 +1265,29 @@
*
*/
- if ( u1->x == u2->x &&
- cf2_fixedAbs( intersection->x - u1->x ) < glyphpath->snapThreshold )
+ if ( u1->x == u2->x &&
+ cf2_fixedAbs( SUB_INT32( intersection->x,
+ u1->x ) ) < glyphpath->snapThreshold )
intersection->x = u1->x;
- if ( u1->y == u2->y &&
- cf2_fixedAbs( intersection->y - u1->y ) < glyphpath->snapThreshold )
+ if ( u1->y == u2->y &&
+ cf2_fixedAbs( SUB_INT32( intersection->y,
+ u1->y ) ) < glyphpath->snapThreshold )
intersection->y = u1->y;
- if ( v1->x == v2->x &&
- cf2_fixedAbs( intersection->x - v1->x ) < glyphpath->snapThreshold )
+ if ( v1->x == v2->x &&
+ cf2_fixedAbs( SUB_INT32( intersection->x,
+ v1->x ) ) < glyphpath->snapThreshold )
intersection->x = v1->x;
- if ( v1->y == v2->y &&
- cf2_fixedAbs( intersection->y - v1->y ) < glyphpath->snapThreshold )
+ if ( v1->y == v2->y &&
+ cf2_fixedAbs( SUB_INT32( intersection->y,
+ v1->y ) ) < glyphpath->snapThreshold )
intersection->y = v1->y;
/* limit the intersection distance from midpoint of u2 and v1 */
- if ( cf2_fixedAbs( intersection->x - ( u2->x + v1->x ) / 2 ) >
- glyphpath->miterLimit ||
- cf2_fixedAbs( intersection->y - ( u2->y + v1->y ) / 2 ) >
- glyphpath->miterLimit )
+ if ( cf2_fixedAbs( intersection->x - ADD_INT32( u2->x, v1->x ) / 2 ) >
+ glyphpath->miterLimit ||
+ cf2_fixedAbs( intersection->y - ADD_INT32( u2->y, v1->y ) / 2 ) >
+ glyphpath->miterLimit )
return FALSE;
return TRUE;
@@ -1446,16 +1535,16 @@
CF2_Fixed* x,
CF2_Fixed* y )
{
- CF2_Fixed dx = x2 - x1;
- CF2_Fixed dy = y2 - y1;
+ CF2_Fixed dx = SUB_INT32( x2, x1 );
+ CF2_Fixed dy = SUB_INT32( y2, y1 );
/* note: negative offsets don't work here; negate deltas to change */
/* quadrants, below */
if ( glyphpath->font->reverseWinding )
{
- dx = -dx;
- dy = -dy;
+ dx = NEG_INT32( dx );
+ dy = NEG_INT32( dy );
}
*x = *y = 0;
@@ -1464,8 +1553,9 @@
return;
/* add momentum for this path element */
- glyphpath->callbacks->windingMomentum +=
- cf2_getWindingMomentum( x1, y1, x2, y2 );
+ glyphpath->callbacks->windingMomentum =
+ ADD_INT32( glyphpath->callbacks->windingMomentum,
+ cf2_getWindingMomentum( x1, y1, x2, y2 ) );
/* note: allow mixed integer and fixed multiplication here */
if ( dx >= 0 )
@@ -1474,13 +1564,13 @@
{
/* first quadrant, +x +y */
- if ( dx > 2 * dy )
+ if ( dx > MUL_INT32( 2, dy ) )
{
/* +x */
*x = 0;
*y = 0;
}
- else if ( dy > 2 * dx )
+ else if ( dy > MUL_INT32( 2, dx ) )
{
/* +y */
*x = glyphpath->xOffset;
@@ -1489,9 +1579,9 @@
else
{
/* +x +y */
- *x = FT_MulFix( cf2_floatToFixed( 0.7 ),
+ *x = FT_MulFix( cf2_doubleToFixed( 0.7 ),
glyphpath->xOffset );
- *y = FT_MulFix( cf2_floatToFixed( 1.0 - 0.7 ),
+ *y = FT_MulFix( cf2_doubleToFixed( 1.0 - 0.7 ),
glyphpath->yOffset );
}
}
@@ -1499,24 +1589,24 @@
{
/* fourth quadrant, +x -y */
- if ( dx > -2 * dy )
+ if ( dx > MUL_INT32( -2, dy ) )
{
/* +x */
*x = 0;
*y = 0;
}
- else if ( -dy > 2 * dx )
+ else if ( NEG_INT32( dy ) > MUL_INT32( 2, dx ) )
{
/* -y */
- *x = -glyphpath->xOffset;
+ *x = NEG_INT32( glyphpath->xOffset );
*y = glyphpath->yOffset;
}
else
{
/* +x -y */
- *x = FT_MulFix( cf2_floatToFixed( -0.7 ),
+ *x = FT_MulFix( cf2_doubleToFixed( -0.7 ),
glyphpath->xOffset );
- *y = FT_MulFix( cf2_floatToFixed( 1.0 - 0.7 ),
+ *y = FT_MulFix( cf2_doubleToFixed( 1.0 - 0.7 ),
glyphpath->yOffset );
}
}
@@ -1527,13 +1617,13 @@
{
/* second quadrant, -x +y */
- if ( -dx > 2 * dy )
+ if ( NEG_INT32( dx ) > MUL_INT32( 2, dy ) )
{
/* -x */
*x = 0;
- *y = 2 * glyphpath->yOffset;
+ *y = MUL_INT32( 2, glyphpath->yOffset );
}
- else if ( dy > -2 * dx )
+ else if ( dy > MUL_INT32( -2, dx ) )
{
/* +y */
*x = glyphpath->xOffset;
@@ -1542,9 +1632,9 @@
else
{
/* -x +y */
- *x = FT_MulFix( cf2_floatToFixed( 0.7 ),
+ *x = FT_MulFix( cf2_doubleToFixed( 0.7 ),
glyphpath->xOffset );
- *y = FT_MulFix( cf2_floatToFixed( 1.0 + 0.7 ),
+ *y = FT_MulFix( cf2_doubleToFixed( 1.0 + 0.7 ),
glyphpath->yOffset );
}
}
@@ -1552,24 +1642,24 @@
{
/* third quadrant, -x -y */
- if ( -dx > -2 * dy )
+ if ( NEG_INT32( dx ) > MUL_INT32( -2, dy ) )
{
/* -x */
*x = 0;
- *y = 2 * glyphpath->yOffset;
+ *y = MUL_INT32( 2, glyphpath->yOffset );
}
- else if ( -dy > -2 * dx )
+ else if ( NEG_INT32( dy ) > MUL_INT32( -2, dx ) )
{
/* -y */
- *x = -glyphpath->xOffset;
+ *x = NEG_INT32( glyphpath->xOffset );
*y = glyphpath->yOffset;
}
else
{
/* -x -y */
- *x = FT_MulFix( cf2_floatToFixed( -0.7 ),
+ *x = FT_MulFix( cf2_doubleToFixed( -0.7 ),
glyphpath->xOffset );
- *y = FT_MulFix( cf2_floatToFixed( 1.0 + 0.7 ),
+ *y = FT_MulFix( cf2_doubleToFixed( 1.0 + 0.7 ),
glyphpath->yOffset );
}
}
@@ -1675,10 +1765,10 @@
&yOffset );
/* construct offset points */
- P0.x = glyphpath->currentCS.x + xOffset;
- P0.y = glyphpath->currentCS.y + yOffset;
- P1.x = x + xOffset;
- P1.y = y + yOffset;
+ P0.x = ADD_INT32( glyphpath->currentCS.x, xOffset );
+ P0.y = ADD_INT32( glyphpath->currentCS.y, yOffset );
+ P1.x = ADD_INT32( x, xOffset );
+ P1.y = ADD_INT32( y, yOffset );
if ( glyphpath->moveIsPending )
{
@@ -1753,19 +1843,20 @@
&yOffset3 );
/* add momentum from the middle segment */
- glyphpath->callbacks->windingMomentum +=
- cf2_getWindingMomentum( x1, y1, x2, y2 );
+ glyphpath->callbacks->windingMomentum =
+ ADD_INT32( glyphpath->callbacks->windingMomentum,
+ cf2_getWindingMomentum( x1, y1, x2, y2 ) );
/* construct offset points */
- P0.x = glyphpath->currentCS.x + xOffset1;
- P0.y = glyphpath->currentCS.y + yOffset1;
- P1.x = x1 + xOffset1;
- P1.y = y1 + yOffset1;
+ P0.x = ADD_INT32( glyphpath->currentCS.x, xOffset1 );
+ P0.y = ADD_INT32( glyphpath->currentCS.y, yOffset1 );
+ P1.x = ADD_INT32( x1, xOffset1 );
+ P1.y = ADD_INT32( y1, yOffset1 );
/* note: preserve angle of final segment by using offset3 at both ends */
- P2.x = x2 + xOffset3;
- P2.y = y2 + yOffset3;
- P3.x = x3 + xOffset3;
- P3.y = y3 + yOffset3;
+ P2.x = ADD_INT32( x2, xOffset3 );
+ P2.y = ADD_INT32( y2, yOffset3 );
+ P3.x = ADD_INT32( x3, xOffset3 );
+ P3.y = ADD_INT32( y3, yOffset3 );
if ( glyphpath->moveIsPending )
{
diff --git a/modules/freetype2/src/cff/cf2hints.h b/modules/freetype2/src/psaux/pshints.h
index a8984542a..92e37e98a 100644
--- a/modules/freetype2/src/cff/cf2hints.h
+++ b/modules/freetype2/src/psaux/pshints.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2hints.h */
+/* pshints.h */
/* */
/* Adobe's code for handling CFF hints (body). */
/* */
@@ -36,9 +36,8 @@
/***************************************************************************/
-#ifndef CF2HINTS_H_
-#define CF2HINTS_H_
-
+#ifndef PSHINT_H_
+#define PSHINT_H_
FT_BEGIN_HEADER
@@ -283,7 +282,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2HINTS_H_ */
+#endif /* PSHINT_H_ */
/* END */
diff --git a/modules/freetype2/src/psaux/psintrp.c b/modules/freetype2/src/psaux/psintrp.c
new file mode 100644
index 000000000..da5a8dad1
--- /dev/null
+++ b/modules/freetype2/src/psaux/psintrp.c
@@ -0,0 +1,3040 @@
+/***************************************************************************/
+/* */
+/* psintrp.c */
+/* */
+/* Adobe's CFF Interpreter (body). */
+/* */
+/* Copyright 2007-2014 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#include "psft.h"
+#include FT_INTERNAL_DEBUG_H
+#include FT_SERVICE_CFF_TABLE_LOAD_H
+
+#include "psglue.h"
+#include "psfont.h"
+#include "psstack.h"
+#include "pshints.h"
+#include "psintrp.h"
+
+#include "pserror.h"
+
+#include "psobjs.h" /* for cff_random */
+#include "t1decode.h" /* for t1 seac */
+
+
+ /*************************************************************************/
+ /* */
+ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+ /* messages during execution. */
+ /* */
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_cf2interp
+
+
+ FT_LOCAL_DEF( void )
+ cf2_hintmask_init( CF2_HintMask hintmask,
+ FT_Error* error )
+ {
+ FT_ZERO( hintmask );
+
+ hintmask->error = error;
+ }
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ cf2_hintmask_isValid( const CF2_HintMask hintmask )
+ {
+ return hintmask->isValid;
+ }
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ cf2_hintmask_isNew( const CF2_HintMask hintmask )
+ {
+ return hintmask->isNew;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_hintmask_setNew( CF2_HintMask hintmask,
+ FT_Bool val )
+ {
+ hintmask->isNew = val;
+ }
+
+
+ /* clients call `getMaskPtr' in order to iterate */
+ /* through hint mask */
+
+ FT_LOCAL_DEF( FT_Byte* )
+ cf2_hintmask_getMaskPtr( CF2_HintMask hintmask )
+ {
+ return hintmask->mask;
+ }
+
+
+ static size_t
+ cf2_hintmask_setCounts( CF2_HintMask hintmask,
+ size_t bitCount )
+ {
+ if ( bitCount > CF2_MAX_HINTS )
+ {
+ /* total of h and v stems must be <= 96 */
+ CF2_SET_ERROR( hintmask->error, Invalid_Glyph_Format );
+ return 0;
+ }
+
+ hintmask->bitCount = bitCount;
+ hintmask->byteCount = ( hintmask->bitCount + 7 ) / 8;
+
+ hintmask->isValid = TRUE;
+ hintmask->isNew = TRUE;
+
+ return bitCount;
+ }
+
+
+ /* consume the hintmask bytes from the charstring, advancing the src */
+ /* pointer */
+ static void
+ cf2_hintmask_read( CF2_HintMask hintmask,
+ CF2_Buffer charstring,
+ size_t bitCount )
+ {
+ size_t i;
+
+#ifndef CF2_NDEBUG
+ /* these are the bits in the final mask byte that should be zero */
+ /* Note: this variable is only used in an assert expression below */
+ /* and then only if CF2_NDEBUG is not defined */
+ CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1;
+#endif
+
+
+ /* initialize counts and isValid */
+ if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 )
+ return;
+
+ FT_ASSERT( hintmask->byteCount > 0 );
+
+ FT_TRACE4(( " (maskbytes:" ));
+
+ /* set mask and advance interpreter's charstring pointer */
+ for ( i = 0; i < hintmask->byteCount; i++ )
+ {
+ hintmask->mask[i] = (FT_Byte)cf2_buf_readByte( charstring );
+ FT_TRACE4(( " 0x%02X", hintmask->mask[i] ));
+ }
+
+ FT_TRACE4(( ")\n" ));
+
+ /* assert any unused bits in last byte are zero unless there's a prior */
+ /* error */
+ /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1 */
+#ifndef CF2_NDEBUG
+ FT_ASSERT( ( hintmask->mask[hintmask->byteCount - 1] & mask ) == 0 ||
+ *hintmask->error );
+#endif
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_hintmask_setAll( CF2_HintMask hintmask,
+ size_t bitCount )
+ {
+ size_t i;
+ CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1;
+
+
+ /* initialize counts and isValid */
+ if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 )
+ return;
+
+ FT_ASSERT( hintmask->byteCount > 0 );
+ FT_ASSERT( hintmask->byteCount <=
+ sizeof ( hintmask->mask ) / sizeof ( hintmask->mask[0] ) );
+
+ /* set mask to all ones */
+ for ( i = 0; i < hintmask->byteCount; i++ )
+ hintmask->mask[i] = 0xFF;
+
+ /* clear unused bits */
+ /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1 */
+ hintmask->mask[hintmask->byteCount - 1] &= ~mask;
+ }
+
+
+ /* Type2 charstring opcodes */
+ enum
+ {
+ cf2_cmdRESERVED_0, /* 0 */
+ cf2_cmdHSTEM, /* 1 */
+ cf2_cmdRESERVED_2, /* 2 */
+ cf2_cmdVSTEM, /* 3 */
+ cf2_cmdVMOVETO, /* 4 */
+ cf2_cmdRLINETO, /* 5 */
+ cf2_cmdHLINETO, /* 6 */
+ cf2_cmdVLINETO, /* 7 */
+ cf2_cmdRRCURVETO, /* 8 */
+ cf2_cmdCLOSEPATH, /* 9 T1 only */
+ cf2_cmdCALLSUBR, /* 10 */
+ cf2_cmdRETURN, /* 11 */
+ cf2_cmdESC, /* 12 */
+ cf2_cmdHSBW, /* 13 T1 only */
+ cf2_cmdENDCHAR, /* 14 */
+ cf2_cmdVSINDEX, /* 15 */
+ cf2_cmdBLEND, /* 16 */
+ cf2_cmdRESERVED_17, /* 17 */
+ cf2_cmdHSTEMHM, /* 18 */
+ cf2_cmdHINTMASK, /* 19 */
+ cf2_cmdCNTRMASK, /* 20 */
+ cf2_cmdRMOVETO, /* 21 */
+ cf2_cmdHMOVETO, /* 22 */
+ cf2_cmdVSTEMHM, /* 23 */
+ cf2_cmdRCURVELINE, /* 24 */
+ cf2_cmdRLINECURVE, /* 25 */
+ cf2_cmdVVCURVETO, /* 26 */
+ cf2_cmdHHCURVETO, /* 27 */
+ cf2_cmdEXTENDEDNMBR, /* 28 */
+ cf2_cmdCALLGSUBR, /* 29 */
+ cf2_cmdVHCURVETO, /* 30 */
+ cf2_cmdHVCURVETO /* 31 */
+ };
+
+ enum
+ {
+ cf2_escDOTSECTION, /* 0 */
+ cf2_escVSTEM3, /* 1 T1 only */
+ cf2_escHSTEM3, /* 2 T1 only */
+ cf2_escAND, /* 3 */
+ cf2_escOR, /* 4 */
+ cf2_escNOT, /* 5 */
+ cf2_escSEAC, /* 6 T1 only */
+ cf2_escSBW, /* 7 T1 only */
+ cf2_escRESERVED_8, /* 8 */
+ cf2_escABS, /* 9 */
+ cf2_escADD, /* 10 like otherADD */
+ cf2_escSUB, /* 11 like otherSUB */
+ cf2_escDIV, /* 12 */
+ cf2_escRESERVED_13, /* 13 */
+ cf2_escNEG, /* 14 */
+ cf2_escEQ, /* 15 */
+ cf2_escCALLOTHERSUBR,/* 16 T1 only */
+ cf2_escPOP, /* 17 T1 only */
+ cf2_escDROP, /* 18 */
+ cf2_escRESERVED_19, /* 19 */
+ cf2_escPUT, /* 20 like otherPUT */
+ cf2_escGET, /* 21 like otherGET */
+ cf2_escIFELSE, /* 22 like otherIFELSE */
+ cf2_escRANDOM, /* 23 like otherRANDOM */
+ cf2_escMUL, /* 24 like otherMUL */
+ cf2_escRESERVED_25, /* 25 */
+ cf2_escSQRT, /* 26 */
+ cf2_escDUP, /* 27 like otherDUP */
+ cf2_escEXCH, /* 28 like otherEXCH */
+ cf2_escINDEX, /* 29 */
+ cf2_escROLL, /* 30 */
+ cf2_escRESERVED_31, /* 31 */
+ cf2_escRESERVED_32, /* 32 */
+ cf2_escSETCURRENTPT, /* 33 T1 only */
+ cf2_escHFLEX, /* 34 */
+ cf2_escFLEX, /* 35 */
+ cf2_escHFLEX1, /* 36 */
+ cf2_escFLEX1, /* 37 */
+ cf2_escRESERVED_38 /* 38 & all higher */
+ };
+
+
+ /* `stemHintArray' does not change once we start drawing the outline. */
+ static void
+ cf2_doStems( const CF2_Font font,
+ CF2_Stack opStack,
+ CF2_ArrStack stemHintArray,
+ CF2_Fixed* width,
+ FT_Bool* haveWidth,
+ CF2_Fixed hintOffset )
+ {
+ CF2_UInt i;
+ CF2_UInt count = cf2_stack_count( opStack );
+ FT_Bool hasWidthArg = (FT_Bool)( count & 1 );
+
+ /* variable accumulates delta values from operand stack */
+ CF2_Fixed position = hintOffset;
+
+ if ( font->isT1 && !font->decoder->flex_state && !*haveWidth )
+ FT_ERROR(( "cf2_doStems (Type 1 mode):"
+ " No width. Use hsbw/sbw as first op\n" ));
+
+ if ( !font->isT1 && hasWidthArg && !*haveWidth )
+ *width = ADD_INT32( cf2_stack_getReal( opStack, 0 ),
+ cf2_getNominalWidthX( font->decoder ) );
+
+ if ( font->decoder->width_only )
+ goto exit;
+
+ for ( i = hasWidthArg ? 1 : 0; i < count; i += 2 )
+ {
+ /* construct a CF2_StemHint and push it onto the list */
+ CF2_StemHintRec stemhint;
+
+
+ stemhint.min =
+ position = ADD_INT32( position,
+ cf2_stack_getReal( opStack, i ) );
+ stemhint.max =
+ position = ADD_INT32( position,
+ cf2_stack_getReal( opStack, i + 1 ) );
+
+ stemhint.used = FALSE;
+ stemhint.maxDS =
+ stemhint.minDS = 0;
+
+ cf2_arrstack_push( stemHintArray, &stemhint ); /* defer error check */
+ }
+
+ cf2_stack_clear( opStack );
+
+ exit:
+ /* cf2_doStems must define a width (may be default) */
+ *haveWidth = TRUE;
+ }
+
+
+ static void
+ cf2_doFlex( CF2_Stack opStack,
+ CF2_Fixed* curX,
+ CF2_Fixed* curY,
+ CF2_GlyphPath glyphPath,
+ const FT_Bool* readFromStack,
+ FT_Bool doConditionalLastRead )
+ {
+ CF2_Fixed vals[14];
+ CF2_UInt idx;
+ FT_Bool isHFlex;
+ CF2_Int top, i, j;
+
+
+ vals[0] = *curX;
+ vals[1] = *curY;
+ idx = 0;
+ isHFlex = FT_BOOL( readFromStack[9] == FALSE );
+ top = isHFlex ? 9 : 10;
+
+ for ( i = 0; i < top; i++ )
+ {
+ vals[i + 2] = vals[i];
+ if ( readFromStack[i] )
+ vals[i + 2] = ADD_INT32( vals[i + 2], cf2_stack_getReal( opStack,
+ idx++ ) );
+ }
+
+ if ( isHFlex )
+ vals[9 + 2] = *curY;
+
+ if ( doConditionalLastRead )
+ {
+ FT_Bool lastIsX = (FT_Bool)(
+ cf2_fixedAbs( SUB_INT32( vals[10], *curX ) ) >
+ cf2_fixedAbs( SUB_INT32( vals[11], *curY ) ) );
+ CF2_Fixed lastVal = cf2_stack_getReal( opStack, idx );
+
+
+ if ( lastIsX )
+ {
+ vals[12] = ADD_INT32( vals[10], lastVal );
+ vals[13] = *curY;
+ }
+ else
+ {
+ vals[12] = *curX;
+ vals[13] = ADD_INT32( vals[11], lastVal );
+ }
+ }
+ else
+ {
+ if ( readFromStack[10] )
+ vals[12] = ADD_INT32( vals[10],
+ cf2_stack_getReal( opStack, idx++ ) );
+ else
+ vals[12] = *curX;
+
+ if ( readFromStack[11] )
+ vals[13] = ADD_INT32( vals[11],
+ cf2_stack_getReal( opStack, idx ) );
+ else
+ vals[13] = *curY;
+ }
+
+ for ( j = 0; j < 2; j++ )
+ cf2_glyphpath_curveTo( glyphPath, vals[j * 6 + 2],
+ vals[j * 6 + 3],
+ vals[j * 6 + 4],
+ vals[j * 6 + 5],
+ vals[j * 6 + 6],
+ vals[j * 6 + 7] );
+
+ cf2_stack_clear( opStack );
+
+ *curX = vals[12];
+ *curY = vals[13];
+ }
+
+
+ /* Blend numOperands on the stack, */
+ /* store results into the first numBlends values, */
+ /* then pop remaining arguments. */
+ static void
+ cf2_doBlend( const CFF_Blend blend,
+ CF2_Stack opStack,
+ CF2_UInt numBlends )
+ {
+ CF2_UInt delta;
+ CF2_UInt base;
+ CF2_UInt i, j;
+ CF2_UInt numOperands = (CF2_UInt)( numBlends * blend->lenBV );
+
+
+ base = cf2_stack_count( opStack ) - numOperands;
+ delta = base + numBlends;
+
+ for ( i = 0; i < numBlends; i++ )
+ {
+ const CF2_Fixed* weight = &blend->BV[1];
+
+ /* start with first term */
+ CF2_Fixed sum = cf2_stack_getReal( opStack, i + base );
+
+
+ for ( j = 1; j < blend->lenBV; j++ )
+ sum = ADD_INT32( sum,
+ FT_MulFix( *weight++,
+ cf2_stack_getReal( opStack,
+ delta++ ) ) );
+
+ /* store blended result */
+ cf2_stack_setReal( opStack, i + base, sum );
+ }
+
+ /* leave only `numBlends' results on stack */
+ cf2_stack_pop( opStack, numOperands - numBlends );
+ }
+
+
+ /*
+ * `error' is a shared error code used by many objects in this
+ * routine. Before the code continues from an error, it must check and
+ * record the error in `*error'. The idea is that this shared
+ * error code will record the first error encountered. If testing
+ * for an error anyway, the cost of `goto exit' is small, so we do it,
+ * even if continuing would be safe. In this case, `lastError' is
+ * set, so the testing and storing can be done in one place, at `exit'.
+ *
+ * Continuing after an error is intended for objects which do their own
+ * testing of `*error', e.g., array stack functions. This allows us to
+ * avoid an extra test after the call.
+ *
+ * Unimplemented opcodes are ignored.
+ *
+ */
+ FT_LOCAL_DEF( void )
+ cf2_interpT2CharString( CF2_Font font,
+ CF2_Buffer buf,
+ CF2_OutlineCallbacks callbacks,
+ const FT_Vector* translation,
+ FT_Bool doingSeac,
+ CF2_Fixed curX,
+ CF2_Fixed curY,
+ CF2_Fixed* width )
+ {
+ /* lastError is used for errors that are immediately tested */
+ FT_Error lastError = FT_Err_Ok;
+
+ /* pointer to parsed font object */
+ PS_Decoder* decoder = font->decoder;
+
+ FT_Error* error = &font->error;
+ FT_Memory memory = font->memory;
+
+ CF2_Fixed scaleY = font->innerTransform.d;
+ CF2_Fixed nominalWidthX = cf2_getNominalWidthX( decoder );
+
+ /* stuff for Type 1 */
+ FT_Int known_othersubr_result_cnt = 0;
+ FT_Bool large_int = FALSE;
+ FT_Bool initial_map_ready = FALSE;
+
+#define PS_STORAGE_SIZE 3
+ CF2_F16Dot16 results[PS_STORAGE_SIZE]; /* for othersubr results */
+ FT_Int result_cnt = 0;
+
+ /* save this for hinting seac accents */
+ CF2_Fixed hintOriginY = curY;
+
+ CF2_Stack opStack = NULL;
+ FT_UInt stackSize;
+ FT_Byte op1; /* first opcode byte */
+
+ CF2_F16Dot16 storage[CF2_STORAGE_SIZE]; /* for `put' and `get' */
+ CF2_F16Dot16 flexStore[6]; /* for Type 1 flex */
+
+ /* instruction limit; 20,000,000 matches Avalon */
+ FT_UInt32 instructionLimit = 20000000UL;
+
+ CF2_ArrStackRec subrStack;
+
+ FT_Bool haveWidth;
+ CF2_Buffer charstring = NULL;
+
+ CF2_Int charstringIndex = -1; /* initialize to empty */
+
+ /* TODO: placeholders for hint structures */
+
+ /* objects used for hinting */
+ CF2_ArrStackRec hStemHintArray;
+ CF2_ArrStackRec vStemHintArray;
+
+ CF2_HintMaskRec hintMask;
+ CF2_GlyphPathRec glyphPath;
+
+
+ FT_ZERO( &storage );
+ FT_ZERO( &results );
+ FT_ZERO( &flexStore );
+
+ /* initialize the remaining objects */
+ cf2_arrstack_init( &subrStack,
+ memory,
+ error,
+ sizeof ( CF2_BufferRec ) );
+ cf2_arrstack_init( &hStemHintArray,
+ memory,
+ error,
+ sizeof ( CF2_StemHintRec ) );
+ cf2_arrstack_init( &vStemHintArray,
+ memory,
+ error,
+ sizeof ( CF2_StemHintRec ) );
+
+ /* initialize CF2_StemHint arrays */
+ cf2_hintmask_init( &hintMask, error );
+
+ /* initialize path map to manage drawing operations */
+
+ /* Note: last 4 params are used to handle `MoveToPermissive', which */
+ /* may need to call `hintMap.Build' */
+ /* TODO: MoveToPermissive is gone; are these still needed? */
+ cf2_glyphpath_init( &glyphPath,
+ font,
+ callbacks,
+ scaleY,
+ /* hShift, */
+ &hStemHintArray,
+ &vStemHintArray,
+ &hintMask,
+ hintOriginY,
+ &font->blues,
+ translation );
+
+ /*
+ * Initialize state for width parsing. From the CFF Spec:
+ *
+ * The first stack-clearing operator, which must be one of hstem,
+ * hstemhm, vstem, vstemhm, cntrmask, hintmask, hmoveto, vmoveto,
+ * rmoveto, or endchar, takes an additional argument - the width (as
+ * described earlier), which may be expressed as zero or one numeric
+ * argument.
+ *
+ * What we implement here uses the first validly specified width, but
+ * does not detect errors for specifying more than one width.
+ *
+ * If one of the above operators occurs without explicitly specifying
+ * a width, we assume the default width.
+ *
+ * CFF2 charstrings always return the default width (0).
+ *
+ */
+ haveWidth = font->isCFF2 ? TRUE : FALSE;
+ *width = cf2_getDefaultWidthX( decoder );
+
+ /*
+ * Note: At this point, all pointers to resources must be NULL
+ * and all local objects must be initialized.
+ * There must be no branches to `exit:' above this point.
+ *
+ */
+
+ /* allocate an operand stack */
+ stackSize = font->isCFF2 ? cf2_getMaxstack( decoder )
+ : CF2_OPERAND_STACK_SIZE;
+ opStack = cf2_stack_init( memory, error, stackSize );
+
+ if ( !opStack )
+ {
+ lastError = FT_THROW( Out_Of_Memory );
+ goto exit;
+ }
+
+ /* initialize subroutine stack by placing top level charstring as */
+ /* first element (max depth plus one for the charstring) */
+ /* Note: Caller owns and must finalize the first charstring. */
+ /* Our copy of it does not change that requirement. */
+ cf2_arrstack_setCount( &subrStack, CF2_MAX_SUBR + 1 );
+
+ charstring = (CF2_Buffer)cf2_arrstack_getBuffer( &subrStack );
+ *charstring = *buf; /* structure copy */
+
+ charstringIndex = 0; /* entry is valid now */
+
+ /* catch errors so far */
+ if ( *error )
+ goto exit;
+
+ /* main interpreter loop */
+ while ( 1 )
+ {
+ if ( font->isT1 )
+ FT_ASSERT( known_othersubr_result_cnt == 0 ||
+ result_cnt == 0 );
+
+ if ( cf2_buf_isEnd( charstring ) )
+ {
+ /* If we've reached the end of the charstring, simulate a */
+ /* cf2_cmdRETURN or cf2_cmdENDCHAR. */
+ /* We do this for both CFF and CFF2. */
+ if ( charstringIndex )
+ op1 = cf2_cmdRETURN; /* end of buffer for subroutine */
+ else
+ op1 = cf2_cmdENDCHAR; /* end of buffer for top level charstring */
+ }
+ else
+ {
+ op1 = (FT_Byte)cf2_buf_readByte( charstring );
+
+ /* Explicit RETURN and ENDCHAR in CFF2 should be ignored. */
+ /* Note: Trace message will report 0 instead of 11 or 14. */
+ if ( ( op1 == cf2_cmdRETURN || op1 == cf2_cmdENDCHAR ) &&
+ font->isCFF2 )
+ op1 = cf2_cmdRESERVED_0;
+ }
+
+ if ( font->isT1 )
+ {
+ if ( !initial_map_ready &&
+ !( op1 == cf2_cmdHSTEM ||
+ op1 == cf2_cmdVSTEM ||
+ op1 == cf2_cmdHSBW ||
+ op1 == cf2_cmdCALLSUBR ||
+ op1 == cf2_cmdRETURN ||
+ op1 == cf2_cmdESC ||
+ op1 == cf2_cmdENDCHAR ||
+ op1 >= 32 /* Numbers */ ) )
+ {
+ /* Skip outline commands first time round. */
+ /* `endchar' will trigger initial hintmap build */
+ /* and rewind the charstring. */
+ cf2_stack_clear( opStack );
+ continue;
+ }
+
+ if ( result_cnt > 0 &&
+ !( op1 == cf2_cmdCALLSUBR ||
+ op1 == cf2_cmdRETURN ||
+ op1 == cf2_cmdESC ||
+ op1 >= 32 /* Numbers */ ) )
+ {
+ /* all operands have been transferred by previous pops */
+ result_cnt = 0;
+ }
+
+ if ( large_int && !( op1 >= 32 || op1 == cf2_escDIV ) )
+ {
+ FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):"
+ " no `div' after large integer\n" ));
+
+ large_int = FALSE;
+ }
+ }
+
+ /* check for errors once per loop */
+ if ( *error )
+ goto exit;
+
+ instructionLimit--;
+ if ( instructionLimit == 0 )
+ {
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ switch( op1 )
+ {
+ case cf2_cmdRESERVED_0:
+ case cf2_cmdRESERVED_2:
+ case cf2_cmdRESERVED_17:
+ /* we may get here if we have a prior error */
+ FT_TRACE4(( " unknown op (%d)\n", op1 ));
+ break;
+
+ case cf2_cmdVSINDEX:
+ FT_TRACE4(( " vsindex\n" ));
+
+ if ( !font->isCFF2 )
+ break; /* clear stack & ignore */
+
+ if ( font->blend.usedBV )
+ {
+ /* vsindex not allowed after blend */
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ {
+ FT_Int temp = cf2_stack_popInt( opStack );
+
+
+ if ( temp >= 0 )
+ font->vsindex = (FT_UInt)temp;
+ }
+ break;
+
+ case cf2_cmdBLEND:
+ {
+ FT_UInt numBlends;
+
+
+ FT_TRACE4(( " blend\n" ));
+
+ if ( !font->isCFF2 )
+ break; /* clear stack & ignore */
+
+ /* do we have a `blend' op in a non-variant font? */
+ if ( !font->blend.font )
+ {
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ /* check cached blend vector */
+ if ( font->cffload->blend_check_vector( &font->blend,
+ font->vsindex,
+ font->lenNDV,
+ font->NDV ) )
+ {
+ lastError = font->cffload->blend_build_vector( &font->blend,
+ font->vsindex,
+ font->lenNDV,
+ font->NDV );
+ if ( lastError )
+ goto exit;
+ }
+
+ /* do the blend */
+ numBlends = (FT_UInt)cf2_stack_popInt( opStack );
+ if ( numBlends > stackSize )
+ {
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ cf2_doBlend( &font->blend, opStack, numBlends );
+
+ font->blend.usedBV = TRUE;
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_cmdHSTEMHM:
+ case cf2_cmdHSTEM:
+ FT_TRACE4(( op1 == cf2_cmdHSTEMHM ? " hstemhm\n" : " hstem\n" ));
+
+ if ( !font->isT1 )
+ {
+ /* never add hints after the mask is computed */
+ /* except if in Type 1 mode (no hintmask op) */
+ if ( cf2_hintmask_isValid( &hintMask ) )
+ {
+ FT_TRACE4(( "cf2_interpT2CharString:"
+ " invalid horizontal hint mask\n" ));
+ break;
+ }
+ }
+
+ /* add left-sidebearing correction in Type 1 mode */
+ cf2_doStems( font,
+ opStack,
+ &hStemHintArray,
+ width,
+ &haveWidth,
+ font->isT1 ? decoder->builder.left_bearing->y
+ : 0 );
+
+ if ( decoder->width_only )
+ goto exit;
+
+ break;
+
+ case cf2_cmdVSTEMHM:
+ case cf2_cmdVSTEM:
+ FT_TRACE4(( op1 == cf2_cmdVSTEMHM ? " vstemhm\n" : " vstem\n" ));
+
+ if ( !font->isT1 )
+ {
+ /* never add hints after the mask is computed */
+ /* except if in Type 1 mode (no hintmask op) */
+ if ( cf2_hintmask_isValid( &hintMask ) )
+ {
+ FT_TRACE4(( "cf2_interpT2CharString:"
+ " invalid vertical hint mask\n" ));
+ break;
+ }
+ }
+
+ /* add left-sidebearing correction in Type 1 mode */
+ cf2_doStems( font,
+ opStack,
+ &vStemHintArray,
+ width,
+ &haveWidth,
+ font->isT1 ? decoder->builder.left_bearing->x
+ : 0 );
+
+ if ( decoder->width_only )
+ goto exit;
+
+ break;
+
+ case cf2_cmdVMOVETO:
+ FT_TRACE4(( " vmoveto\n" ));
+
+ if ( font->isT1 && !decoder->flex_state && !haveWidth )
+ FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):"
+ " No width. Use hsbw/sbw as first op\n" ));
+
+ if ( cf2_stack_count( opStack ) > 1 && !haveWidth )
+ *width = ADD_INT32( cf2_stack_getReal( opStack, 0 ),
+ nominalWidthX );
+
+ /* width is defined or default after this */
+ haveWidth = TRUE;
+
+ if ( decoder->width_only )
+ goto exit;
+
+ curY = ADD_INT32( curY, cf2_stack_popFixed( opStack ) );
+
+ if ( !decoder->flex_state )
+ cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+
+ break;
+
+ case cf2_cmdRLINETO:
+ {
+ CF2_UInt idx;
+ CF2_UInt count = cf2_stack_count( opStack );
+
+
+ FT_TRACE4(( " rlineto\n" ));
+
+ for ( idx = 0; idx < count; idx += 2 )
+ {
+ curX = ADD_INT32( curX, cf2_stack_getReal( opStack,
+ idx + 0 ) );
+ curY = ADD_INT32( curY, cf2_stack_getReal( opStack,
+ idx + 1 ) );
+
+ cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdHLINETO:
+ case cf2_cmdVLINETO:
+ {
+ CF2_UInt idx;
+ CF2_UInt count = cf2_stack_count( opStack );
+
+ FT_Bool isX = FT_BOOL( op1 == cf2_cmdHLINETO );
+
+
+ FT_TRACE4(( isX ? " hlineto\n" : " vlineto\n" ));
+
+ for ( idx = 0; idx < count; idx++ )
+ {
+ CF2_Fixed v = cf2_stack_getReal( opStack, idx );
+
+
+ if ( isX )
+ curX = ADD_INT32( curX, v );
+ else
+ curY = ADD_INT32( curY, v );
+
+ isX = !isX;
+
+ cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue;
+
+ case cf2_cmdRCURVELINE:
+ case cf2_cmdRRCURVETO:
+ {
+ CF2_UInt count = cf2_stack_count( opStack );
+ CF2_UInt idx = 0;
+
+
+ FT_TRACE4(( op1 == cf2_cmdRCURVELINE ? " rcurveline\n"
+ : " rrcurveto\n" ));
+
+ while ( idx + 6 <= count )
+ {
+ CF2_Fixed x1, y1, x2, y2, x3, y3;
+
+
+ x1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curX );
+ y1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), curY );
+ x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), x1 );
+ y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), y1 );
+ x3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 4 ), x2 );
+ y3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 5 ), y2 );
+
+ cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+
+ curX = x3;
+ curY = y3;
+ idx += 6;
+ }
+
+ if ( op1 == cf2_cmdRCURVELINE )
+ {
+ curX = ADD_INT32( curX, cf2_stack_getReal( opStack,
+ idx + 0 ) );
+ curY = ADD_INT32( curY, cf2_stack_getReal( opStack,
+ idx + 1 ) );
+
+ cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdCLOSEPATH:
+ if ( !font->isT1 )
+ FT_TRACE4(( " unknown op (%d)\n", op1 ));
+ else
+ {
+ FT_TRACE4(( " closepath" ));
+
+ /* if there is no path, `closepath' is a no-op */
+ ps_builder_close_contour( &decoder->builder );
+
+ haveWidth = TRUE;
+ }
+ break;
+
+ case cf2_cmdCALLGSUBR:
+ case cf2_cmdCALLSUBR:
+ {
+ CF2_Int subrNum;
+
+
+ FT_TRACE4(( op1 == cf2_cmdCALLGSUBR ? " callgsubr"
+ : " callsubr" ));
+
+ if ( ( !font->isT1 && charstringIndex > CF2_MAX_SUBR ) ||
+ ( font->isT1 && charstringIndex > T1_MAX_SUBRS_CALLS ) )
+ {
+ /* max subr plus one for charstring */
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* overflow of stack */
+ }
+
+ /* push our current CFF charstring region on subrStack */
+ charstring = (CF2_Buffer)
+ cf2_arrstack_getPointer(
+ &subrStack,
+ (size_t)charstringIndex + 1 );
+
+ /* set up the new CFF region and pointer */
+ subrNum = cf2_stack_popInt( opStack );
+
+ if ( font->isT1 && decoder->locals_hash )
+ {
+ size_t* val = ft_hash_num_lookup( subrNum,
+ decoder->locals_hash );
+
+
+ if ( val )
+ subrNum = *val;
+ else
+ subrNum = -1;
+ }
+
+ switch ( op1 )
+ {
+ case cf2_cmdCALLGSUBR:
+ FT_TRACE4(( " (idx %d, entering level %d)\n",
+ subrNum + decoder->globals_bias,
+ charstringIndex + 1 ));
+
+ if ( cf2_initGlobalRegionBuffer( decoder,
+ subrNum,
+ charstring ) )
+ {
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* subroutine lookup or stream error */
+ }
+ break;
+
+ default:
+ /* cf2_cmdCALLSUBR */
+ FT_TRACE4(( " (idx %d, entering level %d)\n",
+ subrNum + decoder->locals_bias,
+ charstringIndex + 1 ));
+
+ if ( cf2_initLocalRegionBuffer( decoder,
+ subrNum,
+ charstring ) )
+ {
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* subroutine lookup or stream error */
+ }
+ }
+
+ charstringIndex += 1; /* entry is valid now */
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_cmdRETURN:
+ FT_TRACE4(( " return (leaving level %d)\n", charstringIndex ));
+
+ if ( charstringIndex < 1 )
+ {
+ /* Note: cannot return from top charstring */
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* underflow of stack */
+ }
+
+ /* restore position in previous charstring */
+ charstring = (CF2_Buffer)
+ cf2_arrstack_getPointer(
+ &subrStack,
+ (CF2_UInt)--charstringIndex );
+ continue; /* do not clear the stack */
+
+ case cf2_cmdESC:
+ {
+ FT_Byte op2 = (FT_Byte)cf2_buf_readByte( charstring );
+
+
+ /* first switch for 2-byte operators handles CFF2 */
+ /* and opcodes that are reserved for both CFF and CFF2 */
+ switch ( op2 )
+ {
+ case cf2_escHFLEX:
+ {
+ static const FT_Bool readFromStack[12] =
+ {
+ TRUE /* dx1 */, FALSE /* dy1 */,
+ TRUE /* dx2 */, TRUE /* dy2 */,
+ TRUE /* dx3 */, FALSE /* dy3 */,
+ TRUE /* dx4 */, FALSE /* dy4 */,
+ TRUE /* dx5 */, FALSE /* dy5 */,
+ TRUE /* dx6 */, FALSE /* dy6 */
+ };
+
+
+ FT_TRACE4(( " hflex\n" ));
+
+ cf2_doFlex( opStack,
+ &curX,
+ &curY,
+ &glyphPath,
+ readFromStack,
+ FALSE /* doConditionalLastRead */ );
+ }
+ continue;
+
+ case cf2_escFLEX:
+ {
+ static const FT_Bool readFromStack[12] =
+ {
+ TRUE /* dx1 */, TRUE /* dy1 */,
+ TRUE /* dx2 */, TRUE /* dy2 */,
+ TRUE /* dx3 */, TRUE /* dy3 */,
+ TRUE /* dx4 */, TRUE /* dy4 */,
+ TRUE /* dx5 */, TRUE /* dy5 */,
+ TRUE /* dx6 */, TRUE /* dy6 */
+ };
+
+
+ FT_TRACE4(( " flex\n" ));
+
+ cf2_doFlex( opStack,
+ &curX,
+ &curY,
+ &glyphPath,
+ readFromStack,
+ FALSE /* doConditionalLastRead */ );
+ }
+ break; /* TODO: why is this not a continue? */
+
+ case cf2_escHFLEX1:
+ {
+ static const FT_Bool readFromStack[12] =
+ {
+ TRUE /* dx1 */, TRUE /* dy1 */,
+ TRUE /* dx2 */, TRUE /* dy2 */,
+ TRUE /* dx3 */, FALSE /* dy3 */,
+ TRUE /* dx4 */, FALSE /* dy4 */,
+ TRUE /* dx5 */, TRUE /* dy5 */,
+ TRUE /* dx6 */, FALSE /* dy6 */
+ };
+
+
+ FT_TRACE4(( " hflex1\n" ));
+
+ cf2_doFlex( opStack,
+ &curX,
+ &curY,
+ &glyphPath,
+ readFromStack,
+ FALSE /* doConditionalLastRead */ );
+ }
+ continue;
+
+ case cf2_escFLEX1:
+ {
+ static const FT_Bool readFromStack[12] =
+ {
+ TRUE /* dx1 */, TRUE /* dy1 */,
+ TRUE /* dx2 */, TRUE /* dy2 */,
+ TRUE /* dx3 */, TRUE /* dy3 */,
+ TRUE /* dx4 */, TRUE /* dy4 */,
+ TRUE /* dx5 */, TRUE /* dy5 */,
+ FALSE /* dx6 */, FALSE /* dy6 */
+ };
+
+
+ FT_TRACE4(( " flex1\n" ));
+
+ cf2_doFlex( opStack,
+ &curX,
+ &curY,
+ &glyphPath,
+ readFromStack,
+ TRUE /* doConditionalLastRead */ );
+ }
+ continue;
+
+ /* these opcodes are always reserved */
+ case cf2_escRESERVED_8:
+ case cf2_escRESERVED_13:
+ case cf2_escRESERVED_19:
+ case cf2_escRESERVED_25:
+ case cf2_escRESERVED_31:
+ case cf2_escRESERVED_32:
+ FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+ break;
+
+ default:
+ {
+ if ( font->isCFF2 || op2 >= cf2_escRESERVED_38 )
+ FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+ else if ( font->isT1 && result_cnt > 0 && op2 != cf2_escPOP )
+ {
+ /* all operands have been transferred by previous pops */
+ result_cnt = 0;
+ }
+ else
+ {
+ /* second switch for 2-byte operators handles */
+ /* CFF and Type 1 */
+ switch ( op2 )
+ {
+
+ case cf2_escDOTSECTION:
+ /* something about `flip type of locking' -- ignore it */
+ FT_TRACE4(( " dotsection\n" ));
+
+ break;
+
+ case cf2_escVSTEM3:
+ case cf2_escHSTEM3:
+ /*
+ * Type 1: Type 2:
+ * x0 dx0 x1 dx1 x2 dx2 vstem3 x dx {dxa dxb}* vstem
+ * y0 dy0 y1 dy1 y2 dy2 hstem3 y dy {dya dyb}* hstem
+ * relative to lsb point relative to zero
+ *
+ */
+ {
+ if ( !font->isT1 )
+ FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+ else
+ {
+ CF2_F16Dot16 v0, v1, v2;
+
+ FT_Bool isV = FT_BOOL( op2 == cf2_escVSTEM3 );
+
+
+ FT_TRACE4(( isV ? " vstem3\n"
+ : " hstem3\n" ));
+
+ FT_ASSERT( cf2_stack_count( opStack ) == 6 );
+
+ v0 = cf2_stack_getReal( opStack, 0 );
+ v1 = cf2_stack_getReal( opStack, 2 );
+ v2 = cf2_stack_getReal( opStack, 4 );
+
+ cf2_stack_setReal(
+ opStack, 2,
+ SUB_INT32( SUB_INT32( v1, v0 ),
+ cf2_stack_getReal( opStack, 1 ) ) );
+ cf2_stack_setReal(
+ opStack, 4,
+ SUB_INT32( SUB_INT32( v2, v1 ),
+ cf2_stack_getReal( opStack, 3 ) ) );
+
+ /* add left-sidebearing correction */
+ cf2_doStems( font,
+ opStack,
+ isV ? &vStemHintArray : &hStemHintArray,
+ width,
+ &haveWidth,
+ isV ? decoder->builder.left_bearing->x
+ : decoder->builder.left_bearing->y );
+
+ if ( decoder->width_only )
+ goto exit;
+ }
+ }
+ break;
+
+ case cf2_escAND:
+ {
+ CF2_F16Dot16 arg1;
+ CF2_F16Dot16 arg2;
+
+
+ FT_TRACE4(( " and\n" ));
+
+ arg2 = cf2_stack_popFixed( opStack );
+ arg1 = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushInt( opStack, arg1 && arg2 );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escOR:
+ {
+ CF2_F16Dot16 arg1;
+ CF2_F16Dot16 arg2;
+
+
+ FT_TRACE4(( " or\n" ));
+
+ arg2 = cf2_stack_popFixed( opStack );
+ arg1 = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushInt( opStack, arg1 || arg2 );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escNOT:
+ {
+ CF2_F16Dot16 arg;
+
+
+ FT_TRACE4(( " not\n" ));
+
+ arg = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushInt( opStack, !arg );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escSEAC:
+ if ( !font->isT1 )
+ FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+ else
+ {
+ FT_Error error2;
+ CF2_Int bchar_index, achar_index;
+ FT_Vector left_bearing, advance;
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ T1_Face face = (T1_Face)decoder->builder.face;
+#endif
+ CF2_BufferRec component;
+ CF2_Fixed dummyWidth;
+
+ CF2_Int achar = cf2_stack_popInt( opStack );
+ CF2_Int bchar = cf2_stack_popInt( opStack );
+
+ FT_Pos ady = cf2_stack_popFixed ( opStack );
+ FT_Pos adx = cf2_stack_popFixed ( opStack );
+ FT_Pos asb = cf2_stack_popFixed ( opStack );
+
+
+ FT_TRACE4(( " seac\n" ));
+
+ if ( doingSeac )
+ {
+ FT_ERROR(( " nested seac\n" ));
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* nested seac */
+ }
+
+ if ( decoder->builder.metrics_only )
+ {
+ FT_ERROR(( " unexpected seac\n" ));
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* unexpected seac */
+ }
+
+ /* `glyph_names' is set to 0 for CID fonts which do */
+ /* not include an encoding. How can we deal with */
+ /* these? */
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ if ( decoder->glyph_names == 0 &&
+ !face->root.internal->incremental_interface )
+#else
+ if ( decoder->glyph_names == 0 )
+#endif /* FT_CONFIG_OPTION_INCREMENTAL */
+ {
+ FT_ERROR((
+ "cf2_interpT2CharString: (Type 1 seac)"
+ " glyph names table not available in this font\n" ));
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ /* seac weirdness */
+ adx += decoder->builder.left_bearing->x;
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ if ( face->root.internal->incremental_interface )
+ {
+ /* the caller must handle the font encoding also */
+ bchar_index = bchar;
+ achar_index = achar;
+ }
+ else
+#endif
+ {
+ bchar_index = t1_lookup_glyph_by_stdcharcode_ps(
+ decoder, bchar );
+ achar_index = t1_lookup_glyph_by_stdcharcode_ps(
+ decoder, achar );
+ }
+
+ if ( bchar_index < 0 || achar_index < 0 )
+ {
+ FT_ERROR((
+ "cf2_interpT2CharString: (Type 1 seac)"
+ " invalid seac character code arguments\n" ));
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ /* if we are trying to load a composite glyph, */
+ /* do not load the accent character and return */
+ /* the array of subglyphs. */
+ if ( decoder->builder.no_recurse )
+ {
+ FT_GlyphSlot glyph = (FT_GlyphSlot)decoder->builder.glyph;
+ FT_GlyphLoader loader = glyph->internal->loader;
+ FT_SubGlyph subg;
+
+
+ /* reallocate subglyph array if necessary */
+ error2 = FT_GlyphLoader_CheckSubGlyphs( loader, 2 );
+ if ( error2 )
+ {
+ lastError = error2; /* pass FreeType error through */
+ goto exit;
+ }
+
+ subg = loader->current.subglyphs;
+
+ /* subglyph 0 = base character */
+ subg->index = bchar_index;
+ subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES |
+ FT_SUBGLYPH_FLAG_USE_MY_METRICS;
+ subg->arg1 = 0;
+ subg->arg2 = 0;
+ subg++;
+
+ /* subglyph 1 = accent character */
+ subg->index = achar_index;
+ subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES;
+ subg->arg1 = (FT_Int)FIXED_TO_INT( adx - asb );
+ subg->arg2 = (FT_Int)FIXED_TO_INT( ady );
+
+ /* set up remaining glyph fields */
+ glyph->num_subglyphs = 2;
+ glyph->subglyphs = loader->base.subglyphs;
+ glyph->format = FT_GLYPH_FORMAT_COMPOSITE;
+
+ loader->current.num_subglyphs = 2;
+
+ goto exit;
+ }
+
+ /* First load `bchar' in builder */
+ /* now load the unscaled outline */
+
+ /* prepare loader */
+ FT_GlyphLoader_Prepare( decoder->builder.loader );
+
+ error2 = cf2_getT1SeacComponent( decoder,
+ (FT_UInt)bchar_index,
+ &component );
+ if ( error2 )
+ {
+ lastError = error2; /* pass FreeType error through */
+ goto exit;
+ }
+ cf2_interpT2CharString( font,
+ &component,
+ callbacks,
+ translation,
+ TRUE,
+ 0,
+ 0,
+ &dummyWidth );
+ cf2_freeT1SeacComponent( decoder, &component );
+
+ /* save the left bearing and width of the base */
+ /* character as they will be erased by the next load */
+
+ left_bearing = *decoder->builder.left_bearing;
+ advance = *decoder->builder.advance;
+
+ decoder->builder.left_bearing->x = 0;
+ decoder->builder.left_bearing->y = 0;
+
+ /* Now load `achar' on top of */
+ /* the base outline */
+
+ error2 = cf2_getT1SeacComponent( decoder,
+ (FT_UInt)achar_index,
+ &component );
+ if ( error2 )
+ {
+ lastError = error2; /* pass FreeType error through */
+ goto exit;
+ }
+ cf2_interpT2CharString( font,
+ &component,
+ callbacks,
+ translation,
+ TRUE,
+ adx - asb,
+ ady,
+ &dummyWidth );
+ cf2_freeT1SeacComponent( decoder, &component );
+
+ /* restore the left side bearing and */
+ /* advance width of the base character */
+
+ *decoder->builder.left_bearing = left_bearing;
+ *decoder->builder.advance = advance;
+
+ goto exit;
+ }
+ break;
+
+ case cf2_escSBW:
+ if ( !font->isT1 )
+ FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+ else
+ {
+ CF2_Fixed lsb_x, lsb_y;
+ PS_Builder* builder;
+
+
+ FT_TRACE4(( " sbw" ));
+
+ builder = &decoder->builder;
+
+ builder->advance->y = cf2_stack_popFixed( opStack );
+ builder->advance->x = cf2_stack_popFixed( opStack );
+
+ lsb_y = cf2_stack_popFixed( opStack );
+ lsb_x = cf2_stack_popFixed( opStack );
+
+ builder->left_bearing->x =
+ ADD_INT32( builder->left_bearing->x, lsb_x );
+ builder->left_bearing->y =
+ ADD_INT32( builder->left_bearing->y, lsb_y );
+
+ haveWidth = TRUE;
+
+ /* the `metrics_only' indicates that we only want */
+ /* to compute the glyph's metrics (lsb + advance */
+ /* width), not load the rest of it; so exit */
+ /* immediately */
+ if ( builder->metrics_only )
+ goto exit;
+
+ if ( initial_map_ready )
+ {
+ curX = ADD_INT32( curX, lsb_x );
+ curY = ADD_INT32( curY, lsb_y );
+ }
+ }
+ break;
+
+ case cf2_escABS:
+ {
+ CF2_F16Dot16 arg;
+
+
+ FT_TRACE4(( " abs\n" ));
+
+ arg = cf2_stack_popFixed( opStack );
+
+ if ( arg < -CF2_FIXED_MAX )
+ cf2_stack_pushFixed( opStack, CF2_FIXED_MAX );
+ else
+ cf2_stack_pushFixed( opStack, FT_ABS( arg ) );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escADD:
+ {
+ CF2_F16Dot16 summand1;
+ CF2_F16Dot16 summand2;
+
+
+ FT_TRACE4(( " add\n" ));
+
+ summand2 = cf2_stack_popFixed( opStack );
+ summand1 = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushFixed( opStack,
+ ADD_INT32( summand1,
+ summand2 ) );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escSUB:
+ {
+ CF2_F16Dot16 minuend;
+ CF2_F16Dot16 subtrahend;
+
+
+ FT_TRACE4(( " sub\n" ));
+
+ subtrahend = cf2_stack_popFixed( opStack );
+ minuend = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushFixed( opStack,
+ SUB_INT32( minuend, subtrahend ) );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escDIV:
+ {
+ CF2_F16Dot16 dividend;
+ CF2_F16Dot16 divisor;
+
+
+ FT_TRACE4(( " div\n" ));
+
+ if ( font->isT1 && large_int )
+ {
+ divisor = (CF2_F16Dot16)cf2_stack_popInt( opStack );
+ dividend = (CF2_F16Dot16)cf2_stack_popInt( opStack );
+
+ large_int = FALSE;
+ }
+ else
+ {
+ divisor = cf2_stack_popFixed( opStack );
+ dividend = cf2_stack_popFixed( opStack );
+ }
+
+ cf2_stack_pushFixed( opStack,
+ FT_DivFix( dividend, divisor ) );
+
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escNEG:
+ {
+ CF2_F16Dot16 arg;
+
+
+ FT_TRACE4(( " neg\n" ));
+
+ arg = cf2_stack_popFixed( opStack );
+
+ if ( arg < -CF2_FIXED_MAX )
+ cf2_stack_pushFixed( opStack, CF2_FIXED_MAX );
+ else
+ cf2_stack_pushFixed( opStack, -arg );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escEQ:
+ {
+ CF2_F16Dot16 arg1;
+ CF2_F16Dot16 arg2;
+
+
+ FT_TRACE4(( " eq\n" ));
+
+ arg2 = cf2_stack_popFixed( opStack );
+ arg1 = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushInt( opStack, arg1 == arg2 );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escCALLOTHERSUBR:
+ if ( !font->isT1 )
+ FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+ else
+ {
+ CF2_Int subr_no;
+ CF2_Int arg_cnt;
+ CF2_UInt count;
+ CF2_UInt opIdx = 0;
+
+
+ FT_TRACE4(( " callothersubr\n" ));
+
+ subr_no = cf2_stack_popInt( opStack );
+ arg_cnt = cf2_stack_popInt( opStack );
+
+ /*******************************************************/
+ /* */
+ /* remove all operands to callothersubr from the stack */
+ /* */
+ /* for handled othersubrs, where we know the number of */
+ /* arguments, we increase the stack by the value of */
+ /* known_othersubr_result_cnt */
+ /* */
+ /* for unhandled othersubrs the following pops adjust */
+ /* the stack pointer as necessary */
+
+ count = cf2_stack_count( opStack );
+ FT_ASSERT( (CF2_UInt)arg_cnt <= count );
+
+ opIdx += count - (CF2_UInt)arg_cnt;
+
+ known_othersubr_result_cnt = 0;
+ result_cnt = 0;
+
+ /* XXX TODO: The checks to `arg_count == <whatever>' */
+ /* might not be correct; an othersubr expects a */
+ /* certain number of operands on the PostScript stack */
+ /* (as opposed to the T1 stack) but it doesn't have to */
+ /* put them there by itself; previous othersubrs might */
+ /* have left the operands there if they were not */
+ /* followed by an appropriate number of pops */
+ /* */
+ /* On the other hand, Adobe Reader 7.0.8 for Linux */
+ /* doesn't accept a font that contains charstrings */
+ /* like */
+ /* */
+ /* 100 200 2 20 callothersubr */
+ /* 300 1 20 callothersubr pop */
+ /* */
+ /* Perhaps this is the reason why BuildCharArray */
+ /* exists. */
+
+ switch ( subr_no )
+ {
+ case 0: /* end flex feature */
+ if ( arg_cnt != 3 )
+ goto Unexpected_OtherSubr;
+
+ if ( initial_map_ready &&
+ ( !decoder->flex_state ||
+ decoder->num_flex_vectors != 7 ) )
+ {
+ FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):"
+ " unexpected flex end\n" ));
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ /* the two `results' are popped */
+ /* by the following setcurrentpoint */
+ cf2_stack_pushFixed( opStack, curX );
+ cf2_stack_pushFixed( opStack, curY );
+ known_othersubr_result_cnt = 2;
+ break;
+
+ case 1: /* start flex feature */
+ if ( arg_cnt != 0 )
+ goto Unexpected_OtherSubr;
+
+ if ( !initial_map_ready )
+ break;
+
+ if ( ps_builder_check_points( &decoder->builder, 6 ) )
+ goto exit;
+
+ decoder->flex_state = 1;
+ decoder->num_flex_vectors = 0;
+ break;
+
+ case 2: /* add flex vectors */
+ {
+ FT_Int idx;
+ FT_Int idx2;
+
+
+ if ( arg_cnt != 0 )
+ goto Unexpected_OtherSubr;
+
+ if ( !initial_map_ready )
+ break;
+
+ if ( !decoder->flex_state )
+ {
+ FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):"
+ " missing flex start\n" ));
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ /* note that we should not add a point for */
+ /* index 0; this will move our current position */
+ /* to the flex point without adding any point */
+ /* to the outline */
+ idx = decoder->num_flex_vectors++;
+ if ( idx > 0 && idx < 7 )
+ {
+ /* in malformed fonts it is possible to have */
+ /* other opcodes in the middle of a flex (which */
+ /* don't increase `num_flex_vectors'); we thus */
+ /* have to check whether we can add a point */
+
+ if ( ps_builder_check_points( &decoder->builder,
+ 1 ) )
+ {
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ /* map: 1->2 2->4 3->6 4->2 5->4 6->6 */
+ idx2 = ( idx > 3 ? idx - 3 : idx ) * 2;
+
+ flexStore[idx2 - 2] = curX;
+ flexStore[idx2 - 1] = curY;
+
+ if ( idx == 3 || idx == 6 )
+ cf2_glyphpath_curveTo( &glyphPath,
+ flexStore[0],
+ flexStore[1],
+ flexStore[2],
+ flexStore[3],
+ flexStore[4],
+ flexStore[5] );
+ }
+ }
+ break;
+
+ case 3: /* change hints */
+ if ( arg_cnt != 1 )
+ goto Unexpected_OtherSubr;
+
+ if ( initial_map_ready )
+ {
+ /* do not clear hints if initial hintmap */
+ /* is not ready - we need to collate all */
+ cf2_arrstack_clear( &vStemHintArray );
+ cf2_arrstack_clear( &hStemHintArray );
+
+ cf2_hintmask_init( &hintMask, error );
+ hintMask.isValid = FALSE;
+ hintMask.isNew = TRUE;
+ }
+
+ known_othersubr_result_cnt = 1;
+ break;
+
+ case 12:
+ case 13:
+ /* counter control hints, clear stack */
+ cf2_stack_clear( opStack );
+ break;
+
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 18: /* multiple masters */
+ {
+ PS_Blend blend = decoder->blend;
+ FT_UInt num_points, nn, mm;
+ CF2_UInt delta;
+ CF2_UInt values;
+
+
+ if ( !blend )
+ {
+ FT_ERROR((
+ "cf2_interpT2CharString:"
+ " unexpected multiple masters operator\n" ));
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ num_points = (FT_UInt)subr_no - 13 +
+ ( subr_no == 18 );
+ if ( arg_cnt != (FT_Int)( num_points *
+ blend->num_designs ) )
+ {
+ FT_ERROR((
+ "cf2_interpT2CharString:"
+ " incorrect number of multiple masters arguments\n" ));
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ /* We want to compute */
+ /* */
+ /* a0*w0 + a1*w1 + ... + ak*wk */
+ /* */
+ /* but we only have a0, a1-a0, a2-a0, ..., ak-a0. */
+ /* */
+ /* However, given that w0 + w1 + ... + wk == 1, we */
+ /* can rewrite it easily as */
+ /* */
+ /* a0 + (a1-a0)*w1 + (a2-a0)*w2 + ... + (ak-a0)*wk */
+ /* */
+ /* where k == num_designs-1. */
+ /* */
+ /* I guess that's why it's written in this `compact' */
+ /* form. */
+ /* */
+ delta = opIdx + num_points;
+ values = opIdx;
+ for ( nn = 0; nn < num_points; nn++ )
+ {
+ CF2_Fixed tmp = cf2_stack_getReal( opStack,
+ values );
+
+
+ for ( mm = 1; mm < blend->num_designs; mm++ )
+ tmp = ADD_INT32( tmp,
+ FT_MulFix(
+ cf2_stack_getReal( opStack,
+ delta++ ),
+ blend->weight_vector[mm] ) );
+
+ cf2_stack_setReal( opStack, values++, tmp );
+ }
+ cf2_stack_pop( opStack,
+ (CF2_UInt)arg_cnt - num_points );
+
+ known_othersubr_result_cnt = (FT_Int)num_points;
+ break;
+ }
+
+ case 19:
+ /* <idx> 1 19 callothersubr */
+ /* ==> replace elements starting from index */
+ /* cvi( <idx> ) of BuildCharArray with */
+ /* WeightVector */
+ {
+ FT_Int idx;
+ PS_Blend blend = decoder->blend;
+
+
+ if ( arg_cnt != 1 || !blend )
+ goto Unexpected_OtherSubr;
+
+ idx = cf2_stack_popInt( opStack );
+
+ if ( idx < 0 ||
+ (FT_UInt)idx + blend->num_designs >
+ decoder->len_buildchar )
+ goto Unexpected_OtherSubr;
+
+ ft_memcpy( &decoder->buildchar[idx],
+ blend->weight_vector,
+ blend->num_designs *
+ sizeof ( blend->weight_vector[0] ) );
+ }
+ break;
+
+ case 20:
+ /* <arg1> <arg2> 2 20 callothersubr pop */
+ /* ==> push <arg1> + <arg2> onto T1 stack */
+ {
+ CF2_F16Dot16 summand1;
+ CF2_F16Dot16 summand2;
+
+
+ if ( arg_cnt != 2 )
+ goto Unexpected_OtherSubr;
+
+ summand2 = cf2_stack_popFixed( opStack );
+ summand1 = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushFixed( opStack,
+ ADD_INT32( summand1,
+ summand2 ) );
+ known_othersubr_result_cnt = 1;
+ }
+ break;
+
+ case 21:
+ /* <arg1> <arg2> 2 21 callothersubr pop */
+ /* ==> push <arg1> - <arg2> onto T1 stack */
+ {
+ CF2_F16Dot16 minuend;
+ CF2_F16Dot16 subtrahend;
+
+
+ if ( arg_cnt != 2 )
+ goto Unexpected_OtherSubr;
+
+ subtrahend = cf2_stack_popFixed( opStack );
+ minuend = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushFixed( opStack,
+ SUB_INT32( minuend,
+ subtrahend ) );
+ known_othersubr_result_cnt = 1;
+ }
+ break;
+
+ case 22:
+ /* <arg1> <arg2> 2 22 callothersubr pop */
+ /* ==> push <arg1> * <arg2> onto T1 stack */
+ {
+ CF2_F16Dot16 factor1;
+ CF2_F16Dot16 factor2;
+
+
+ if ( arg_cnt != 2 )
+ goto Unexpected_OtherSubr;
+
+ factor2 = cf2_stack_popFixed( opStack );
+ factor1 = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushFixed( opStack,
+ FT_MulFix( factor1, factor2 ) );
+ known_othersubr_result_cnt = 1;
+ }
+ break;
+
+ case 23:
+ /* <arg1> <arg2> 2 23 callothersubr pop */
+ /* ==> push <arg1> / <arg2> onto T1 stack */
+ {
+ CF2_F16Dot16 dividend;
+ CF2_F16Dot16 divisor;
+
+
+ if ( arg_cnt != 2 )
+ goto Unexpected_OtherSubr;
+
+ divisor = cf2_stack_popFixed( opStack );
+ dividend = cf2_stack_popFixed( opStack );
+
+ if ( divisor == 0 )
+ goto Unexpected_OtherSubr;
+
+ cf2_stack_pushFixed( opStack,
+ FT_DivFix( dividend,
+ divisor ) );
+ known_othersubr_result_cnt = 1;
+ }
+ break;
+
+ case 24:
+ /* <val> <idx> 2 24 callothersubr */
+ /* ==> set BuildCharArray[cvi( <idx> )] = <val> */
+ {
+ CF2_Int idx;
+ PS_Blend blend = decoder->blend;
+
+
+ if ( arg_cnt != 2 || !blend )
+ goto Unexpected_OtherSubr;
+
+ idx = cf2_stack_popInt( opStack );
+
+ if ( idx < 0 ||
+ (FT_UInt)idx >= decoder->len_buildchar )
+ goto Unexpected_OtherSubr;
+
+ decoder->buildchar[idx] =
+ cf2_stack_popFixed( opStack );
+ }
+ break;
+
+ case 25:
+ /* <idx> 1 25 callothersubr pop */
+ /* ==> push BuildCharArray[cvi( idx )] */
+ /* onto T1 stack */
+ {
+ CF2_Int idx;
+ PS_Blend blend = decoder->blend;
+
+
+ if ( arg_cnt != 1 || !blend )
+ goto Unexpected_OtherSubr;
+
+ idx = cf2_stack_popInt( opStack );
+
+ if ( idx < 0 ||
+ (FT_UInt)idx >= decoder->len_buildchar )
+ goto Unexpected_OtherSubr;
+
+ cf2_stack_pushFixed( opStack,
+ decoder->buildchar[idx] );
+ known_othersubr_result_cnt = 1;
+ }
+ break;
+
+#if 0
+ case 26:
+ /* <val> mark <idx> */
+ /* ==> set BuildCharArray[cvi( <idx> )] = <val>, */
+ /* leave mark on T1 stack */
+ /* <val> <idx> */
+ /* ==> set BuildCharArray[cvi( <idx> )] = <val> */
+ XXX which routine has left its mark on the
+ XXX (PostScript) stack?;
+ break;
+#endif
+
+ case 27:
+ /* <res1> <res2> <val1> <val2> 4 27 callothersubr pop */
+ /* ==> push <res1> onto T1 stack if <val1> <= <val2>, */
+ /* otherwise push <res2> */
+ {
+ CF2_F16Dot16 arg1;
+ CF2_F16Dot16 arg2;
+ CF2_F16Dot16 cond1;
+ CF2_F16Dot16 cond2;
+
+
+ if ( arg_cnt != 4 )
+ goto Unexpected_OtherSubr;
+
+ cond2 = cf2_stack_popFixed( opStack );
+ cond1 = cf2_stack_popFixed( opStack );
+ arg2 = cf2_stack_popFixed( opStack );
+ arg1 = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushFixed( opStack,
+ cond1 <= cond2 ? arg1 : arg2 );
+ known_othersubr_result_cnt = 1;
+ }
+ break;
+
+ case 28:
+ /* 0 28 callothersubr pop */
+ /* ==> push random value from interval [0, 1) */
+ /* onto stack */
+ {
+ CF2_F16Dot16 r;
+
+
+ if ( arg_cnt != 0 )
+ goto Unexpected_OtherSubr;
+
+ /* only use the lower 16 bits of `random' */
+ /* to generate a number in the range (0;1] */
+ r = (CF2_F16Dot16)
+ ( ( decoder->current_subfont->random & 0xFFFF ) + 1 );
+
+ decoder->current_subfont->random =
+ cff_random( decoder->current_subfont->random );
+
+ cf2_stack_pushFixed( opStack, r );
+ known_othersubr_result_cnt = 1;
+ }
+ break;
+
+ default:
+ if ( arg_cnt >= 0 && subr_no >= 0 )
+ {
+ FT_Int i;
+
+
+ FT_ERROR((
+ "cf2_interpT2CharString (Type 1 mode):"
+ " unknown othersubr [%d %d], wish me luck\n",
+ arg_cnt, subr_no ));
+
+ /* store the unused args */
+ /* for this unhandled OtherSubr */
+
+ if ( arg_cnt > PS_STORAGE_SIZE )
+ arg_cnt = PS_STORAGE_SIZE;
+ result_cnt = arg_cnt;
+
+ for ( i = 1; i <= arg_cnt; i++ )
+ results[result_cnt - i] =
+ cf2_stack_popFixed( opStack );
+
+ break;
+ }
+ /* fall through */
+
+ Unexpected_OtherSubr:
+ FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):"
+ " invalid othersubr [%d %d]\n",
+ arg_cnt, subr_no ));
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escPOP:
+ if ( !font->isT1 )
+ FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+ else
+ {
+ FT_TRACE4(( " pop" ));
+
+ if ( known_othersubr_result_cnt > 0 )
+ {
+ known_othersubr_result_cnt--;
+ /* ignore, we pushed the operands ourselves */
+ continue;
+ }
+
+ if ( result_cnt == 0 )
+ {
+ FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):"
+ " no more operands for othersubr\n" ));
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ result_cnt--;
+ cf2_stack_pushFixed( opStack, results[result_cnt] );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escDROP:
+ FT_TRACE4(( " drop\n" ));
+
+ (void)cf2_stack_popFixed( opStack );
+ continue; /* do not clear the stack */
+
+ case cf2_escPUT:
+ {
+ CF2_F16Dot16 val;
+ CF2_Int idx;
+
+
+ FT_TRACE4(( " put\n" ));
+
+ idx = cf2_stack_popInt( opStack );
+ val = cf2_stack_popFixed( opStack );
+
+ if ( idx >= 0 && idx < CF2_STORAGE_SIZE )
+ storage[idx] = val;
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escGET:
+ {
+ CF2_Int idx;
+
+
+ FT_TRACE4(( " get\n" ));
+
+ idx = cf2_stack_popInt( opStack );
+
+ if ( idx >= 0 && idx < CF2_STORAGE_SIZE )
+ cf2_stack_pushFixed( opStack, storage[idx] );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escIFELSE:
+ {
+ CF2_F16Dot16 arg1;
+ CF2_F16Dot16 arg2;
+ CF2_F16Dot16 cond1;
+ CF2_F16Dot16 cond2;
+
+
+ FT_TRACE4(( " ifelse\n" ));
+
+ cond2 = cf2_stack_popFixed( opStack );
+ cond1 = cf2_stack_popFixed( opStack );
+ arg2 = cf2_stack_popFixed( opStack );
+ arg1 = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushFixed( opStack,
+ cond1 <= cond2 ? arg1 : arg2 );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escRANDOM: /* in spec */
+ {
+ CF2_F16Dot16 r;
+
+
+ FT_TRACE4(( " random\n" ));
+
+ /* only use the lower 16 bits of `random' */
+ /* to generate a number in the range (0;1] */
+ r = (CF2_F16Dot16)
+ ( ( decoder->current_subfont->random & 0xFFFF ) + 1 );
+
+ decoder->current_subfont->random =
+ cff_random( decoder->current_subfont->random );
+
+ cf2_stack_pushFixed( opStack, r );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escMUL:
+ {
+ CF2_F16Dot16 factor1;
+ CF2_F16Dot16 factor2;
+
+
+ FT_TRACE4(( " mul\n" ));
+
+ factor2 = cf2_stack_popFixed( opStack );
+ factor1 = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushFixed( opStack,
+ FT_MulFix( factor1, factor2 ) );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escSQRT:
+ {
+ CF2_F16Dot16 arg;
+
+
+ FT_TRACE4(( " sqrt\n" ));
+
+ arg = cf2_stack_popFixed( opStack );
+ if ( arg > 0 )
+ {
+ /* use a start value that doesn't make */
+ /* the algorithm's addition overflow */
+ FT_Fixed root = arg < 10 ? arg : arg >> 1;
+ FT_Fixed new_root;
+
+
+ /* Babylonian method */
+ for (;;)
+ {
+ new_root = ( root + FT_DivFix( arg, root ) + 1 ) >> 1;
+ if ( new_root == root )
+ break;
+ root = new_root;
+ }
+ arg = new_root;
+ }
+ else
+ arg = 0;
+
+ cf2_stack_pushFixed( opStack, arg );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escDUP:
+ {
+ CF2_F16Dot16 arg;
+
+
+ FT_TRACE4(( " dup\n" ));
+
+ arg = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushFixed( opStack, arg );
+ cf2_stack_pushFixed( opStack, arg );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escEXCH:
+ {
+ CF2_F16Dot16 arg1;
+ CF2_F16Dot16 arg2;
+
+
+ FT_TRACE4(( " exch\n" ));
+
+ arg2 = cf2_stack_popFixed( opStack );
+ arg1 = cf2_stack_popFixed( opStack );
+
+ cf2_stack_pushFixed( opStack, arg2 );
+ cf2_stack_pushFixed( opStack, arg1 );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escINDEX:
+ {
+ CF2_Int idx;
+ CF2_UInt size;
+
+
+ FT_TRACE4(( " index\n" ));
+
+ idx = cf2_stack_popInt( opStack );
+ size = cf2_stack_count( opStack );
+
+ if ( size > 0 )
+ {
+ /* for `cf2_stack_getReal', */
+ /* index 0 is bottom of stack */
+ CF2_UInt gr_idx;
+
+
+ if ( idx < 0 )
+ gr_idx = size - 1;
+ else if ( (CF2_UInt)idx >= size )
+ gr_idx = 0;
+ else
+ gr_idx = size - 1 - (CF2_UInt)idx;
+
+ cf2_stack_pushFixed( opStack,
+ cf2_stack_getReal( opStack,
+ gr_idx ) );
+ }
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escROLL:
+ {
+ CF2_Int idx;
+ CF2_Int count;
+
+
+ FT_TRACE4(( " roll\n" ));
+
+ idx = cf2_stack_popInt( opStack );
+ count = cf2_stack_popInt( opStack );
+
+ cf2_stack_roll( opStack, count, idx );
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_escSETCURRENTPT:
+ if ( !font->isT1 )
+ FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+ else
+ {
+ FT_TRACE4(( " setcurrentpoint" ));
+
+ if ( !initial_map_ready )
+ break;
+
+ /* From the T1 specification, section 6.4: */
+ /* */
+ /* The setcurrentpoint command is used only in */
+ /* conjunction with results from OtherSubrs */
+ /* procedures. */
+
+ /* known_othersubr_result_cnt != 0 is already handled */
+ /* above. */
+
+ /* Note, however, that both Ghostscript and Adobe */
+ /* Distiller handle this situation by silently */
+ /* ignoring the inappropriate `setcurrentpoint' */
+ /* instruction. So we do the same. */
+#if 0
+
+ if ( decoder->flex_state != 1 )
+ {
+ FT_ERROR(( "cf2_interpT2CharString:"
+ " unexpected `setcurrentpoint'\n" ));
+ goto Syntax_Error;
+ }
+ else
+ ...
+#endif
+
+ curY = cf2_stack_popFixed( opStack );
+ curX = cf2_stack_popFixed( opStack );
+
+ decoder->flex_state = 0;
+ }
+ break;
+
+ } /* end of 2nd switch checking op2 */
+ }
+ }
+ } /* end of 1st switch checking op2 */
+ } /* case cf2_cmdESC */
+
+ break;
+
+ case cf2_cmdHSBW:
+ if ( !font->isT1 )
+ FT_TRACE4(( " unknown op (%d)\n", op1 ));
+ else
+ {
+ CF2_Fixed lsb_x;
+ PS_Builder* builder;
+
+
+ FT_TRACE4(( " hsbw" ));
+
+ builder = &decoder->builder;
+
+ builder->advance->x = cf2_stack_popFixed( opStack );
+ builder->advance->y = 0;
+
+ lsb_x = cf2_stack_popFixed( opStack );
+
+ builder->left_bearing->x = ADD_INT32( builder->left_bearing->x,
+ lsb_x );
+
+ haveWidth = TRUE;
+
+ /* the `metrics_only' indicates that we only want to compute */
+ /* the glyph's metrics (lsb + advance width), not load the */
+ /* rest of it; so exit immediately */
+ if ( builder->metrics_only )
+ goto exit;
+
+ if ( initial_map_ready )
+ curX = ADD_INT32( curX, lsb_x );
+ }
+ break;
+
+ case cf2_cmdENDCHAR:
+ FT_TRACE4(( " endchar\n" ));
+
+ if ( font->isT1 && !initial_map_ready )
+ {
+ FT_TRACE5(( "cf2_interpT2CharString (Type 1 mode): "
+ "Build initial hintmap, rewinding...\n" ));
+
+ /* trigger initial hintmap build */
+ cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+
+ initial_map_ready = TRUE;
+
+ /* change hints routine - clear for rewind */
+ cf2_arrstack_clear( &vStemHintArray );
+ cf2_arrstack_clear( &hStemHintArray );
+
+ cf2_hintmask_init( &hintMask, error );
+ hintMask.isValid = FALSE;
+ hintMask.isNew = TRUE;
+
+ /* rewind charstring */
+ /* some charstrings use endchar from a final subroutine call */
+ /* without returning, detect these and exit to the top level */
+ /* charstring */
+ while ( charstringIndex > 0 )
+ {
+ FT_TRACE4(( " return (leaving level %d)\n", charstringIndex ));
+
+ /* restore position in previous charstring */
+ charstring = (CF2_Buffer)
+ cf2_arrstack_getPointer(
+ &subrStack,
+ (CF2_UInt)--charstringIndex );
+ }
+ charstring->ptr = charstring->start;
+
+ break;
+ }
+
+ if ( cf2_stack_count( opStack ) == 1 ||
+ cf2_stack_count( opStack ) == 5 )
+ {
+ if ( !haveWidth )
+ *width = ADD_INT32( cf2_stack_getReal( opStack, 0 ),
+ nominalWidthX );
+ }
+
+ /* width is defined or default after this */
+ haveWidth = TRUE;
+
+ if ( decoder->width_only )
+ goto exit;
+
+ /* close path if still open */
+ cf2_glyphpath_closeOpenPath( &glyphPath );
+
+ /* disable seac for CFF2 and Type1 */
+ /* (charstring ending with args on stack) */
+ if ( !font->isCFF2 && !font->isT1 && cf2_stack_count( opStack ) > 1 )
+ {
+ /* must be either 4 or 5 -- */
+ /* this is a (deprecated) implied `seac' operator */
+
+ CF2_Int achar;
+ CF2_Int bchar;
+ CF2_BufferRec component;
+ CF2_Fixed dummyWidth; /* ignore component width */
+ FT_Error error2;
+
+
+ if ( doingSeac )
+ {
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* nested seac */
+ }
+
+ achar = cf2_stack_popInt( opStack );
+ bchar = cf2_stack_popInt( opStack );
+
+ curY = cf2_stack_popFixed( opStack );
+ curX = cf2_stack_popFixed( opStack );
+
+ error2 = cf2_getSeacComponent( decoder, achar, &component );
+ if ( error2 )
+ {
+ lastError = error2; /* pass FreeType error through */
+ goto exit;
+ }
+ cf2_interpT2CharString( font,
+ &component,
+ callbacks,
+ translation,
+ TRUE,
+ curX,
+ curY,
+ &dummyWidth );
+ cf2_freeSeacComponent( decoder, &component );
+
+ error2 = cf2_getSeacComponent( decoder, bchar, &component );
+ if ( error2 )
+ {
+ lastError = error2; /* pass FreeType error through */
+ goto exit;
+ }
+ cf2_interpT2CharString( font,
+ &component,
+ callbacks,
+ translation,
+ TRUE,
+ 0,
+ 0,
+ &dummyWidth );
+ cf2_freeSeacComponent( decoder, &component );
+ }
+ goto exit;
+
+ case cf2_cmdCNTRMASK:
+ case cf2_cmdHINTMASK:
+ /* the final \n in the tracing message gets added in */
+ /* `cf2_hintmask_read' (which also traces the mask bytes) */
+ FT_TRACE4(( op1 == cf2_cmdCNTRMASK ? " cntrmask" : " hintmask" ));
+
+ /* never add hints after the mask is computed */
+ if ( cf2_stack_count( opStack ) > 1 &&
+ cf2_hintmask_isValid( &hintMask ) )
+ {
+ FT_TRACE4(( "cf2_interpT2CharString: invalid hint mask\n" ));
+ break;
+ }
+
+ /* if there are arguments on the stack, there this is an */
+ /* implied cf2_cmdVSTEMHM */
+ cf2_doStems( font,
+ opStack,
+ &vStemHintArray,
+ width,
+ &haveWidth,
+ 0 );
+
+ if ( decoder->width_only )
+ goto exit;
+
+ if ( op1 == cf2_cmdHINTMASK )
+ {
+ /* consume the hint mask bytes which follow the operator */
+ cf2_hintmask_read( &hintMask,
+ charstring,
+ cf2_arrstack_size( &hStemHintArray ) +
+ cf2_arrstack_size( &vStemHintArray ) );
+ }
+ else
+ {
+ /*
+ * Consume the counter mask bytes which follow the operator:
+ * Build a temporary hint map, just to place and lock those
+ * stems participating in the counter mask. These are most
+ * likely the dominant hstems, and are grouped together in a
+ * few counter groups, not necessarily in correspondence
+ * with the hint groups. This reduces the chances of
+ * conflicts between hstems that are initially placed in
+ * separate hint groups and then brought together. The
+ * positions are copied back to `hStemHintArray', so we can
+ * discard `counterMask' and `counterHintMap'.
+ *
+ */
+ CF2_HintMapRec counterHintMap;
+ CF2_HintMaskRec counterMask;
+
+
+ cf2_hintmap_init( &counterHintMap,
+ font,
+ &glyphPath.initialHintMap,
+ &glyphPath.hintMoves,
+ scaleY );
+ cf2_hintmask_init( &counterMask, error );
+
+ cf2_hintmask_read( &counterMask,
+ charstring,
+ cf2_arrstack_size( &hStemHintArray ) +
+ cf2_arrstack_size( &vStemHintArray ) );
+ cf2_hintmap_build( &counterHintMap,
+ &hStemHintArray,
+ &vStemHintArray,
+ &counterMask,
+ 0,
+ FALSE );
+ }
+ break;
+
+ case cf2_cmdRMOVETO:
+ FT_TRACE4(( " rmoveto\n" ));
+
+ if ( font->isT1 && !decoder->flex_state && !haveWidth )
+ FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):"
+ " No width. Use hsbw/sbw as first op\n" ));
+
+ if ( cf2_stack_count( opStack ) > 2 && !haveWidth )
+ *width = ADD_INT32( cf2_stack_getReal( opStack, 0 ),
+ nominalWidthX );
+
+ /* width is defined or default after this */
+ haveWidth = TRUE;
+
+ if ( decoder->width_only )
+ goto exit;
+
+ curY = ADD_INT32( curY, cf2_stack_popFixed( opStack ) );
+ curX = ADD_INT32( curX, cf2_stack_popFixed( opStack ) );
+
+ if ( !decoder->flex_state )
+ cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+
+ break;
+
+ case cf2_cmdHMOVETO:
+ FT_TRACE4(( " hmoveto\n" ));
+
+ if ( font->isT1 && !decoder->flex_state && !haveWidth )
+ FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):"
+ " No width. Use hsbw/sbw as first op\n" ));
+
+ if ( cf2_stack_count( opStack ) > 1 && !haveWidth )
+ *width = ADD_INT32( cf2_stack_getReal( opStack, 0 ),
+ nominalWidthX );
+
+ /* width is defined or default after this */
+ haveWidth = TRUE;
+
+ if ( decoder->width_only )
+ goto exit;
+
+ curX = ADD_INT32( curX, cf2_stack_popFixed( opStack ) );
+
+ if ( !decoder->flex_state )
+ cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+
+ break;
+
+ case cf2_cmdRLINECURVE:
+ {
+ CF2_UInt count = cf2_stack_count( opStack );
+ CF2_UInt idx = 0;
+
+
+ FT_TRACE4(( " rlinecurve\n" ));
+
+ while ( idx + 6 < count )
+ {
+ curX = ADD_INT32( curX, cf2_stack_getReal( opStack,
+ idx + 0 ) );
+ curY = ADD_INT32( curY, cf2_stack_getReal( opStack,
+ idx + 1 ) );
+
+ cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+ idx += 2;
+ }
+
+ while ( idx < count )
+ {
+ CF2_Fixed x1, y1, x2, y2, x3, y3;
+
+
+ x1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curX );
+ y1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), curY );
+ x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), x1 );
+ y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), y1 );
+ x3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 4 ), x2 );
+ y3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 5 ), y2 );
+
+ cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+
+ curX = x3;
+ curY = y3;
+ idx += 6;
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdVVCURVETO:
+ {
+ CF2_UInt count, count1 = cf2_stack_count( opStack );
+ CF2_UInt idx = 0;
+
+
+ /* if `cf2_stack_count' isn't of the form 4n or 4n+1, */
+ /* we enforce it by clearing the second bit */
+ /* (and sorting the stack indexing to suit) */
+ count = count1 & ~2U;
+ idx += count1 - count;
+
+ FT_TRACE4(( " vvcurveto\n" ));
+
+ while ( idx < count )
+ {
+ CF2_Fixed x1, y1, x2, y2, x3, y3;
+
+
+ if ( ( count - idx ) & 1 )
+ {
+ x1 = ADD_INT32( cf2_stack_getReal( opStack, idx ), curX );
+
+ idx++;
+ }
+ else
+ x1 = curX;
+
+ y1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curY );
+ x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), x1 );
+ y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), y1 );
+ x3 = x2;
+ y3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), y2 );
+
+ cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+
+ curX = x3;
+ curY = y3;
+ idx += 4;
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdHHCURVETO:
+ {
+ CF2_UInt count, count1 = cf2_stack_count( opStack );
+ CF2_UInt idx = 0;
+
+
+ /* if `cf2_stack_count' isn't of the form 4n or 4n+1, */
+ /* we enforce it by clearing the second bit */
+ /* (and sorting the stack indexing to suit) */
+ count = count1 & ~2U;
+ idx += count1 - count;
+
+ FT_TRACE4(( " hhcurveto\n" ));
+
+ while ( idx < count )
+ {
+ CF2_Fixed x1, y1, x2, y2, x3, y3;
+
+
+ if ( ( count - idx ) & 1 )
+ {
+ y1 = ADD_INT32( cf2_stack_getReal( opStack, idx ), curY );
+
+ idx++;
+ }
+ else
+ y1 = curY;
+
+ x1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curX );
+ x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), x1 );
+ y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), y1 );
+ x3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), x2 );
+ y3 = y2;
+
+ cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+
+ curX = x3;
+ curY = y3;
+ idx += 4;
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdVHCURVETO:
+ case cf2_cmdHVCURVETO:
+ {
+ CF2_UInt count, count1 = cf2_stack_count( opStack );
+ CF2_UInt idx = 0;
+
+ FT_Bool alternate = FT_BOOL( op1 == cf2_cmdHVCURVETO );
+
+
+ /* if `cf2_stack_count' isn't of the form 8n, 8n+1, */
+ /* 8n+4, or 8n+5, we enforce it by clearing the */
+ /* second bit */
+ /* (and sorting the stack indexing to suit) */
+ count = count1 & ~2U;
+ idx += count1 - count;
+
+ FT_TRACE4(( alternate ? " hvcurveto\n" : " vhcurveto\n" ));
+
+ while ( idx < count )
+ {
+ CF2_Fixed x1, x2, x3, y1, y2, y3;
+
+
+ if ( alternate )
+ {
+ x1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curX );
+ y1 = curY;
+ x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), x1 );
+ y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), y1 );
+ y3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), y2 );
+
+ if ( count - idx == 5 )
+ {
+ x3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 4 ), x2 );
+
+ idx++;
+ }
+ else
+ x3 = x2;
+
+ alternate = FALSE;
+ }
+ else
+ {
+ x1 = curX;
+ y1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curY );
+ x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), x1 );
+ y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), y1 );
+ x3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), x2 );
+
+ if ( count - idx == 5 )
+ {
+ y3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 4 ), y2 );
+
+ idx++;
+ }
+ else
+ y3 = y2;
+
+ alternate = TRUE;
+ }
+
+ cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+
+ curX = x3;
+ curY = y3;
+ idx += 4;
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdEXTENDEDNMBR:
+ {
+ CF2_Int v;
+
+ CF2_Int byte1 = cf2_buf_readByte( charstring );
+ CF2_Int byte2 = cf2_buf_readByte( charstring );
+
+
+ v = (FT_Short)( ( byte1 << 8 ) |
+ byte2 );
+
+ FT_TRACE4(( " %d", v ));
+
+ cf2_stack_pushInt( opStack, v );
+ }
+ continue;
+
+ default:
+ /* numbers */
+ {
+ if ( /* op1 >= 32 && */ op1 <= 246 )
+ {
+ CF2_Int v;
+
+
+ v = op1 - 139;
+
+ FT_TRACE4(( " %d", v ));
+
+ /* -107 .. 107 */
+ cf2_stack_pushInt( opStack, v );
+ }
+
+ else if ( /* op1 >= 247 && */ op1 <= 250 )
+ {
+ CF2_Int v;
+
+
+ v = op1;
+ v -= 247;
+ v *= 256;
+ v += cf2_buf_readByte( charstring );
+ v += 108;
+
+ FT_TRACE4(( " %d", v ));
+
+ /* 108 .. 1131 */
+ cf2_stack_pushInt( opStack, v );
+ }
+
+ else if ( /* op1 >= 251 && */ op1 <= 254 )
+ {
+ CF2_Int v;
+
+
+ v = op1;
+ v -= 251;
+ v *= 256;
+ v += cf2_buf_readByte( charstring );
+ v = -v - 108;
+
+ FT_TRACE4(( " %d", v ));
+
+ /* -1131 .. -108 */
+ cf2_stack_pushInt( opStack, v );
+ }
+
+ else /* op1 == 255 */
+ {
+ CF2_Fixed v;
+
+ FT_UInt32 byte1 = (FT_UInt32)cf2_buf_readByte( charstring );
+ FT_UInt32 byte2 = (FT_UInt32)cf2_buf_readByte( charstring );
+ FT_UInt32 byte3 = (FT_UInt32)cf2_buf_readByte( charstring );
+ FT_UInt32 byte4 = (FT_UInt32)cf2_buf_readByte( charstring );
+
+
+ v = (CF2_Fixed)( ( byte1 << 24 ) |
+ ( byte2 << 16 ) |
+ ( byte3 << 8 ) |
+ byte4 );
+
+ /*
+ * For Type 1:
+ *
+ * According to the specification, values > 32000 or < -32000
+ * must be followed by a `div' operator to make the result be
+ * in the range [-32000;32000]. We expect that the second
+ * argument of `div' is not a large number. Additionally, we
+ * don't handle stuff like `<large1> <large2> <num> div <num>
+ * div' or <large1> <large2> <num> div div'. This is probably
+ * not allowed anyway.
+ *
+ * <large> <num> <num>+ div is not checked but should not be
+ * allowed as the large value remains untouched.
+ *
+ */
+ if ( font->isT1 )
+ {
+ if ( v > 32000 || v < -32000 )
+ {
+ if ( large_int )
+ FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):"
+ " no `div' after large integer\n" ));
+ else
+ large_int = TRUE;
+ }
+
+ FT_TRACE4(( " %d", v ));
+
+ cf2_stack_pushInt( opStack, (CF2_Int)v );
+ }
+ else
+ {
+ FT_TRACE4(( " %.5fF", v / 65536.0 ));
+
+ cf2_stack_pushFixed( opStack, v );
+ }
+ }
+ }
+ continue; /* don't clear stack */
+
+ } /* end of switch statement checking `op1' */
+
+ cf2_stack_clear( opStack );
+
+ } /* end of main interpreter loop */
+
+ /* we get here if the charstring ends without cf2_cmdENDCHAR */
+ FT_TRACE4(( "cf2_interpT2CharString:"
+ " charstring ends without ENDCHAR\n" ));
+
+ exit:
+ /* check whether last error seen is also the first one */
+ cf2_setError( error, lastError );
+
+ if ( *error )
+ FT_TRACE4(( "charstring error %d\n", *error ));
+
+ /* free resources from objects we've used */
+ cf2_glyphpath_finalize( &glyphPath );
+ cf2_arrstack_finalize( &vStemHintArray );
+ cf2_arrstack_finalize( &hStemHintArray );
+ cf2_arrstack_finalize( &subrStack );
+ cf2_stack_free( opStack );
+
+ FT_TRACE4(( "\n" ));
+
+ return;
+ }
+
+
+/* END */
diff --git a/modules/freetype2/src/cff/cf2intrp.h b/modules/freetype2/src/psaux/psintrp.h
index ec030e894..4790aaa30 100644
--- a/modules/freetype2/src/cff/cf2intrp.h
+++ b/modules/freetype2/src/psaux/psintrp.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2font.h */
+/* psintrp.h */
/* */
/* Adobe's CFF Interpreter (specification). */
/* */
@@ -36,12 +36,12 @@
/***************************************************************************/
-#ifndef CF2INTRP_H_
-#define CF2INTRP_H_
+#ifndef PSINTRP_H_
+#define PSINTRP_H_
-#include "cf2ft.h"
-#include "cf2hints.h"
+#include "psft.h"
+#include "pshints.h"
FT_BEGIN_HEADER
@@ -77,7 +77,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2INTRP_H_ */
+#endif /* PSINTRP_H_ */
/* END */
diff --git a/modules/freetype2/src/psaux/psobjs.c b/modules/freetype2/src/psaux/psobjs.c
index 6e528d407..f54bc7e41 100644
--- a/modules/freetype2/src/psaux/psobjs.c
+++ b/modules/freetype2/src/psaux/psobjs.c
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,11 +20,13 @@
#include FT_INTERNAL_POSTSCRIPT_AUX_H
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_CALC_H
+#include FT_DRIVER_H
#include "psobjs.h"
#include "psconv.h"
#include "psauxerr.h"
+#include "psauxmod.h"
/*************************************************************************/
@@ -1551,7 +1553,7 @@
builder->current = &loader->current.outline;
FT_GlyphLoader_Rewind( loader );
- builder->hints_globals = size->internal;
+ builder->hints_globals = size->internal->module_data;
builder->hints_funcs = NULL;
if ( hinting )
@@ -1718,6 +1720,581 @@
first = outline->n_contours <= 1
? 0 : outline->contours[outline->n_contours - 2] + 1;
+ /* in malformed fonts it can happen that a contour was started */
+ /* but no points were added */
+ if ( outline->n_contours && first == outline->n_points )
+ {
+ outline->n_contours--;
+ return;
+ }
+
+ /* We must not include the last point in the path if it */
+ /* is located on the first point. */
+ if ( outline->n_points > 1 )
+ {
+ FT_Vector* p1 = outline->points + first;
+ FT_Vector* p2 = outline->points + outline->n_points - 1;
+ FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points - 1;
+
+
+ /* `delete' last point only if it coincides with the first */
+ /* point and it is not a control point (which can happen). */
+ if ( p1->x == p2->x && p1->y == p2->y )
+ if ( *control == FT_CURVE_TAG_ON )
+ outline->n_points--;
+ }
+
+ if ( outline->n_contours > 0 )
+ {
+ /* Don't add contours only consisting of one point, i.e., */
+ /* check whether the first and the last point is the same. */
+ if ( first == outline->n_points - 1 )
+ {
+ outline->n_contours--;
+ outline->n_points--;
+ }
+ else
+ outline->contours[outline->n_contours - 1] =
+ (short)( outline->n_points - 1 );
+ }
+ }
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** CFF BUILDER *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* cff_builder_init */
+ /* */
+ /* <Description> */
+ /* Initializes a given glyph builder. */
+ /* */
+ /* <InOut> */
+ /* builder :: A pointer to the glyph builder to initialize. */
+ /* */
+ /* <Input> */
+ /* face :: The current face object. */
+ /* */
+ /* size :: The current size object. */
+ /* */
+ /* glyph :: The current glyph object. */
+ /* */
+ /* hinting :: Whether hinting is active. */
+ /* */
+ FT_LOCAL_DEF( void )
+ cff_builder_init( CFF_Builder* builder,
+ TT_Face face,
+ CFF_Size size,
+ CFF_GlyphSlot glyph,
+ FT_Bool hinting )
+ {
+ builder->path_begun = 0;
+ builder->load_points = 1;
+
+ builder->face = face;
+ builder->glyph = glyph;
+ builder->memory = face->root.memory;
+
+ if ( glyph )
+ {
+ FT_GlyphLoader loader = glyph->root.internal->loader;
+
+
+ builder->loader = loader;
+ builder->base = &loader->base.outline;
+ builder->current = &loader->current.outline;
+ FT_GlyphLoader_Rewind( loader );
+
+ builder->hints_globals = NULL;
+ builder->hints_funcs = NULL;
+
+ if ( hinting && size )
+ {
+ FT_Size ftsize = FT_SIZE( size );
+ CFF_Internal internal = (CFF_Internal)ftsize->internal->module_data;
+
+ if ( internal )
+ {
+ builder->hints_globals = (void *)internal->topfont;
+ builder->hints_funcs = glyph->root.internal->glyph_hints;
+ }
+ }
+ }
+
+ builder->pos_x = 0;
+ builder->pos_y = 0;
+
+ builder->left_bearing.x = 0;
+ builder->left_bearing.y = 0;
+ builder->advance.x = 0;
+ builder->advance.y = 0;
+
+ builder->funcs = cff_builder_funcs;
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* cff_builder_done */
+ /* */
+ /* <Description> */
+ /* Finalizes a given glyph builder. Its contents can still be used */
+ /* after the call, but the function saves important information */
+ /* within the corresponding glyph slot. */
+ /* */
+ /* <Input> */
+ /* builder :: A pointer to the glyph builder to finalize. */
+ /* */
+ FT_LOCAL_DEF( void )
+ cff_builder_done( CFF_Builder* builder )
+ {
+ CFF_GlyphSlot glyph = builder->glyph;
+
+
+ if ( glyph )
+ glyph->root.outline = *builder->base;
+ }
+
+
+ /* check that there is enough space for `count' more points */
+ FT_LOCAL_DEF( FT_Error )
+ cff_check_points( CFF_Builder* builder,
+ FT_Int count )
+ {
+ return FT_GLYPHLOADER_CHECK_POINTS( builder->loader, count, 0 );
+ }
+
+
+ /* add a new point, do not check space */
+ FT_LOCAL_DEF( void )
+ cff_builder_add_point( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y,
+ FT_Byte flag )
+ {
+ FT_Outline* outline = builder->current;
+
+
+ if ( builder->load_points )
+ {
+ FT_Vector* point = outline->points + outline->n_points;
+ FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points;
+
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( builder->face );
+
+
+ if ( driver->hinting_engine == FT_HINTING_FREETYPE )
+ {
+ point->x = x >> 16;
+ point->y = y >> 16;
+ }
+ else
+#endif
+ {
+ /* cf2_decoder_parse_charstrings uses 16.16 coordinates */
+ point->x = x >> 10;
+ point->y = y >> 10;
+ }
+ *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );
+ }
+
+ outline->n_points++;
+ }
+
+
+ /* check space for a new on-curve point, then add it */
+ FT_LOCAL_DEF( FT_Error )
+ cff_builder_add_point1( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y )
+ {
+ FT_Error error;
+
+
+ error = cff_check_points( builder, 1 );
+ if ( !error )
+ cff_builder_add_point( builder, x, y, 1 );
+
+ return error;
+ }
+
+
+ /* check space for a new contour, then add it */
+ FT_LOCAL_DEF( FT_Error )
+ cff_builder_add_contour( CFF_Builder* builder )
+ {
+ FT_Outline* outline = builder->current;
+ FT_Error error;
+
+
+ if ( !builder->load_points )
+ {
+ outline->n_contours++;
+ return FT_Err_Ok;
+ }
+
+ error = FT_GLYPHLOADER_CHECK_POINTS( builder->loader, 0, 1 );
+ if ( !error )
+ {
+ if ( outline->n_contours > 0 )
+ outline->contours[outline->n_contours - 1] =
+ (short)( outline->n_points - 1 );
+
+ outline->n_contours++;
+ }
+
+ return error;
+ }
+
+
+ /* if a path was begun, add its first on-curve point */
+ FT_LOCAL_DEF( FT_Error )
+ cff_builder_start_point( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y )
+ {
+ FT_Error error = FT_Err_Ok;
+
+
+ /* test whether we are building a new contour */
+ if ( !builder->path_begun )
+ {
+ builder->path_begun = 1;
+ error = cff_builder_add_contour( builder );
+ if ( !error )
+ error = cff_builder_add_point1( builder, x, y );
+ }
+
+ return error;
+ }
+
+
+ /* close the current contour */
+ FT_LOCAL_DEF( void )
+ cff_builder_close_contour( CFF_Builder* builder )
+ {
+ FT_Outline* outline = builder->current;
+ FT_Int first;
+
+
+ if ( !outline )
+ return;
+
+ first = outline->n_contours <= 1
+ ? 0 : outline->contours[outline->n_contours - 2] + 1;
+
+ /* We must not include the last point in the path if it */
+ /* is located on the first point. */
+ if ( outline->n_points > 1 )
+ {
+ FT_Vector* p1 = outline->points + first;
+ FT_Vector* p2 = outline->points + outline->n_points - 1;
+ FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points - 1;
+
+
+ /* `delete' last point only if it coincides with the first */
+ /* point and if it is not a control point (which can happen). */
+ if ( p1->x == p2->x && p1->y == p2->y )
+ if ( *control == FT_CURVE_TAG_ON )
+ outline->n_points--;
+ }
+
+ if ( outline->n_contours > 0 )
+ {
+ /* Don't add contours only consisting of one point, i.e., */
+ /* check whether begin point and last point are the same. */
+ if ( first == outline->n_points - 1 )
+ {
+ outline->n_contours--;
+ outline->n_points--;
+ }
+ else
+ outline->contours[outline->n_contours - 1] =
+ (short)( outline->n_points - 1 );
+ }
+ }
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** PS BUILDER *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ps_builder_init */
+ /* */
+ /* <Description> */
+ /* Initializes a given glyph builder. */
+ /* */
+ /* <InOut> */
+ /* builder :: A pointer to the glyph builder to initialize. */
+ /* */
+ /* <Input> */
+ /* face :: The current face object. */
+ /* */
+ /* size :: The current size object. */
+ /* */
+ /* glyph :: The current glyph object. */
+ /* */
+ /* hinting :: Whether hinting should be applied. */
+ /* */
+ FT_LOCAL_DEF( void )
+ ps_builder_init( PS_Builder* ps_builder,
+ void* builder,
+ FT_Bool is_t1 )
+ {
+ FT_ZERO( ps_builder );
+
+ if ( is_t1 )
+ {
+ T1_Builder t1builder = (T1_Builder)builder;
+
+
+ ps_builder->memory = t1builder->memory;
+ ps_builder->face = (FT_Face)t1builder->face;
+ ps_builder->glyph = (CFF_GlyphSlot)t1builder->glyph;
+ ps_builder->loader = t1builder->loader;
+ ps_builder->base = t1builder->base;
+ ps_builder->current = t1builder->current;
+
+ ps_builder->pos_x = &t1builder->pos_x;
+ ps_builder->pos_y = &t1builder->pos_y;
+
+ ps_builder->left_bearing = &t1builder->left_bearing;
+ ps_builder->advance = &t1builder->advance;
+
+ ps_builder->bbox = &t1builder->bbox;
+ ps_builder->path_begun = 0;
+ ps_builder->load_points = t1builder->load_points;
+ ps_builder->no_recurse = t1builder->no_recurse;
+
+ ps_builder->metrics_only = t1builder->metrics_only;
+ }
+ else
+ {
+ CFF_Builder* cffbuilder = (CFF_Builder*)builder;
+
+
+ ps_builder->memory = cffbuilder->memory;
+ ps_builder->face = (FT_Face)cffbuilder->face;
+ ps_builder->glyph = cffbuilder->glyph;
+ ps_builder->loader = cffbuilder->loader;
+ ps_builder->base = cffbuilder->base;
+ ps_builder->current = cffbuilder->current;
+
+ ps_builder->pos_x = &cffbuilder->pos_x;
+ ps_builder->pos_y = &cffbuilder->pos_y;
+
+ ps_builder->left_bearing = &cffbuilder->left_bearing;
+ ps_builder->advance = &cffbuilder->advance;
+
+ ps_builder->bbox = &cffbuilder->bbox;
+ ps_builder->path_begun = cffbuilder->path_begun;
+ ps_builder->load_points = cffbuilder->load_points;
+ ps_builder->no_recurse = cffbuilder->no_recurse;
+
+ ps_builder->metrics_only = cffbuilder->metrics_only;
+ }
+
+ ps_builder->is_t1 = is_t1;
+ ps_builder->funcs = ps_builder_funcs;
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ps_builder_done */
+ /* */
+ /* <Description> */
+ /* Finalizes a given glyph builder. Its contents can still be used */
+ /* after the call, but the function saves important information */
+ /* within the corresponding glyph slot. */
+ /* */
+ /* <Input> */
+ /* builder :: A pointer to the glyph builder to finalize. */
+ /* */
+ FT_LOCAL_DEF( void )
+ ps_builder_done( PS_Builder* builder )
+ {
+ CFF_GlyphSlot glyph = builder->glyph;
+
+
+ if ( glyph )
+ glyph->root.outline = *builder->base;
+ }
+
+
+ /* check that there is enough space for `count' more points */
+ FT_LOCAL_DEF( FT_Error )
+ ps_builder_check_points( PS_Builder* builder,
+ FT_Int count )
+ {
+ return FT_GLYPHLOADER_CHECK_POINTS( builder->loader, count, 0 );
+ }
+
+
+ /* add a new point, do not check space */
+ FT_LOCAL_DEF( void )
+ ps_builder_add_point( PS_Builder* builder,
+ FT_Pos x,
+ FT_Pos y,
+ FT_Byte flag )
+ {
+ FT_Outline* outline = builder->current;
+
+
+ if ( builder->load_points )
+ {
+ FT_Vector* point = outline->points + outline->n_points;
+ FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points;
+
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( builder->face );
+
+
+ if ( !builder->is_t1 &&
+ driver->hinting_engine == FT_HINTING_FREETYPE )
+ {
+ point->x = x >> 16;
+ point->y = y >> 16;
+ }
+ else
+#endif
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+#ifndef CFF_CONFIG_OPTION_OLD_ENGINE
+ PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( builder->face );
+#endif
+ if ( builder->is_t1 &&
+ driver->hinting_engine == FT_HINTING_FREETYPE )
+ {
+ point->x = FIXED_TO_INT( x );
+ point->y = FIXED_TO_INT( y );
+ }
+ else
+#endif
+ {
+ /* cf2_decoder_parse_charstrings uses 16.16 coordinates */
+ point->x = x >> 10;
+ point->y = y >> 10;
+ }
+ *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );
+ }
+ outline->n_points++;
+ }
+
+
+ /* check space for a new on-curve point, then add it */
+ FT_LOCAL_DEF( FT_Error )
+ ps_builder_add_point1( PS_Builder* builder,
+ FT_Pos x,
+ FT_Pos y )
+ {
+ FT_Error error;
+
+
+ error = ps_builder_check_points( builder, 1 );
+ if ( !error )
+ ps_builder_add_point( builder, x, y, 1 );
+
+ return error;
+ }
+
+
+ /* check space for a new contour, then add it */
+ FT_LOCAL_DEF( FT_Error )
+ ps_builder_add_contour( PS_Builder* builder )
+ {
+ FT_Outline* outline = builder->current;
+ FT_Error error;
+
+
+ /* this might happen in invalid fonts */
+ if ( !outline )
+ {
+ FT_ERROR(( "ps_builder_add_contour: no outline to add points to\n" ));
+ return FT_THROW( Invalid_File_Format );
+ }
+
+ if ( !builder->load_points )
+ {
+ outline->n_contours++;
+ return FT_Err_Ok;
+ }
+
+ error = FT_GLYPHLOADER_CHECK_POINTS( builder->loader, 0, 1 );
+ if ( !error )
+ {
+ if ( outline->n_contours > 0 )
+ outline->contours[outline->n_contours - 1] =
+ (short)( outline->n_points - 1 );
+
+ outline->n_contours++;
+ }
+
+ return error;
+ }
+
+
+ /* if a path was begun, add its first on-curve point */
+ FT_LOCAL_DEF( FT_Error )
+ ps_builder_start_point( PS_Builder* builder,
+ FT_Pos x,
+ FT_Pos y )
+ {
+ FT_Error error = FT_Err_Ok;
+
+
+ /* test whether we are building a new contour */
+ if ( !builder->path_begun )
+ {
+ builder->path_begun = 1;
+ error = ps_builder_add_contour( builder );
+ if ( !error )
+ error = ps_builder_add_point1( builder, x, y );
+ }
+
+ return error;
+ }
+
+
+ /* close the current contour */
+ FT_LOCAL_DEF( void )
+ ps_builder_close_contour( PS_Builder* builder )
+ {
+ FT_Outline* outline = builder->current;
+ FT_Int first;
+
+
+ if ( !outline )
+ return;
+
+ first = outline->n_contours <= 1
+ ? 0 : outline->contours[outline->n_contours - 2] + 1;
+
+ /* in malformed fonts it can happen that a contour was started */
+ /* but no points were added */
+ if ( outline->n_contours && first == outline->n_points )
+ {
+ outline->n_contours--;
+ return;
+ }
+
/* We must not include the last point in the path if it */
/* is located on the first point. */
if ( outline->n_points > 1 )
@@ -1758,6 +2335,176 @@
/*************************************************************************/
/*************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ps_decoder_init */
+ /* */
+ /* <Description> */
+ /* Creates a wrapper decoder for use in the combined */
+ /* Type 1 / CFF interpreter. */
+ /* */
+ /* <InOut> */
+ /* ps_decoder :: A pointer to the decoder to initialize. */
+ /* */
+ /* <Input> */
+ /* decoder :: A pointer to the original decoder. */
+ /* */
+ /* is_t1 :: Flag indicating Type 1 or CFF */
+ /* */
+ FT_LOCAL_DEF( void )
+ ps_decoder_init( PS_Decoder* ps_decoder,
+ void* decoder,
+ FT_Bool is_t1 )
+ {
+ FT_ZERO( ps_decoder );
+
+ if ( is_t1 )
+ {
+ T1_Decoder t1_decoder = (T1_Decoder)decoder;
+
+
+ ps_builder_init( &ps_decoder->builder,
+ &t1_decoder->builder,
+ is_t1 );
+
+ ps_decoder->cf2_instance = &t1_decoder->cf2_instance;
+ ps_decoder->psnames = t1_decoder->psnames;
+
+ ps_decoder->num_glyphs = t1_decoder->num_glyphs;
+ ps_decoder->glyph_names = t1_decoder->glyph_names;
+ ps_decoder->hint_mode = t1_decoder->hint_mode;
+ ps_decoder->blend = t1_decoder->blend;
+
+ ps_decoder->num_locals = (FT_UInt)t1_decoder->num_subrs;
+ ps_decoder->locals = t1_decoder->subrs;
+ ps_decoder->locals_len = t1_decoder->subrs_len;
+ ps_decoder->locals_hash = t1_decoder->subrs_hash;
+
+ ps_decoder->buildchar = t1_decoder->buildchar;
+ ps_decoder->len_buildchar = t1_decoder->len_buildchar;
+
+ ps_decoder->lenIV = t1_decoder->lenIV;
+ }
+ else
+ {
+ CFF_Decoder* cff_decoder = (CFF_Decoder*)decoder;
+
+
+ ps_builder_init( &ps_decoder->builder,
+ &cff_decoder->builder,
+ is_t1 );
+
+ ps_decoder->cff = cff_decoder->cff;
+ ps_decoder->cf2_instance = &cff_decoder->cff->cf2_instance;
+ ps_decoder->current_subfont = cff_decoder->current_subfont;
+
+ ps_decoder->num_globals = cff_decoder->num_globals;
+ ps_decoder->globals = cff_decoder->globals;
+ ps_decoder->globals_bias = cff_decoder->globals_bias;
+ ps_decoder->num_locals = cff_decoder->num_locals;
+ ps_decoder->locals = cff_decoder->locals;
+ ps_decoder->locals_bias = cff_decoder->locals_bias;
+
+ ps_decoder->glyph_width = &cff_decoder->glyph_width;
+ ps_decoder->width_only = cff_decoder->width_only;
+
+ ps_decoder->hint_mode = cff_decoder->hint_mode;
+
+ ps_decoder->get_glyph_callback = cff_decoder->get_glyph_callback;
+ ps_decoder->free_glyph_callback = cff_decoder->free_glyph_callback;
+ }
+ }
+
+
+ /* Synthesize a SubFont object for Type 1 fonts, for use in the */
+ /* new interpreter to access Private dict data. */
+ FT_LOCAL_DEF( void )
+ t1_make_subfont( FT_Face face,
+ PS_Private priv,
+ CFF_SubFont subfont )
+ {
+ CFF_Private cpriv = &subfont->private_dict;
+ FT_UInt n, count;
+
+
+ FT_ZERO( subfont );
+ FT_ZERO( cpriv );
+
+ count = cpriv->num_blue_values = priv->num_blue_values;
+ for ( n = 0; n < count; n++ )
+ cpriv->blue_values[n] = (FT_Pos)priv->blue_values[n];
+
+ count = cpriv->num_other_blues = priv->num_other_blues;
+ for ( n = 0; n < count; n++ )
+ cpriv->other_blues[n] = (FT_Pos)priv->other_blues[n];
+
+ count = cpriv->num_family_blues = priv->num_family_blues;
+ for ( n = 0; n < count; n++ )
+ cpriv->family_blues[n] = (FT_Pos)priv->family_blues[n];
+
+ count = cpriv->num_family_other_blues = priv->num_family_other_blues;
+ for ( n = 0; n < count; n++ )
+ cpriv->family_other_blues[n] = (FT_Pos)priv->family_other_blues[n];
+
+ cpriv->blue_scale = priv->blue_scale;
+ cpriv->blue_shift = (FT_Pos)priv->blue_shift;
+ cpriv->blue_fuzz = (FT_Pos)priv->blue_fuzz;
+
+ cpriv->standard_width = (FT_Pos)priv->standard_width[0];
+ cpriv->standard_height = (FT_Pos)priv->standard_height[0];
+
+ count = cpriv->num_snap_widths = priv->num_snap_widths;
+ for ( n = 0; n < count; n++ )
+ cpriv->snap_widths[n] = (FT_Pos)priv->snap_widths[n];
+
+ count = cpriv->num_snap_heights = priv->num_snap_heights;
+ for ( n = 0; n < count; n++ )
+ cpriv->snap_heights[n] = (FT_Pos)priv->snap_heights[n];
+
+ cpriv->force_bold = priv->force_bold;
+ cpriv->lenIV = priv->lenIV;
+ cpriv->language_group = priv->language_group;
+ cpriv->expansion_factor = priv->expansion_factor;
+
+ cpriv->subfont = subfont;
+
+
+ /* Initialize the random number generator. */
+ if ( face->internal->random_seed != -1 )
+ {
+ /* If we have a face-specific seed, use it. */
+ /* If non-zero, update it to a positive value. */
+ subfont->random = (FT_UInt32)face->internal->random_seed;
+ if ( face->internal->random_seed )
+ {
+ do
+ {
+ face->internal->random_seed = (FT_Int32)cff_random(
+ (FT_UInt32)face->internal->random_seed );
+
+ } while ( face->internal->random_seed < 0 );
+ }
+ }
+ if ( !subfont->random )
+ {
+ FT_UInt32 seed;
+
+
+ /* compute random seed from some memory addresses */
+ seed = (FT_UInt32)( (FT_Offset)(char*)&seed ^
+ (FT_Offset)(char*)&face ^
+ (FT_Offset)(char*)&subfont );
+ seed = seed ^ ( seed >> 10 ) ^ ( seed >> 20 );
+ if ( seed == 0 )
+ seed = 0x7384;
+
+ subfont->random = seed;
+ }
+ }
+
+
FT_LOCAL_DEF( void )
t1_decrypt( FT_Byte* buffer,
FT_Offset length,
@@ -1771,4 +2518,16 @@
}
+ FT_LOCAL_DEF( FT_UInt32 )
+ cff_random( FT_UInt32 r )
+ {
+ /* a 32bit version of the `xorshift' algorithm */
+ r ^= r << 13;
+ r ^= r >> 17;
+ r ^= r << 5;
+
+ return r;
+ }
+
+
/* END */
diff --git a/modules/freetype2/src/psaux/psobjs.h b/modules/freetype2/src/psaux/psobjs.h
index 4c7178e79..8e0fe5fa4 100644
--- a/modules/freetype2/src/psaux/psobjs.h
+++ b/modules/freetype2/src/psaux/psobjs.h
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,7 @@
#include <ft2build.h>
#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
FT_BEGIN_HEADER
@@ -193,17 +194,117 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
/***** *****/
+ /***** CFF BUILDER *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ FT_LOCAL( void )
+ cff_builder_init( CFF_Builder* builder,
+ TT_Face face,
+ CFF_Size size,
+ CFF_GlyphSlot glyph,
+ FT_Bool hinting );
+
+ FT_LOCAL( void )
+ cff_builder_done( CFF_Builder* builder );
+
+ FT_LOCAL( FT_Error )
+ cff_check_points( CFF_Builder* builder,
+ FT_Int count );
+
+ FT_LOCAL( void )
+ cff_builder_add_point( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y,
+ FT_Byte flag );
+ FT_LOCAL( FT_Error )
+ cff_builder_add_point1( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y );
+ FT_LOCAL( FT_Error )
+ cff_builder_start_point( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y );
+ FT_LOCAL( void )
+ cff_builder_close_contour( CFF_Builder* builder );
+
+ FT_LOCAL( FT_Error )
+ cff_builder_add_contour( CFF_Builder* builder );
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** PS BUILDER *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ FT_LOCAL( void )
+ ps_builder_init( PS_Builder* ps_builder,
+ void* builder,
+ FT_Bool is_t1 );
+
+
+ FT_LOCAL( void )
+ ps_builder_done( PS_Builder* builder );
+
+ FT_LOCAL( FT_Error )
+ ps_builder_check_points( PS_Builder* builder,
+ FT_Int count );
+
+ FT_LOCAL( void )
+ ps_builder_add_point( PS_Builder* builder,
+ FT_Pos x,
+ FT_Pos y,
+ FT_Byte flag );
+
+ FT_LOCAL( FT_Error )
+ ps_builder_add_point1( PS_Builder* builder,
+ FT_Pos x,
+ FT_Pos y );
+
+ FT_LOCAL( FT_Error )
+ ps_builder_add_contour( PS_Builder* builder );
+
+ FT_LOCAL( FT_Error )
+ ps_builder_start_point( PS_Builder* builder,
+ FT_Pos x,
+ FT_Pos y );
+
+ FT_LOCAL( void )
+ ps_builder_close_contour( PS_Builder* builder );
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
/***** OTHER *****/
/***** *****/
/*************************************************************************/
/*************************************************************************/
FT_LOCAL( void )
+ ps_decoder_init( PS_Decoder* ps_decoder,
+ void* decoder,
+ FT_Bool is_t1 );
+
+ FT_LOCAL( void )
+ t1_make_subfont( FT_Face face,
+ PS_Private priv,
+ CFF_SubFont subfont );
+
+ FT_LOCAL( void )
t1_decrypt( FT_Byte* buffer,
FT_Offset length,
FT_UShort seed );
+ FT_LOCAL( FT_UInt32 )
+ cff_random( FT_UInt32 r );
+
+
FT_END_HEADER
#endif /* PSOBJS_H_ */
diff --git a/modules/freetype2/src/cff/cf2read.c b/modules/freetype2/src/psaux/psread.c
index 2b429e3ee..719863ce1 100644
--- a/modules/freetype2/src/cff/cf2read.c
+++ b/modules/freetype2/src/psaux/psread.c
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2read.c */
+/* psread.c */
/* */
/* Adobe's code for stream handling (body). */
/* */
@@ -36,12 +36,12 @@
/***************************************************************************/
-#include "cf2ft.h"
+#include "psft.h"
#include FT_INTERNAL_DEBUG_H
-#include "cf2glue.h"
+#include "psglue.h"
-#include "cf2error.h"
+#include "pserror.h"
/* Define CF2_IO_FAIL as 1 to enable random errors and random */
diff --git a/modules/freetype2/src/cff/cf2read.h b/modules/freetype2/src/psaux/psread.h
index b0b0db803..464b29ba7 100644
--- a/modules/freetype2/src/cff/cf2read.h
+++ b/modules/freetype2/src/psaux/psread.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2read.h */
+/* psread.h */
/* */
/* Adobe's code for stream handling (specification). */
/* */
@@ -36,8 +36,8 @@
/***************************************************************************/
-#ifndef CF2READ_H_
-#define CF2READ_H_
+#ifndef PSREAD_H_
+#define PSREAD_H_
FT_BEGIN_HEADER
@@ -62,7 +62,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2READ_H_ */
+#endif /* PSREAD_H_ */
/* END */
diff --git a/modules/freetype2/src/cff/cf2stack.c b/modules/freetype2/src/psaux/psstack.c
index 12a026d21..69d063349 100644
--- a/modules/freetype2/src/cff/cf2stack.c
+++ b/modules/freetype2/src/psaux/psstack.c
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2stack.c */
+/* psstack.c */
/* */
/* Adobe's code for emulating a CFF stack (body). */
/* */
@@ -36,14 +36,14 @@
/***************************************************************************/
-#include "cf2ft.h"
+#include "psft.h"
#include FT_INTERNAL_DEBUG_H
-#include "cf2glue.h"
-#include "cf2font.h"
-#include "cf2stack.h"
+#include "psglue.h"
+#include "psfont.h"
+#include "psstack.h"
-#include "cf2error.h"
+#include "pserror.h"
/* Allocate and initialize an instance of CF2_Stack. */
diff --git a/modules/freetype2/src/cff/cf2stack.h b/modules/freetype2/src/psaux/psstack.h
index ef08eefe4..38f7b41c6 100644
--- a/modules/freetype2/src/cff/cf2stack.h
+++ b/modules/freetype2/src/psaux/psstack.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2stack.h */
+/* psstack.h */
/* */
/* Adobe's code for emulating a CFF stack (specification). */
/* */
@@ -36,8 +36,8 @@
/***************************************************************************/
-#ifndef CF2STACK_H_
-#define CF2STACK_H_
+#ifndef PSSTACK_H_
+#define PSSTACK_H_
FT_BEGIN_HEADER
@@ -115,7 +115,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2STACK_H_ */
+#endif /* PSSTACK_H_ */
/* END */
diff --git a/modules/freetype2/src/cff/cf2types.h b/modules/freetype2/src/psaux/pstypes.h
index 5b7e1239a..dfbaa3d47 100644
--- a/modules/freetype2/src/cff/cf2types.h
+++ b/modules/freetype2/src/psaux/pstypes.h
@@ -1,6 +1,6 @@
/***************************************************************************/
/* */
-/* cf2types.h */
+/* pstypes.h */
/* */
/* Adobe's code for defining data types (specification only). */
/* */
@@ -36,8 +36,8 @@
/***************************************************************************/
-#ifndef CF2TYPES_H_
-#define CF2TYPES_H_
+#ifndef PSTYPES_H_
+#define PSTYPES_H_
#include <ft2build.h>
#include FT_FREETYPE_H
@@ -72,7 +72,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* CF2TYPES_H_ */
+#endif /* PSTYPES_H_ */
/* END */
diff --git a/modules/freetype2/src/psaux/rules.mk b/modules/freetype2/src/psaux/rules.mk
index 19787b5f8..a87bfe968 100644
--- a/modules/freetype2/src/psaux/rules.mk
+++ b/modules/freetype2/src/psaux/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -33,12 +33,25 @@ PSAUX_DRV_SRC := $(PSAUX_DIR)/psobjs.c \
$(PSAUX_DIR)/t1cmap.c \
$(PSAUX_DIR)/afmparse.c \
$(PSAUX_DIR)/psconv.c \
- $(PSAUX_DIR)/psauxmod.c
+ $(PSAUX_DIR)/psauxmod.c \
+ $(PSAUX_DIR)/psarrst.c \
+ $(PSAUX_DIR)/psblues.c \
+ $(PSAUX_DIR)/pserror.c \
+ $(PSAUX_DIR)/psfont.c \
+ $(PSAUX_DIR)/psft.c \
+ $(PSAUX_DIR)/pshints.c \
+ $(PSAUX_DIR)/psintrp.c \
+ $(PSAUX_DIR)/psread.c \
+ $(PSAUX_DIR)/psstack.c \
+ $(PSAUX_DIR)/cffdecode.c
# PSAUX driver headers
#
PSAUX_DRV_H := $(PSAUX_DRV_SRC:%c=%h) \
- $(PSAUX_DIR)/psauxerr.h
+ $(PSAUX_DIR)/psauxerr.h \
+ $(PSAUX_DIR)/psfixed.h \
+ $(PSAUX_DIR)/psglue.h \
+ $(PSAUX_DIR)/pstypes.h
# PSAUX driver object(s)
diff --git a/modules/freetype2/src/psaux/t1cmap.c b/modules/freetype2/src/psaux/t1cmap.c
index 7b289b7f5..112a7892b 100644
--- a/modules/freetype2/src/psaux/t1cmap.c
+++ b/modules/freetype2/src/psaux/t1cmap.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 character map support (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/psaux/t1cmap.h b/modules/freetype2/src/psaux/t1cmap.h
index 5e1277dc6..4308e31d2 100644
--- a/modules/freetype2/src/psaux/t1cmap.h
+++ b/modules/freetype2/src/psaux/t1cmap.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 character map support (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/psaux/t1decode.c b/modules/freetype2/src/psaux/t1decode.c
index 1cd9d730a..6ad145661 100644
--- a/modules/freetype2/src/psaux/t1decode.c
+++ b/modules/freetype2/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
/* */
/* PostScript Type 1 decoding routines (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -112,6 +112,56 @@
/*************************************************************************/
/* */
/* <Function> */
+ /* t1_lookup_glyph_by_stdcharcode_ps */
+ /* */
+ /* <Description> */
+ /* Looks up a given glyph by its StandardEncoding charcode. Used to */
+ /* implement the SEAC Type 1 operator in the Adobe engine */
+ /* */
+ /* <Input> */
+ /* face :: The current face object. */
+ /* */
+ /* charcode :: The character code to look for. */
+ /* */
+ /* <Return> */
+ /* A glyph index in the font face. Returns -1 if the corresponding */
+ /* glyph wasn't found. */
+ /* */
+ FT_LOCAL_DEF( FT_Int )
+ t1_lookup_glyph_by_stdcharcode_ps( PS_Decoder* decoder,
+ FT_Int charcode )
+ {
+ FT_UInt n;
+ const FT_String* glyph_name;
+ FT_Service_PsCMaps psnames = decoder->psnames;
+
+
+ /* check range of standard char code */
+ if ( charcode < 0 || charcode > 255 )
+ return -1;
+
+ glyph_name = psnames->adobe_std_strings(
+ psnames->adobe_std_encoding[charcode]);
+
+ for ( n = 0; n < decoder->num_glyphs; n++ )
+ {
+ FT_String* name = (FT_String*)decoder->glyph_names[n];
+
+
+ if ( name &&
+ name[0] == glyph_name[0] &&
+ ft_strcmp( name, glyph_name ) == 0 )
+ return (FT_Int)n;
+ }
+
+ return -1;
+ }
+
+
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+ /*************************************************************************/
+ /* */
+ /* <Function> */
/* t1_lookup_glyph_by_stdcharcode */
/* */
/* <Description> */
@@ -158,6 +208,15 @@
}
+ /* parse a single Type 1 glyph */
+ FT_LOCAL_DEF( FT_Error )
+ t1_decoder_parse_glyph( T1_Decoder decoder,
+ FT_UInt glyph )
+ {
+ return decoder->parse_callback( decoder, glyph );
+ }
+
+
/*************************************************************************/
/* */
/* <Function> */
@@ -666,9 +725,9 @@
#ifdef FT_DEBUG_LEVEL_TRACE
if ( large_int )
- FT_TRACE4(( " %ld", value ));
+ FT_TRACE4(( " %d", value ));
else
- FT_TRACE4(( " %ld", value / 65536 ));
+ FT_TRACE4(( " %d", value / 65536 ));
#endif
*top++ = value;
@@ -780,10 +839,19 @@
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
+ {
+ /* in malformed fonts it is possible to have other */
+ /* opcodes in the middle of a flex (which don't */
+ /* increase `num_flex_vectors'); we thus have to */
+ /* check whether we can add a point */
+ if ( FT_SET_ERROR( t1_builder_check_points( builder, 1 ) ) )
+ goto Syntax_Error;
+
t1_builder_add_point( builder,
x,
y,
(FT_Byte)( idx == 3 || idx == 6 ) );
+ }
}
break;
@@ -855,7 +923,9 @@
for ( mm = 1; mm < blend->num_designs; mm++ )
- tmp += FT_MulFix( *delta++, blend->weight_vector[mm] );
+ tmp = ADD_LONG( tmp,
+ FT_MulFix( *delta++,
+ blend->weight_vector[mm] ) );
*values++ = tmp;
}
@@ -895,7 +965,7 @@
if ( arg_cnt != 2 )
goto Unexpected_OtherSubr;
- top[0] += top[1]; /* XXX (over|under)flow */
+ top[0] = ADD_LONG( top[0], top[1] );
known_othersubr_result_cnt = 1;
break;
@@ -906,7 +976,7 @@
if ( arg_cnt != 2 )
goto Unexpected_OtherSubr;
- top[0] -= top[1]; /* XXX (over|under)flow */
+ top[0] = SUB_LONG( top[0], top[1] );
known_othersubr_result_cnt = 1;
break;
@@ -1138,11 +1208,13 @@
builder->parse_state = T1_Parse_Have_Width;
- builder->left_bearing.x += top[0];
- builder->advance.x = top[1];
- builder->advance.y = 0;
+ builder->left_bearing.x = ADD_LONG( builder->left_bearing.x,
+ top[0] );
+
+ builder->advance.x = top[1];
+ builder->advance.y = 0;
- orig_x = x = builder->pos_x + top[0];
+ orig_x = x = ADD_LONG( builder->pos_x, top[0] );
orig_y = y = builder->pos_y;
FT_UNUSED( orig_y );
@@ -1168,13 +1240,16 @@
builder->parse_state = T1_Parse_Have_Width;
- builder->left_bearing.x += top[0];
- builder->left_bearing.y += top[1];
- builder->advance.x = top[2];
- builder->advance.y = top[3];
+ builder->left_bearing.x = ADD_LONG( builder->left_bearing.x,
+ top[0] );
+ builder->left_bearing.y = ADD_LONG( builder->left_bearing.y,
+ top[1] );
- x = builder->pos_x + top[0];
- y = builder->pos_y + top[1];
+ builder->advance.x = top[2];
+ builder->advance.y = top[3];
+
+ x = ADD_LONG( builder->pos_x, top[0] );
+ y = ADD_LONG( builder->pos_y, top[1] );
/* the `metrics_only' indicates that we only want to compute */
/* the glyph's metrics (lsb + advance width), not load the */
@@ -1201,13 +1276,14 @@
if ( FT_SET_ERROR( t1_builder_start_point( builder, x, y ) ) )
goto Fail;
- x += top[0];
+ x = ADD_LONG( x, top[0] );
goto Add_Line;
case op_hmoveto:
FT_TRACE4(( " hmoveto" ));
- x += top[0];
+ x = ADD_LONG( x, top[0] );
+
if ( !decoder->flex_state )
{
if ( builder->parse_state == T1_Parse_Start )
@@ -1223,12 +1299,14 @@
FT_SET_ERROR( t1_builder_check_points( builder, 3 ) ) )
goto Fail;
- x += top[0];
+ x = ADD_LONG( x, top[0] );
t1_builder_add_point( builder, x, y, 0 );
- x += top[1];
- y += top[2];
+
+ x = ADD_LONG( x, top[1] );
+ y = ADD_LONG( y, top[2] );
t1_builder_add_point( builder, x, y, 0 );
- y += top[3];
+
+ y = ADD_LONG( y, top[3] );
t1_builder_add_point( builder, x, y, 1 );
break;
@@ -1238,8 +1316,8 @@
if ( FT_SET_ERROR( t1_builder_start_point( builder, x, y ) ) )
goto Fail;
- x += top[0];
- y += top[1];
+ x = ADD_LONG( x, top[0] );
+ y = ADD_LONG( y, top[1] );
Add_Line:
if ( FT_SET_ERROR( t1_builder_add_point1( builder, x, y ) ) )
@@ -1249,8 +1327,9 @@
case op_rmoveto:
FT_TRACE4(( " rmoveto" ));
- x += top[0];
- y += top[1];
+ x = ADD_LONG( x, top[0] );
+ y = ADD_LONG( y, top[1] );
+
if ( !decoder->flex_state )
{
if ( builder->parse_state == T1_Parse_Start )
@@ -1266,16 +1345,16 @@
FT_SET_ERROR( t1_builder_check_points( builder, 3 ) ) )
goto Fail;
- x += top[0];
- y += top[1];
+ x = ADD_LONG( x, top[0] );
+ y = ADD_LONG( y, top[1] );
t1_builder_add_point( builder, x, y, 0 );
- x += top[2];
- y += top[3];
+ x = ADD_LONG( x, top[2] );
+ y = ADD_LONG( y, top[3] );
t1_builder_add_point( builder, x, y, 0 );
- x += top[4];
- y += top[5];
+ x = ADD_LONG( x, top[4] );
+ y = ADD_LONG( y, top[5] );
t1_builder_add_point( builder, x, y, 1 );
break;
@@ -1286,12 +1365,14 @@
FT_SET_ERROR( t1_builder_check_points( builder, 3 ) ) )
goto Fail;
- y += top[0];
+ y = ADD_LONG( y, top[0] );
t1_builder_add_point( builder, x, y, 0 );
- x += top[1];
- y += top[2];
+
+ x = ADD_LONG( x, top[1] );
+ y = ADD_LONG( y, top[2] );
t1_builder_add_point( builder, x, y, 0 );
- x += top[3];
+
+ x = ADD_LONG( x, top[3] );
t1_builder_add_point( builder, x, y, 1 );
break;
@@ -1301,13 +1382,14 @@
if ( FT_SET_ERROR( t1_builder_start_point( builder, x, y ) ) )
goto Fail;
- y += top[0];
+ y = ADD_LONG( y, top[0] );
goto Add_Line;
case op_vmoveto:
FT_TRACE4(( " vmoveto" ));
- y += top[0];
+ y = ADD_LONG( y, top[0] );
+
if ( !decoder->flex_state )
{
if ( builder->parse_state == T1_Parse_Start )
@@ -1464,7 +1546,7 @@
/* record vertical hint */
if ( hinter )
{
- top[0] += orig_x;
+ top[0] = ADD_LONG( top[0], orig_x );
hinter->stem( hinter->hints, 0, top );
}
break;
@@ -1478,9 +1560,9 @@
FT_Pos dx = orig_x;
- top[0] += dx;
- top[2] += dx;
- top[4] += dx;
+ top[0] = ADD_LONG( top[0], dx );
+ top[2] = ADD_LONG( top[2], dx );
+ top[4] = ADD_LONG( top[4], dx );
hinter->stem3( hinter->hints, 0, top );
}
break;
@@ -1556,14 +1638,286 @@
return FT_THROW( Stack_Underflow );
}
+#else /* T1_CONFIG_OPTION_OLD_ENGINE */
- /* parse a single Type 1 glyph */
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* t1_decoder_parse_metrics */
+ /* */
+ /* <Description> */
+ /* Parses a given Type 1 charstrings program to extract width */
+ /* */
+ /* <Input> */
+ /* decoder :: The current Type 1 decoder. */
+ /* */
+ /* charstring_base :: The base address of the charstring stream. */
+ /* */
+ /* charstring_len :: The length in bytes of the charstring stream. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
FT_LOCAL_DEF( FT_Error )
- t1_decoder_parse_glyph( T1_Decoder decoder,
- FT_UInt glyph )
+ t1_decoder_parse_metrics( T1_Decoder decoder,
+ FT_Byte* charstring_base,
+ FT_UInt charstring_len )
{
- return decoder->parse_callback( decoder, glyph );
+ T1_Decoder_Zone zone;
+ FT_Byte* ip;
+ FT_Byte* limit;
+ T1_Builder builder = &decoder->builder;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_Bool bol = TRUE;
+#endif
+
+
+ /* First of all, initialize the decoder */
+ decoder->top = decoder->stack;
+ decoder->zone = decoder->zones;
+ zone = decoder->zones;
+
+ builder->parse_state = T1_Parse_Start;
+
+ FT_TRACE4(( "\n"
+ "Start charstring: get width\n" ));
+
+ zone->base = charstring_base;
+ limit = zone->limit = charstring_base + charstring_len;
+ ip = zone->cursor = zone->base;
+
+ /* now, execute loop */
+ while ( ip < limit )
+ {
+ FT_Long* top = decoder->top;
+ T1_Operator op = op_none;
+ FT_Int32 value = 0;
+
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( bol )
+ {
+ FT_TRACE5(( " (%d)", decoder->top - decoder->stack ));
+ bol = FALSE;
+ }
+#endif
+
+ /*********************************************************************/
+ /* */
+ /* Decode operator or operand */
+ /* */
+ /* */
+
+ /* first of all, decompress operator or value */
+ switch ( *ip++ )
+ {
+ case 1:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 14:
+ case 15:
+ case 21:
+ case 22:
+ case 30:
+ case 31:
+ goto No_Width;
+
+ case 13:
+ op = op_hsbw;
+ break;
+
+ case 12:
+ if ( ip >= limit )
+ {
+ FT_ERROR(( "t1_decoder_parse_metrics:"
+ " invalid escape (12+EOF)\n" ));
+ goto Syntax_Error;
+ }
+
+ switch ( *ip++ )
+ {
+ case 7:
+ op = op_sbw;
+ break;
+
+ default:
+ goto No_Width;
+ }
+ break;
+
+ case 255: /* four bytes integer */
+ if ( ip + 4 > limit )
+ {
+ FT_ERROR(( "t1_decoder_parse_metrics:"
+ " unexpected EOF in integer\n" ));
+ goto Syntax_Error;
+ }
+
+ value = (FT_Int32)( ( (FT_UInt32)ip[0] << 24 ) |
+ ( (FT_UInt32)ip[1] << 16 ) |
+ ( (FT_UInt32)ip[2] << 8 ) |
+ (FT_UInt32)ip[3] );
+ ip += 4;
+
+ /* According to the specification, values > 32000 or < -32000 must */
+ /* be followed by a `div' operator to make the result be in the */
+ /* range [-32000;32000]. We expect that the second argument of */
+ /* `div' is not a large number. Additionally, we don't handle */
+ /* stuff like `<large1> <large2> <num> div <num> div' or */
+ /* <large1> <large2> <num> div div'. This is probably not allowed */
+ /* anyway. */
+ if ( value > 32000 || value < -32000 )
+ {
+ FT_ERROR(( "t1_decoder_parse_metrics:"
+ " large integer found for width\n" ));
+ goto Syntax_Error;
+ }
+ else
+ {
+ value = (FT_Int32)( (FT_UInt32)value << 16 );
+ }
+
+ break;
+
+ default:
+ if ( ip[-1] >= 32 )
+ {
+ if ( ip[-1] < 247 )
+ value = (FT_Int32)ip[-1] - 139;
+ else
+ {
+ if ( ++ip > limit )
+ {
+ FT_ERROR(( "t1_decoder_parse_metrics:"
+ " unexpected EOF in integer\n" ));
+ goto Syntax_Error;
+ }
+
+ if ( ip[-2] < 251 )
+ value = ( ( ip[-2] - 247 ) * 256 ) + ip[-1] + 108;
+ else
+ value = -( ( ( ip[-2] - 251 ) * 256 ) + ip[-1] + 108 );
+ }
+
+ value = (FT_Int32)( (FT_UInt32)value << 16 );
+ }
+ else
+ {
+ FT_ERROR(( "t1_decoder_parse_metrics:"
+ " invalid byte (%d)\n", ip[-1] ));
+ goto Syntax_Error;
+ }
+ }
+
+ /*********************************************************************/
+ /* */
+ /* Push value on stack, or process operator */
+ /* */
+ /* */
+ if ( op == op_none )
+ {
+ if ( top - decoder->stack >= T1_MAX_CHARSTRINGS_OPERANDS )
+ {
+ FT_ERROR(( "t1_decoder_parse_metrics: stack overflow\n" ));
+ goto Syntax_Error;
+ }
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE4(( " %d", value / 65536 ));
+#endif
+
+ *top++ = value;
+ decoder->top = top;
+ }
+ else /* general operator */
+ {
+ FT_Int num_args = t1_args_count[op];
+
+
+ FT_ASSERT( num_args >= 0 );
+
+ if ( top - decoder->stack < num_args )
+ goto Stack_Underflow;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+ if ( top - decoder->stack != num_args )
+ FT_TRACE0(( "t1_decoder_parse_metrics:"
+ " too much operands on the stack"
+ " (seen %d, expected %d)\n",
+ top - decoder->stack, num_args ));
+
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
+ top -= num_args;
+
+ switch ( op )
+ {
+ case op_hsbw:
+ FT_TRACE4(( " hsbw" ));
+
+ builder->parse_state = T1_Parse_Have_Width;
+
+ builder->left_bearing.x = ADD_LONG( builder->left_bearing.x,
+ top[0] );
+
+ builder->advance.x = top[1];
+ builder->advance.y = 0;
+
+ /* we only want to compute the glyph's metrics */
+ /* (lsb + advance width), not load the rest of */
+ /* it; so exit immediately */
+ return FT_Err_Ok;
+
+ case op_sbw:
+ FT_TRACE4(( " sbw" ));
+
+ builder->parse_state = T1_Parse_Have_Width;
+
+ builder->left_bearing.x = ADD_LONG( builder->left_bearing.x,
+ top[0] );
+ builder->left_bearing.y = ADD_LONG( builder->left_bearing.y,
+ top[1] );
+
+ builder->advance.x = top[2];
+ builder->advance.y = top[3];
+
+ /* we only want to compute the glyph's metrics */
+ /* (lsb + advance width), not load the rest of */
+ /* it; so exit immediately */
+ return FT_Err_Ok;
+
+ default:
+ FT_ERROR(( "t1_decoder_parse_metrics:"
+ " unhandled opcode %d\n", op ));
+ goto Syntax_Error;
+ }
+
+ } /* general operator processing */
+
+ } /* while ip < limit */
+
+ FT_TRACE4(( "..end..\n\n" ));
+
+ No_Width:
+ FT_ERROR(( "t1_decoder_parse_metrics:"
+ " no width, found op %d instead\n",
+ ip[-1] ));
+ Syntax_Error:
+ return FT_THROW( Syntax_Error );
+
+ Stack_Underflow:
+ return FT_THROW( Stack_Underflow );
}
+#endif /* T1_CONFIG_OPTION_OLD_ENGINE */
/* initialize T1 decoder */
@@ -1618,7 +1972,16 @@
FT_LOCAL_DEF( void )
t1_decoder_done( T1_Decoder decoder )
{
+ FT_Memory memory = decoder->builder.memory;
+
+
t1_builder_done( &decoder->builder );
+
+ if ( decoder->cf2_instance.finalizer )
+ {
+ decoder->cf2_instance.finalizer( decoder->cf2_instance.data );
+ FT_FREE( decoder->cf2_instance.data );
+ }
}
diff --git a/modules/freetype2/src/psaux/t1decode.h b/modules/freetype2/src/psaux/t1decode.h
index 0f5adfa15..1d9718d67 100644
--- a/modules/freetype2/src/psaux/t1decode.h
+++ b/modules/freetype2/src/psaux/t1decode.h
@@ -4,7 +4,7 @@
/* */
/* PostScript Type 1 decoding routines (specification). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,7 +31,11 @@ FT_BEGIN_HEADER
FT_CALLBACK_TABLE
const T1_Decoder_FuncsRec t1_decoder_funcs;
+ FT_LOCAL( FT_Int )
+ t1_lookup_glyph_by_stdcharcode_ps( PS_Decoder* decoder,
+ FT_Int charcode );
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
FT_LOCAL( FT_Error )
t1_decoder_parse_glyph( T1_Decoder decoder,
FT_UInt glyph_index );
@@ -40,6 +44,12 @@ FT_BEGIN_HEADER
t1_decoder_parse_charstrings( T1_Decoder decoder,
FT_Byte* base,
FT_UInt len );
+#else
+ FT_LOCAL( FT_Error )
+ t1_decoder_parse_metrics( T1_Decoder decoder,
+ FT_Byte* charstring_base,
+ FT_UInt charstring_len );
+#endif
FT_LOCAL( FT_Error )
t1_decoder_init( T1_Decoder decoder,
diff --git a/modules/freetype2/src/pshinter/Jamfile b/modules/freetype2/src/pshinter/Jamfile
index fcb225811..3f5f0ae40 100644
--- a/modules/freetype2/src/pshinter/Jamfile
+++ b/modules/freetype2/src/pshinter/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/pshinter Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/pshinter/module.mk b/modules/freetype2/src/pshinter/module.mk
index 63110c46a..06707be3b 100644
--- a/modules/freetype2/src/pshinter/module.mk
+++ b/modules/freetype2/src/pshinter/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/pshinter/pshalgo.c b/modules/freetype2/src/pshinter/pshalgo.c
index 5a538e27d..b98077c62 100644
--- a/modules/freetype2/src/pshinter/pshalgo.c
+++ b/modules/freetype2/src/pshinter/pshalgo.c
@@ -4,7 +4,7 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -26,7 +26,7 @@
#undef FT_COMPONENT
-#define FT_COMPONENT trace_pshalgo2
+#define FT_COMPONENT trace_pshalgo
#ifdef DEBUG_HINTER
diff --git a/modules/freetype2/src/pshinter/pshalgo.h b/modules/freetype2/src/pshinter/pshalgo.h
index f1bda6501..c50683fbe 100644
--- a/modules/freetype2/src/pshinter/pshalgo.h
+++ b/modules/freetype2/src/pshinter/pshalgo.h
@@ -4,7 +4,7 @@
/* */
/* PostScript hinting algorithm (specification). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pshinter/pshglob.c b/modules/freetype2/src/pshinter/pshglob.c
index 2ac5ef155..accc04921 100644
--- a/modules/freetype2/src/pshinter/pshglob.c
+++ b/modules/freetype2/src/pshinter/pshglob.c
@@ -5,7 +5,7 @@
/* PostScript hinter global hinting management (body). */
/* Inspired by the new auto-hinter module. */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -227,8 +227,8 @@
}
- /* Re-read blue zones from the original fonts and store them into out */
- /* private structure. This function re-orders, sanitizes and */
+ /* Re-read blue zones from the original fonts and store them into our */
+ /* private structure. This function re-orders, sanitizes, and */
/* fuzz-expands the zones as well. */
static void
psh_blues_set_zones( PSH_Blues target,
diff --git a/modules/freetype2/src/pshinter/pshglob.h b/modules/freetype2/src/pshinter/pshglob.h
index 45c957b6e..cf80bf40e 100644
--- a/modules/freetype2/src/pshinter/pshglob.h
+++ b/modules/freetype2/src/pshinter/pshglob.h
@@ -4,7 +4,7 @@
/* */
/* PostScript hinter global hinting management. */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pshinter/pshinter.c b/modules/freetype2/src/pshinter/pshinter.c
index 614e0bb3d..0eedac452 100644
--- a/modules/freetype2/src/pshinter/pshinter.c
+++ b/modules/freetype2/src/pshinter/pshinter.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PostScript Hinting module */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,13 +17,13 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "pshpic.c"
-#include "pshrec.c"
-#include "pshglob.c"
+
#include "pshalgo.c"
+#include "pshglob.c"
#include "pshmod.c"
+#include "pshpic.c"
+#include "pshrec.c"
/* END */
diff --git a/modules/freetype2/src/pshinter/pshmod.c b/modules/freetype2/src/pshinter/pshmod.c
index d5d53ab2d..0b8f6f99b 100644
--- a/modules/freetype2/src/pshinter/pshmod.c
+++ b/modules/freetype2/src/pshinter/pshmod.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PostScript hinter module implementation (body). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pshinter/pshmod.h b/modules/freetype2/src/pshinter/pshmod.h
index 39112a956..556de2fbc 100644
--- a/modules/freetype2/src/pshinter/pshmod.h
+++ b/modules/freetype2/src/pshinter/pshmod.h
@@ -4,7 +4,7 @@
/* */
/* PostScript hinter module interface (specification). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pshinter/pshnterr.h b/modules/freetype2/src/pshinter/pshnterr.h
index 7a94588b8..b9d02d295 100644
--- a/modules/freetype2/src/pshinter/pshnterr.h
+++ b/modules/freetype2/src/pshinter/pshnterr.h
@@ -4,7 +4,7 @@
/* */
/* PS Hinter error codes (specification only). */
/* */
-/* Copyright 2003-2016 by */
+/* Copyright 2003-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pshinter/pshpic.c b/modules/freetype2/src/pshinter/pshpic.c
index d0a3d8ebc..465ad3188 100644
--- a/modules/freetype2/src/pshinter/pshpic.c
+++ b/modules/freetype2/src/pshinter/pshpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for pshinter module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pshinter/pshpic.h b/modules/freetype2/src/pshinter/pshpic.h
index 75ee57354..4469ba87c 100644
--- a/modules/freetype2/src/pshinter/pshpic.h
+++ b/modules/freetype2/src/pshinter/pshpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for pshinter module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pshinter/pshrec.c b/modules/freetype2/src/pshinter/pshrec.c
index 3aeb2651f..6648d13d6 100644
--- a/modules/freetype2/src/pshinter/pshrec.c
+++ b/modules/freetype2/src/pshinter/pshrec.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PostScript hints recorder (body). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pshinter/pshrec.h b/modules/freetype2/src/pshinter/pshrec.h
index 97e6f0ed5..7e3dfe0d5 100644
--- a/modules/freetype2/src/pshinter/pshrec.h
+++ b/modules/freetype2/src/pshinter/pshrec.h
@@ -4,7 +4,7 @@
/* */
/* Postscript (Type1/Type2) hints recorder (specification). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/pshinter/rules.mk b/modules/freetype2/src/pshinter/rules.mk
index 67ecf7862..966690efc 100644
--- a/modules/freetype2/src/pshinter/rules.mk
+++ b/modules/freetype2/src/pshinter/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/psnames/Jamfile b/modules/freetype2/src/psnames/Jamfile
index 35b8a99c8..a0fd37397 100644
--- a/modules/freetype2/src/psnames/Jamfile
+++ b/modules/freetype2/src/psnames/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/psnames Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/psnames/module.mk b/modules/freetype2/src/psnames/module.mk
index ba29af813..410f48a19 100644
--- a/modules/freetype2/src/psnames/module.mk
+++ b/modules/freetype2/src/psnames/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/psnames/psmodule.c b/modules/freetype2/src/psnames/psmodule.c
index 01b85c3c8..8929ebe75 100644
--- a/modules/freetype2/src/psnames/psmodule.c
+++ b/modules/freetype2/src/psnames/psmodule.c
@@ -4,7 +4,7 @@
/* */
/* PSNames module implementation (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,7 +23,21 @@
#include "psmodule.h"
+ /*
+ * The file `pstables.h' with its arrays and its function
+ * `ft_get_adobe_glyph_index' is useful for other projects also (for
+ * example, `pdfium' is using it). However, if used as a C++ header,
+ * including it in two different source files makes it necessary to use
+ * `extern const' for the declaration of its arrays, otherwise the data
+ * would be duplicated as mandated by the C++ standard.
+ *
+ * For this reason, we use `DEFINE_PS_TABLES' to guard the function
+ * definitions, and `DEFINE_PS_TABLES_DATA' to provide both proper array
+ * declarations and definitions.
+ */
+#include "pstables.h"
#define DEFINE_PS_TABLES
+#define DEFINE_PS_TABLES_DATA
#include "pstables.h"
#include "psnamerr.h"
diff --git a/modules/freetype2/src/psnames/psmodule.h b/modules/freetype2/src/psnames/psmodule.h
index ee3c6cb63..3e94f8b43 100644
--- a/modules/freetype2/src/psnames/psmodule.h
+++ b/modules/freetype2/src/psnames/psmodule.h
@@ -4,7 +4,7 @@
/* */
/* High-level PSNames module interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/psnames/psnamerr.h b/modules/freetype2/src/psnames/psnamerr.h
index 3a9f65323..14eb76c99 100644
--- a/modules/freetype2/src/psnames/psnamerr.h
+++ b/modules/freetype2/src/psnames/psnamerr.h
@@ -4,7 +4,7 @@
/* */
/* PS names module error codes (specification only). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/psnames/psnames.c b/modules/freetype2/src/psnames/psnames.c
index e7b2c0b5e..febb80d59 100644
--- a/modules/freetype2/src/psnames/psnames.c
+++ b/modules/freetype2/src/psnames/psnames.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PSNames module component (body only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,10 +17,10 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "pspic.c"
+
#include "psmodule.c"
+#include "pspic.c"
/* END */
diff --git a/modules/freetype2/src/psnames/pspic.c b/modules/freetype2/src/psnames/pspic.c
index a78ec5aa8..85a06f360 100644
--- a/modules/freetype2/src/psnames/pspic.c
+++ b/modules/freetype2/src/psnames/pspic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for psnames module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/psnames/pspic.h b/modules/freetype2/src/psnames/pspic.h
index 48348765c..889780cc0 100644
--- a/modules/freetype2/src/psnames/pspic.h
+++ b/modules/freetype2/src/psnames/pspic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for psnames module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/psnames/pstables.h b/modules/freetype2/src/psnames/pstables.h
index 309f16bd3..79545ee03 100644
--- a/modules/freetype2/src/psnames/pstables.h
+++ b/modules/freetype2/src/psnames/pstables.h
@@ -4,7 +4,7 @@
/* */
/* PostScript glyph names. */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,7 +19,7 @@
/* This file has been generated automatically -- do not edit! */
-#ifndef DEFINE_PS_TABLES
+#ifndef DEFINE_PS_TABLES_DATA
#ifdef __cplusplus
extern "C"
#else
@@ -27,7 +27,7 @@
#endif
#endif
const char ft_standard_glyph_names[3696]
-#ifdef DEFINE_PS_TABLES
+#ifdef DEFINE_PS_TABLES_DATA
=
{
'.','n','u','l','l', 0,
@@ -451,7 +451,7 @@
'R','o','m','a','n', 0,
'S','e','m','i','b','o','l','d', 0,
}
-#endif /* DEFINE_PS_TABLES */
+#endif /* DEFINE_PS_TABLES_DATA */
;
@@ -459,7 +459,7 @@
/* Values are offsets into the `ft_standard_glyph_names' table */
-#ifndef DEFINE_PS_TABLES
+#ifndef DEFINE_PS_TABLES_DATA
#ifdef __cplusplus
extern "C"
#else
@@ -467,7 +467,7 @@
#endif
#endif
const short ft_mac_names[FT_NUM_MAC_NAMES]
-#ifdef DEFINE_PS_TABLES
+#ifdef DEFINE_PS_TABLES_DATA
=
{
253, 0, 6, 261, 267, 274, 283, 294, 301, 309, 758, 330, 340, 351,
@@ -490,7 +490,7 @@
1270,1313,1323,1171,1290,1332,1211,1235,1276, 169, 175, 182, 189, 200,
209, 218, 225, 232, 239, 246
}
-#endif /* DEFINE_PS_TABLES */
+#endif /* DEFINE_PS_TABLES_DATA */
;
@@ -498,7 +498,7 @@
/* Values are offsets into the `ft_standard_glyph_names' table */
-#ifndef DEFINE_PS_TABLES
+#ifndef DEFINE_PS_TABLES_DATA
#ifdef __cplusplus
extern "C"
#else
@@ -506,7 +506,7 @@
#endif
#endif
const short ft_sid_names[FT_NUM_SID_NAMES]
-#ifdef DEFINE_PS_TABLES
+#ifdef DEFINE_PS_TABLES_DATA
=
{
253, 261, 267, 274, 283, 294, 301, 309, 319, 330, 340, 351, 360, 365,
@@ -538,12 +538,12 @@
3418,3430,3442,3454,3471,3483,3498,3506,3518,3530,3542,3559,3574,3586,
3597,3612,3620,3628,3636,3644,3650,3655,3660,3666,3673,3681,3687
}
-#endif /* DEFINE_PS_TABLES */
+#endif /* DEFINE_PS_TABLES_DATA */
;
/* the following are indices into the SID name table */
-#ifndef DEFINE_PS_TABLES
+#ifndef DEFINE_PS_TABLES_DATA
#ifdef __cplusplus
extern "C"
#else
@@ -551,7 +551,7 @@
#endif
#endif
const unsigned short t1_standard_encoding[256]
-#ifdef DEFINE_PS_TABLES
+#ifdef DEFINE_PS_TABLES_DATA
=
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -571,12 +571,12 @@
0,138, 0,139, 0, 0, 0, 0,140,141,142,143, 0, 0, 0, 0,
0,144, 0, 0, 0,145, 0, 0,146,147,148,149, 0, 0, 0, 0
}
-#endif /* DEFINE_PS_TABLES */
+#endif /* DEFINE_PS_TABLES_DATA */
;
/* the following are indices into the SID name table */
-#ifndef DEFINE_PS_TABLES
+#ifndef DEFINE_PS_TABLES_DATA
#ifdef __cplusplus
extern "C"
#else
@@ -584,7 +584,7 @@
#endif
#endif
const unsigned short t1_expert_encoding[256]
-#ifdef DEFINE_PS_TABLES
+#ifdef DEFINE_PS_TABLES_DATA
=
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -604,7 +604,7 @@
347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,
363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378
}
-#endif /* DEFINE_PS_TABLES */
+#endif /* DEFINE_PS_TABLES_DATA */
;
@@ -619,7 +619,7 @@
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
-#ifndef DEFINE_PS_TABLES
+#ifndef DEFINE_PS_TABLES_DATA
#ifdef __cplusplus
extern "C"
#else
@@ -627,7 +627,7 @@
#endif
#endif
const unsigned char ft_adobe_glyph_list[55997L]
-#ifdef DEFINE_PS_TABLES
+#ifdef DEFINE_PS_TABLES_DATA
=
{
0, 52, 0,106, 2,167, 3, 63, 4,220, 6,125, 9,143, 10, 23,
@@ -4131,10 +4131,11 @@
182,117, 2,218,167,218,178,232,233,242,225,231,225,238, 97,128,
48, 90,235,225,244,225,235,225,238, 97,128, 48,186
}
-#endif /* DEFINE_PS_TABLES */
+#endif /* DEFINE_PS_TABLES_DATA */
;
+#ifdef DEFINE_PS_TABLES
/*
* This function searches the compressed table efficiently.
*/
@@ -4229,6 +4230,7 @@
NotFound:
return 0;
}
+#endif /* DEFINE_PS_TABLES */
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
diff --git a/modules/freetype2/src/psnames/rules.mk b/modules/freetype2/src/psnames/rules.mk
index 9849f4053..4d629d841 100644
--- a/modules/freetype2/src/psnames/rules.mk
+++ b/modules/freetype2/src/psnames/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/raster/Jamfile b/modules/freetype2/src/raster/Jamfile
index 2ec88f560..838e7ef57 100644
--- a/modules/freetype2/src/raster/Jamfile
+++ b/modules/freetype2/src/raster/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/raster Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/raster/ftmisc.h b/modules/freetype2/src/raster/ftmisc.h
index 981ce3227..7e4011907 100644
--- a/modules/freetype2/src/raster/ftmisc.h
+++ b/modules/freetype2/src/raster/ftmisc.h
@@ -5,7 +5,7 @@
/* Miscellaneous macros for stand-alone rasterizer (specification */
/* only). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
diff --git a/modules/freetype2/src/raster/ftraster.c b/modules/freetype2/src/raster/ftraster.c
index 429f0d250..4354730d5 100644
--- a/modules/freetype2/src/raster/ftraster.c
+++ b/modules/freetype2/src/raster/ftraster.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/raster/ftraster.h b/modules/freetype2/src/raster/ftraster.h
index 65cd5f960..40b5d6d32 100644
--- a/modules/freetype2/src/raster/ftraster.h
+++ b/modules/freetype2/src/raster/ftraster.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
diff --git a/modules/freetype2/src/raster/ftrend1.c b/modules/freetype2/src/raster/ftrend1.c
index 5bd4b30c8..a7ce9731d 100644
--- a/modules/freetype2/src/raster/ftrend1.c
+++ b/modules/freetype2/src/raster/ftrend1.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer interface (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,12 +31,7 @@
static FT_Error
ft_raster1_init( FT_Renderer render )
{
- FT_Library library = FT_MODULE_LIBRARY( render );
-
-
- render->clazz->raster_class->raster_reset( render->raster,
- library->raster_pool,
- library->raster_pool_size );
+ render->clazz->raster_class->raster_reset( render->raster, NULL, 0 );
return FT_Err_Ok;
}
@@ -102,12 +97,12 @@
FT_Render_Mode mode,
const FT_Vector* origin )
{
- FT_Error error;
- FT_Outline* outline;
- FT_BBox cbox, cbox0;
- FT_UInt width, height, pitch;
- FT_Bitmap* bitmap;
- FT_Memory memory;
+ FT_Error error = FT_Err_Ok;
+ FT_Outline* outline = &slot->outline;
+ FT_Bitmap* bitmap = &slot->bitmap;
+ FT_Memory memory = render->root.memory;
+ FT_Pos x_shift = 0;
+ FT_Pos y_shift = 0;
FT_Raster_Params params;
@@ -126,60 +121,6 @@
return FT_THROW( Cannot_Render_Glyph );
}
- outline = &slot->outline;
-
- /* translate the outline to the new origin if needed */
- if ( origin )
- FT_Outline_Translate( outline, origin->x, origin->y );
-
- /* compute the control box, and grid fit it */
- FT_Outline_Get_CBox( outline, &cbox0 );
-
- /* undocumented but confirmed: bbox values get rounded */
-#if 1
- cbox.xMin = FT_PIX_ROUND( cbox0.xMin );
- cbox.yMin = FT_PIX_ROUND( cbox0.yMin );
- cbox.xMax = FT_PIX_ROUND( cbox0.xMax );
- cbox.yMax = FT_PIX_ROUND( cbox0.yMax );
-#else
- cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
- cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
- cbox.xMax = FT_PIX_CEIL( cbox.xMax );
- cbox.yMax = FT_PIX_CEIL( cbox.yMax );
-#endif
-
- /* If either `width' or `height' round to 0, try */
- /* explicitly rounding up/down. In the case of */
- /* glyphs containing only one very narrow feature, */
- /* this gives the drop-out compensation in the scan */
- /* conversion code a chance to do its stuff. */
- width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
- if ( width == 0 )
- {
- cbox.xMin = FT_PIX_FLOOR( cbox0.xMin );
- cbox.xMax = FT_PIX_CEIL( cbox0.xMax );
-
- width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
- }
-
- height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
- if ( height == 0 )
- {
- cbox.yMin = FT_PIX_FLOOR( cbox0.yMin );
- cbox.yMax = FT_PIX_CEIL( cbox0.yMax );
-
- height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
- }
-
- if ( width > FT_USHORT_MAX || height > FT_USHORT_MAX )
- {
- error = FT_THROW( Invalid_Argument );
- goto Exit;
- }
-
- bitmap = &slot->bitmap;
- memory = render->root.memory;
-
/* release old bitmap buffer */
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
{
@@ -187,39 +128,48 @@
slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
}
- pitch = ( ( width + 15 ) >> 4 ) << 1;
- bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
+ ft_glyphslot_preset_bitmap( slot, mode, origin );
- bitmap->width = width;
- bitmap->rows = height;
- bitmap->pitch = (int)pitch;
-
- if ( FT_ALLOC_MULT( bitmap->buffer, pitch, height ) )
+ /* allocate new one */
+ if ( FT_ALLOC_MULT( bitmap->buffer, bitmap->rows, bitmap->pitch ) )
goto Exit;
slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
+ x_shift = -slot->bitmap_left * 64;
+ y_shift = ( (FT_Int)bitmap->rows - slot->bitmap_top ) * 64;
+
+ if ( origin )
+ {
+ x_shift += origin->x;
+ y_shift += origin->y;
+ }
+
/* translate outline to render it into the bitmap */
- FT_Outline_Translate( outline, -cbox.xMin, -cbox.yMin );
+ if ( x_shift || y_shift )
+ FT_Outline_Translate( outline, x_shift, y_shift );
/* set up parameters */
params.target = bitmap;
params.source = outline;
- params.flags = 0;
+ params.flags = FT_RASTER_FLAG_DEFAULT;
/* render outline into the bitmap */
error = render->raster_render( render->raster, &params );
- FT_Outline_Translate( outline, cbox.xMin, cbox.yMin );
-
- if ( error )
- goto Exit;
+ Exit:
+ if ( !error )
+ /* everything is fine; the glyph is now officially a bitmap */
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
+ else if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
+ {
+ FT_FREE( bitmap->buffer );
+ slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
+ }
- slot->format = FT_GLYPH_FORMAT_BITMAP;
- slot->bitmap_left = (FT_Int)( cbox.xMin >> 6 );
- slot->bitmap_top = (FT_Int)( cbox.yMax >> 6 );
+ if ( x_shift || y_shift )
+ FT_Outline_Translate( outline, -x_shift, -y_shift );
- Exit:
return error;
}
diff --git a/modules/freetype2/src/raster/ftrend1.h b/modules/freetype2/src/raster/ftrend1.h
index a431f185d..2abdf2d70 100644
--- a/modules/freetype2/src/raster/ftrend1.h
+++ b/modules/freetype2/src/raster/ftrend1.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/raster/module.mk b/modules/freetype2/src/raster/module.mk
index f4a5f8e83..b115f416b 100644
--- a/modules/freetype2/src/raster/module.mk
+++ b/modules/freetype2/src/raster/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/raster/raster.c b/modules/freetype2/src/raster/raster.c
index 5b21dcbc6..76edd21e1 100644
--- a/modules/freetype2/src/raster/raster.c
+++ b/modules/freetype2/src/raster/raster.c
@@ -4,7 +4,7 @@
/* */
/* FreeType monochrome rasterer module component (body only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,11 +17,11 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "rastpic.c"
+
#include "ftraster.c"
#include "ftrend1.c"
+#include "rastpic.c"
/* END */
diff --git a/modules/freetype2/src/raster/rasterrs.h b/modules/freetype2/src/raster/rasterrs.h
index 44da7fca5..22a3e1534 100644
--- a/modules/freetype2/src/raster/rasterrs.h
+++ b/modules/freetype2/src/raster/rasterrs.h
@@ -4,7 +4,7 @@
/* */
/* monochrome renderer error codes (specification only). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/raster/rastpic.c b/modules/freetype2/src/raster/rastpic.c
index dcfa92eef..1dc8981b8 100644
--- a/modules/freetype2/src/raster/rastpic.c
+++ b/modules/freetype2/src/raster/rastpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for raster module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/raster/rastpic.h b/modules/freetype2/src/raster/rastpic.h
index 781587638..6d0877c42 100644
--- a/modules/freetype2/src/raster/rastpic.h
+++ b/modules/freetype2/src/raster/rastpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for raster module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/raster/rules.mk b/modules/freetype2/src/raster/rules.mk
index 929faa3a9..9aef1f0ba 100644
--- a/modules/freetype2/src/raster/rules.mk
+++ b/modules/freetype2/src/raster/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/sfnt/Jamfile b/modules/freetype2/src/sfnt/Jamfile
index 089cc269b..57977fc96 100644
--- a/modules/freetype2/src/sfnt/Jamfile
+++ b/modules/freetype2/src/sfnt/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/sfnt Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/sfnt/module.mk b/modules/freetype2/src/sfnt/module.mk
index ca19e096a..51ca67e78 100644
--- a/modules/freetype2/src/sfnt/module.mk
+++ b/modules/freetype2/src/sfnt/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/sfnt/pngshim.c b/modules/freetype2/src/sfnt/pngshim.c
index ff6729273..16020266a 100644
--- a/modules/freetype2/src/sfnt/pngshim.c
+++ b/modules/freetype2/src/sfnt/pngshim.c
@@ -4,7 +4,7 @@
/* */
/* PNG Bitmap glyph support. */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* Google, Inc. */
/* Written by Stuart Gill and Behdad Esfahbod. */
/* */
@@ -24,9 +24,10 @@
#include FT_CONFIG_STANDARD_LIBRARY_H
-#ifdef FT_CONFIG_OPTION_USE_PNG
+#if defined( TT_CONFIG_OPTION_EMBEDDED_BITMAPS ) && \
+ defined( FT_CONFIG_OPTION_USE_PNG )
- /* We always include <stjmp.h>, so make libpng shut up! */
+ /* We always include <setjmp.h>, so make libpng shut up! */
#define PNG_SKIP_SETJMP_CHECK 1
#include <png.h>
#include "pngshim.h"
@@ -48,18 +49,85 @@
}
- /* Premultiplies data and converts RGBA bytes => native endian. */
+ /* Premultiplies data and converts RGBA bytes => BGRA. */
static void
premultiply_data( png_structp png,
png_row_infop row_info,
png_bytep data )
{
- unsigned int i;
+ unsigned int i = 0, limit;
+
+ /* The `vector_size' attribute was introduced in gcc 3.1, which */
+ /* predates clang; the `__BYTE_ORDER__' preprocessor symbol was */
+ /* introduced in gcc 4.6 and clang 3.2, respectively. */
+ /* `__builtin_shuffle' for gcc was introduced in gcc 4.7.0. */
+#if ( ( defined( __GNUC__ ) && \
+ ( ( __GNUC__ >= 5 ) || \
+ ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 7 ) ) ) ) || \
+ ( defined( __clang__ ) && \
+ ( ( __clang_major__ >= 4 ) || \
+ ( ( __clang_major__ == 3 ) && ( __clang_minor__ >= 2 ) ) ) ) ) && \
+ defined( __OPTIMIZE__ ) && \
+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+
+#ifdef __clang__
+ /* the clang documentation doesn't cover the two-argument case of */
+ /* `__builtin_shufflevector'; however, it is is implemented since */
+ /* version 2.8 */
+#define vector_shuffle __builtin_shufflevector
+#else
+#define vector_shuffle __builtin_shuffle
+#endif
- FT_UNUSED( png );
+ typedef unsigned short v82 __attribute__(( vector_size( 16 ) ));
- for ( i = 0; i < row_info->rowbytes; i += 4 )
+ if ( row_info->rowbytes > 15 )
+ {
+ /* process blocks of 16 bytes in one rush, which gives a nice speed-up */
+ limit = row_info->rowbytes - 16 + 1;
+ for ( ; i < limit; i += 16 )
+ {
+ unsigned char* base = &data[i];
+
+ v82 s, s0, s1, a;
+
+ /* clang <= 3.9 can't apply scalar values to vectors */
+ /* (or rather, it needs a different syntax) */
+ v82 n0x80 = { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 };
+ v82 n0xFF = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
+ v82 n8 = { 8, 8, 8, 8, 8, 8, 8, 8 };
+
+ v82 ma = { 1, 1, 3, 3, 5, 5, 7, 7 };
+ v82 o1 = { 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF };
+ v82 m0 = { 1, 0, 3, 2, 5, 4, 7, 6 };
+
+
+ ft_memcpy( &s, base, 16 ); /* RGBA RGBA RGBA RGBA */
+ s0 = s & n0xFF; /* R B R B R B R B */
+ s1 = s >> n8; /* G A G A G A G A */
+
+ a = vector_shuffle( s1, ma ); /* A A A A A A A A */
+ s1 |= o1; /* G 1 G 1 G 1 G 1 */
+ s0 = vector_shuffle( s0, m0 ); /* B R B R B R B R */
+
+ s0 *= a;
+ s1 *= a;
+ s0 += n0x80;
+ s1 += n0x80;
+ s0 = ( s0 + ( s0 >> n8 ) ) >> n8;
+ s1 = ( s1 + ( s1 >> n8 ) ) >> n8;
+
+ s = s0 | ( s1 << n8 );
+ ft_memcpy( base, &s, 16 );
+ }
+ }
+#endif /* use `vector_size' */
+
+ FT_UNUSED( png );
+
+ limit = row_info->rowbytes;
+ for ( ; i < limit; i += 4 )
{
unsigned char* base = &data[i];
unsigned int alpha = base[3];
@@ -169,7 +237,7 @@
return;
}
- memcpy( data, stream->cursor, length );
+ ft_memcpy( data, stream->cursor, length );
FT_FRAME_EXIT();
}
@@ -377,7 +445,12 @@
return error;
}
-#endif /* FT_CONFIG_OPTION_USE_PNG */
+#else /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _pngshim_dummy;
+
+#endif /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */
/* END */
diff --git a/modules/freetype2/src/sfnt/pngshim.h b/modules/freetype2/src/sfnt/pngshim.h
index 0af4bfc5b..194238c3a 100644
--- a/modules/freetype2/src/sfnt/pngshim.h
+++ b/modules/freetype2/src/sfnt/pngshim.h
@@ -4,7 +4,7 @@
/* */
/* PNG Bitmap glyph support. */
/* */
-/* Copyright 2013-2016 by */
+/* Copyright 2013-2018 by */
/* Google, Inc. */
/* Written by Stuart Gill and Behdad Esfahbod. */
/* */
diff --git a/modules/freetype2/src/sfnt/rules.mk b/modules/freetype2/src/sfnt/rules.mk
index e9fc42156..83acc66a8 100644
--- a/modules/freetype2/src/sfnt/rules.mk
+++ b/modules/freetype2/src/sfnt/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/sfnt/sfdriver.c b/modules/freetype2/src/sfnt/sfdriver.c
index 1f15223cb..303e1ca9f 100644
--- a/modules/freetype2/src/sfnt/sfdriver.c
+++ b/modules/freetype2/src/sfnt/sfdriver.c
@@ -4,7 +4,7 @@
/* */
/* High-level SFNT driver interface (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,6 +20,7 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_SFNT_H
#include FT_INTERNAL_OBJECTS_H
+#include FT_TRUETYPE_IDS_H
#include "sfdriver.h"
#include "ttload.h"
@@ -50,6 +51,11 @@
#include FT_SERVICE_SFNT_H
#include FT_SERVICE_TT_CMAP_H
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#include FT_MULTIPLE_MASTERS_H
+#include FT_SERVICE_MULTIPLE_MASTERS_H
+#endif
+
/*************************************************************************/
/* */
@@ -220,113 +226,841 @@
*
*/
- static const char*
- sfnt_get_ps_name( TT_Face face )
+ /* an array representing allowed ASCII characters in a PS string */
+ static const unsigned char sfnt_ps_map[16] =
{
- FT_Int n, found_win, found_apple;
- const char* result = NULL;
+ /* 4 0 C 8 */
+ 0x00, 0x00, /* 0x00: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 */
+ 0x00, 0x00, /* 0x10: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 */
+ 0xDE, 0x7C, /* 0x20: 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 0 */
+ 0xFF, 0xAF, /* 0x30: 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 */
+ 0xFF, 0xFF, /* 0x40: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 */
+ 0xFF, 0xD7, /* 0x50: 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 */
+ 0xFF, 0xFF, /* 0x60: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 */
+ 0xFF, 0x57 /* 0x70: 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 */
+ };
+
+
+ static int
+ sfnt_is_postscript( int c )
+ {
+ unsigned int cc;
- /* shouldn't happen, but just in case to avoid memory leaks */
- if ( face->postscript_name )
- return face->postscript_name;
+ if ( c < 0 || c >= 0x80 )
+ return 0;
- /* scan the name table to see whether we have a Postscript name here, */
- /* either in Macintosh or Windows platform encodings */
- found_win = -1;
- found_apple = -1;
+ cc = (unsigned int)c;
+
+ return sfnt_ps_map[cc >> 3] & ( 1 << ( cc & 0x07 ) );
+ }
+
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
+ /* Only ASCII letters and digits are taken for a variation font */
+ /* instance's PostScript name. */
+ /* */
+ /* `ft_isalnum' is a macro, but we need a function here, thus */
+ /* this definition. */
+ static int
+ sfnt_is_alphanumeric( int c )
+ {
+ return ft_isalnum( c );
+ }
+
+
+ /* the implementation of MurmurHash3 is taken and adapted from */
+ /* https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp */
+
+#define ROTL32( x, r ) ( x << r ) | ( x >> ( 32 - r ) )
+
+
+ static FT_UInt32
+ fmix32( FT_UInt32 h )
+ {
+ h ^= h >> 16;
+ h *= 0x85ebca6b;
+ h ^= h >> 13;
+ h *= 0xc2b2ae35;
+ h ^= h >> 16;
+
+ return h;
+ }
+
+
+ static void
+ murmur_hash_3_128( const void* key,
+ const unsigned int len,
+ FT_UInt32 seed,
+ void* out )
+ {
+ const FT_Byte* data = (const FT_Byte*)key;
+ const int nblocks = (int)len / 16;
+
+ FT_UInt32 h1 = seed;
+ FT_UInt32 h2 = seed;
+ FT_UInt32 h3 = seed;
+ FT_UInt32 h4 = seed;
+
+ const FT_UInt32 c1 = 0x239b961b;
+ const FT_UInt32 c2 = 0xab0e9789;
+ const FT_UInt32 c3 = 0x38b34ae5;
+ const FT_UInt32 c4 = 0xa1e38b93;
+
+ const FT_UInt32* blocks = (const FT_UInt32*)( data + nblocks * 16 );
+
+ int i;
+
+
+ for( i = -nblocks; i; i++ )
+ {
+ FT_UInt32 k1 = blocks[i * 4 + 0];
+ FT_UInt32 k2 = blocks[i * 4 + 1];
+ FT_UInt32 k3 = blocks[i * 4 + 2];
+ FT_UInt32 k4 = blocks[i * 4 + 3];
+
+
+ k1 *= c1;
+ k1 = ROTL32( k1, 15 );
+ k1 *= c2;
+ h1 ^= k1;
+
+ h1 = ROTL32( h1, 19 );
+ h1 += h2;
+ h1 = h1 * 5 + 0x561ccd1b;
+
+ k2 *= c2;
+ k2 = ROTL32( k2, 16 );
+ k2 *= c3;
+ h2 ^= k2;
+
+ h2 = ROTL32( h2, 17 );
+ h2 += h3;
+ h2 = h2 * 5 + 0x0bcaa747;
+
+ k3 *= c3;
+ k3 = ROTL32( k3, 17 );
+ k3 *= c4;
+ h3 ^= k3;
+
+ h3 = ROTL32( h3, 15 );
+ h3 += h4;
+ h3 = h3 * 5 + 0x96cd1c35;
+
+ k4 *= c4;
+ k4 = ROTL32( k4, 18 );
+ k4 *= c1;
+ h4 ^= k4;
+
+ h4 = ROTL32( h4, 13 );
+ h4 += h1;
+ h4 = h4 * 5 + 0x32ac3b17;
+ }
- for ( n = 0; n < face->num_names; n++ )
{
- TT_NameEntryRec* name = face->name_table.names + n;
+ const FT_Byte* tail = (const FT_Byte*)( data + nblocks * 16 );
+ FT_UInt32 k1 = 0;
+ FT_UInt32 k2 = 0;
+ FT_UInt32 k3 = 0;
+ FT_UInt32 k4 = 0;
- if ( name->nameID == 6 && name->stringLength > 0 )
+
+ switch ( len & 15 )
{
- if ( name->platformID == 3 &&
- name->encodingID == 1 &&
- name->languageID == 0x409 )
- found_win = n;
-
- if ( name->platformID == 1 &&
- name->encodingID == 0 &&
- name->languageID == 0 )
- found_apple = n;
+ case 15:
+ k4 ^= (FT_UInt32)tail[14] << 16;
+ case 14:
+ k4 ^= (FT_UInt32)tail[13] << 8;
+ case 13:
+ k4 ^= (FT_UInt32)tail[12];
+ k4 *= c4;
+ k4 = ROTL32( k4, 18 );
+ k4 *= c1;
+ h4 ^= k4;
+
+ case 12:
+ k3 ^= (FT_UInt32)tail[11] << 24;
+ case 11:
+ k3 ^= (FT_UInt32)tail[10] << 16;
+ case 10:
+ k3 ^= (FT_UInt32)tail[9] << 8;
+ case 9:
+ k3 ^= (FT_UInt32)tail[8];
+ k3 *= c3;
+ k3 = ROTL32( k3, 17 );
+ k3 *= c4;
+ h3 ^= k3;
+
+ case 8:
+ k2 ^= (FT_UInt32)tail[7] << 24;
+ case 7:
+ k2 ^= (FT_UInt32)tail[6] << 16;
+ case 6:
+ k2 ^= (FT_UInt32)tail[5] << 8;
+ case 5:
+ k2 ^= (FT_UInt32)tail[4];
+ k2 *= c2;
+ k2 = ROTL32( k2, 16 );
+ k2 *= c3;
+ h2 ^= k2;
+
+ case 4:
+ k1 ^= (FT_UInt32)tail[3] << 24;
+ case 3:
+ k1 ^= (FT_UInt32)tail[2] << 16;
+ case 2:
+ k1 ^= (FT_UInt32)tail[1] << 8;
+ case 1:
+ k1 ^= (FT_UInt32)tail[0];
+ k1 *= c1;
+ k1 = ROTL32( k1, 15 );
+ k1 *= c2;
+ h1 ^= k1;
}
}
- if ( found_win != -1 )
+ h1 ^= len;
+ h2 ^= len;
+ h3 ^= len;
+ h4 ^= len;
+
+ h1 += h2;
+ h1 += h3;
+ h1 += h4;
+
+ h2 += h1;
+ h3 += h1;
+ h4 += h1;
+
+ h1 = fmix32( h1 );
+ h2 = fmix32( h2 );
+ h3 = fmix32( h3 );
+ h4 = fmix32( h4 );
+
+ h1 += h2;
+ h1 += h3;
+ h1 += h4;
+
+ h2 += h1;
+ h3 += h1;
+ h4 += h1;
+
+ ((FT_UInt32*)out)[0] = h1;
+ ((FT_UInt32*)out)[1] = h2;
+ ((FT_UInt32*)out)[2] = h3;
+ ((FT_UInt32*)out)[3] = h4;
+ }
+
+
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+
+
+ typedef int (*char_type_func)( int c );
+
+
+ /* handling of PID/EID 3/0 and 3/1 is the same */
+#define IS_WIN( n ) ( (n)->platformID == 3 && \
+ ( (n)->encodingID == 1 || (n)->encodingID == 0 ) && \
+ (n)->languageID == 0x409 )
+
+#define IS_APPLE( n ) ( (n)->platformID == 1 && \
+ (n)->encodingID == 0 && \
+ (n)->languageID == 0 )
+
+ static char*
+ get_win_string( FT_Memory memory,
+ FT_Stream stream,
+ TT_Name entry,
+ char_type_func char_type,
+ FT_Bool report_invalid_characters )
+ {
+ FT_Error error = FT_Err_Ok;
+
+ char* result = NULL;
+ FT_String* r;
+ FT_Char* p;
+ FT_UInt len;
+
+ FT_UNUSED( error );
+
+
+ if ( FT_ALLOC( result, entry->stringLength / 2 + 1 ) )
+ return NULL;
+
+ if ( FT_STREAM_SEEK( entry->stringOffset ) ||
+ FT_FRAME_ENTER( entry->stringLength ) )
{
- FT_Memory memory = face->root.memory;
- TT_NameEntryRec* name = face->name_table.names + found_win;
- FT_UInt len = name->stringLength / 2;
- FT_Error error = FT_Err_Ok;
+ FT_FREE( result );
+ entry->stringLength = 0;
+ entry->stringOffset = 0;
+ FT_FREE( entry->string );
- FT_UNUSED( error );
+ return NULL;
+ }
+ r = (FT_String*)result;
+ p = (FT_Char*)stream->cursor;
- if ( !FT_ALLOC( result, name->stringLength + 1 ) )
+ for ( len = entry->stringLength / 2; len > 0; len--, p += 2 )
+ {
+ if ( p[0] == 0 )
{
- FT_Stream stream = face->name_table.stream;
- FT_String* r = (FT_String*)result;
- FT_Char* p;
+ if ( char_type( p[1] ) )
+ *r++ = p[1];
+ else
+ {
+ if ( report_invalid_characters )
+ {
+ FT_TRACE0(( "get_win_string:"
+ " Character `%c' (0x%X) invalid in PS name string\n",
+ p[1], p[1] ));
+ /* it's not the job of FreeType to correct PS names... */
+ *r++ = p[1];
+ }
+ }
+ }
+ }
+ *r = '\0';
+
+ FT_FRAME_EXIT();
+
+ return result;
+ }
+
+
+ static char*
+ get_apple_string( FT_Memory memory,
+ FT_Stream stream,
+ TT_Name entry,
+ char_type_func char_type,
+ FT_Bool report_invalid_characters )
+ {
+ FT_Error error = FT_Err_Ok;
+
+ char* result = NULL;
+ FT_String* r;
+ FT_Char* p;
+ FT_UInt len;
+
+ FT_UNUSED( error );
+
+ if ( FT_ALLOC( result, entry->stringLength + 1 ) )
+ return NULL;
+
+ if ( FT_STREAM_SEEK( entry->stringOffset ) ||
+ FT_FRAME_ENTER( entry->stringLength ) )
+ {
+ FT_FREE( result );
+ entry->stringOffset = 0;
+ entry->stringLength = 0;
+ FT_FREE( entry->string );
+
+ return NULL;
+ }
- if ( FT_STREAM_SEEK( name->stringOffset ) ||
- FT_FRAME_ENTER( name->stringLength ) )
+ r = (FT_String*)result;
+ p = (FT_Char*)stream->cursor;
+
+ for ( len = entry->stringLength; len > 0; len--, p++ )
+ {
+ if ( char_type( *p ) )
+ *r++ = *p;
+ else
+ {
+ if ( report_invalid_characters )
{
- FT_FREE( result );
- name->stringLength = 0;
- name->stringOffset = 0;
- FT_FREE( name->string );
+ FT_TRACE0(( "get_apple_string:"
+ " Character `%c' (0x%X) invalid in PS name string\n",
+ *p, *p ));
+ /* it's not the job of FreeType to correct PS names... */
+ *r++ = *p;
+ }
+ }
+ }
+ *r = '\0';
+
+ FT_FRAME_EXIT();
+
+ return result;
+ }
- goto Exit;
+
+ static FT_Bool
+ sfnt_get_name_id( TT_Face face,
+ FT_UShort id,
+ FT_Int *win,
+ FT_Int *apple )
+ {
+ FT_Int n;
+
+
+ *win = -1;
+ *apple = -1;
+
+ for ( n = 0; n < face->num_names; n++ )
+ {
+ TT_Name name = face->name_table.names + n;
+
+
+ if ( name->nameID == id && name->stringLength > 0 )
+ {
+ if ( IS_WIN( name ) )
+ *win = n;
+
+ if ( IS_APPLE( name ) )
+ *apple = n;
+ }
+ }
+
+ return ( *win >= 0 ) || ( *apple >= 0 );
+ }
+
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
+ /*
+ The maximum length of an axis value descriptor.
+
+ We need 65536 different values for the decimal fraction; this fits
+ nicely into five decimal places. Consequently, it consists of
+
+ . the minus sign if the number is negative,
+ . up to five characters for the digits before the decimal point,
+ . the decimal point if there is a fractional part, and
+ . up to five characters for the digits after the decimal point.
+
+ We also need one byte for the leading `_' character and up to four
+ bytes for the axis tag.
+ */
+#define MAX_VALUE_DESCRIPTOR_LEN ( 1 + 5 + 1 + 5 + 1 + 4 )
+
+
+ /* the maximum length of PostScript font names */
+#define MAX_PS_NAME_LEN 127
+
+
+ /*
+ * Find the shortest decimal representation of a 16.16 fixed point
+ * number. The function fills `buf' with the result, returning a pointer
+ * to the position after the representation's last byte.
+ */
+
+ static char*
+ fixed2float( FT_Int fixed,
+ char* buf )
+ {
+ char* p;
+ char* q;
+ char tmp[5];
+
+ FT_Int int_part;
+ FT_Int frac_part;
+
+ FT_Int i;
+
+
+ p = buf;
+
+ if ( fixed == 0 )
+ {
+ *p++ = '0';
+ return p;
+ }
+
+ if ( fixed < 0 )
+ {
+ *p++ = '-';
+ fixed = -fixed;
+ }
+
+ int_part = ( fixed >> 16 ) & 0xFFFF;
+ frac_part = fixed & 0xFFFF;
+
+ /* get digits of integer part (in reverse order) */
+ q = tmp;
+ while ( int_part > 0 )
+ {
+ *q++ = '0' + int_part % 10;
+ int_part /= 10;
+ }
+
+ /* copy digits in correct order to buffer */
+ while ( q > tmp )
+ *p++ = *--q;
+
+ if ( !frac_part )
+ return p;
+
+ /* save position of point */
+ q = p;
+ *p++ = '.';
+
+ /* apply rounding */
+ frac_part = frac_part * 10 + 5;
+
+ /* get digits of fractional part */
+ for ( i = 0; i < 5; i++ )
+ {
+ *p++ = '0' + (char)( frac_part / 0x10000L );
+
+ frac_part %= 0x10000L;
+ if ( !frac_part )
+ break;
+
+ frac_part *= 10;
+ }
+
+ /*
+ If the remainder stored in `frac_part' (after the last FOR loop) is
+ smaller than 34480*10, the resulting decimal value minus 0.00001 is
+ an equivalent representation of `fixed'.
+
+ The above FOR loop always finds the larger of the two values; I
+ verified this by iterating over all possible fixed point numbers.
+
+ If the remainder is 17232*10, both values are equally good, and we
+ take the next even number (following IEEE 754's `round to nearest,
+ ties to even' rounding rule).
+
+ If the remainder is smaller than 17232*10, the lower of the two
+ numbers is nearer to the exact result (values 17232 and 34480 were
+ also found by testing all possible fixed point values).
+
+ We use this to find a shorter decimal representation. If not ending
+ with digit zero, we take the representation with less error.
+ */
+ p--;
+ if ( p - q == 5 ) /* five digits? */
+ {
+ /* take the representation that has zero as the last digit */
+ if ( frac_part < 34480 * 10 &&
+ *p == '1' )
+ *p = '0';
+
+ /* otherwise use the one with less error */
+ else if ( frac_part == 17232 * 10 &&
+ *p & 1 )
+ *p -= 1;
+
+ else if ( frac_part < 17232 * 10 &&
+ *p != '0' )
+ *p -= 1;
+ }
+
+ /* remove trailing zeros */
+ while ( *p == '0' )
+ *p-- = '\0';
+
+ return p + 1;
+ }
+
+
+ static const char hexdigits[16] =
+ {
+ '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+ };
+
+
+ static const char*
+ sfnt_get_var_ps_name( TT_Face face )
+ {
+ FT_Error error;
+ FT_Memory memory = face->root.memory;
+
+ FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
+
+ FT_UInt num_coords;
+ FT_Fixed* coords;
+ FT_MM_Var* mm_var;
+
+ FT_Int found, win, apple;
+ FT_UInt i, j;
+
+ char* result = NULL;
+ char* p;
+
+
+ if ( !face->var_postscript_prefix )
+ {
+ FT_UInt len;
+
+
+ /* check whether we have a Variations PostScript Name Prefix */
+ found = sfnt_get_name_id( face,
+ TT_NAME_ID_VARIATIONS_PREFIX,
+ &win,
+ &apple );
+ if ( !found )
+ {
+ /* otherwise use the typographic family name */
+ found = sfnt_get_name_id( face,
+ TT_NAME_ID_TYPOGRAPHIC_FAMILY,
+ &win,
+ &apple );
+ }
+
+ if ( !found )
+ {
+ /* as a last resort we try the family name; note that this is */
+ /* not in the Adobe TechNote, but GX fonts (which predate the */
+ /* TechNote) benefit from this behaviour */
+ found = sfnt_get_name_id( face,
+ TT_NAME_ID_FONT_FAMILY,
+ &win,
+ &apple );
+ }
+
+ if ( !found )
+ {
+ FT_TRACE0(( "sfnt_get_var_ps_name:"
+ " Can't construct PS name prefix for font instances\n" ));
+ return NULL;
+ }
+
+ /* prefer Windows entries over Apple */
+ if ( win != -1 )
+ result = get_win_string( face->root.memory,
+ face->name_table.stream,
+ face->name_table.names + win,
+ sfnt_is_alphanumeric,
+ 0 );
+ else
+ result = get_apple_string( face->root.memory,
+ face->name_table.stream,
+ face->name_table.names + apple,
+ sfnt_is_alphanumeric,
+ 0 );
+
+ len = ft_strlen( result );
+
+ /* sanitize if necessary; we reserve space for 36 bytes (a 128bit */
+ /* checksum as a hex number, preceded by `-' and followed by three */
+ /* ASCII dots, to be used if the constructed PS name would be too */
+ /* long); this is also sufficient for a single instance */
+ if ( len > MAX_PS_NAME_LEN - ( 1 + 32 + 3 ) )
+ {
+ len = MAX_PS_NAME_LEN - ( 1 + 32 + 3 );
+ result[len] = '\0';
+
+ FT_TRACE0(( "sfnt_get_var_ps_name:"
+ " Shortening variation PS name prefix\n"
+ " "
+ " to %d characters\n", len ));
+ }
+
+ face->var_postscript_prefix = result;
+ face->var_postscript_prefix_len = len;
+ }
+
+ mm->get_var_blend( FT_FACE( face ),
+ &num_coords,
+ &coords,
+ NULL,
+ &mm_var );
+
+ if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) &&
+ !FT_IS_VARIATION( FT_FACE( face ) ) )
+ {
+ SFNT_Service sfnt = (SFNT_Service)face->sfnt;
+
+ FT_Long instance = ( ( face->root.face_index & 0x7FFF0000L ) >> 16 ) - 1;
+ FT_UInt psid = mm_var->namedstyle[instance].psid;
+
+ char* ps_name = NULL;
+
+
+ /* try first to load the name string with index `postScriptNameID' */
+ if ( psid == 6 ||
+ ( psid > 255 && psid < 32768 ) )
+ (void)sfnt->get_name( face, (FT_UShort)psid, &ps_name );
+
+ if ( ps_name )
+ {
+ result = ps_name;
+ p = result + ft_strlen( result ) + 1;
+
+ goto check_length;
+ }
+ else
+ {
+ /* otherwise construct a name using `subfamilyNameID' */
+ FT_UInt strid = mm_var->namedstyle[instance].strid;
+
+ char* subfamily_name;
+ char* s;
+
+
+ (void)sfnt->get_name( face, (FT_UShort)strid, &subfamily_name );
+
+ if ( !subfamily_name )
+ {
+ FT_TRACE1(( "sfnt_get_var_ps_name:"
+ " can't construct named instance PS name;\n"
+ " "
+ " trying to construct normal instance PS name\n" ));
+ goto construct_instance_name;
}
- p = (FT_Char*)stream->cursor;
+ /* after the prefix we have character `-' followed by the */
+ /* subfamily name (using only characters a-z, A-Z, and 0-9) */
+ if ( FT_ALLOC( result, face->var_postscript_prefix_len +
+ 1 + ft_strlen( subfamily_name ) + 1 ) )
+ return NULL;
+
+ ft_strcpy( result, face->var_postscript_prefix );
+
+ p = result + face->var_postscript_prefix_len;
+ *p++ = '-';
- for ( ; len > 0; len--, p += 2 )
+ s = subfamily_name;
+ while ( *s )
{
- if ( p[0] == 0 && p[1] >= 32 )
- *r++ = p[1];
+ if ( ft_isalnum( *s ) )
+ *p++ = *s;
+ s++;
}
- *r = '\0';
+ *p++ = '\0';
+
+ FT_FREE( subfamily_name );
+ }
+ }
+ else
+ {
+ FT_Var_Axis* axis;
+
+
+ construct_instance_name:
+ axis = mm_var->axis;
- FT_FRAME_EXIT();
+ if ( FT_ALLOC( result,
+ face->var_postscript_prefix_len +
+ num_coords * MAX_VALUE_DESCRIPTOR_LEN + 1 ) )
+ return NULL;
+
+ p = result;
+
+ ft_strcpy( p, face->var_postscript_prefix );
+ p += face->var_postscript_prefix_len;
+
+ for ( i = 0; i < num_coords; i++, coords++, axis++ )
+ {
+ char t;
+
+
+ /* omit axis value descriptor if it is identical */
+ /* to the default axis value */
+ if ( *coords == axis->def )
+ continue;
+
+ *p++ = '_';
+ p = fixed2float( *coords, p );
+
+ t = (char)( axis->tag >> 24 );
+ if ( t != ' ' && ft_isalnum( t ) )
+ *p++ = t;
+ t = (char)( axis->tag >> 16 );
+ if ( t != ' ' && ft_isalnum( t ) )
+ *p++ = t;
+ t = (char)( axis->tag >> 8 );
+ if ( t != ' ' && ft_isalnum( t ) )
+ *p++ = t;
+ t = (char)axis->tag;
+ if ( t != ' ' && ft_isalnum( t ) )
+ *p++ = t;
}
- goto Exit;
}
- if ( found_apple != -1 )
+ check_length:
+ if ( p - result > MAX_PS_NAME_LEN )
{
- FT_Memory memory = face->root.memory;
- TT_NameEntryRec* name = face->name_table.names + found_apple;
- FT_UInt len = name->stringLength;
- FT_Error error = FT_Err_Ok;
+ /* the PS name is too long; replace the part after the prefix with */
+ /* a checksum; we use MurmurHash 3 with a hash length of 128 bit */
- FT_UNUSED( error );
+ FT_UInt32 seed = 123456789;
+ FT_UInt32 hash[4];
+ FT_UInt32* h;
- if ( !FT_ALLOC( result, len + 1 ) )
+
+ murmur_hash_3_128( result, p - result, seed, hash );
+
+ p = result + face->var_postscript_prefix_len;
+ *p++ = '-';
+
+ /* we convert the hash value to hex digits from back to front */
+ p += 32 + 3;
+ h = hash + 3;
+
+ *p-- = '\0';
+ *p-- = '.';
+ *p-- = '.';
+ *p-- = '.';
+
+ for ( i = 0; i < 4; i++, h-- )
{
- FT_Stream stream = face->name_table.stream;
+ FT_UInt32 v = *h;
- if ( FT_STREAM_SEEK( name->stringOffset ) ||
- FT_STREAM_READ( result, len ) )
+ for ( j = 0; j < 8; j++ )
{
- name->stringOffset = 0;
- name->stringLength = 0;
- FT_FREE( name->string );
- FT_FREE( result );
- goto Exit;
+ *p-- = hexdigits[v & 0xF];
+ v >>= 4;
}
- ((char*)result)[len] = '\0';
}
}
- Exit:
+ return result;
+ }
+
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+
+
+ static const char*
+ sfnt_get_ps_name( TT_Face face )
+ {
+ FT_Int found, win, apple;
+ const char* result = NULL;
+
+
+ if ( face->postscript_name )
+ return face->postscript_name;
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+ if ( face->blend &&
+ ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) ||
+ FT_IS_VARIATION( FT_FACE( face ) ) ) )
+ {
+ face->postscript_name = sfnt_get_var_ps_name( face );
+ return face->postscript_name;
+ }
+#endif
+
+ /* scan the name table to see whether we have a Postscript name here, */
+ /* either in Macintosh or Windows platform encodings */
+ found = sfnt_get_name_id( face, TT_NAME_ID_PS_NAME, &win, &apple );
+ if ( !found )
+ return NULL;
+
+ /* prefer Windows entries over Apple */
+ if ( win != -1 )
+ result = get_win_string( face->root.memory,
+ face->name_table.stream,
+ face->name_table.names + win,
+ sfnt_is_postscript,
+ 1 );
+ else
+ result = get_apple_string( face->root.memory,
+ face->name_table.stream,
+ face->name_table.names + apple,
+ sfnt_is_postscript,
+ 1 );
+
face->postscript_name = result;
+
return result;
}
@@ -528,7 +1262,8 @@
tt_face_get_metrics, /* TT_Get_Metrics_Func get_metrics */
- tt_face_get_name /* TT_Get_Name_Func get_name */
+ tt_face_get_name, /* TT_Get_Name_Func get_name */
+ sfnt_get_name_id /* TT_Get_Name_ID_Func get_name_id */
)
diff --git a/modules/freetype2/src/sfnt/sfdriver.h b/modules/freetype2/src/sfnt/sfdriver.h
index 2694488e2..81c22d288 100644
--- a/modules/freetype2/src/sfnt/sfdriver.h
+++ b/modules/freetype2/src/sfnt/sfdriver.h
@@ -4,7 +4,7 @@
/* */
/* High-level SFNT driver interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/sfnt/sferrors.h b/modules/freetype2/src/sfnt/sferrors.h
index c2f9fdfea..74003d4b3 100644
--- a/modules/freetype2/src/sfnt/sferrors.h
+++ b/modules/freetype2/src/sfnt/sferrors.h
@@ -4,7 +4,7 @@
/* */
/* SFNT error codes (specification only). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/sfnt/sfnt.c b/modules/freetype2/src/sfnt/sfnt.c
index 952d6d425..8b9a6b345 100644
--- a/modules/freetype2/src/sfnt/sfnt.c
+++ b/modules/freetype2/src/sfnt/sfnt.c
@@ -4,7 +4,7 @@
/* */
/* Single object library component. */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,27 +17,19 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
+
+#include "pngshim.c"
+#include "sfdriver.c"
#include "sfntpic.c"
-#include "ttload.c"
-#include "ttmtx.c"
+#include "sfobjs.c"
+#include "ttbdf.c"
#include "ttcmap.c"
#include "ttkern.c"
-#include "sfobjs.c"
-#include "sfdriver.c"
-
-#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-#include "pngshim.c"
-#include "ttsbit.c"
-#endif
-
-#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+#include "ttload.c"
+#include "ttmtx.c"
#include "ttpost.c"
-#endif
+#include "ttsbit.c"
-#ifdef TT_CONFIG_OPTION_BDF
-#include "ttbdf.c"
-#endif
/* END */
diff --git a/modules/freetype2/src/sfnt/sfntpic.c b/modules/freetype2/src/sfnt/sfntpic.c
index 1f596c093..db2d816ce 100644
--- a/modules/freetype2/src/sfnt/sfntpic.c
+++ b/modules/freetype2/src/sfnt/sfntpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for sfnt module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/sfnt/sfntpic.h b/modules/freetype2/src/sfnt/sfntpic.h
index 5ce96d393..8f43122d8 100644
--- a/modules/freetype2/src/sfnt/sfntpic.h
+++ b/modules/freetype2/src/sfnt/sfntpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for sfnt module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/sfnt/sfobjs.c b/modules/freetype2/src/sfnt/sfobjs.c
index 818009ef5..6ba8509f5 100644
--- a/modules/freetype2/src/sfnt/sfobjs.c
+++ b/modules/freetype2/src/sfnt/sfobjs.c
@@ -4,7 +4,7 @@
/* */
/* SFNT object management (base). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -54,8 +54,8 @@
/* convert a UTF-16 name entry to ASCII */
static FT_String*
- tt_name_entry_ascii_from_utf16( TT_NameEntry entry,
- FT_Memory memory )
+ tt_name_ascii_from_utf16( TT_Name entry,
+ FT_Memory memory )
{
FT_String* string = NULL;
FT_UInt len, code, n;
@@ -89,8 +89,8 @@
/* convert an Apple Roman or symbol name entry to ASCII */
static FT_String*
- tt_name_entry_ascii_from_other( TT_NameEntry entry,
- FT_Memory memory )
+ tt_name_ascii_from_other( TT_Name entry,
+ FT_Memory memory )
{
FT_String* string = NULL;
FT_UInt len, code, n;
@@ -122,8 +122,8 @@
}
- typedef FT_String* (*TT_NameEntry_ConvertFunc)( TT_NameEntry entry,
- FT_Memory memory );
+ typedef FT_String* (*TT_Name_ConvertFunc)( TT_Name entry,
+ FT_Memory memory );
/* documentation is in sfnt.h */
@@ -133,20 +133,21 @@
FT_UShort nameid,
FT_String** name )
{
- FT_Memory memory = face->root.memory;
- FT_Error error = FT_Err_Ok;
- FT_String* result = NULL;
- FT_UShort n;
- TT_NameEntryRec* rec;
- FT_Int found_apple = -1;
- FT_Int found_apple_roman = -1;
- FT_Int found_apple_english = -1;
- FT_Int found_win = -1;
- FT_Int found_unicode = -1;
+ FT_Memory memory = face->root.memory;
+ FT_Error error = FT_Err_Ok;
+ FT_String* result = NULL;
+ FT_UShort n;
+ TT_Name rec;
- FT_Bool is_english = 0;
+ FT_Int found_apple = -1;
+ FT_Int found_apple_roman = -1;
+ FT_Int found_apple_english = -1;
+ FT_Int found_win = -1;
+ FT_Int found_unicode = -1;
- TT_NameEntry_ConvertFunc convert;
+ FT_Bool is_english = 0;
+
+ TT_Name_ConvertFunc convert;
FT_ASSERT( name );
@@ -231,7 +232,7 @@
/* all Unicode strings are encoded using UTF-16BE */
case TT_MS_ID_UNICODE_CS:
case TT_MS_ID_SYMBOL_CS:
- convert = tt_name_entry_ascii_from_utf16;
+ convert = tt_name_ascii_from_utf16;
break;
case TT_MS_ID_UCS_4:
@@ -240,7 +241,7 @@
/* MsGothic font shipped with Windows Vista shows that this really */
/* means UTF-16 encoded names (UCS-4 values are only used within */
/* charmaps). */
- convert = tt_name_entry_ascii_from_utf16;
+ convert = tt_name_ascii_from_utf16;
break;
default:
@@ -250,12 +251,12 @@
else if ( found_apple >= 0 )
{
rec = face->name_table.names + found_apple;
- convert = tt_name_entry_ascii_from_other;
+ convert = tt_name_ascii_from_other;
}
else if ( found_unicode >= 0 )
{
rec = face->name_table.names + found_unicode;
- convert = tt_name_entry_ascii_from_utf16;
+ convert = tt_name_ascii_from_utf16;
}
if ( rec && convert )
@@ -310,7 +311,7 @@
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, FT_ENCODING_UNICODE },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, FT_ENCODING_UNICODE },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, FT_ENCODING_SJIS },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, FT_ENCODING_GB2312 },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_PRC, FT_ENCODING_PRC },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, FT_ENCODING_BIG5 },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, FT_ENCODING_WANSUNG },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, FT_ENCODING_JOHAB }
@@ -786,6 +787,8 @@
tag != TTAG_OTTO &&
tag != TTAG_true &&
tag != TTAG_typ1 &&
+ tag != TTAG_0xA5kbd &&
+ tag != TTAG_0xA5lst &&
tag != 0x00020000UL )
{
FT_TRACE2(( " not a font using the SFNT container format\n" ));
@@ -893,7 +896,17 @@
0 );
}
- FT_FACE_FIND_GLOBAL_SERVICE( face, face->var, METRICS_VARIATIONS );
+ if ( !face->var )
+ {
+ /* we want the metrics variations interface */
+ /* from the `truetype' module only */
+ FT_Module tt_module = FT_Get_Module( library, "truetype" );
+
+
+ face->var = ft_module_get_service( tt_module,
+ FT_SERVICE_ID_METRICS_VARIATIONS,
+ 0 );
+ }
#endif
FT_TRACE2(( "SFNT driver\n" ));
@@ -909,6 +922,10 @@
face_index = FT_ABS( face_instance_index ) & 0xFFFF;
+ /* value -(N+1) requests information on index N */
+ if ( face_instance_index < 0 )
+ face_index--;
+
if ( face_index >= face->ttc_header.count )
{
if ( face_instance_index >= 0 )
@@ -927,6 +944,8 @@
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
{
+ FT_Memory memory = face->root.memory;
+
FT_ULong fvar_len;
FT_ULong version;
@@ -939,8 +958,9 @@
FT_Int instance_index;
+ FT_Byte* default_values = NULL;
+ FT_Byte* instance_values = NULL;
- face->is_default_instance = 1;
instance_index = FT_ABS( face_instance_index ) >> 16;
@@ -949,7 +969,7 @@
fvar_len < 20 ||
FT_READ_ULONG( version ) ||
FT_READ_USHORT( offset ) ||
- FT_STREAM_SKIP( 2 ) /* count_size_pairs */ ||
+ FT_STREAM_SKIP( 2 ) /* reserved */ ||
FT_READ_USHORT( num_axes ) ||
FT_READ_USHORT( axis_size ) ||
FT_READ_USHORT( num_instances ) ||
@@ -965,18 +985,13 @@
/* check that the data is bound by the table length */
if ( version != 0x00010000UL ||
-#if 0
- /* fonts like `JamRegular.ttf' have an incorrect value for */
- /* `count_size_pairs'; since value 2 is hard-coded in `fvar' */
- /* version 1.0, we simply ignore it */
- count_size_pairs != 2 ||
-#endif
axis_size != 20 ||
num_axes == 0 ||
/* `num_axes' limit implied by 16-bit `instance_size' */
num_axes > 0x3FFE ||
!( instance_size == 4 + 4 * num_axes ||
instance_size == 6 + 4 * num_axes ) ||
+ /* `num_instances' limit implied by limited range of name IDs */
num_instances > 0x7EFF ||
offset +
axis_size * num_axes +
@@ -985,19 +1000,73 @@
else
face->variation_support |= TT_FACE_FLAG_VAR_FVAR;
- /* we don't support Multiple Master CFFs yet */
- if ( !face->goto_table( face, TTAG_CFF, stream, 0 ) )
- num_instances = 0;
+ /*
+ * As documented in the OpenType specification, an entry for the
+ * default instance may be omitted in the named instance table. In
+ * particular this means that even if there is no named instance
+ * table in the font we actually do have a named instance, namely the
+ * default instance.
+ *
+ * For consistency, we always want the default instance in our list
+ * of named instances. If it is missing, we try to synthesize it
+ * later on. Here, we have to adjust `num_instances' accordingly.
+ */
- /* we support at most 2^15 - 1 instances */
- if ( num_instances >= ( 1U << 15 ) - 1 )
+ if ( ( face->variation_support & TT_FACE_FLAG_VAR_FVAR ) &&
+ !( FT_ALLOC( default_values, num_axes * 4 ) ||
+ FT_ALLOC( instance_values, num_axes * 4 ) ) )
{
- if ( face_instance_index >= 0 )
- return FT_THROW( Invalid_Argument );
- else
- num_instances = 0;
+ /* the current stream position is 16 bytes after the table start */
+ FT_ULong array_start = FT_STREAM_POS() - 16 + offset;
+ FT_ULong default_value_offset, instance_offset;
+
+ FT_Byte* p;
+ FT_UInt i;
+
+
+ default_value_offset = array_start + 8;
+ p = default_values;
+
+ for ( i = 0; i < num_axes; i++ )
+ {
+ (void)FT_STREAM_READ_AT( default_value_offset, p, 4 );
+
+ default_value_offset += axis_size;
+ p += 4;
+ }
+
+ instance_offset = array_start + axis_size * num_axes + 4;
+
+ for ( i = 0; i < num_instances; i++ )
+ {
+ (void)FT_STREAM_READ_AT( instance_offset,
+ instance_values,
+ num_axes * 4 );
+
+ if ( !ft_memcmp( default_values, instance_values, num_axes * 4 ) )
+ break;
+
+ instance_offset += instance_size;
+ }
+
+ if ( i == num_instances )
+ {
+ /* no default instance in named instance table; */
+ /* we thus have to synthesize it */
+ num_instances++;
+ }
}
+ FT_FREE( default_values );
+ FT_FREE( instance_values );
+
+ /* we don't support Multiple Master CFFs yet; */
+ /* note that `glyf' or `CFF2' have precedence */
+ if ( face->goto_table( face, TTAG_glyf, stream, 0 ) &&
+ face->goto_table( face, TTAG_CFF2, stream, 0 ) &&
+ !face->goto_table( face, TTAG_CFF, stream, 0 ) )
+ num_instances = 0;
+
/* instance indices in `face_instance_index' start with index 1, */
/* thus `>' and not `>=' */
if ( instance_index > num_instances )
@@ -1075,8 +1144,10 @@
FT_Bool has_outline;
FT_Bool is_apple_sbit;
FT_Bool is_apple_sbix;
- FT_Bool ignore_preferred_family = FALSE;
- FT_Bool ignore_preferred_subfamily = FALSE;
+ FT_Bool has_CBLC;
+ FT_Bool has_CBDT;
+ FT_Bool ignore_typographic_family = FALSE;
+ FT_Bool ignore_typographic_subfamily = FALSE;
SFNT_Service sfnt = (SFNT_Service)face->sfnt;
@@ -1091,10 +1162,10 @@
for ( i = 0; i < num_params; i++ )
{
- if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY )
- ignore_preferred_family = TRUE;
- else if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY )
- ignore_preferred_subfamily = TRUE;
+ if ( params[i].tag == FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY )
+ ignore_typographic_family = TRUE;
+ else if ( params[i].tag == FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY )
+ ignore_typographic_subfamily = TRUE;
}
}
@@ -1155,7 +1226,17 @@
goto Exit;
}
- if ( face->header.Units_Per_EM == 0 )
+ has_CBLC = !face->goto_table( face, TTAG_CBLC, stream, 0 );
+ has_CBDT = !face->goto_table( face, TTAG_CBDT, stream, 0 );
+
+ /* Ignore outlines for CBLC/CBDT fonts. */
+ if ( has_CBLC || has_CBDT )
+ has_outline = FALSE;
+
+ /* OpenType 1.8.2 introduced limits to this value; */
+ /* however, they make sense for older SFNT fonts also */
+ if ( face->header.Units_Per_EM < 16 ||
+ face->header.Units_Per_EM > 16384 )
{
error = FT_THROW( Invalid_Table );
@@ -1258,30 +1339,10 @@
/* embedded bitmap support */
if ( sfnt->load_eblc )
- {
LOAD_( eblc );
- if ( error )
- {
- /* a font which contains neither bitmaps nor outlines is */
- /* still valid (although rather useless in most cases); */
- /* however, you can find such stripped fonts in PDFs */
- if ( FT_ERR_EQ( error, Table_Missing ) )
- error = FT_Err_Ok;
- else
- goto Exit;
- }
- }
+ /* consider the pclt, kerning, and gasp tables as optional */
LOAD_( pclt );
- if ( error )
- {
- if ( FT_ERR_NEQ( error, Table_Missing ) )
- goto Exit;
-
- face->pclt.Version = 0;
- }
-
- /* consider the kerning and gasp tables as optional */
LOAD_( gasp );
LOAD_( kern );
@@ -1297,27 +1358,27 @@
face->root.style_name = NULL;
if ( face->os2.version != 0xFFFFU && face->os2.fsSelection & 256 )
{
- if ( !ignore_preferred_family )
- GET_NAME( PREFERRED_FAMILY, &face->root.family_name );
+ if ( !ignore_typographic_family )
+ GET_NAME( TYPOGRAPHIC_FAMILY, &face->root.family_name );
if ( !face->root.family_name )
GET_NAME( FONT_FAMILY, &face->root.family_name );
- if ( !ignore_preferred_subfamily )
- GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );
+ if ( !ignore_typographic_subfamily )
+ GET_NAME( TYPOGRAPHIC_SUBFAMILY, &face->root.style_name );
if ( !face->root.style_name )
GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
}
else
{
GET_NAME( WWS_FAMILY, &face->root.family_name );
- if ( !face->root.family_name && !ignore_preferred_family )
- GET_NAME( PREFERRED_FAMILY, &face->root.family_name );
+ if ( !face->root.family_name && !ignore_typographic_family )
+ GET_NAME( TYPOGRAPHIC_FAMILY, &face->root.family_name );
if ( !face->root.family_name )
GET_NAME( FONT_FAMILY, &face->root.family_name );
GET_NAME( WWS_SUBFAMILY, &face->root.style_name );
- if ( !face->root.style_name && !ignore_preferred_subfamily )
- GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );
+ if ( !face->root.style_name && !ignore_typographic_subfamily )
+ GET_NAME( TYPOGRAPHIC_SUBFAMILY, &face->root.style_name );
if ( !face->root.style_name )
GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
}
@@ -1415,7 +1476,8 @@
/* Polish the charmaps. */
/* */
/* Try to set the charmap encoding according to the platform & */
- /* encoding ID of each charmap. */
+ /* encoding ID of each charmap. Emulate Unicode charmap if one */
+ /* is missing. */
/* */
tt_face_build_cmaps( face ); /* ignore errors */
@@ -1423,7 +1485,10 @@
/* set the encoding fields */
{
- FT_Int m;
+ FT_Int m;
+#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
+ FT_Bool has_unicode = FALSE;
+#endif
for ( m = 0; m < root->num_charmaps; m++ )
@@ -1434,14 +1499,34 @@
charmap->encoding = sfnt_find_encoding( charmap->platform_id,
charmap->encoding_id );
-#if 0
- if ( !root->charmap &&
- charmap->encoding == FT_ENCODING_UNICODE )
- {
- /* set 'root->charmap' to the first Unicode encoding we find */
- root->charmap = charmap;
- }
-#endif
+#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
+
+ if ( charmap->encoding == FT_ENCODING_UNICODE ||
+ charmap->encoding == FT_ENCODING_MS_SYMBOL ) /* PUA */
+ has_unicode = TRUE;
+ }
+
+ /* synthesize Unicode charmap if one is missing */
+ if ( !has_unicode )
+ {
+ FT_CharMapRec cmaprec;
+
+
+ cmaprec.face = root;
+ cmaprec.platform_id = TT_PLATFORM_MICROSOFT;
+ cmaprec.encoding_id = TT_MS_ID_UNICODE_CS;
+ cmaprec.encoding = FT_ENCODING_UNICODE;
+
+
+ error = FT_CMap_New( (FT_CMap_Class)&tt_cmap_unicode_class_rec,
+ NULL, &cmaprec, NULL );
+ if ( error &&
+ FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
+ goto Exit;
+ error = FT_Err_Ok;
+
+#endif /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+
}
}
@@ -1608,9 +1693,9 @@
(FT_Short)( face->vertical_info ? face->vertical.advance_Height_Max
: root->height );
- /* See http://www.microsoft.com/OpenType/OTSpec/post.htm -- */
- /* Adjust underline position from top edge to centre of */
- /* stroke to convert TrueType meaning to FreeType meaning. */
+ /* See https://www.microsoft.com/typography/otspec/post.htm -- */
+ /* Adjust underline position from top edge to centre of */
+ /* stroke to convert TrueType meaning to FreeType meaning. */
root->underline_position = face->postscript.underlinePosition -
face->postscript.underlineThickness / 2;
root->underline_thickness = face->postscript.underlineThickness;
@@ -1707,7 +1792,10 @@
FT_FREE( face->sbit_strike_map );
face->root.num_fixed_sizes = 0;
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
FT_FREE( face->postscript_name );
+ FT_FREE( face->var_postscript_prefix );
+#endif
face->sfnt = NULL;
}
diff --git a/modules/freetype2/src/sfnt/sfobjs.h b/modules/freetype2/src/sfnt/sfobjs.h
index 60b5698ed..1b8d1be5b 100644
--- a/modules/freetype2/src/sfnt/sfobjs.h
+++ b/modules/freetype2/src/sfnt/sfobjs.h
@@ -4,7 +4,7 @@
/* */
/* SFNT object management (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/sfnt/ttbdf.c b/modules/freetype2/src/sfnt/ttbdf.c
index 62acf090c..534201f22 100644
--- a/modules/freetype2/src/sfnt/ttbdf.c
+++ b/modules/freetype2/src/sfnt/ttbdf.c
@@ -4,7 +4,7 @@
/* */
/* TrueType and OpenType embedded BDF properties (body). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -246,7 +246,12 @@
return error;
}
-#endif /* TT_CONFIG_OPTION_BDF */
+#else /* !TT_CONFIG_OPTION_BDF */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _tt_bdf_dummy;
+
+#endif /* !TT_CONFIG_OPTION_BDF */
/* END */
diff --git a/modules/freetype2/src/sfnt/ttbdf.h b/modules/freetype2/src/sfnt/ttbdf.h
index ae521c60b..809a66300 100644
--- a/modules/freetype2/src/sfnt/ttbdf.h
+++ b/modules/freetype2/src/sfnt/ttbdf.h
@@ -4,7 +4,7 @@
/* */
/* TrueType and OpenType embedded BDF properties (specification). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -28,6 +28,8 @@
FT_BEGIN_HEADER
+#ifdef TT_CONFIG_OPTION_BDF
+
FT_LOCAL( void )
tt_face_free_bdf_props( TT_Face face );
@@ -37,6 +39,8 @@ FT_BEGIN_HEADER
const char* property_name,
BDF_PropertyRec *aprop );
+#endif /* TT_CONFIG_OPTION_BDF */
+
FT_END_HEADER
diff --git a/modules/freetype2/src/sfnt/ttcmap.c b/modules/freetype2/src/sfnt/ttcmap.c
index e48c15c65..996e66485 100644
--- a/modules/freetype2/src/sfnt/ttcmap.c
+++ b/modules/freetype2/src/sfnt/ttcmap.c
@@ -4,7 +4,7 @@
/* */
/* TrueType character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,8 +23,10 @@
#include FT_INTERNAL_VALIDATE_H
#include FT_INTERNAL_STREAM_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include "ttload.h"
#include "ttcmap.h"
+#include "ttpost.h"
#include "sfntpic.h"
@@ -220,10 +222,10 @@
/***** The following charmap lookup and iteration functions all *****/
/***** assume that the value `charcode' fulfills the following. *****/
/***** *****/
- /***** - For one byte characters, `charcode' is simply the *****/
+ /***** - For one-byte characters, `charcode' is simply the *****/
/***** character code. *****/
/***** *****/
- /***** - For two byte characters, `charcode' is the 2-byte *****/
+ /***** - For two-byte characters, `charcode' is the 2-byte *****/
/***** character code in big endian format. More precisely: *****/
/***** *****/
/***** (charcode >> 8) is the first byte value *****/
@@ -250,11 +252,11 @@
/* subs 518 SUBHEAD[NSUBS] sub-headers array */
/* glyph_ids 518+NSUB*8 USHORT[] glyph ID array */
/* */
- /* The `keys' table is used to map charcode high-bytes to sub-headers. */
+ /* The `keys' table is used to map charcode high bytes to sub-headers. */
/* The value of `NSUBS' is the number of sub-headers defined in the */
/* table and is computed by finding the maximum of the `keys' table. */
/* */
- /* Note that for any n, `keys[n]' is a byte offset within the `subs' */
+ /* Note that for any `n', `keys[n]' is a byte offset within the `subs' */
/* table, i.e., it is the corresponding sub-header index multiplied */
/* by 8. */
/* */
@@ -267,8 +269,8 @@
/* delta 4 SHORT see below */
/* offset 6 USHORT see below */
/* */
- /* A sub-header defines, for each high-byte, the range of valid */
- /* low-bytes within the charmap. Note that the range defined by `first' */
+ /* A sub-header defines, for each high byte, the range of valid */
+ /* low bytes within the charmap. Note that the range defined by `first' */
/* and `count' must be completely included in the interval [0..255] */
/* according to the specification. */
/* */
@@ -358,7 +360,7 @@
/* check range within 0..255 */
if ( valid->level >= FT_VALIDATE_PARANOID )
{
- if ( first_code >= 256 || first_code + code_count > 256 )
+ if ( first_code >= 256 || code_count > 256 - first_code )
FT_INVALID_DATA;
}
@@ -410,7 +412,7 @@
{
FT_UInt char_lo = (FT_UInt)( char_code & 0xFF );
FT_UInt char_hi = (FT_UInt)( char_code >> 8 );
- FT_Byte* p = table + 6; /* keys table */
+ FT_Byte* p = table + 6; /* keys table */
FT_Byte* subs = table + 518; /* subheaders table */
FT_Byte* sub;
@@ -423,8 +425,8 @@
sub = subs; /* jump to first sub-header */
/* check that the sub-header for this byte is 0, which */
- /* indicates that it is really a valid one-byte value */
- /* Otherwise, return 0 */
+ /* indicates that it is really a valid one-byte value; */
+ /* otherwise, return 0 */
/* */
p += char_lo * 2;
if ( TT_PEEK_USHORT( p ) != 0 )
@@ -443,6 +445,7 @@
if ( sub == subs )
goto Exit;
}
+
result = sub;
}
@@ -515,8 +518,19 @@
FT_UInt pos, idx;
+ if ( char_lo >= start + count && charcode <= 0xFF )
+ {
+ /* this happens only for a malformed cmap */
+ charcode = 0x100;
+ continue;
+ }
+
if ( offset == 0 )
+ {
+ if ( charcode == 0x100 )
+ goto Exit; /* this happens only for a malformed cmap */
goto Next_SubHeader;
+ }
if ( char_lo < start )
{
@@ -543,11 +557,20 @@
}
}
}
+
+ /* if unsuccessful, avoid `charcode' leaving */
+ /* the current 256-character block */
+ if ( count )
+ charcode--;
}
- /* jump to next sub-header, i.e. higher byte value */
+ /* If `charcode' is <= 0xFF, retry with `charcode + 1'. */
+ /* Otherwise jump to the next 256-character block and retry. */
Next_SubHeader:
- charcode = FT_PAD_FLOOR( charcode, 256 ) + 256;
+ if ( charcode <= 0xFF )
+ charcode++;
+ else
+ charcode = FT_PAD_FLOOR( charcode, 0x100 ) + 0x100;
}
Exit:
@@ -3622,6 +3645,110 @@
#endif /* TT_CONFIG_CMAP_FORMAT_14 */
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** SYNTHETIC UNICODE *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /* This charmap is generated using postscript glyph names. */
+
+#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
+
+ FT_CALLBACK_DEF( const char * )
+ tt_get_glyph_name( TT_Face face,
+ FT_UInt idx )
+ {
+ FT_String* PSname;
+
+
+ tt_face_get_ps_name( face, idx, &PSname );
+
+ return PSname;
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ tt_cmap_unicode_init( PS_Unicodes unicodes,
+ FT_Pointer pointer )
+ {
+ TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes );
+ FT_Memory memory = FT_FACE_MEMORY( face );
+ FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
+
+ FT_UNUSED( pointer );
+
+
+ return psnames->unicodes_init( memory,
+ unicodes,
+ face->root.num_glyphs,
+ (PS_GetGlyphNameFunc)&tt_get_glyph_name,
+ (PS_FreeGlyphNameFunc)NULL,
+ (FT_Pointer)face );
+ }
+
+
+ FT_CALLBACK_DEF( void )
+ tt_cmap_unicode_done( PS_Unicodes unicodes )
+ {
+ FT_Face face = FT_CMAP_FACE( unicodes );
+ FT_Memory memory = FT_FACE_MEMORY( face );
+
+
+ FT_FREE( unicodes->maps );
+ unicodes->num_maps = 0;
+ }
+
+
+ FT_CALLBACK_DEF( FT_UInt )
+ tt_cmap_unicode_char_index( PS_Unicodes unicodes,
+ FT_UInt32 char_code )
+ {
+ TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes );
+ FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
+
+
+ return psnames->unicodes_char_index( unicodes, char_code );
+ }
+
+
+ FT_CALLBACK_DEF( FT_UInt32 )
+ tt_cmap_unicode_char_next( PS_Unicodes unicodes,
+ FT_UInt32 *pchar_code )
+ {
+ TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes );
+ FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
+
+
+ return psnames->unicodes_char_next( unicodes, pchar_code );
+ }
+
+
+ FT_DEFINE_TT_CMAP(
+ tt_cmap_unicode_class_rec,
+
+ sizeof ( PS_UnicodesRec ),
+
+ (FT_CMap_InitFunc) tt_cmap_unicode_init, /* init */
+ (FT_CMap_DoneFunc) tt_cmap_unicode_done, /* done */
+ (FT_CMap_CharIndexFunc)tt_cmap_unicode_char_index, /* char_index */
+ (FT_CMap_CharNextFunc) tt_cmap_unicode_char_next, /* char_next */
+
+ (FT_CMap_CharVarIndexFunc) NULL, /* char_var_index */
+ (FT_CMap_CharVarIsDefaultFunc)NULL, /* char_var_default */
+ (FT_CMap_VariantListFunc) NULL, /* variant_list */
+ (FT_CMap_CharVariantListFunc) NULL, /* charvariant_list */
+ (FT_CMap_VariantCharListFunc) NULL, /* variantchar_list */
+
+ ~0U,
+ (TT_CMap_ValidateFunc)NULL, /* validate */
+ (TT_CMap_Info_GetFunc)NULL /* get_cmap_info */
+ )
+
+#endif /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+
#ifndef FT_CONFIG_OPTION_PIC
static const TT_CMap_Class tt_cmap_classes[] =
@@ -3801,8 +3928,10 @@
FT_CMap cmap = (FT_CMap)charmap;
TT_CMap_Class clazz = (TT_CMap_Class)cmap->clazz;
-
- return clazz->get_cmap_info( charmap, cmap_info );
+ if ( clazz->get_cmap_info )
+ return clazz->get_cmap_info( charmap, cmap_info );
+ else
+ return FT_THROW( Invalid_CharMap_Format );
}
diff --git a/modules/freetype2/src/sfnt/ttcmap.h b/modules/freetype2/src/sfnt/ttcmap.h
index 2273cbd96..d264d99d2 100644
--- a/modules/freetype2/src/sfnt/ttcmap.h
+++ b/modules/freetype2/src/sfnt/ttcmap.h
@@ -4,7 +4,7 @@
/* */
/* TrueType character mapping table (cmap) support (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -141,6 +141,8 @@ FT_BEGIN_HEADER
#define TT_VALID_GLYPH_COUNT( x ) TT_VALIDATOR( x )->num_glyphs
+ FT_CALLBACK_TABLE const TT_CMap_ClassRec tt_cmap_unicode_class_rec;
+
FT_LOCAL( FT_Error )
tt_face_build_cmaps( TT_Face face );
diff --git a/modules/freetype2/src/sfnt/ttcmapc.h b/modules/freetype2/src/sfnt/ttcmapc.h
index 7c732fbd3..4980e9dd3 100644
--- a/modules/freetype2/src/sfnt/ttcmapc.h
+++ b/modules/freetype2/src/sfnt/ttcmapc.h
@@ -4,7 +4,7 @@
/* */
/* TT CMAP classes definitions (specification only). */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/sfnt/ttkern.c b/modules/freetype2/src/sfnt/ttkern.c
index 6f9fa522d..68f15a201 100644
--- a/modules/freetype2/src/sfnt/ttkern.c
+++ b/modules/freetype2/src/sfnt/ttkern.c
@@ -5,7 +5,7 @@
/* Load the basic TrueType kerning table. This doesn't handle */
/* kerning data within the GPOS table at the moment. */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -85,7 +85,7 @@
for ( nn = 0; nn < num_tables; nn++ )
{
- FT_UInt num_pairs, length, coverage;
+ FT_UInt num_pairs, length, coverage, format;
FT_Byte* p_next;
FT_UInt32 mask = (FT_UInt32)1UL << nn;
@@ -107,9 +107,15 @@
if ( p_next > p_limit ) /* handle broken table */
p_next = p_limit;
+ format = coverage >> 8;
+
+ /* we currently only support format 0 kerning tables */
+ if ( format != 0 )
+ goto NextTable;
+
/* only use horizontal kerning tables */
- if ( ( coverage & ~8U ) != 0x0001 ||
- p + 8 > p_limit )
+ if ( ( coverage & 3U ) != 0x0001 ||
+ p + 8 > p_next )
goto NextTable;
num_pairs = FT_NEXT_USHORT( p );
@@ -214,8 +220,7 @@
if ( ( face->kern_avail_bits & mask ) == 0 )
goto NextTable;
- if ( p + 8 > next )
- goto NextTable;
+ FT_ASSERT( p + 8 <= next ); /* tested in tt_face_load_kern */
num_pairs = FT_NEXT_USHORT( p );
p += 6;
diff --git a/modules/freetype2/src/sfnt/ttkern.h b/modules/freetype2/src/sfnt/ttkern.h
index 85dd5c31a..4e45d0964 100644
--- a/modules/freetype2/src/sfnt/ttkern.h
+++ b/modules/freetype2/src/sfnt/ttkern.h
@@ -5,7 +5,7 @@
/* Load the basic TrueType kerning table. This doesn't handle */
/* kerning data within the GPOS table at the moment. */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/sfnt/ttload.c b/modules/freetype2/src/sfnt/ttload.c
index d615bba04..a86a546c3 100644
--- a/modules/freetype2/src/sfnt/ttload.c
+++ b/modules/freetype2/src/sfnt/ttload.c
@@ -5,7 +5,7 @@
/* Load the basic TrueType tables, i.e., tables that can be either in */
/* TTF or OTF fonts (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -338,7 +338,7 @@
SFNT_HeaderRec sfnt;
FT_Error error;
FT_Memory memory = stream->memory;
- FT_UShort nn, valid_entries;
+ FT_UShort nn, valid_entries = 0;
static const FT_Frame_Field offset_table_fields[] =
{
@@ -808,7 +808,6 @@
FT_Memory memory = stream->memory;
FT_ULong table_pos, table_len;
FT_ULong storage_start, storage_limit;
- FT_UInt count;
TT_NameTable table;
static const FT_Frame_Field name_table_fields[] =
@@ -826,7 +825,7 @@
static const FT_Frame_Field name_record_fields[] =
{
#undef FT_STRUCTURE
-#define FT_STRUCTURE TT_NameEntryRec
+#define FT_STRUCTURE TT_NameRec
/* no FT_FRAME_START */
FT_FRAME_USHORT( platformID ),
@@ -838,6 +837,17 @@
FT_FRAME_END
};
+ static const FT_Frame_Field langTag_record_fields[] =
+ {
+#undef FT_STRUCTURE
+#define FT_STRUCTURE TT_LangTagRec
+
+ /* no FT_FRAME_START */
+ FT_FRAME_USHORT( stringLength ),
+ FT_FRAME_USHORT( stringOffset ),
+ FT_FRAME_END
+ };
+
table = &face->name_table;
table->stream = stream;
@@ -848,18 +858,17 @@
table_pos = FT_STREAM_POS();
-
if ( FT_STREAM_READ_FIELDS( name_table_fields, table ) )
goto Exit;
- /* Some popular Asian fonts have an invalid `storageOffset' value */
- /* (it should be at least "6 + 12*num_names"). However, the string */
- /* offsets, computed as "storageOffset + entry->stringOffset", are */
- /* valid pointers within the name table... */
- /* */
- /* We thus can't check `storageOffset' right now. */
- /* */
- storage_start = table_pos + 6 + 12*table->numNameRecords;
+ /* Some popular Asian fonts have an invalid `storageOffset' value (it */
+ /* should be at least `6 + 12*numNameRecords'). However, the string */
+ /* offsets, computed as `storageOffset + entry->stringOffset', are */
+ /* valid pointers within the name table... */
+ /* */
+ /* We thus can't check `storageOffset' right now. */
+ /* */
+ storage_start = table_pos + 6 + 12 * table->numNameRecords;
storage_limit = table_pos + table_len;
if ( storage_start > storage_limit )
@@ -869,18 +878,56 @@
goto Exit;
}
- /* Allocate the array of name records. */
- count = table->numNameRecords;
- table->numNameRecords = 0;
+ /* `name' format 1 contains additional language tag records, */
+ /* which we load first */
+ if ( table->format == 1 )
+ {
+ if ( FT_STREAM_SEEK( storage_start ) ||
+ FT_READ_USHORT( table->numLangTagRecords ) )
+ goto Exit;
+
+ storage_start += 2 + 4 * table->numLangTagRecords;
+
+ /* allocate language tag records array */
+ if ( FT_NEW_ARRAY( table->langTags, table->numLangTagRecords ) ||
+ FT_FRAME_ENTER( table->numLangTagRecords * 4 ) )
+ goto Exit;
- if ( FT_NEW_ARRAY( table->names, count ) ||
- FT_FRAME_ENTER( count * 12 ) )
+ /* load language tags */
+ {
+ TT_LangTag entry = table->langTags;
+ TT_LangTag limit = entry + table->numLangTagRecords;
+
+
+ for ( ; entry < limit; entry++ )
+ {
+ (void)FT_STREAM_READ_FIELDS( langTag_record_fields, entry );
+
+ /* check that the langTag string is within the table */
+ entry->stringOffset += table_pos + table->storageOffset;
+ if ( entry->stringOffset < storage_start ||
+ entry->stringOffset + entry->stringLength > storage_limit )
+ {
+ /* invalid entry; ignore it */
+ entry->stringLength = 0;
+ }
+ }
+ }
+
+ FT_FRAME_EXIT();
+
+ (void)FT_STREAM_SEEK( table_pos + 6 );
+ }
+
+ /* allocate name records array */
+ if ( FT_NEW_ARRAY( table->names, table->numNameRecords ) ||
+ FT_FRAME_ENTER( table->numNameRecords * 12 ) )
goto Exit;
- /* Load the name records and determine how much storage is needed */
- /* to hold the strings themselves. */
+ /* load name records */
{
- TT_NameEntryRec* entry = table->names;
+ TT_Name entry = table->names;
+ FT_UInt count = table->numNameRecords;
for ( ; count > 0; count-- )
@@ -897,22 +944,37 @@
if ( entry->stringOffset < storage_start ||
entry->stringOffset + entry->stringLength > storage_limit )
{
- /* invalid entry - ignore it */
- entry->stringOffset = 0;
- entry->stringLength = 0;
+ /* invalid entry; ignore it */
continue;
}
+ /* assure that we have a valid language tag ID, and */
+ /* that the corresponding langTag entry is valid, too */
+ if ( table->format == 1 && entry->languageID >= 0x8000U )
+ {
+ if ( entry->languageID - 0x8000U >= table->numLangTagRecords ||
+ !table->langTags[entry->languageID - 0x8000U].stringLength )
+ {
+ /* invalid entry; ignore it */
+ continue;
+ }
+ }
+
entry++;
}
- table->numNameRecords = (FT_UInt)( entry - table->names );
+ /* reduce array size to the actually used elements */
+ count = (FT_UInt)( entry - table->names );
+ (void)FT_RENEW_ARRAY( table->names,
+ table->numNameRecords,
+ count );
+ table->numNameRecords = count;
}
FT_FRAME_EXIT();
/* everything went well, update face->num_names */
- face->num_names = (FT_UShort) table->numNameRecords;
+ face->num_names = (FT_UShort)table->numNameRecords;
Exit:
return error;
@@ -922,7 +984,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* tt_face_free_names */
+ /* tt_face_free_name */
/* */
/* <Description> */
/* Frees the name records. */
@@ -935,25 +997,36 @@
{
FT_Memory memory = face->root.driver->root.memory;
TT_NameTable table = &face->name_table;
- TT_NameEntry entry = table->names;
- FT_UInt count = table->numNameRecords;
if ( table->names )
{
- for ( ; count > 0; count--, entry++ )
- {
+ TT_Name entry = table->names;
+ TT_Name limit = entry + table->numNameRecords;
+
+
+ for ( ; entry < limit; entry++ )
FT_FREE( entry->string );
- entry->stringLength = 0;
- }
- /* free strings table */
FT_FREE( table->names );
}
- table->numNameRecords = 0;
- table->format = 0;
- table->storageOffset = 0;
+ if ( table->langTags )
+ {
+ TT_LangTag entry = table->langTags;
+ TT_LangTag limit = entry + table->numLangTagRecords;
+
+
+ for ( ; entry < limit; entry++ )
+ FT_FREE( entry->string );
+
+ FT_FREE( table->langTags );
+ }
+
+ table->numNameRecords = 0;
+ table->numLangTagRecords = 0;
+ table->format = 0;
+ table->storageOffset = 0;
}
diff --git a/modules/freetype2/src/sfnt/ttload.h b/modules/freetype2/src/sfnt/ttload.h
index bec42b94b..f94be8b7b 100644
--- a/modules/freetype2/src/sfnt/ttload.h
+++ b/modules/freetype2/src/sfnt/ttload.h
@@ -5,7 +5,7 @@
/* Load the basic TrueType tables, i.e., tables that can be either in */
/* TTF or OTF fonts (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/sfnt/ttmtx.c b/modules/freetype2/src/sfnt/ttmtx.c
index 8c5508e24..6ddda95b5 100644
--- a/modules/freetype2/src/sfnt/ttmtx.c
+++ b/modules/freetype2/src/sfnt/ttmtx.c
@@ -4,7 +4,7 @@
/* */
/* Load the metrics tables common to TTF and OTF fonts (body). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -30,6 +30,14 @@
#include "sferrors.h"
+ /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
+ /* be identical except for the names of their fields, */
+ /* which are different. */
+ /* */
+ /* This ensures that `tt_face_load_hmtx' is able to read */
+ /* both the horizontal and vertical headers. */
+
+
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
diff --git a/modules/freetype2/src/sfnt/ttmtx.h b/modules/freetype2/src/sfnt/ttmtx.h
index 78395def3..ab00acd79 100644
--- a/modules/freetype2/src/sfnt/ttmtx.h
+++ b/modules/freetype2/src/sfnt/ttmtx.h
@@ -4,7 +4,7 @@
/* */
/* Load the metrics tables common to TTF and OTF fonts (specification). */
/* */
-/* Copyright 2006-2016 by */
+/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/sfnt/ttpost.c b/modules/freetype2/src/sfnt/ttpost.c
index ef81e63a3..6de99ef97 100644
--- a/modules/freetype2/src/sfnt/ttpost.c
+++ b/modules/freetype2/src/sfnt/ttpost.c
@@ -5,7 +5,7 @@
/* PostScript name table processing for TrueType and OpenType fonts */
/* (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,6 +29,10 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
+
+
+#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+
#include "ttpost.h"
#include "sferrors.h"
@@ -321,7 +325,6 @@
FT_UNUSED( post_limit );
- /* UNDOCUMENTED! This value appears only in the Apple TT specs. */
if ( FT_READ_USHORT( num_glyphs ) )
goto Exit;
@@ -404,7 +407,7 @@
/* now read postscript table */
if ( format == 0x00020000L )
error = load_format_20( face, stream, post_limit );
- else if ( format == 0x00028000L )
+ else if ( format == 0x00025000L )
error = load_format_25( face, stream, post_limit );
else
error = FT_THROW( Invalid_File_Format );
@@ -443,7 +446,7 @@
FT_FREE( table->glyph_names );
table->num_names = 0;
}
- else if ( format == 0x00028000L )
+ else if ( format == 0x00025000L )
{
TT_Post_25 table = &names->names.format_25;
@@ -470,8 +473,8 @@
/* idx :: The glyph index. */
/* */
/* <InOut> */
- /* PSname :: The address of a string pointer. Will be NULL in case */
- /* of error, otherwise it is a pointer to the glyph name. */
+ /* PSname :: The address of a string pointer. Undefined in case of */
+ /* error, otherwise it is a pointer to the glyph name. */
/* */
/* You must not modify the returned string! */
/* */
@@ -539,7 +542,7 @@
*PSname = (FT_String*)table->glyph_names[name_index - 258];
}
}
- else if ( format == 0x00028000L )
+ else if ( format == 0x00025000L )
{
TT_Post_25 table = &names->names.format_25;
@@ -561,5 +564,12 @@
return FT_Err_Ok;
}
+#else /* !TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _tt_post_dummy;
+
+#endif /* !TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+
/* END */
diff --git a/modules/freetype2/src/sfnt/ttpost.h b/modules/freetype2/src/sfnt/ttpost.h
index ede45fd84..3bec07e44 100644
--- a/modules/freetype2/src/sfnt/ttpost.h
+++ b/modules/freetype2/src/sfnt/ttpost.h
@@ -5,7 +5,7 @@
/* PostScript name table processing for TrueType and OpenType fonts */
/* (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/sfnt/ttsbit.c b/modules/freetype2/src/sfnt/ttsbit.c
index bf6ecca5a..33b8640bc 100644
--- a/modules/freetype2/src/sfnt/ttsbit.c
+++ b/modules/freetype2/src/sfnt/ttsbit.c
@@ -4,7 +4,7 @@
/* */
/* TrueType and OpenType embedded bitmap support (body). */
/* */
-/* Copyright 2005-2016 by */
+/* Copyright 2005-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* Copyright 2013 by Google, Inc. */
@@ -24,6 +24,10 @@
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
#include FT_BITMAP_H
+
+
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
#include "ttsbit.h"
#include "sferrors.h"
@@ -444,6 +448,15 @@
metrics->max_advance =
FT_MulDiv( hori->advance_Width_Max, ppem_ * 64, upem );
+ /* set the scale values (in 16.16 units) so advances */
+ /* from the hmtx and vmtx table are scaled correctly */
+ metrics->x_scale = FT_MulDiv( metrics->x_ppem,
+ 64 * 0x10000,
+ face->header.Units_Per_EM );
+ metrics->y_scale = FT_MulDiv( metrics->y_ppem,
+ 64 * 0x10000,
+ face->header.Units_Per_EM );
+
return error;
}
@@ -994,8 +1007,9 @@
goto Fail;
}
- FT_TRACE3(( "tt_sbit_decoder_load_compound: loading %d components\n",
- num_components ));
+ FT_TRACE3(( "tt_sbit_decoder_load_compound: loading %d component%s\n",
+ num_components,
+ num_components == 1 ? "" : "s" ));
for ( nn = 0; nn < num_components; nn++ )
{
@@ -1435,10 +1449,17 @@
return FT_THROW( Invalid_Table );
NoBitmap:
+ if ( recurse_count )
+ {
+ FT_TRACE4(( "tt_sbit_decoder_load_image:"
+ " missing subglyph sbit with glyph index %d\n",
+ glyph_index ));
+ return FT_THROW( Invalid_Composite );
+ }
+
FT_TRACE4(( "tt_sbit_decoder_load_image:"
" no sbit found for glyph index %d\n", glyph_index ));
-
- return FT_THROW( Invalid_Argument );
+ return FT_THROW( Missing_Bitmap );
}
@@ -1460,6 +1481,9 @@
FT_Byte* p;
FT_UNUSED( map );
+#ifndef FT_CONFIG_OPTION_USE_PNG
+ FT_UNUSED( metrics_only );
+#endif
strike_index = face->sbit_strike_map[strike_index];
@@ -1490,7 +1514,7 @@
FT_FRAME_EXIT();
if ( glyph_start == glyph_end )
- return FT_THROW( Invalid_Argument );
+ return FT_THROW( Missing_Bitmap );
if ( glyph_start > glyph_end ||
glyph_end - glyph_start < 8 ||
face->ebdt_size - strike_offset < glyph_end )
@@ -1647,5 +1671,12 @@
return error;
}
+#else /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _tt_sbit_dummy;
+
+#endif /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
-/* EOF */
+/* END */
diff --git a/modules/freetype2/src/sfnt/ttsbit.h b/modules/freetype2/src/sfnt/ttsbit.h
index d8a816708..ce2af3c16 100644
--- a/modules/freetype2/src/sfnt/ttsbit.h
+++ b/modules/freetype2/src/sfnt/ttsbit.h
@@ -4,7 +4,7 @@
/* */
/* TrueType and OpenType embedded bitmap support (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/smooth/Jamfile b/modules/freetype2/src/smooth/Jamfile
index a388c11d9..9957d5e91 100644
--- a/modules/freetype2/src/smooth/Jamfile
+++ b/modules/freetype2/src/smooth/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/smooth Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/smooth/ftgrays.c b/modules/freetype2/src/smooth/ftgrays.c
index ba42c9ca9..803a19e41 100644
--- a/modules/freetype2/src/smooth/ftgrays.c
+++ b/modules/freetype2/src/smooth/ftgrays.c
@@ -4,7 +4,7 @@
/* */
/* A new `perfect' anti-aliasing renderer (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -141,6 +141,16 @@
#define FT_INT_MAX INT_MAX
#define FT_ULONG_MAX ULONG_MAX
+#define ADD_LONG( a, b ) \
+ (long)( (unsigned long)(a) + (unsigned long)(b) )
+#define SUB_LONG( a, b ) \
+ (long)( (unsigned long)(a) - (unsigned long)(b) )
+#define MUL_LONG( a, b ) \
+ (long)( (unsigned long)(a) * (unsigned long)(b) )
+#define NEG_LONG( a ) \
+ (long)( -(unsigned long)(a) )
+
+
#define ft_memset memset
#define ft_setjmp setjmp
@@ -264,6 +274,7 @@ typedef ptrdiff_t FT_PtrDist;
#include "ftgrays.h"
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_CALC_H
#include FT_OUTLINE_H
#include "ftsmerrs.h"
@@ -341,7 +352,8 @@ typedef ptrdiff_t FT_PtrDist;
/* Compute `dividend / divisor' and return both its quotient and */
/* remainder, cast to a specific type. This macro also ensures that */
- /* the remainder is always positive. */
+ /* the remainder is always positive. We use the remainder to keep */
+ /* track of accumulating errors and compensate for them. */
#define FT_DIV_MOD( type, dividend, divisor, quotient, remainder ) \
FT_BEGIN_STMNT \
(quotient) = (type)( (dividend) / (divisor) ); \
@@ -358,7 +370,7 @@ typedef ptrdiff_t FT_PtrDist;
/* optimize a division and modulo operation on the same parameters */
/* into a single call to `__aeabi_idivmod'. See */
/* */
- /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43721 */
+ /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43721 */
#undef FT_DIV_MOD
#define FT_DIV_MOD( type, dividend, divisor, quotient, remainder ) \
FT_BEGIN_STMNT \
@@ -392,7 +404,7 @@ typedef ptrdiff_t FT_PtrDist;
/* need to define them to "float" or "double" when experimenting with */
/* new algorithms */
- typedef long TPos; /* sub-pixel coordinate */
+ typedef long TPos; /* subpixel coordinate */
typedef int TCoord; /* integer scanline/pixel coordinate */
typedef int TArea; /* cell areas, coordinate products */
@@ -567,14 +579,11 @@ typedef ptrdiff_t FT_PtrDist;
/* Note that if a cell is to the left of the clipping region, it is */
/* actually set to the (min_ex-1) horizontal position. */
- /* All cells that are on the left of the clipping region go to the */
- /* min_ex - 1 horizontal position. */
-
if ( ex < ras.min_ex )
ex = ras.min_ex - 1;
- /* record the current one if it is valid */
- if ( !ras.invalid )
+ /* record the current one if it is valid and substantial */
+ if ( !ras.invalid && ( ras.area || ras.cover ) )
gray_record_cell( RAS_VAR );
ras.area = 0;
@@ -600,7 +609,7 @@ typedef ptrdiff_t FT_PtrDist;
TPos x2,
TCoord y2 )
{
- TCoord ex1, ex2, fx1, fx2, first, delta, mod;
+ TCoord ex1, ex2, fx1, fx2, first, dy, delta, mod;
TPos p, dx;
int incr;
@@ -617,31 +626,27 @@ typedef ptrdiff_t FT_PtrDist;
fx1 = (TCoord)( x1 - SUBPIXELS( ex1 ) );
fx2 = (TCoord)( x2 - SUBPIXELS( ex2 ) );
- delta = y2 - y1;
/* everything is located in a single cell. That is easy! */
/* */
if ( ex1 == ex2 )
- {
- ras.area += (TArea)(( fx1 + fx2 ) * delta);
- ras.cover += delta;
- return;
- }
+ goto End;
/* ok, we'll have to render a run of adjacent cells on the same */
/* scanline... */
/* */
dx = x2 - x1;
+ dy = y2 - y1;
if ( dx > 0 )
{
- p = ( ONE_PIXEL - fx1 ) * delta;
+ p = ( ONE_PIXEL - fx1 ) * dy;
first = ONE_PIXEL;
incr = 1;
}
else
{
- p = fx1 * delta;
+ p = fx1 * dy;
first = 0;
incr = -1;
dx = -dx;
@@ -649,34 +654,31 @@ typedef ptrdiff_t FT_PtrDist;
FT_DIV_MOD( TCoord, p, dx, delta, mod );
- ras.area += (TArea)(( fx1 + first ) * delta);
+ ras.area += (TArea)( ( fx1 + first ) * delta );
ras.cover += delta;
-
- ex1 += incr;
+ y1 += delta;
+ ex1 += incr;
gray_set_cell( RAS_VAR_ ex1, ey );
- y1 += delta;
if ( ex1 != ex2 )
{
TCoord lift, rem;
- p = ONE_PIXEL * ( y2 - y1 + delta );
+ p = ONE_PIXEL * dy;
FT_DIV_MOD( TCoord, p, dx, lift, rem );
- mod -= (int)dx;
-
do
{
delta = lift;
mod += rem;
- if ( mod >= 0 )
+ if ( mod >= (TCoord)dx )
{
mod -= (TCoord)dx;
delta++;
}
- ras.area += (TArea)(ONE_PIXEL * delta);
+ ras.area += (TArea)( ONE_PIXEL * delta );
ras.cover += delta;
y1 += delta;
ex1 += incr;
@@ -684,9 +686,13 @@ typedef ptrdiff_t FT_PtrDist;
} while ( ex1 != ex2 );
}
- delta = y2 - y1;
- ras.area += (TArea)(( fx2 + ONE_PIXEL - first ) * delta);
- ras.cover += delta;
+ fx1 = ONE_PIXEL - first;
+
+ End:
+ dy = y2 - y1;
+
+ ras.area += (TArea)( ( fx1 + fx2 ) * dy );
+ ras.cover += dy;
}
@@ -798,13 +804,12 @@ typedef ptrdiff_t FT_PtrDist;
p = ONE_PIXEL * dx;
FT_DIV_MOD( TCoord, p, dy, lift, rem );
- mod -= (TCoord)dy;
do
{
delta = lift;
mod += rem;
- if ( mod >= 0 )
+ if ( mod >= (TCoord)dy )
{
mod -= (TCoord)dy;
delta++;
@@ -1141,7 +1146,7 @@ typedef ptrdiff_t FT_PtrDist;
/* s is L * the perpendicular distance from P1 to the line P0-P3. */
dx1 = arc[1].x - arc[0].x;
dy1 = arc[1].y - arc[0].y;
- s = FT_ABS( dy * dx1 - dx * dy1 );
+ s = FT_ABS( SUB_LONG( MUL_LONG( dy, dx1 ), MUL_LONG( dx, dy1 ) ) );
if ( s > s_limit )
goto Split;
@@ -1149,7 +1154,7 @@ typedef ptrdiff_t FT_PtrDist;
/* s is L * the perpendicular distance from P2 to the line P0-P3. */
dx2 = arc[2].x - arc[0].x;
dy2 = arc[2].y - arc[0].y;
- s = FT_ABS( dy * dx2 - dx * dy2 );
+ s = FT_ABS( SUB_LONG( MUL_LONG( dy, dx2 ), MUL_LONG( dx, dy2 ) ) );
if ( s > s_limit )
goto Split;
@@ -1228,31 +1233,21 @@ typedef ptrdiff_t FT_PtrDist;
static void
gray_hline( RAS_ARG_ TCoord x,
TCoord y,
- TArea area,
+ TArea coverage,
TCoord acount )
{
- int coverage;
- FT_Span span;
-
-
- /* compute the coverage line's coverage, depending on the */
- /* outline fill rule */
- /* */
- /* the coverage percentage is area/(PIXEL_BITS*PIXEL_BITS*2) */
- /* */
- coverage = (int)( area >> ( PIXEL_BITS * 2 + 1 - 8 ) );
- /* use range 0..256 */
+ /* scale the coverage from 0..(ONE_PIXEL*ONE_PIXEL*2) to 0..256 */
+ coverage >>= PIXEL_BITS * 2 + 1 - 8;
if ( coverage < 0 )
- coverage = -coverage;
+ coverage = -coverage - 1;
+ /* compute the line's coverage depending on the outline fill rule */
if ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL )
{
coverage &= 511;
- if ( coverage > 256 )
- coverage = 512 - coverage;
- else if ( coverage == 256 )
- coverage = 255;
+ if ( coverage >= 256 )
+ coverage = 511 - coverage;
}
else
{
@@ -1263,6 +1258,9 @@ typedef ptrdiff_t FT_PtrDist;
if ( ras.render_span ) /* for FT_RASTER_FLAG_DIRECT only */
{
+ FT_Span span;
+
+
span.x = (short)x;
span.len = (unsigned short)acount;
span.coverage = (unsigned char)coverage;
@@ -1302,26 +1300,21 @@ typedef ptrdiff_t FT_PtrDist;
int y;
- FT_TRACE7(( "gray_sweep: start\n" ));
-
for ( y = ras.min_ey; y < ras.max_ey; y++ )
{
PCell cell = ras.ycells[y - ras.min_ey];
- TCoord cover = 0;
TCoord x = ras.min_ex;
+ TArea cover = 0;
+ TArea area;
for ( ; cell != NULL; cell = cell->next )
{
- TArea area;
-
-
if ( cover != 0 && cell->x > x )
- gray_hline( RAS_VAR_ x, y, (TArea)cover * ( ONE_PIXEL * 2 ),
- cell->x - x );
+ gray_hline( RAS_VAR_ x, y, cover, cell->x - x );
- cover += cell->cover;
- area = (TArea)cover * ( ONE_PIXEL * 2 ) - cell->area;
+ cover += (TArea)cell->cover * ( ONE_PIXEL * 2 );
+ area = cover - cell->area;
if ( area != 0 && cell->x >= ras.min_ex )
gray_hline( RAS_VAR_ cell->x, y, area, 1 );
@@ -1330,11 +1323,8 @@ typedef ptrdiff_t FT_PtrDist;
}
if ( cover != 0 )
- gray_hline( RAS_VAR_ x, y, (TArea)cover * ( ONE_PIXEL * 2 ),
- ras.max_ex - x );
+ gray_hline( RAS_VAR_ x, y, cover, ras.max_ex - x );
}
-
- FT_TRACE7(( "gray_sweep: end\n" ));
}
@@ -1613,7 +1603,7 @@ typedef ptrdiff_t FT_PtrDist;
return 0;
Exit:
- FT_TRACE5(( "FT_Outline_Decompose: Error %d\n", error ));
+ FT_TRACE5(( "FT_Outline_Decompose: Error 0x%x\n", error ));
return error;
Invalid_Outline:
@@ -1728,8 +1718,11 @@ typedef ptrdiff_t FT_PtrDist;
if ( !ras.invalid )
gray_record_cell( RAS_VAR );
- FT_TRACE7(( "band [%d..%d]: %d cells\n",
- ras.min_ey, ras.max_ey, ras.num_cells ));
+ FT_TRACE7(( "band [%d..%d]: %d cell%s\n",
+ ras.min_ey,
+ ras.max_ey,
+ ras.num_cells,
+ ras.num_cells == 1 ? "" : "s" ));
}
else
{
@@ -1746,35 +1739,43 @@ typedef ptrdiff_t FT_PtrDist;
static int
gray_convert_glyph( RAS_ARG )
{
+ const TCoord yMin = ras.min_ey;
+ const TCoord yMax = ras.max_ey;
+ const TCoord xMin = ras.min_ex;
+ const TCoord xMax = ras.max_ex;
+
TCell buffer[FT_MAX_GRAY_POOL];
- TCoord band_size = FT_MAX_GRAY_POOL / 8;
- TCoord count = ras.max_ey - ras.min_ey;
- int num_bands;
- TCoord min, max, max_y;
+ size_t height = (size_t)( yMax - yMin );
+ size_t n = FT_MAX_GRAY_POOL / 8;
+ TCoord y;
TCoord bands[32]; /* enough to accommodate bisections */
TCoord* band;
/* set up vertical bands */
- if ( count > band_size )
+ if ( height > n )
{
/* two divisions rounded up */
- num_bands = (int)( ( count + band_size - 1) / band_size );
- band_size = ( count + num_bands - 1 ) / num_bands;
+ n = ( height + n - 1 ) / n;
+ height = ( height + n - 1 ) / n;
}
- min = ras.min_ey;
- max_y = ras.max_ey;
+ /* memory management */
+ n = ( height * sizeof ( PCell ) + sizeof ( TCell ) - 1 ) / sizeof ( TCell );
+
+ ras.cells = buffer + n;
+ ras.max_cells = (FT_PtrDist)( FT_MAX_GRAY_POOL - n );
+ ras.ycells = (PCell*)buffer;
- for ( ; min < max_y; min = max )
+ for ( y = yMin; y < yMax; )
{
- max = min + band_size;
- if ( max > max_y )
- max = max_y;
+ ras.min_ey = y;
+ y += height;
+ ras.max_ey = FT_MIN( y, yMax );
band = bands;
- band[1] = min;
- band[0] = max;
+ band[1] = xMin;
+ band[0] = xMax;
do
{
@@ -1782,27 +1783,12 @@ typedef ptrdiff_t FT_PtrDist;
int error;
- /* memory management */
- {
- size_t ycount = (size_t)width;
- size_t cell_start;
-
-
- cell_start = ( ycount * sizeof ( PCell ) + sizeof ( TCell ) - 1 ) /
- sizeof ( TCell );
-
- ras.cells = buffer + cell_start;
- ras.max_cells = (FT_PtrDist)( FT_MAX_GRAY_POOL - cell_start );
- ras.num_cells = 0;
-
- ras.ycells = (PCell*)buffer;
- while ( ycount )
- ras.ycells[--ycount] = NULL;
- }
+ FT_MEM_ZERO( ras.ycells, height * sizeof ( PCell ) );
+ ras.num_cells = 0;
ras.invalid = 1;
- ras.min_ey = band[1];
- ras.max_ey = band[0];
+ ras.min_ex = band[1];
+ ras.max_ex = band[0];
error = gray_convert_glyph_inner( RAS_VAR );
@@ -1818,8 +1804,7 @@ typedef ptrdiff_t FT_PtrDist;
/* render pool overflow; we will reduce the render band by half */
width >>= 1;
- /* This is too complex for a single scanline; there must */
- /* be some problems. */
+ /* this should never happen even with tiny rendering pool */
if ( width == 0 )
{
FT_TRACE7(( "gray_convert_glyph: rotten glyph\n" ));
diff --git a/modules/freetype2/src/smooth/ftgrays.h b/modules/freetype2/src/smooth/ftgrays.h
index 21c2badca..9e11ca675 100644
--- a/modules/freetype2/src/smooth/ftgrays.h
+++ b/modules/freetype2/src/smooth/ftgrays.h
@@ -4,7 +4,7 @@
/* */
/* FreeType smooth renderer declaration */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/smooth/ftsmerrs.h b/modules/freetype2/src/smooth/ftsmerrs.h
index a759b91c1..226dc1b00 100644
--- a/modules/freetype2/src/smooth/ftsmerrs.h
+++ b/modules/freetype2/src/smooth/ftsmerrs.h
@@ -4,7 +4,7 @@
/* */
/* smooth renderer error codes (specification only). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/smooth/ftsmooth.c b/modules/freetype2/src/smooth/ftsmooth.c
index 5f6aa60ef..ef176bdf1 100644
--- a/modules/freetype2/src/smooth/ftsmooth.c
+++ b/modules/freetype2/src/smooth/ftsmooth.c
@@ -4,7 +4,7 @@
/* */
/* Anti-aliasing renderer interface (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,12 +31,7 @@
static FT_Error
ft_smooth_init( FT_Renderer render )
{
- FT_Library library = FT_MODULE_LIBRARY( render );
-
-
- render->clazz->raster_class->raster_reset( render->raster,
- library->raster_pool,
- library->raster_pool_size );
+ render->clazz->raster_class->raster_reset( render->raster, NULL, 0 );
return 0;
}
@@ -102,26 +97,17 @@
const FT_Vector* origin,
FT_Render_Mode required_mode )
{
- FT_Error error;
+ FT_Error error = FT_Err_Ok;
FT_Outline* outline = &slot->outline;
FT_Bitmap* bitmap = &slot->bitmap;
FT_Memory memory = render->root.memory;
- FT_BBox cbox;
FT_Pos x_shift = 0;
FT_Pos y_shift = 0;
- FT_Pos x_left, y_top;
- FT_Pos width, height, pitch;
-#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
- FT_Pos height_org, width_org;
-#endif
FT_Int hmul = ( mode == FT_RENDER_MODE_LCD );
FT_Int vmul = ( mode == FT_RENDER_MODE_LCD_V );
FT_Raster_Params params;
- FT_Bool have_outline_shifted = FALSE;
- FT_Bool have_buffer = FALSE;
-
/* check glyph image format */
if ( slot->format != render->glyph_format )
@@ -137,91 +123,6 @@
goto Exit;
}
- if ( origin )
- {
- x_shift = origin->x;
- y_shift = origin->y;
- }
-
- /* compute the control box, and grid fit it */
- /* taking into account the origin shift */
- FT_Outline_Get_CBox( outline, &cbox );
-
- cbox.xMin = FT_PIX_FLOOR( cbox.xMin + x_shift );
- cbox.yMin = FT_PIX_FLOOR( cbox.yMin + y_shift );
- cbox.xMax = FT_PIX_CEIL( cbox.xMax + x_shift );
- cbox.yMax = FT_PIX_CEIL( cbox.yMax + y_shift );
-
- x_shift -= cbox.xMin;
- y_shift -= cbox.yMin;
-
- x_left = cbox.xMin >> 6;
- y_top = cbox.yMax >> 6;
-
- width = (FT_ULong)( cbox.xMax - cbox.xMin ) >> 6;
- height = (FT_ULong)( cbox.yMax - cbox.yMin ) >> 6;
-
-#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
- width_org = width;
- height_org = height;
-#endif
-
- pitch = width;
- if ( hmul )
- {
- width *= 3;
- pitch = FT_PAD_CEIL( width, 4 );
- }
-
- if ( vmul )
- height *= 3;
-
-#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-
- if ( slot->library->lcd_filter_func )
- {
- FT_Int extra = slot->library->lcd_extra;
-
-
- if ( hmul )
- {
- x_shift += 64 * ( extra >> 1 );
- x_left -= extra >> 1;
- width += 3 * extra;
- pitch = FT_PAD_CEIL( width, 4 );
- }
-
- if ( vmul )
- {
- y_shift += 64 * ( extra >> 1 );
- y_top += extra >> 1;
- height += 3 * extra;
- }
- }
-
-#endif
-
- /*
- * XXX: on 16bit system, we return an error for huge bitmap
- * to prevent an overflow.
- */
- if ( x_left > FT_INT_MAX || y_top > FT_INT_MAX ||
- x_left < FT_INT_MIN || y_top < FT_INT_MIN )
- {
- error = FT_THROW( Invalid_Pixel_Size );
- goto Exit;
- }
-
- /* Required check is (pitch * height < FT_ULONG_MAX), */
- /* but we care realistic cases only. Always pitch <= width. */
- if ( width > 0x7FFF || height > 0x7FFF )
- {
- FT_ERROR(( "ft_smooth_render_generic: glyph too large: %u x %u\n",
- width, height ));
- error = FT_THROW( Raster_Overflow );
- goto Exit;
- }
-
/* release old bitmap buffer */
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
{
@@ -229,30 +130,30 @@
slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
}
+ ft_glyphslot_preset_bitmap( slot, mode, origin );
+
/* allocate new one */
- if ( FT_ALLOC( bitmap->buffer, (FT_ULong)( pitch * height ) ) )
+ if ( FT_ALLOC_MULT( bitmap->buffer, bitmap->rows, bitmap->pitch ) )
goto Exit;
- else
- have_buffer = TRUE;
slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
- slot->format = FT_GLYPH_FORMAT_BITMAP;
- slot->bitmap_left = (FT_Int)x_left;
- slot->bitmap_top = (FT_Int)y_top;
+ x_shift = 64 * -slot->bitmap_left;
+ y_shift = 64 * -slot->bitmap_top;
+ if ( bitmap->pixel_mode == FT_PIXEL_MODE_LCD_V )
+ y_shift += 64 * (FT_Int)bitmap->rows / 3;
+ else
+ y_shift += 64 * (FT_Int)bitmap->rows;
- bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
- bitmap->num_grays = 256;
- bitmap->width = (unsigned int)width;
- bitmap->rows = (unsigned int)height;
- bitmap->pitch = pitch;
+ if ( origin )
+ {
+ x_shift += origin->x;
+ y_shift += origin->y;
+ }
/* translate outline to render it into the bitmap */
if ( x_shift || y_shift )
- {
FT_Outline_Translate( outline, x_shift, y_shift );
- have_outline_shifted = TRUE;
- }
/* set up parameters */
params.target = bitmap;
@@ -299,80 +200,143 @@
if ( error )
goto Exit;
- if ( slot->library->lcd_filter_func )
- slot->library->lcd_filter_func( bitmap, mode, slot->library );
+ /* finally apply filtering */
+ if ( hmul || vmul )
+ {
+ FT_Byte* lcd_weights;
+ FT_Bitmap_LcdFilterFunc lcd_filter_func;
-#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
- /* render outline into bitmap */
- error = render->raster_render( render->raster, &params );
- if ( error )
- goto Exit;
+ /* Per-face LCD filtering takes priority if set up. */
+ if ( slot->face && slot->face->internal->lcd_filter_func )
+ {
+ lcd_weights = slot->face->internal->lcd_weights;
+ lcd_filter_func = slot->face->internal->lcd_filter_func;
+ }
+ else
+ {
+ lcd_weights = slot->library->lcd_weights;
+ lcd_filter_func = slot->library->lcd_filter_func;
+ }
- /* expand it horizontally */
- if ( hmul )
+ if ( lcd_filter_func )
+ lcd_filter_func( bitmap, mode, lcd_weights );
+ }
+
+#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+
+ if ( hmul ) /* lcd */
{
- FT_Byte* line = bitmap->buffer;
- FT_UInt hh;
+ FT_Byte* line;
+ FT_Byte* temp = NULL;
+ FT_UInt i, j;
+ unsigned int height = bitmap->rows;
+ unsigned int width = bitmap->width;
+ int pitch = bitmap->pitch;
- for ( hh = height_org; hh > 0; hh--, line += pitch )
- {
- FT_UInt xx;
- FT_Byte* end = line + width;
+ /* Render 3 separate monochrome bitmaps, shifting the outline */
+ /* by 1/3 pixel. */
+ width /= 3;
- for ( xx = width_org; xx > 0; xx-- )
- {
- FT_UInt pixel = line[xx-1];
+ bitmap->buffer += width;
+ error = render->raster_render( render->raster, &params );
+ if ( error )
+ goto Exit;
- end[-3] = (FT_Byte)pixel;
- end[-2] = (FT_Byte)pixel;
- end[-1] = (FT_Byte)pixel;
- end -= 3;
+ FT_Outline_Translate( outline, -21, 0 );
+ x_shift -= 21;
+ bitmap->buffer += width;
+
+ error = render->raster_render( render->raster, &params );
+ if ( error )
+ goto Exit;
+
+ FT_Outline_Translate( outline, 42, 0 );
+ x_shift += 42;
+ bitmap->buffer -= 2 * width;
+
+ error = render->raster_render( render->raster, &params );
+ if ( error )
+ goto Exit;
+
+ /* XXX: Rearrange the bytes according to FT_PIXEL_MODE_LCD. */
+ /* XXX: It is more efficient to render every third byte above. */
+
+ if ( FT_ALLOC( temp, (FT_ULong)pitch ) )
+ goto Exit;
+
+ for ( i = 0; i < height; i++ )
+ {
+ line = bitmap->buffer + i * (FT_ULong)pitch;
+ for ( j = 0; j < width; j++ )
+ {
+ temp[3 * j ] = line[j];
+ temp[3 * j + 1] = line[j + width];
+ temp[3 * j + 2] = line[j + width + width];
}
+ FT_MEM_COPY( line, temp, pitch );
}
- }
- /* expand it vertically */
- if ( vmul )
+ FT_FREE( temp );
+ }
+ else if ( vmul ) /* lcd_v */
{
- FT_Byte* read = bitmap->buffer + ( height - height_org ) * pitch;
- FT_Byte* write = bitmap->buffer;
- FT_UInt hh;
+ int pitch = bitmap->pitch;
- for ( hh = height_org; hh > 0; hh-- )
- {
- ft_memcpy( write, read, pitch );
- write += pitch;
+ /* Render 3 separate monochrome bitmaps, shifting the outline */
+ /* by 1/3 pixel. Triple the pitch to render on each third row. */
+ bitmap->pitch *= 3;
+ bitmap->rows /= 3;
- ft_memcpy( write, read, pitch );
- write += pitch;
+ bitmap->buffer += pitch;
- ft_memcpy( write, read, pitch );
- write += pitch;
- read += pitch;
- }
- }
+ error = render->raster_render( render->raster, &params );
+ if ( error )
+ goto Exit;
-#endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+ FT_Outline_Translate( outline, 0, 21 );
+ y_shift += 21;
+ bitmap->buffer += pitch;
+
+ error = render->raster_render( render->raster, &params );
+ if ( error )
+ goto Exit;
- /* everything is fine; don't deallocate buffer */
- have_buffer = FALSE;
+ FT_Outline_Translate( outline, 0, -42 );
+ y_shift -= 42;
+ bitmap->buffer -= 2 * pitch;
+
+ error = render->raster_render( render->raster, &params );
+ if ( error )
+ goto Exit;
+
+ bitmap->pitch /= 3;
+ bitmap->rows *= 3;
+ }
+ else /* grayscale */
+ error = render->raster_render( render->raster, &params );
- error = FT_Err_Ok;
+#endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
Exit:
- if ( have_outline_shifted )
- FT_Outline_Translate( outline, -x_shift, -y_shift );
- if ( have_buffer )
+ if ( !error )
+ {
+ /* everything is fine; the glyph is now officially a bitmap */
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
+ }
+ else if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
{
FT_FREE( bitmap->buffer );
slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
}
+ if ( x_shift || y_shift )
+ FT_Outline_Translate( outline, -x_shift, -y_shift );
+
return error;
}
@@ -399,14 +363,8 @@
FT_Render_Mode mode,
const FT_Vector* origin )
{
- FT_Error error;
-
- error = ft_smooth_render_generic( render, slot, mode, origin,
- FT_RENDER_MODE_LCD );
- if ( !error )
- slot->bitmap.pixel_mode = FT_PIXEL_MODE_LCD;
-
- return error;
+ return ft_smooth_render_generic( render, slot, mode, origin,
+ FT_RENDER_MODE_LCD );
}
@@ -417,14 +375,8 @@
FT_Render_Mode mode,
const FT_Vector* origin )
{
- FT_Error error;
-
- error = ft_smooth_render_generic( render, slot, mode, origin,
- FT_RENDER_MODE_LCD_V );
- if ( !error )
- slot->bitmap.pixel_mode = FT_PIXEL_MODE_LCD_V;
-
- return error;
+ return ft_smooth_render_generic( render, slot, mode, origin,
+ FT_RENDER_MODE_LCD_V );
}
diff --git a/modules/freetype2/src/smooth/ftsmooth.h b/modules/freetype2/src/smooth/ftsmooth.h
index c7c28c244..c76ffc503 100644
--- a/modules/freetype2/src/smooth/ftsmooth.h
+++ b/modules/freetype2/src/smooth/ftsmooth.h
@@ -4,7 +4,7 @@
/* */
/* Anti-aliasing renderer interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,18 +27,11 @@
FT_BEGIN_HEADER
-#ifndef FT_CONFIG_OPTION_NO_STD_RASTER
- FT_DECLARE_RENDERER( ft_std_renderer_class )
-#endif
-
-#ifndef FT_CONFIG_OPTION_NO_SMOOTH_RASTER
FT_DECLARE_RENDERER( ft_smooth_renderer_class )
FT_DECLARE_RENDERER( ft_smooth_lcd_renderer_class )
- FT_DECLARE_RENDERER( ft_smooth_lcd_v_renderer_class )
-#endif
-
+ FT_DECLARE_RENDERER( ft_smooth_lcdv_renderer_class )
FT_END_HEADER
diff --git a/modules/freetype2/src/smooth/ftspic.c b/modules/freetype2/src/smooth/ftspic.c
index 6c2b2329b..10f04cf4c 100644
--- a/modules/freetype2/src/smooth/ftspic.c
+++ b/modules/freetype2/src/smooth/ftspic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for smooth module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/smooth/ftspic.h b/modules/freetype2/src/smooth/ftspic.h
index fe7615277..80fb64cff 100644
--- a/modules/freetype2/src/smooth/ftspic.h
+++ b/modules/freetype2/src/smooth/ftspic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for smooth module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/smooth/module.mk b/modules/freetype2/src/smooth/module.mk
index f3cb04403..5b8bc3be3 100644
--- a/modules/freetype2/src/smooth/module.mk
+++ b/modules/freetype2/src/smooth/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/smooth/rules.mk b/modules/freetype2/src/smooth/rules.mk
index 5e94f7351..f30824a36 100644
--- a/modules/freetype2/src/smooth/rules.mk
+++ b/modules/freetype2/src/smooth/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/smooth/smooth.c b/modules/freetype2/src/smooth/smooth.c
index 97ca3e599..5249a8931 100644
--- a/modules/freetype2/src/smooth/smooth.c
+++ b/modules/freetype2/src/smooth/smooth.c
@@ -4,7 +4,7 @@
/* */
/* FreeType anti-aliasing rasterer module component (body only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,11 +17,11 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "ftspic.c"
+
#include "ftgrays.c"
#include "ftsmooth.c"
+#include "ftspic.c"
/* END */
diff --git a/modules/freetype2/src/tools/afblue.pl b/modules/freetype2/src/tools/afblue.pl
index 39fe5c584..7c6f1a7df 100644
--- a/modules/freetype2/src/tools/afblue.pl
+++ b/modules/freetype2/src/tools/afblue.pl
@@ -5,7 +5,7 @@
#
# Process a blue zone character data file.
#
-# Copyright 2013-2016 by
+# Copyright 2013-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/src/tools/apinames.c b/modules/freetype2/src/tools/apinames.c
index 73bc99de5..06c326043 100644
--- a/modules/freetype2/src/tools/apinames.c
+++ b/modules/freetype2/src/tools/apinames.c
@@ -22,7 +22,7 @@
#include <ctype.h>
#define PROGRAM_NAME "apinames"
-#define PROGRAM_VERSION "0.2"
+#define PROGRAM_VERSION "0.3"
#define LINEBUFF_SIZE 1024
@@ -32,7 +32,8 @@ typedef enum OutputFormat_
OUTPUT_WINDOWS_DEF, /* output a Windows .DEF file for Visual C++ or Mingw */
OUTPUT_BORLAND_DEF, /* output a Windows .DEF file for Borland C++ */
OUTPUT_WATCOM_LBC, /* output a Watcom Linker Command File */
- OUTPUT_NETWARE_IMP /* output a NetWare ImportFile */
+ OUTPUT_NETWARE_IMP, /* output a NetWare ImportFile */
+ OUTPUT_GNU_VERMAP /* output a version map for GNU or Solaris linker */
} OutputFormat;
@@ -198,6 +199,15 @@ names_dump( FILE* out,
}
break;
+ case OUTPUT_GNU_VERMAP:
+ {
+ fprintf( out, "{\n\tglobal:\n" );
+ for ( nn = 0; nn < num_names; nn++ )
+ fprintf( out, "\t\t%s;\n", the_names[nn].name );
+ fprintf( out, "\tlocal:\n\t\t*;\n};\n" );
+ }
+ break;
+
default: /* LIST */
for ( nn = 0; nn < num_names; nn++ )
fprintf( out, "%s\n", the_names[nn].name );
@@ -323,6 +333,7 @@ usage( void )
" -wB : output .DEF file for Borland C++\n"
" -wW : output Watcom Linker Response File\n"
" -wN : output NetWare Import File\n"
+ " -wL : output version map for GNU or Solaris linker\n"
"\n";
fprintf( stderr,
@@ -410,6 +421,10 @@ int main( int argc, const char* const* argv )
format = OUTPUT_NETWARE_IMP;
break;
+ case 'L':
+ format = OUTPUT_GNU_VERMAP;
+ break;
+
case 0:
break;
diff --git a/modules/freetype2/src/tools/docmaker/content.py b/modules/freetype2/src/tools/docmaker/content.py
index 438345c41..198780aee 100644
--- a/modules/freetype2/src/tools/docmaker/content.py
+++ b/modules/freetype2/src/tools/docmaker/content.py
@@ -3,7 +3,7 @@
#
# Parse comment blocks to build content blocks (library file).
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
@@ -109,7 +109,7 @@ class DocCode:
def dump( self, prefix = "", width = 60 ):
lines = self.dump_lines( 0, width )
for l in lines:
- print prefix + l
+ print( prefix + l )
def dump_lines( self, margin = 0, width = 60 ):
result = []
@@ -139,7 +139,7 @@ class DocPara:
def dump( self, prefix = "", width = 60 ):
lines = self.dump_lines( 0, width )
for l in lines:
- print prefix + l
+ print( prefix + l )
def dump_lines( self, margin = 0, width = 60 ):
cur = "" # current line
@@ -243,13 +243,13 @@ class DocField:
def dump( self, prefix = "" ):
if self.field:
- print prefix + self.field + " ::"
+ print( prefix + self.field + " ::" )
prefix = prefix + "----"
first = 1
for p in self.items:
if not first:
- print ""
+ print( "" )
p.dump( prefix )
first = 0
@@ -330,10 +330,10 @@ class DocMarkup:
return None
def dump( self, margin ):
- print " " * margin + "<" + self.tag + ">"
+ print( " " * margin + "<" + self.tag + ">" )
for f in self.fields:
f.dump( " " )
- print " " * margin + "</" + self.tag + ">"
+ print( " " * margin + "</" + self.tag + ">" )
################################################################
@@ -453,15 +453,32 @@ class ContentProcessor:
markup_lines = []
first = 1
+ margin = -1
+ in_code = 0
+
for line in content:
- found = None
- for t in re_markup_tags:
- m = t.match( line )
+ if in_code:
+ m = re_code_end.match( line )
+ if m and len( m.group( 1 ) ) <= margin:
+ in_code = 0
+ margin = -1
+ else:
+ m = re_code_start.match( line )
if m:
- found = string.lower( m.group( 1 ) )
- prefix = len( m.group( 0 ) )
- line = " " * prefix + line[prefix:] # remove markup from line
- break
+ in_code = 1
+ margin = len( m.group( 1 ) )
+
+ found = None
+
+ if not in_code:
+ for t in re_markup_tags:
+ m = t.match( line )
+ if m:
+ found = string.lower( m.group( 1 ) )
+ prefix = len( m.group( 0 ) )
+ # remove markup from line
+ line = " " * prefix + line[prefix:]
+ break
# is it the start of a new markup section ?
if found:
diff --git a/modules/freetype2/src/tools/docmaker/docbeauty.py b/modules/freetype2/src/tools/docmaker/docbeauty.py
index 3ddf4a94a..0b021fa6c 100644
--- a/modules/freetype2/src/tools/docmaker/docbeauty.py
+++ b/modules/freetype2/src/tools/docmaker/docbeauty.py
@@ -10,9 +10,7 @@ from sources import *
from content import *
from utils import *
-import utils
-
-import sys, os, time, string, getopt
+import sys, os, string, getopt
content_processor = ContentProcessor()
@@ -40,13 +38,13 @@ def beautify_block( block ):
def usage():
- print "\nDocBeauty 0.1 Usage information\n"
- print " docbeauty [options] file1 [file2 ...]\n"
- print "using the following options:\n"
- print " -h : print this page"
- print " -b : backup original files with the 'orig' extension"
- print ""
- print " --backup : same as -b"
+ print( "\nDocBeauty 0.1 Usage information\n" )
+ print( " docbeauty [options] file1 [file2 ...]\n" )
+ print( "using the following options:\n" )
+ print( " -h : print this page" )
+ print( " -b : backup original files with the 'orig' extension" )
+ print( "" )
+ print( " --backup : same as -b" )
def main( argv ):
diff --git a/modules/freetype2/src/tools/docmaker/docmaker.py b/modules/freetype2/src/tools/docmaker/docmaker.py
index aa8899664..eb49afb0a 100644
--- a/modules/freetype2/src/tools/docmaker/docmaker.py
+++ b/modules/freetype2/src/tools/docmaker/docmaker.py
@@ -4,7 +4,7 @@
#
# Convert source code markup to HTML documentation.
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
@@ -31,21 +31,21 @@ from tohtml import *
import utils
-import sys, os, time, string, glob, getopt
+import sys, glob, getopt
def usage():
- print "\nDocMaker Usage information\n"
- print " docmaker [options] file1 [file2 ...]\n"
- print "using the following options:\n"
- print " -h : print this page"
- print " -t : set project title, as in '-t \"My Project\"'"
- print " -o : set output directory, as in '-o mydir'"
- print " -p : set documentation prefix, as in '-p ft2'"
- print ""
- print " --title : same as -t, as in '--title=\"My Project\"'"
- print " --output : same as -o, as in '--output=mydir'"
- print " --prefix : same as -p, as in '--prefix=ft2'"
+ print( "\nDocMaker Usage information\n" )
+ print( " docmaker [options] file1 [file2 ...]\n" )
+ print( "using the following options:\n" )
+ print( " -h : print this page" )
+ print( " -t : set project title, as in '-t \"My Project\"'" )
+ print( " -o : set output directory, as in '-o mydir'" )
+ print( " -p : set documentation prefix, as in '-p ft2'" )
+ print( "" )
+ print( " --title : same as -t, as in '--title=\"My Project\"'" )
+ print( " --output : same as -o, as in '--output=mydir'" )
+ print( " --prefix : same as -p, as in '--prefix=ft2'" )
def main( argv ):
diff --git a/modules/freetype2/src/tools/docmaker/formatter.py b/modules/freetype2/src/tools/docmaker/formatter.py
index c47589048..2708fd40d 100644
--- a/modules/freetype2/src/tools/docmaker/formatter.py
+++ b/modules/freetype2/src/tools/docmaker/formatter.py
@@ -3,7 +3,7 @@
#
# Convert parsed content blocks to a structured document (library file).
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/src/tools/docmaker/sources.py b/modules/freetype2/src/tools/docmaker/sources.py
index 3d30c7277..e3b95e0fa 100644
--- a/modules/freetype2/src/tools/docmaker/sources.py
+++ b/modules/freetype2/src/tools/docmaker/sources.py
@@ -3,7 +3,7 @@
#
# Convert source code comments to multi-line blocks (library file).
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
@@ -29,7 +29,7 @@
#
-import fileinput, re, sys, os, string
+import fileinput, re, string
################################################################
@@ -171,7 +171,7 @@ re_bold = re.compile( r"\*((?:\w|-)(?:\w|'|-)*)\*(.*)" ) # *bold*
#
# This regular expression code to identify an URL has been taken from
#
-# http://mail.python.org/pipermail/tutor/2002-September/017228.html
+# https://mail.python.org/pipermail/tutor/2002-September/017228.html
#
# (with slight modifications).
#
@@ -296,10 +296,10 @@ class SourceBlock:
# debugging only -- not used in normal operations
def dump( self ):
if self.content:
- print "{{{content start---"
+ print( "{{{content start---" )
for l in self.content:
- print l
- print "---content end}}}"
+ print( l )
+ print( "---content end}}}" )
return
fmt = ""
@@ -307,7 +307,7 @@ class SourceBlock:
fmt = repr( self.format.id ) + " "
for line in self.lines:
- print line
+ print( line )
################################################################
diff --git a/modules/freetype2/src/tools/docmaker/tohtml.py b/modules/freetype2/src/tools/docmaker/tohtml.py
index 9b28780e9..9f318a2a4 100644
--- a/modules/freetype2/src/tools/docmaker/tohtml.py
+++ b/modules/freetype2/src/tools/docmaker/tohtml.py
@@ -3,7 +3,7 @@
#
# A sub-class container of the `Formatter' class to produce HTML.
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
@@ -25,7 +25,7 @@ import time
# The following strings define the HTML header used by all generated pages.
html_header_1 = """\
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
+"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -406,7 +406,7 @@ class HtmlFormatter( Formatter ):
return string.join( lines, '\n' )
def print_html_items( self, items ):
- print self.make_html_items( items )
+ print( self.make_html_items( items ) )
def print_html_field( self, field ):
if field.name:
@@ -414,10 +414,10 @@ class HtmlFormatter( Formatter ):
+ field.name
+ "</b></td><td>" )
- print self.make_html_items( field.items )
+ print( self.make_html_items( field.items ) )
if field.name:
- print "</td></tr></table>"
+ print( "</td></tr></table>" )
def html_source_quote( self, line, block_name = None ):
result = ""
@@ -468,14 +468,14 @@ class HtmlFormatter( Formatter ):
return result
def print_html_field_list( self, fields ):
- print '<table class="fields">'
+ print( '<table class="fields">' )
for field in fields:
- print ( '<tr><td class="val" id="' + field.name + '">'
- + field.name
- + '</td><td class="desc">' )
+ print( '<tr><td class="val" id="' + field.name + '">'
+ + field.name
+ + '</td><td class="desc">' )
self.print_html_items( field.items )
- print "</td></tr>"
- print "</table>"
+ print( "</td></tr>" )
+ print( "</table>" )
def print_html_markup( self, markup ):
table_fields = []
@@ -499,7 +499,7 @@ class HtmlFormatter( Formatter ):
# formatting the index
#
def index_enter( self ):
- print self.html_index_header
+ print( self.html_index_header )
self.index_items = {}
def index_name_enter( self, name ):
@@ -512,7 +512,7 @@ class HtmlFormatter( Formatter ):
count = len( self.block_index )
rows = ( count + self.columns - 1 ) // self.columns
- print '<table class="index">'
+ print( '<table class="index">' )
for r in range( rows ):
line = "<tr>"
for c in range( self.columns ):
@@ -531,15 +531,15 @@ class HtmlFormatter( Formatter ):
else:
line = line + '<td></td>'
line = line + "</tr>"
- print line
+ print( line )
- print "</table>"
+ print( "</table>" )
print( index_footer_start
+ self.file_prefix + "toc.html"
+ index_footer_end )
- print self.html_footer
+ print( self.html_footer )
self.index_items = {}
@@ -553,25 +553,25 @@ class HtmlFormatter( Formatter ):
# formatting the table of contents
#
def toc_enter( self ):
- print self.html_toc_header
- print "<h1>Table of Contents</h1>"
+ print( self.html_toc_header )
+ print( "<h1>Table of Contents</h1>" )
def toc_chapter_enter( self, chapter ):
- print chapter_header + string.join( chapter.title ) + chapter_inter
- print '<table class="toc">'
+ print( chapter_header + string.join( chapter.title ) + chapter_inter )
+ print( '<table class="toc">' )
def toc_section_enter( self, section ):
- print ( '<tr><td class="link">'
- + '<a href="' + self.make_section_url( section ) + '">'
- + section.title + '</a></td><td class="desc">' )
- print self.make_html_para( section.abstract )
+ print( '<tr><td class="link">'
+ + '<a href="' + self.make_section_url( section ) + '">'
+ + section.title + '</a></td><td class="desc">' )
+ print( self.make_html_para( section.abstract ) )
def toc_section_exit( self, section ):
- print "</td></tr>"
+ print( "</td></tr>" )
def toc_chapter_exit( self, chapter ):
- print "</table>"
- print chapter_footer
+ print( "</table>" )
+ print( chapter_footer )
def toc_index( self, index_filename ):
print( chapter_header
@@ -583,7 +583,7 @@ class HtmlFormatter( Formatter ):
+ self.file_prefix + "index.html"
+ toc_footer_end )
- print self.html_footer
+ print( self.html_footer )
def toc_dump( self, toc_filename = None, index_filename = None ):
if toc_filename == None:
@@ -598,11 +598,11 @@ class HtmlFormatter( Formatter ):
# formatting sections
#
def section_enter( self, section ):
- print self.html_header
+ print( self.html_header )
- print ( section_title_header1 + section.name + section_title_header2
- + section.title
- + section_title_footer )
+ print( section_title_header1 + section.name + section_title_header2
+ + section.title
+ + section_title_footer )
maxwidth = 0
for b in section.blocks.values():
@@ -612,8 +612,8 @@ class HtmlFormatter( Formatter ):
width = 70 # XXX magic number
if maxwidth > 0:
# print section synopsis
- print section_synopsis_header
- print '<table class="synopsis">'
+ print( section_synopsis_header )
+ print( '<table class="synopsis">' )
columns = width // maxwidth
if columns < 1:
@@ -650,17 +650,17 @@ class HtmlFormatter( Formatter ):
line = line + '</td>'
line = line + "</tr>"
- print line
+ print( line )
- print "</table>"
- print section_synopsis_footer
+ print( "</table>" )
+ print( section_synopsis_footer )
- print description_header
- print self.make_html_items( section.description )
- print description_footer
+ print( description_header )
+ print( self.make_html_items( section.description ) )
+ print( description_footer )
def block_enter( self, block ):
- print block_header
+ print( block_header )
# place html anchor if needed
if block.name:
@@ -686,28 +686,28 @@ class HtmlFormatter( Formatter ):
# + " '" + block.source.filename + "'.\n" )
if header:
- print ( header_location_header
- + 'Defined in ' + header + '.'
- + header_location_footer )
+ print( header_location_header
+ + 'Defined in ' + header + '.'
+ + header_location_footer )
- print source_header
+ print( source_header )
for l in block.code:
- print self.html_source_quote( l, block.name )
- print source_footer
+ print( self.html_source_quote( l, block.name ) )
+ print( source_footer )
def markup_enter( self, markup, block ):
if markup.tag == "description":
- print description_header
+ print( description_header )
else:
- print marker_header + markup.tag + marker_inter
+ print( marker_header + markup.tag + marker_inter )
self.print_html_markup( markup )
def markup_exit( self, markup, block ):
if markup.tag == "description":
- print description_footer
+ print( description_footer )
else:
- print marker_footer
+ print( marker_footer )
def block_exit( self, block ):
print( block_footer_start + self.file_prefix + "index.html"
@@ -715,7 +715,7 @@ class HtmlFormatter( Formatter ):
+ block_footer_end )
def section_exit( self, section ):
- print html_footer
+ print( html_footer )
def section_dump_all( self ):
for section in self.sections:
diff --git a/modules/freetype2/src/tools/docmaker/utils.py b/modules/freetype2/src/tools/docmaker/utils.py
index cbba9b874..f40f1674a 100644
--- a/modules/freetype2/src/tools/docmaker/utils.py
+++ b/modules/freetype2/src/tools/docmaker/utils.py
@@ -3,7 +3,7 @@
#
# Auxiliary functions for the `docmaker' tool (library file).
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/src/tools/ftfuzzer/README b/modules/freetype2/src/tools/ftfuzzer/README
index c16b7e94e..09d8e9f32 100644
--- a/modules/freetype2/src/tools/ftfuzzer/README
+++ b/modules/freetype2/src/tools/ftfuzzer/README
@@ -6,7 +6,7 @@ ftfuzzer.cc
-----------
This file contains a target function for FreeType fuzzing. It can be
-used with libFuzzer (http://llvm.org/docs/LibFuzzer.html) or
+used with libFuzzer (https://llvm.org/docs/LibFuzzer.html) or
potentially any other similar fuzzer.
Usage:
@@ -20,7 +20,7 @@ Usage:
-fsanitize=address,signed-integer-overflow,shift
You also need the header files from the `libarchive' library
- (http://www.libarchive.org/) for handling tar files (see file
+ (https://www.libarchive.org/) for handling tar files (see file
`ftmutator.cc' below for more).
2. Link with `libFuzzer' (it contains `main') and `libarchive'.
@@ -29,10 +29,14 @@ Usage:
The exact flags and commands may vary.
+ https://github.com/google/oss-fuzz/tree/master/projects/freetype2
There is a continuous fuzzing bot that runs ftfuzzer.
- https://github.com/google/libfuzzer-bot/tree/master/freetype
+ https://oss-fuzz.com
+
+(You need an account to be able to see coverage reports and the like
+on oss-fuzz.com.)
Check the bot configuration for the most current settings.
@@ -64,7 +68,7 @@ a convenience `main' function. Link it with `ftfuzzer.cc',
----------------------------------------------------------------------
-Copyright 2015-2016 by
+Copyright 2015-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/src/tools/ftfuzzer/ftfuzzer.cc b/modules/freetype2/src/tools/ftfuzzer/ftfuzzer.cc
index 31834a5f9..acf2bc982 100644
--- a/modules/freetype2/src/tools/ftfuzzer/ftfuzzer.cc
+++ b/modules/freetype2/src/tools/ftfuzzer/ftfuzzer.cc
@@ -2,7 +2,7 @@
//
// A fuzzing function to test FreeType with libFuzzer.
//
-// Copyright 2015-2016 by
+// Copyright 2015-2018 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used,
@@ -43,8 +43,7 @@
#include FT_OUTLINE_H
#include FT_BBOX_H
#include FT_MODULE_H
-#include FT_CFF_DRIVER_H
-#include FT_TRUETYPE_DRIVER_H
+#include FT_DRIVER_H
#include FT_MULTIPLE_MASTERS_H
@@ -61,7 +60,7 @@
return;
// try to activate Adobe's CFF engine; it might not be the default
- unsigned int cff_hinting_engine = FT_CFF_HINTING_ADOBE;
+ unsigned int cff_hinting_engine = FT_HINTING_ADOBE;
FT_Property_Set( library,
"cff",
"hinting-engine", &cff_hinting_engine );
@@ -76,7 +75,7 @@
FT_Global global_ft;
- // We want to select n values at random (without repitition),
+ // We want to select n values at random (without repetition),
// with 0 < n <= N. The algorithm is taken from TAoCP, Vol. 2
// (Algorithm S, selection sampling technique)
struct Random
@@ -270,11 +269,20 @@
long num_faces = face->num_faces;
FT_Done_Face( face );
- // loop over all faces
- for ( long face_index = 0;
- face_index < num_faces;
- face_index++ )
+ // loop over up to 20 arbitrarily selected faces
+ // from index range [0;num-faces-1]
+ long max_face_cnt = num_faces < 20
+ ? num_faces
+ : 20;
+
+ Random faces_pool( (int)max_face_cnt, (int)num_faces );
+
+ for ( long face_cnt = 0;
+ face_cnt < max_face_cnt;
+ face_cnt++ )
{
+ long face_index = faces_pool.get() - 1;
+
// get number of instances
if ( FT_New_Memory_Face( library,
files[0].data(),
@@ -285,17 +293,41 @@
long num_instances = face->style_flags >> 16;
FT_Done_Face( face );
- // load face with and without instances
- for ( long instance_index = 0;
- instance_index < num_instances + 1;
- instance_index++ )
+ // loop over the face without instance (index 0)
+ // and up to 20 arbitrarily selected instances
+ // from index range [1;num_instances]
+ long max_instance_cnt = num_instances < 20
+ ? num_instances
+ : 20;
+
+ Random instances_pool( (int)max_instance_cnt, (int)num_instances );
+
+ for ( long instance_cnt = 0;
+ instance_cnt <= max_instance_cnt;
+ instance_cnt++ )
{
- if ( FT_New_Memory_Face( library,
- files[0].data(),
- (FT_Long)files[0].size(),
- ( instance_index << 16 ) + face_index,
- &face ) )
- continue;
+ long instance_index = 0;
+
+ if ( !instance_cnt )
+ {
+ if ( FT_New_Memory_Face( library,
+ files[0].data(),
+ (FT_Long)files[0].size(),
+ face_index,
+ &face ) )
+ continue;
+ }
+ else
+ {
+ instance_index = instances_pool.get();
+
+ if ( FT_New_Memory_Face( library,
+ files[0].data(),
+ (FT_Long)files[0].size(),
+ ( instance_index << 16 ) + face_index,
+ &face ) )
+ continue;
+ }
// if we have more than a single input file coming from an archive,
// attach them (starting with the second file) using the order given
@@ -314,19 +346,24 @@
FT_Attach_Stream( face, &open_args );
}
- // loop over an arbitrary size for outlines (index 0)
- // and up to ten arbitrarily selected bitmap stroke sizes (index 1-10)
- int max_idx = face->num_fixed_sizes < 10
- ? face->num_fixed_sizes
- : 10;
+ // loop over an arbitrary size for outlines
+ // and up to ten arbitrarily selected bitmap strike sizes
+ // from the range [0;num_fixed_sizes - 1]
+ int max_size_cnt = face->num_fixed_sizes < 10
+ ? face->num_fixed_sizes
+ : 10;
- Random pool( max_idx, face->num_fixed_sizes );
+ Random sizes_pool( max_size_cnt, face->num_fixed_sizes );
- for ( int idx = 0; idx <= max_idx; idx++ )
+ for ( int size_cnt = 0;
+ size_cnt <= max_size_cnt;
+ size_cnt++ )
{
FT_Int32 flags = load_flags;
- if ( !idx )
+ int size_index = 0;
+
+ if ( !size_cnt )
{
// set up 20pt at 72dpi as an arbitrary size
if ( FT_Set_Char_Size( face, 20 * 64, 20 * 64, 72, 72 ) )
@@ -335,17 +372,20 @@
}
else
{
- // bitmap strokes are not active for glyph variations
+ // bitmap strikes are not active for font variations
if ( instance_index )
continue;
- if ( FT_Select_Size( face, pool.get() - 1 ) )
+ size_index = sizes_pool.get() - 1;
+
+ if ( FT_Select_Size( face, size_index ) )
continue;
flags |= FT_LOAD_COLOR;
}
// test MM interface only for a face without a selected instance
- if ( instance_index == 0 )
+ // and without a selected bitmap strike
+ if ( !instance_index && !size_cnt )
setIntermediateAxis( face );
// loop over all glyphs
diff --git a/modules/freetype2/src/tools/ftfuzzer/ftmutator.cc b/modules/freetype2/src/tools/ftfuzzer/ftmutator.cc
index 4818450aa..ae4b14040 100644
--- a/modules/freetype2/src/tools/ftfuzzer/ftmutator.cc
+++ b/modules/freetype2/src/tools/ftfuzzer/ftmutator.cc
@@ -2,7 +2,7 @@
//
// A custom fuzzer mutator to test for FreeType with libFuzzer.
//
-// Copyright 2015-2016 by
+// Copyright 2015-2018 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/src/tools/ftfuzzer/rasterfuzzer.cc b/modules/freetype2/src/tools/ftfuzzer/rasterfuzzer.cc
index 05187b0be..c69b95ea0 100644
--- a/modules/freetype2/src/tools/ftfuzzer/rasterfuzzer.cc
+++ b/modules/freetype2/src/tools/ftfuzzer/rasterfuzzer.cc
@@ -2,7 +2,7 @@
//
// A fuzzing function to test FreeType's rasterizers with libFuzzer.
//
-// Copyright 2016 by
+// Copyright 2016-2018 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/src/tools/ftfuzzer/runinput.cc b/modules/freetype2/src/tools/ftfuzzer/runinput.cc
index d5f9f1587..2b02f5758 100644
--- a/modules/freetype2/src/tools/ftfuzzer/runinput.cc
+++ b/modules/freetype2/src/tools/ftfuzzer/runinput.cc
@@ -2,7 +2,7 @@
//
// A `main' function for fuzzers like `ftfuzzer.cc'.
//
-// Copyright 2015-2016 by
+// Copyright 2015-2018 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used,
diff --git a/modules/freetype2/src/tools/glnames.py b/modules/freetype2/src/tools/glnames.py
index 3569f06ee..b048d2936 100644
--- a/modules/freetype2/src/tools/glnames.py
+++ b/modules/freetype2/src/tools/glnames.py
@@ -6,7 +6,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -151,7 +151,7 @@ mac_standard_names = \
# The list of standard `SID' glyph names. For the official list,
# see Annex A of document at
#
-# http://partners.adobe.com/public/developer/en/font/5176.CFF.pdf .
+# https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5176.CFF.pdf .
#
sid_standard_names = \
[
@@ -4920,7 +4920,7 @@ class StringTable:
def dump( self, file ):
write = file.write
- write( "#ifndef DEFINE_PS_TABLES\n" )
+ write( "#ifndef DEFINE_PS_TABLES_DATA\n" )
write( "#ifdef __cplusplus\n" )
write( ' extern "C"\n' )
write( "#else\n" )
@@ -4929,7 +4929,7 @@ class StringTable:
write( "#endif\n" )
write( " const char " + self.master_table +
"[" + repr( self.total ) + "]\n" )
- write( "#ifdef DEFINE_PS_TABLES\n" )
+ write( "#ifdef DEFINE_PS_TABLES_DATA\n" )
write( " =\n" )
write( " {\n" )
@@ -4941,7 +4941,7 @@ class StringTable:
write( line )
write( " }\n" )
- write( "#endif /* DEFINE_PS_TABLES */\n" )
+ write( "#endif /* DEFINE_PS_TABLES_DATA */\n" )
write( " ;\n\n\n" )
def dump_sublist( self, file, table_name, macro_name, sublist ):
@@ -4950,7 +4950,7 @@ class StringTable:
write( " /* Values are offsets into the `" +
self.master_table + "' table */\n\n" )
- write( "#ifndef DEFINE_PS_TABLES\n" )
+ write( "#ifndef DEFINE_PS_TABLES_DATA\n" )
write( "#ifdef __cplusplus\n" )
write( ' extern "C"\n' )
write( "#else\n" )
@@ -4959,7 +4959,7 @@ class StringTable:
write( "#endif\n" )
write( " const short " + table_name +
"[" + macro_name + "]\n" )
- write( "#ifdef DEFINE_PS_TABLES\n" )
+ write( "#ifdef DEFINE_PS_TABLES_DATA\n" )
write( " =\n" )
write( " {\n" )
@@ -4979,7 +4979,7 @@ class StringTable:
write( line )
write( "\n" )
write( " }\n" )
- write( "#endif /* DEFINE_PS_TABLES */\n" )
+ write( "#endif /* DEFINE_PS_TABLES_DATA */\n" )
write( " ;\n\n\n" )
@@ -5213,7 +5213,7 @@ def dump_encoding( file, encoding_name, encoding_list ):
write = file.write
write( " /* the following are indices into the SID name table */\n" )
- write( "#ifndef DEFINE_PS_TABLES\n" )
+ write( "#ifndef DEFINE_PS_TABLES_DATA\n" )
write( "#ifdef __cplusplus\n" )
write( ' extern "C"\n' )
write( "#else\n" )
@@ -5222,7 +5222,7 @@ def dump_encoding( file, encoding_name, encoding_list ):
write( "#endif\n" )
write( " const unsigned short " + encoding_name +
"[" + repr( len( encoding_list ) ) + "]\n" )
- write( "#ifdef DEFINE_PS_TABLES\n" )
+ write( "#ifdef DEFINE_PS_TABLES_DATA\n" )
write( " =\n" )
write( " {\n" )
@@ -5241,14 +5241,14 @@ def dump_encoding( file, encoding_name, encoding_list ):
write( line )
write( "\n" )
write( " }\n" )
- write( "#endif /* DEFINE_PS_TABLES */\n" )
+ write( "#endif /* DEFINE_PS_TABLES_DATA */\n" )
write( " ;\n\n\n" )
def dump_array( the_array, write, array_name ):
"""dumps a given encoding"""
- write( "#ifndef DEFINE_PS_TABLES\n" )
+ write( "#ifndef DEFINE_PS_TABLES_DATA\n" )
write( "#ifdef __cplusplus\n" )
write( ' extern "C"\n' )
write( "#else\n" )
@@ -5257,7 +5257,7 @@ def dump_array( the_array, write, array_name ):
write( "#endif\n" )
write( " const unsigned char " + array_name +
"[" + repr( len( the_array ) ) + "L]\n" )
- write( "#ifdef DEFINE_PS_TABLES\n" )
+ write( "#ifdef DEFINE_PS_TABLES_DATA\n" )
write( " =\n" )
write( " {\n" )
@@ -5282,7 +5282,7 @@ def dump_array( the_array, write, array_name ):
write( line )
write( "\n" )
write( " }\n" )
- write( "#endif /* DEFINE_PS_TABLES */\n" )
+ write( "#endif /* DEFINE_PS_TABLES_DATA */\n" )
write( " ;\n\n\n" )
@@ -5293,7 +5293,7 @@ def main():
print __doc__ % sys.argv[0]
sys.exit( 1 )
- file = open( sys.argv[1], "w\n" )
+ file = open( sys.argv[1], "wb" )
write = file.write
count_sid = len( sid_standard_names )
@@ -5318,7 +5318,7 @@ def main():
write( "/* */\n" )
write( "/* PostScript glyph names. */\n" )
write( "/* */\n" )
- write( "/* Copyright 2005-2016 by */\n" )
+ write( "/* Copyright 2005-2018 by */\n" )
write( "/* David Turner, Robert Wilhelm, and Werner Lemberg. */\n" )
write( "/* */\n" )
write( "/* This file is part of the FreeType project, and may only be used, */\n" )
@@ -5378,6 +5378,7 @@ def main():
# write the lookup routine now
#
write( """\
+#ifdef DEFINE_PS_TABLES
/*
* This function searches the compressed table efficiently.
*/
@@ -5472,6 +5473,7 @@ def main():
NotFound:
return 0;
}
+#endif /* DEFINE_PS_TABLES */
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
diff --git a/modules/freetype2/src/tools/update-copyright-year b/modules/freetype2/src/tools/update-copyright-year
index f4a323b7c..934f11cf0 100755
--- a/modules/freetype2/src/tools/update-copyright-year
+++ b/modules/freetype2/src/tools/update-copyright-year
@@ -2,7 +2,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -i "$0" ${1+"$@"}'
& eval 'exec perl -wS -i "$0" $argv:q'
if 0;
-# Copyright 2015-2016 by
+# Copyright 2015-2018 by
# Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/truetype/Jamfile b/modules/freetype2/src/truetype/Jamfile
index ecbb2dbdd..e321fba14 100644
--- a/modules/freetype2/src/truetype/Jamfile
+++ b/modules/freetype2/src/truetype/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/truetype Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/truetype/module.mk b/modules/freetype2/src/truetype/module.mk
index 80c9832b2..16bc9c8b2 100644
--- a/modules/freetype2/src/truetype/module.mk
+++ b/modules/freetype2/src/truetype/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/truetype/rules.mk b/modules/freetype2/src/truetype/rules.mk
index 3bf7cf770..e16113f12 100644
--- a/modules/freetype2/src/truetype/rules.mk
+++ b/modules/freetype2/src/truetype/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/truetype/truetype.c b/modules/freetype2/src/truetype/truetype.c
index 23e2ea00a..484370975 100644
--- a/modules/freetype2/src/truetype/truetype.c
+++ b/modules/freetype2/src/truetype/truetype.c
@@ -4,7 +4,7 @@
/* */
/* FreeType TrueType driver component (body only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,22 +17,16 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "ttpic.c"
+
#include "ttdriver.c" /* driver interface */
-#include "ttpload.c" /* tables loader */
#include "ttgload.c" /* glyph loader */
-#include "ttobjs.c" /* object manager */
-
-#ifdef TT_USE_BYTECODE_INTERPRETER
+#include "ttgxvar.c" /* gx distortable font */
#include "ttinterp.c"
+#include "ttobjs.c" /* object manager */
+#include "ttpic.c"
+#include "ttpload.c" /* tables loader */
#include "ttsubpix.c"
-#endif
-
-#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include "ttgxvar.c" /* gx distortable font */
-#endif
/* END */
diff --git a/modules/freetype2/src/truetype/ttdriver.c b/modules/freetype2/src/truetype/ttdriver.c
index af8b205e3..820cafbb8 100644
--- a/modules/freetype2/src/truetype/ttdriver.c
+++ b/modules/freetype2/src/truetype/ttdriver.c
@@ -4,7 +4,7 @@
/* */
/* TrueType font driver implementation (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,7 +31,7 @@
#include FT_SERVICE_TRUETYPE_ENGINE_H
#include FT_SERVICE_TRUETYPE_GLYF_H
#include FT_SERVICE_PROPERTIES_H
-#include FT_TRUETYPE_DRIVER_H
+#include FT_DRIVER_H
#include "ttdriver.h"
#include "ttgload.h"
@@ -233,8 +233,8 @@
{
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
/* no fast retrieval for blended MM fonts without VVAR table */
- if ( !face->is_default_instance &&
- !( face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
+ if ( ( FT_IS_NAMED_INSTANCE( ttface ) || FT_IS_VARIATION( ttface ) ) &&
+ !( face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
return FT_THROW( Unimplemented_Feature );
#endif
@@ -253,8 +253,8 @@
{
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
/* no fast retrieval for blended MM fonts without HVAR table */
- if ( !face->is_default_instance &&
- !( face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
+ if ( ( FT_IS_NAMED_INSTANCE( ttface ) || FT_IS_VARIATION( ttface ) ) &&
+ !( face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
return FT_THROW( Unimplemented_Feature );
#endif
@@ -304,15 +304,17 @@
/* use the scaled metrics, even when tt_size_reset fails */
FT_Select_Metrics( size->face, strike_index );
- tt_size_reset( ttsize ); /* ignore return value */
+ tt_size_reset( ttsize, 0 ); /* ignore return value */
}
else
{
- SFNT_Service sfnt = (SFNT_Service)ttface->sfnt;
- FT_Size_Metrics* metrics = &size->metrics;
+ SFNT_Service sfnt = (SFNT_Service)ttface->sfnt;
+ FT_Size_Metrics* size_metrics = &size->metrics;
- error = sfnt->load_strike_metrics( ttface, strike_index, metrics );
+ error = sfnt->load_strike_metrics( ttface,
+ strike_index,
+ size_metrics );
if ( error )
ttsize->strike_index = 0xFFFFFFFFUL;
}
@@ -354,15 +356,16 @@
if ( FT_IS_SCALABLE( size->face ) )
{
- error = tt_size_reset( ttsize );
- ttsize->root.metrics = ttsize->metrics;
+ error = tt_size_reset( ttsize, 0 );
#ifdef TT_USE_BYTECODE_INTERPRETER
/* for the `MPS' bytecode instruction we need the point size */
+ if ( !error )
{
- FT_UInt resolution = ttsize->metrics.x_ppem > ttsize->metrics.y_ppem
- ? req->horiResolution
- : req->vertResolution;
+ FT_UInt resolution =
+ ttsize->metrics->x_ppem > ttsize->metrics->y_ppem
+ ? req->horiResolution
+ : req->vertResolution;
/* if we don't have a resolution value, assume 72dpi */
@@ -456,6 +459,11 @@
load_flags |= FT_LOAD_NO_HINTING;
}
+ /* use hinted metrics only if we load a glyph with hinting */
+ size->metrics = ( load_flags & FT_LOAD_NO_HINTING )
+ ? &ttsize->metrics
+ : &size->hinted_metrics;
+
/* now load the glyph outline if necessary */
error = TT_Load_Glyph( size, slot, glyph_index, load_flags );
@@ -490,6 +498,7 @@
(FT_Get_MM_Var_Func) TT_Get_MM_Var, /* get_mm_var */
(FT_Set_Var_Design_Func)TT_Set_Var_Design, /* set_var_design */
(FT_Get_Var_Design_Func)TT_Get_Var_Design, /* get_var_design */
+ (FT_Set_Instance_Func) TT_Set_Named_Instance, /* set_instance */
(FT_Get_Var_Blend_Func) tt_get_var_blend, /* get_var_blend */
(FT_Done_Blend_Func) tt_done_blend /* done_blend */
@@ -502,12 +511,12 @@
(FT_LSB_Adjust_Func) NULL, /* lsb_adjust */
(FT_RSB_Adjust_Func) NULL, /* rsb_adjust */
- (FT_VAdvance_Adjust_Func)NULL, /* vadvance_adjust */
+ (FT_VAdvance_Adjust_Func)tt_vadvance_adjust, /* vadvance_adjust */
(FT_TSB_Adjust_Func) NULL, /* tsb_adjust */
(FT_BSB_Adjust_Func) NULL, /* bsb_adjust */
(FT_VOrg_Adjust_Func) NULL, /* vorg_adjust */
- (FT_Metrics_Adjust_Func) NULL /* metrics_adjust */
+ (FT_Metrics_Adjust_Func) tt_apply_mvar /* metrics_adjust */
)
#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
diff --git a/modules/freetype2/src/truetype/ttdriver.h b/modules/freetype2/src/truetype/ttdriver.h
index 74392bbd0..707aa68ed 100644
--- a/modules/freetype2/src/truetype/ttdriver.h
+++ b/modules/freetype2/src/truetype/ttdriver.h
@@ -4,7 +4,7 @@
/* */
/* High-level TrueType driver interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/truetype/tterrors.h b/modules/freetype2/src/truetype/tterrors.h
index 895989f5f..88bca3a04 100644
--- a/modules/freetype2/src/truetype/tterrors.h
+++ b/modules/freetype2/src/truetype/tterrors.h
@@ -4,7 +4,7 @@
/* */
/* TrueType error codes (specification only). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/truetype/ttgload.c b/modules/freetype2/src/truetype/ttgload.c
index a0cdfc890..39d9c3f73 100644
--- a/modules/freetype2/src/truetype/ttgload.c
+++ b/modules/freetype2/src/truetype/ttgload.c
@@ -4,7 +4,7 @@
/* */
/* TrueType Glyph Loader (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,12 +18,13 @@
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
+#include FT_CONFIG_CONFIG_H
#include FT_INTERNAL_CALC_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
#include FT_TRUETYPE_TAGS_H
#include FT_OUTLINE_H
-#include FT_TRUETYPE_DRIVER_H
+#include FT_DRIVER_H
#include FT_LIST_H
#include "ttgload.h"
@@ -86,7 +87,7 @@
/*************************************************************************/
/* */
/* Return the vertical metrics in font units for a given glyph. */
- /* See macro `TT_LOADER_SET_PP' below for explanations. */
+ /* See function `tt_loader_set_pp' below for explanations. */
/* */
FT_LOCAL_DEF( void )
TT_Get_VMetrics( TT_Face face,
@@ -162,7 +163,7 @@
/* This may not be the right place for this, but it works... */
/* Note that we have to unconditionally load the tweaks since */
/* it is possible that glyphs individually switch ClearType's */
- /* backwards compatibility mode on and off. */
+ /* backward compatibility mode on and off. */
sph_set_tweaks( loader, glyph_index );
}
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
@@ -194,39 +195,39 @@
if ( face->root.internal->incremental_interface &&
face->root.internal->incremental_interface->funcs->get_glyph_metrics )
{
- FT_Incremental_MetricsRec metrics;
+ FT_Incremental_MetricsRec incr_metrics;
FT_Error error;
- metrics.bearing_x = loader->left_bearing;
- metrics.bearing_y = 0;
- metrics.advance = loader->advance;
- metrics.advance_v = 0;
+ incr_metrics.bearing_x = loader->left_bearing;
+ incr_metrics.bearing_y = 0;
+ incr_metrics.advance = loader->advance;
+ incr_metrics.advance_v = 0;
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
face->root.internal->incremental_interface->object,
- glyph_index, FALSE, &metrics );
+ glyph_index, FALSE, &incr_metrics );
if ( error )
goto Exit;
- left_bearing = (FT_Short)metrics.bearing_x;
- advance_width = (FT_UShort)metrics.advance;
+ left_bearing = (FT_Short)incr_metrics.bearing_x;
+ advance_width = (FT_UShort)incr_metrics.advance;
#if 0
/* GWW: Do I do the same for vertical metrics? */
- metrics.bearing_x = 0;
- metrics.bearing_y = loader->top_bearing;
- metrics.advance = loader->vadvance;
+ incr_metrics.bearing_x = 0;
+ incr_metrics.bearing_y = loader->top_bearing;
+ incr_metrics.advance = loader->vadvance;
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
face->root.internal->incremental_interface->object,
- glyph_index, TRUE, &metrics );
+ glyph_index, TRUE, &incr_metrics );
if ( error )
goto Exit;
- top_bearing = (FT_Short)metrics.bearing_y;
- advance_height = (FT_UShort)metrics.advance;
+ top_bearing = (FT_Short)incr_metrics.bearing_y;
+ advance_height = (FT_UShort)incr_metrics.advance;
#endif /* 0 */
@@ -332,7 +333,6 @@
FT_Outline* outline;
FT_UShort n_ins;
FT_Int n_points;
- FT_ULong tmp;
FT_Byte *flag, *flag_limit;
FT_Byte c, count;
@@ -398,18 +398,21 @@
FT_TRACE5(( " Instructions size: %u\n", n_ins ));
- /* check it */
- if ( ( limit - p ) < n_ins )
- {
- FT_TRACE0(( "TT_Load_Simple_Glyph: instruction count mismatch\n" ));
- error = FT_THROW( Too_Many_Hints );
- goto Fail;
- }
-
#ifdef TT_USE_BYTECODE_INTERPRETER
if ( IS_HINTED( load->load_flags ) )
{
+ FT_ULong tmp;
+
+
+ /* check instructions size */
+ if ( ( limit - p ) < n_ins )
+ {
+ FT_TRACE1(( "TT_Load_Simple_Glyph: instruction count mismatch\n" ));
+ error = FT_THROW( Too_Many_Hints );
+ goto Fail;
+ }
+
/* we don't trust `maxSizeOfInstructions' in the `maxp' table */
/* and thus update the bytecode array size by ourselves */
@@ -661,7 +664,52 @@
} while ( subglyph->flags & MORE_COMPONENTS );
gloader->current.num_subglyphs = num_subglyphs;
- FT_TRACE5(( " %d components\n", num_subglyphs ));
+ FT_TRACE5(( " %d component%s\n",
+ num_subglyphs,
+ num_subglyphs > 1 ? "s" : "" ));
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ FT_UInt i;
+
+
+ subglyph = gloader->current.subglyphs;
+
+ for ( i = 0; i < num_subglyphs; i++ )
+ {
+ if ( num_subglyphs > 1 )
+ FT_TRACE7(( " subglyph %d:\n", i ));
+
+ FT_TRACE7(( " glyph index: %d\n", subglyph->index ));
+
+ if ( subglyph->flags & ARGS_ARE_XY_VALUES )
+ FT_TRACE7(( " offset: x=%d, y=%d\n",
+ subglyph->arg1,
+ subglyph->arg2 ));
+ else
+ FT_TRACE7(( " matching points: base=%d, component=%d\n",
+ subglyph->arg1,
+ subglyph->arg2 ));
+
+ if ( subglyph->flags & WE_HAVE_A_SCALE )
+ FT_TRACE7(( " scaling: %f\n",
+ subglyph->transform.xx / 65536.0 ));
+ else if ( subglyph->flags & WE_HAVE_AN_XY_SCALE )
+ FT_TRACE7(( " scaling: x=%f, y=%f\n",
+ subglyph->transform.xx / 65536.0,
+ subglyph->transform.yy / 65536.0 ));
+ else if ( subglyph->flags & WE_HAVE_A_2X2 )
+ FT_TRACE7(( " scaling: xx=%f, yx=%f\n"
+ " xy=%f, yy=%f\n",
+ subglyph->transform.xx / 65536.0,
+ subglyph->transform.yx / 65536.0,
+ subglyph->transform.xy / 65536.0,
+ subglyph->transform.yy / 65536.0 ));
+
+ subglyph++;
+ }
+ }
+#endif /* FT_DEBUG_LEVEL_TRACE */
#ifdef TT_USE_BYTECODE_INTERPRETER
@@ -753,7 +801,7 @@
{
FT_TRACE1(( "TT_Hint_Glyph: too long instructions" ));
FT_TRACE1(( " (0x%lx byte) is truncated\n",
- loader->glyph->control_len ));
+ loader->glyph->control_len ));
}
n_ins = loader->glyph->control_len;
@@ -775,8 +823,8 @@
}
else
{
- loader->exec->metrics.x_scale = loader->size->metrics.x_scale;
- loader->exec->metrics.y_scale = loader->size->metrics.y_scale;
+ loader->exec->metrics.x_scale = loader->size->metrics->x_scale;
+ loader->exec->metrics.y_scale = loader->size->metrics->y_scale;
}
#endif
@@ -818,11 +866,11 @@
#endif
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- /* Save possibly modified glyph phantom points unless in v40 backwards */
+ /* Save possibly modified glyph phantom points unless in v40 backward */
/* compatibility mode, where no movement on the x axis means no reason */
/* to change bearings or advance widths. */
if ( !( driver->interpreter_version == TT_INTERPRETER_VERSION_40 &&
- !loader->exec->backwards_compatibility ) )
+ loader->exec->backward_compatibility ) )
{
#endif
loader->pp1 = zone->cur[zone->n_points - 4];
@@ -886,7 +934,8 @@
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- if ( loader->face->doblend && !loader->face->is_default_instance )
+ if ( FT_IS_NAMED_INSTANCE( FT_FACE( loader->face ) ) ||
+ FT_IS_VARIATION( FT_FACE( loader->face ) ) )
{
/* Deltas apply to the unscaled data. */
error = TT_Vary_Apply_Glyph_Deltas( loader->face,
@@ -923,7 +972,7 @@
TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face );
FT_String* family = face->root.family_name;
- FT_UInt ppem = loader->size->metrics.x_ppem;
+ FT_UInt ppem = loader->size->metrics->x_ppem;
FT_String* style = face->root.style_name;
FT_UInt x_scale_factor = 1000;
#endif
@@ -952,9 +1001,9 @@
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ||
x_scale_factor != 1000 )
{
- x_scale = FT_MulDiv( loader->size->metrics.x_scale,
+ x_scale = FT_MulDiv( loader->size->metrics->x_scale,
(FT_Long)x_scale_factor, 1000 );
- y_scale = loader->size->metrics.y_scale;
+ y_scale = loader->size->metrics->y_scale;
/* compensate for any scaling by de/emboldening; */
/* the amount was determined via experimentation */
@@ -974,8 +1023,8 @@
/* scale the glyph */
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
- x_scale = loader->size->metrics.x_scale;
- y_scale = loader->size->metrics.y_scale;
+ x_scale = loader->size->metrics->x_scale;
+ y_scale = loader->size->metrics->y_scale;
do_scale = TRUE;
}
@@ -988,9 +1037,24 @@
vec->x = FT_MulFix( vec->x, x_scale );
vec->y = FT_MulFix( vec->y, y_scale );
}
+ }
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+ /* if we have a HVAR table, `pp1' and/or `pp2' are already adjusted */
+ if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) ||
+ !IS_HINTED( loader->load_flags ) )
+#endif
+ {
loader->pp1 = outline->points[n_points - 4];
loader->pp2 = outline->points[n_points - 3];
+ }
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+ /* if we have a VVAR table, `pp3' and/or `pp4' are already adjusted */
+ if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) ||
+ !IS_HINTED( loader->load_flags ) )
+#endif
+ {
loader->pp3 = outline->points[n_points - 2];
loader->pp4 = outline->points[n_points - 1];
}
@@ -1133,8 +1197,8 @@
if ( !( loader->load_flags & FT_LOAD_NO_SCALE ) )
{
- FT_Fixed x_scale = loader->size->metrics.x_scale;
- FT_Fixed y_scale = loader->size->metrics.y_scale;
+ FT_Fixed x_scale = loader->size->metrics->x_scale;
+ FT_Fixed y_scale = loader->size->metrics->y_scale;
x = FT_MulFix( x, x_scale );
@@ -1142,8 +1206,28 @@
if ( subglyph->flags & ROUND_XY_TO_GRID )
{
- x = FT_PIX_ROUND( x );
- y = FT_PIX_ROUND( y );
+ TT_Face face = loader->face;
+ TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face );
+
+
+ if ( IS_HINTED( loader->load_flags ) )
+ {
+ /*
+ * We round the horizontal offset only if there is hinting along
+ * the x axis; this corresponds to integer advance width values.
+ *
+ * Theoretically, a glyph's bytecode can toggle ClearType's
+ * `backward compatibility' mode, which would allow modification
+ * of the advance width. In reality, however, applications
+ * neither allow nor expect modified advance widths if subpixel
+ * rendering is active.
+ *
+ */
+ if ( driver->interpreter_version == TT_INTERPRETER_VERSION_35 )
+ x = FT_PIX_ROUND( x );
+
+ y = FT_PIX_ROUND( y );
+ }
}
}
}
@@ -1356,6 +1440,7 @@
TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( loader->face );
#endif
+
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )
{
@@ -1392,7 +1477,7 @@
/* a utility function to retrieve i-th node from given FT_List */
static FT_ListNode
ft_list_get_node_at( FT_List list,
- FT_UInt index )
+ FT_UInt idx )
{
FT_ListNode cur;
@@ -1402,10 +1487,10 @@
for ( cur = list->head; cur; cur = cur->next )
{
- if ( !index )
+ if ( !idx )
return cur;
- index--;
+ idx--;
}
return NULL;
@@ -1467,8 +1552,8 @@
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
- x_scale = loader->size->metrics.x_scale;
- y_scale = loader->size->metrics.y_scale;
+ x_scale = loader->size->metrics->x_scale;
+ y_scale = loader->size->metrics->y_scale;
}
else
{
@@ -1574,7 +1659,8 @@
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- if ( loader->face->doblend && !loader->face->is_default_instance )
+ if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) ||
+ FT_IS_VARIATION( FT_FACE( face ) ) )
{
/* a small outline structure with four elements for */
/* communication with `TT_Vary_Apply_Glyph_Deltas' */
@@ -1683,7 +1769,7 @@
/***********************************************************************/
/* otherwise, load a composite! */
- else if ( loader->n_contours == -1 )
+ else if ( loader->n_contours < 0 )
{
FT_Memory memory = face->root.memory;
@@ -1694,6 +1780,9 @@
FT_ListNode node, node2;
+ /* normalize the `n_contours' value */
+ loader->n_contours = -1;
+
/*
* We store the glyph index directly in the `node->data' pointer,
* following the glib solution (cf. macro `GUINT_TO_POINTER') with a
@@ -1705,11 +1794,11 @@
/* clear the nodes filled by sibling chains */
node = ft_list_get_node_at( &loader->composites, recurse_count );
for ( node2 = node; node2; node2 = node2->next )
- node2->data = (void*)ULONG_MAX;
+ node2->data = (void*)FT_ULONG_MAX;
/* check whether we already have a composite glyph with this index */
if ( FT_List_Find( &loader->composites,
- (void*)(unsigned long)glyph_index ) )
+ FT_UINT_TO_POINTER( glyph_index ) ) )
{
FT_TRACE1(( "TT_Load_Composite_Glyph:"
" infinite recursion detected\n" ));
@@ -1718,13 +1807,13 @@
}
else if ( node )
- node->data = (void*)(unsigned long)glyph_index;
+ node->data = FT_UINT_TO_POINTER( glyph_index );
else
{
if ( FT_NEW( node ) )
goto Exit;
- node->data = (void*)(unsigned long)glyph_index;
+ node->data = FT_UINT_TO_POINTER( glyph_index );
FT_List_Add( &loader->composites, node );
}
@@ -1745,7 +1834,8 @@
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- if ( face->doblend && !face->is_default_instance )
+ if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) ||
+ FT_IS_VARIATION( FT_FACE( face ) ) )
{
short i, limit;
FT_SubGlyph subglyph;
@@ -1988,12 +2078,6 @@
}
}
}
- else
- {
- /* invalid composite count (negative but not -1) */
- error = FT_THROW( Invalid_Outline );
- goto Exit;
- }
/***********************************************************************/
/***********************************************************************/
@@ -2035,7 +2119,7 @@
y_scale = 0x10000L;
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
- y_scale = size->root.metrics.y_scale;
+ y_scale = size->metrics->y_scale;
if ( glyph->format != FT_GLYPH_FORMAT_COMPOSITE )
FT_Outline_Get_CBox( &glyph->outline, &bbox );
@@ -2050,24 +2134,24 @@
glyph->metrics.horiBearingY = bbox.yMax;
glyph->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
- /* Adjust advance width to the value contained in the hdmx table */
- /* unless FT_LOAD_COMPUTE_METRICS is set or backwards compatibility */
- /* mode of the v40 interpreter is active. See `ttinterp.h' for */
- /* details on backwards compatibility mode. */
+ /* Adjust advance width to the value contained in the hdmx table */
+ /* unless FT_LOAD_COMPUTE_METRICS is set or backward compatibility */
+ /* mode of the v40 interpreter is active. See `ttinterp.h' for */
+ /* details on backward compatibility mode. */
if (
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- !( driver->interpreter_version == TT_INTERPRETER_VERSION_40 &&
- ( loader->exec && loader->exec->backwards_compatibility ) ) &&
+ !( driver->interpreter_version == TT_INTERPRETER_VERSION_40 &&
+ ( loader->exec && loader->exec->backward_compatibility ) ) &&
#endif
- !face->postscript.isFixedPitch &&
- IS_HINTED( loader->load_flags ) &&
- !( loader->load_flags & FT_LOAD_COMPUTE_METRICS ) )
+ !face->postscript.isFixedPitch &&
+ IS_HINTED( loader->load_flags ) &&
+ !( loader->load_flags & FT_LOAD_COMPUTE_METRICS ) )
{
FT_Byte* widthp;
widthp = tt_face_get_device_metrics( face,
- size->root.metrics.x_ppem,
+ size->metrics->x_ppem,
glyph_index );
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
@@ -2097,8 +2181,8 @@
}
/* set glyph dimensions */
- glyph->metrics.width = bbox.xMax - bbox.xMin;
- glyph->metrics.height = bbox.yMax - bbox.yMin;
+ glyph->metrics.width = SUB_LONG( bbox.xMax, bbox.xMin );
+ glyph->metrics.height = SUB_LONG( bbox.yMax, bbox.yMin );
/* Now take care of vertical metrics. In the case where there is */
/* no vertical information within the font (relatively common), */
@@ -2134,7 +2218,8 @@
/* table in the font. Otherwise, we use the */
/* values defined in the horizontal header. */
- height = (FT_Short)FT_DivFix( bbox.yMax - bbox.yMin,
+ height = (FT_Short)FT_DivFix( SUB_LONG( bbox.yMax,
+ bbox.yMin ),
y_scale );
if ( face->os2.version != 0xFFFFU )
advance = (FT_Pos)( face->os2.sTypoAscender -
@@ -2149,7 +2234,7 @@
#ifdef FT_CONFIG_OPTION_INCREMENTAL
{
FT_Incremental_InterfaceRec* incr;
- FT_Incremental_MetricsRec metrics;
+ FT_Incremental_MetricsRec incr_metrics;
FT_Error error;
@@ -2159,19 +2244,19 @@
/* overriding metrics for this glyph. */
if ( incr && incr->funcs->get_glyph_metrics )
{
- metrics.bearing_x = 0;
- metrics.bearing_y = top;
- metrics.advance = advance;
+ incr_metrics.bearing_x = 0;
+ incr_metrics.bearing_y = top;
+ incr_metrics.advance = advance;
error = incr->funcs->get_glyph_metrics( incr->object,
glyph_index,
TRUE,
- &metrics );
+ &incr_metrics );
if ( error )
return error;
- top = metrics.bearing_y;
- advance = metrics.advance;
+ top = incr_metrics.bearing_y;
+ advance = incr_metrics.advance;
}
}
@@ -2213,7 +2298,7 @@
SFNT_Service sfnt;
FT_Stream stream;
FT_Error error;
- TT_SBit_MetricsRec metrics;
+ TT_SBit_MetricsRec sbit_metrics;
face = (TT_Face)glyph->face;
@@ -2226,34 +2311,34 @@
(FT_UInt)load_flags,
stream,
&glyph->bitmap,
- &metrics );
+ &sbit_metrics );
if ( !error )
{
glyph->outline.n_points = 0;
glyph->outline.n_contours = 0;
- glyph->metrics.width = (FT_Pos)metrics.width * 64;
- glyph->metrics.height = (FT_Pos)metrics.height * 64;
+ glyph->metrics.width = (FT_Pos)sbit_metrics.width * 64;
+ glyph->metrics.height = (FT_Pos)sbit_metrics.height * 64;
- glyph->metrics.horiBearingX = (FT_Pos)metrics.horiBearingX * 64;
- glyph->metrics.horiBearingY = (FT_Pos)metrics.horiBearingY * 64;
- glyph->metrics.horiAdvance = (FT_Pos)metrics.horiAdvance * 64;
+ glyph->metrics.horiBearingX = (FT_Pos)sbit_metrics.horiBearingX * 64;
+ glyph->metrics.horiBearingY = (FT_Pos)sbit_metrics.horiBearingY * 64;
+ glyph->metrics.horiAdvance = (FT_Pos)sbit_metrics.horiAdvance * 64;
- glyph->metrics.vertBearingX = (FT_Pos)metrics.vertBearingX * 64;
- glyph->metrics.vertBearingY = (FT_Pos)metrics.vertBearingY * 64;
- glyph->metrics.vertAdvance = (FT_Pos)metrics.vertAdvance * 64;
+ glyph->metrics.vertBearingX = (FT_Pos)sbit_metrics.vertBearingX * 64;
+ glyph->metrics.vertBearingY = (FT_Pos)sbit_metrics.vertBearingY * 64;
+ glyph->metrics.vertAdvance = (FT_Pos)sbit_metrics.vertAdvance * 64;
glyph->format = FT_GLYPH_FORMAT_BITMAP;
if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
{
- glyph->bitmap_left = metrics.vertBearingX;
- glyph->bitmap_top = metrics.vertBearingY;
+ glyph->bitmap_left = sbit_metrics.vertBearingX;
+ glyph->bitmap_top = sbit_metrics.vertBearingY;
}
else
{
- glyph->bitmap_left = metrics.horiBearingX;
- glyph->bitmap_top = metrics.horiBearingY;
+ glyph->bitmap_left = sbit_metrics.horiBearingX;
+ glyph->bitmap_top = sbit_metrics.horiBearingY;
}
}
@@ -2270,17 +2355,17 @@
FT_Int32 load_flags,
FT_Bool glyf_table_only )
{
- FT_Error error;
-
TT_Face face;
FT_Stream stream;
+
#ifdef TT_USE_BYTECODE_INTERPRETER
+ FT_Error error;
FT_Bool pedantic = FT_BOOL( load_flags & FT_LOAD_PEDANTIC );
-#endif
#if defined TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY || \
defined TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( (TT_Face)glyph->face );
#endif
+#endif
face = (TT_Face)glyph->face;
@@ -2336,13 +2421,19 @@
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
if ( driver->interpreter_version == TT_INTERPRETER_VERSION_40 )
{
- subpixel_hinting_lean = TRUE;
- grayscale_cleartype = !FT_BOOL( load_flags &
- FT_LOAD_TARGET_LCD ||
- load_flags &
- FT_LOAD_TARGET_LCD_V );
- exec->vertical_lcd_lean = FT_BOOL( load_flags &
- FT_LOAD_TARGET_LCD_V );
+ subpixel_hinting_lean =
+ FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) !=
+ FT_RENDER_MODE_MONO );
+ grayscale_cleartype =
+ FT_BOOL( subpixel_hinting_lean &&
+ !( ( load_flags &
+ FT_LOAD_TARGET_LCD ) ||
+ ( load_flags &
+ FT_LOAD_TARGET_LCD_V ) ) );
+ exec->vertical_lcd_lean =
+ FT_BOOL( subpixel_hinting_lean &&
+ ( load_flags &
+ FT_LOAD_TARGET_LCD_V ) );
}
else
{
@@ -2602,7 +2693,8 @@
TT_LoaderRec loader;
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#define IS_DEFAULT_INSTANCE ( ( (TT_Face)glyph->face )->is_default_instance )
+#define IS_DEFAULT_INSTANCE ( !( FT_IS_NAMED_INSTANCE( glyph->face ) || \
+ FT_IS_VARIATION( glyph->face ) ) )
#else
#define IS_DEFAULT_INSTANCE 1
#endif
@@ -2617,8 +2709,73 @@
( load_flags & FT_LOAD_NO_BITMAP ) == 0 &&
IS_DEFAULT_INSTANCE )
{
+ FT_Fixed x_scale = size->root.metrics.x_scale;
+ FT_Fixed y_scale = size->root.metrics.y_scale;
+
+
error = load_sbit_image( size, glyph, glyph_index, load_flags );
- if ( !error )
+ if ( FT_ERR_EQ( error, Missing_Bitmap ) )
+ {
+ /* the bitmap strike is incomplete and misses the requested glyph; */
+ /* if we have a bitmap-only font, return an empty glyph */
+ if ( !FT_IS_SCALABLE( glyph->face ) )
+ {
+ TT_Face face = (TT_Face)glyph->face;
+
+ FT_Short left_bearing = 0;
+ FT_Short top_bearing = 0;
+
+ FT_UShort advance_width = 0;
+ FT_UShort advance_height = 0;
+
+
+ /* to return an empty glyph, however, we need metrics data */
+ /* from the `hmtx' (or `vmtx') table; the assumption is that */
+ /* empty glyphs are missing intentionally, representing */
+ /* whitespace - not having at least horizontal metrics is */
+ /* thus considered an error */
+ if ( !face->horz_metrics_size )
+ return error;
+
+ /* we now construct an empty bitmap glyph */
+ TT_Get_HMetrics( face, glyph_index,
+ &left_bearing,
+ &advance_width );
+ TT_Get_VMetrics( face, glyph_index,
+ 0,
+ &top_bearing,
+ &advance_height );
+
+ glyph->outline.n_points = 0;
+ glyph->outline.n_contours = 0;
+
+ glyph->metrics.width = 0;
+ glyph->metrics.height = 0;
+
+ glyph->metrics.horiBearingX = FT_MulFix( left_bearing, x_scale );
+ glyph->metrics.horiBearingY = 0;
+ glyph->metrics.horiAdvance = FT_MulFix( advance_width, x_scale );
+
+ glyph->metrics.vertBearingX = 0;
+ glyph->metrics.vertBearingY = FT_MulFix( top_bearing, y_scale );
+ glyph->metrics.vertAdvance = FT_MulFix( advance_height, y_scale );
+
+ glyph->format = FT_GLYPH_FORMAT_BITMAP;
+ glyph->bitmap.pixel_mode = FT_PIXEL_MODE_MONO;
+
+ glyph->bitmap_left = 0;
+ glyph->bitmap_top = 0;
+
+ return FT_Err_Ok;
+ }
+ }
+ else if ( error )
+ {
+ /* return error if font is not scalable */
+ if ( !FT_IS_SCALABLE( glyph->face ) )
+ return error;
+ }
+ else
{
if ( FT_IS_SCALABLE( glyph->face ) )
{
@@ -2632,13 +2789,11 @@
/* sanity checks: if `xxxAdvance' in the sbit metric */
/* structure isn't set, use `linearXXXAdvance' */
if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance )
- glyph->metrics.horiAdvance =
- FT_MulFix( glyph->linearHoriAdvance,
- size->root.metrics.x_scale );
+ glyph->metrics.horiAdvance = FT_MulFix( glyph->linearHoriAdvance,
+ x_scale );
if ( !glyph->metrics.vertAdvance && glyph->linearVertAdvance )
- glyph->metrics.vertAdvance =
- FT_MulFix( glyph->linearVertAdvance,
- size->root.metrics.y_scale );
+ glyph->metrics.vertAdvance = FT_MulFix( glyph->linearVertAdvance,
+ y_scale );
}
return FT_Err_Ok;
@@ -2649,14 +2804,20 @@
/* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */
if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.valid )
- return FT_THROW( Invalid_Size_Handle );
+ {
+ error = FT_THROW( Invalid_Size_Handle );
+ goto Exit;
+ }
if ( load_flags & FT_LOAD_SBITS_ONLY )
- return FT_THROW( Invalid_Argument );
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
error = tt_loader_init( &loader, size, glyph, load_flags, FALSE );
if ( error )
- return error;
+ goto Exit;
glyph->format = FT_GLYPH_FORMAT_OUTLINE;
glyph->num_subglyphs = 0;
@@ -2728,9 +2889,16 @@
/* TrueType glyphs at all sizes using the bytecode interpreter. */
/* */
if ( !( load_flags & FT_LOAD_NO_SCALE ) &&
- size->root.metrics.y_ppem < 24 )
+ size->metrics->y_ppem < 24 )
glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
+ Exit:
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( error )
+ FT_TRACE1(( " failed (error code 0x%x)\n",
+ error ));
+#endif
+
return error;
}
diff --git a/modules/freetype2/src/truetype/ttgload.h b/modules/freetype2/src/truetype/ttgload.h
index bfa29e4ff..d237cfd28 100644
--- a/modules/freetype2/src/truetype/ttgload.h
+++ b/modules/freetype2/src/truetype/ttgload.h
@@ -4,7 +4,7 @@
/* */
/* TrueType Glyph Loader (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/truetype/ttgxvar.c b/modules/freetype2/src/truetype/ttgxvar.c
index cf4f7b17a..29ab2a4ef 100644
--- a/modules/freetype2/src/truetype/ttgxvar.c
+++ b/modules/freetype2/src/truetype/ttgxvar.c
@@ -4,7 +4,7 @@
/* */
/* TrueType GX Font Variation loader */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,10 +22,6 @@
/* */
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6[fgca]var.html */
/* */
- /* The documentation for `fvar' is inconsistent. At one point it says */
- /* that `countSizePairs' should be 3, at another point 2. It should */
- /* be 2. */
- /* */
/* The documentation for `gvar' is not intelligible; `cvar' refers you */
/* to `gvar' and is thus also incomprehensible. */
/* */
@@ -49,7 +45,9 @@
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
#include FT_TRUETYPE_TAGS_H
+#include FT_TRUETYPE_IDS_H
#include FT_MULTIPLE_MASTERS_H
+#include FT_LIST_H
#include "ttpload.h"
#include "ttgxvar.h"
@@ -62,8 +60,11 @@
#define FT_Stream_FTell( stream ) \
(FT_ULong)( (stream)->cursor - (stream)->base )
-#define FT_Stream_SeekSet( stream, off ) \
- ( (stream)->cursor = (stream)->base + (off) )
+#define FT_Stream_SeekSet( stream, off ) \
+ (stream)->cursor = \
+ ( (off) < (FT_ULong)( (stream)->limit - (stream)->base ) ) \
+ ? (stream)->base + (off) \
+ : (stream)->limit
/*************************************************************************/
@@ -322,7 +323,7 @@
FT_TRACE2(( "AVAR " ));
- blend->avar_checked = TRUE;
+ blend->avar_loaded = TRUE;
error = face->goto_table( face, TTAG_avar, stream, &table_len );
if ( error )
{
@@ -346,7 +347,7 @@
if ( axisCount != (FT_Long)blend->mmvar->num_axis )
{
- FT_TRACE2(( "ft_var_load_avar: number of axes in `avar' and `cvar'\n"
+ FT_TRACE2(( "ft_var_load_avar: number of axes in `avar' and `fvar'\n"
" table are different\n" ));
goto Exit;
}
@@ -394,361 +395,309 @@
/* some macros we need */
- #define FT_FIXED_ONE ( (FT_Fixed)0x10000 )
+#define FT_FIXED_ONE ( (FT_Fixed)0x10000 )
- #define FT_fdot14ToFixed( x ) \
- ( ( (FT_Fixed)( (FT_Int16)(x) ) ) << 2 )
- #define FT_intToFixed( i ) \
- ( (FT_Fixed)( (FT_UInt32)(i) << 16 ) )
- #define FT_fixedToInt( x ) \
- ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )
+#define FT_fdot14ToFixed( x ) \
+ ( (FT_Fixed)( (FT_ULong)(x) << 2 ) )
+#define FT_intToFixed( i ) \
+ ( (FT_Fixed)( (FT_ULong)(i) << 16 ) )
+#define FT_fixedToInt( x ) \
+ ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )
- /*************************************************************************/
- /* */
- /* <Function> */
- /* ft_var_load_hvar */
- /* */
- /* <Description> */
- /* Parse the `HVAR' table and set `blend->hvar_loaded' to TRUE. */
- /* */
- /* On success, `blend->hvar_checked' is set to TRUE. */
- /* */
- /* Some memory may remain allocated on error; it is always freed in */
- /* `tt_done_blend', however. */
- /* */
- /* <InOut> */
- /* face :: The font face. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
static FT_Error
- ft_var_load_hvar( TT_Face face )
+ ft_var_load_item_variation_store( TT_Face face,
+ FT_ULong offset,
+ GX_ItemVarStore itemStore )
{
FT_Stream stream = FT_FACE_STREAM( face );
FT_Memory memory = stream->memory;
- GX_Blend blend = face->blend;
-
FT_Error error;
- FT_UShort majorVersion;
- FT_ULong table_len;
- FT_ULong table_offset;
- FT_ULong store_offset;
+ FT_UShort format;
+ FT_ULong region_offset;
+ FT_UInt i, j, k;
+ FT_UInt shortDeltaCount;
- FT_ULong* dataOffsetArray = NULL;
+ GX_Blend blend = face->blend;
+ GX_ItemVarData varData;
+ FT_ULong* dataOffsetArray = NULL;
- blend->hvar_loaded = TRUE;
- FT_TRACE2(( "HVAR " ));
+ if ( FT_STREAM_SEEK( offset ) ||
+ FT_READ_USHORT( format ) )
+ goto Exit;
- error = face->goto_table( face, TTAG_HVAR, stream, &table_len );
- if ( error )
+ if ( format != 1 )
{
- FT_TRACE2(( "is missing\n" ));
+ FT_TRACE2(( "ft_var_load_item_variation_store: bad store format %d\n",
+ format ));
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
- table_offset = FT_STREAM_POS();
-
- /* skip minor version */
- if ( FT_READ_USHORT( majorVersion ) ||
- FT_STREAM_SKIP( 2 ) )
+ /* read top level fields */
+ if ( FT_READ_ULONG( region_offset ) ||
+ FT_READ_USHORT( itemStore->dataCount ) )
goto Exit;
- if ( majorVersion != 1 )
+
+ /* we need at least one entry in `itemStore->varData' */
+ if ( !itemStore->dataCount )
{
- FT_TRACE2(( "bad table version %d\n", majorVersion ));
+ FT_TRACE2(( "ft_var_load_item_variation_store: missing varData\n" ));
error = FT_THROW( Invalid_Table );
goto Exit;
}
- /* skip map offset */
- if ( FT_READ_ULONG( store_offset ) ||
- FT_STREAM_SKIP( 4 ) )
+ /* make temporary copy of item variation data offsets; */
+ /* we will parse region list first, then come back */
+ if ( FT_NEW_ARRAY( dataOffsetArray, itemStore->dataCount ) )
goto Exit;
- /* parse item variation store */
+ for ( i = 0; i < itemStore->dataCount; i++ )
{
- FT_UShort format;
- FT_ULong region_offset;
- FT_UInt i, j, k;
- FT_UInt shortDeltaCount;
-
- GX_HVStore itemStore;
- GX_HVarTable hvarTable;
- GX_HVarData hvarData;
-
-
- if ( FT_STREAM_SEEK( table_offset + store_offset ) ||
- FT_READ_USHORT( format ) )
- goto Exit;
- if ( format != 1 )
- {
- FT_TRACE2(( "bad store format %d\n", format ));
- error = FT_THROW( Invalid_Table );
+ if ( FT_READ_ULONG( dataOffsetArray[i] ) )
goto Exit;
- }
+ }
- if ( FT_NEW( blend->hvar_table ) ) /* allocate table at top level */
- goto Exit;
+ /* parse array of region records (region list) */
+ if ( FT_STREAM_SEEK( offset + region_offset ) )
+ goto Exit;
- hvarTable = blend->hvar_table;
- itemStore = &hvarTable->itemStore;
+ if ( FT_READ_USHORT( itemStore->axisCount ) ||
+ FT_READ_USHORT( itemStore->regionCount ) )
+ goto Exit;
- /* read top level fields */
- if ( FT_READ_ULONG( region_offset ) ||
- FT_READ_USHORT( itemStore->dataCount ) )
- goto Exit;
+ if ( itemStore->axisCount != (FT_Long)blend->mmvar->num_axis )
+ {
+ FT_TRACE2(( "ft_var_load_item_variation_store:"
+ " number of axes in item variation store\n"
+ " "
+ " and `fvar' table are different\n" ));
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
- /* make temporary copy of item variation data offsets; */
- /* we will parse region list first, then come back */
- if ( FT_NEW_ARRAY( dataOffsetArray, itemStore->dataCount ) )
- goto Exit;
+ if ( FT_NEW_ARRAY( itemStore->varRegionList, itemStore->regionCount ) )
+ goto Exit;
- for ( i = 0; i < itemStore->dataCount; i++ )
- {
- if ( FT_READ_ULONG( dataOffsetArray[i] ) )
- goto Exit;
- }
+ for ( i = 0; i < itemStore->regionCount; i++ )
+ {
+ GX_AxisCoords axisCoords;
- /* parse array of region records (region list) */
- if ( FT_STREAM_SEEK( table_offset + store_offset + region_offset ) )
- goto Exit;
- if ( FT_READ_USHORT( itemStore->axisCount ) ||
- FT_READ_USHORT( itemStore->regionCount ) )
+ if ( FT_NEW_ARRAY( itemStore->varRegionList[i].axisList,
+ itemStore->axisCount ) )
goto Exit;
- if ( FT_NEW_ARRAY( itemStore->varRegionList, itemStore->regionCount ) )
- goto Exit;
+ axisCoords = itemStore->varRegionList[i].axisList;
- for ( i = 0; i < itemStore->regionCount; i++ )
+ for ( j = 0; j < itemStore->axisCount; j++ )
{
- GX_AxisCoords axisCoords;
+ FT_Short start, peak, end;
- if ( FT_NEW_ARRAY( itemStore->varRegionList[i].axisList,
- itemStore->axisCount ) )
+ if ( FT_READ_SHORT( start ) ||
+ FT_READ_SHORT( peak ) ||
+ FT_READ_SHORT( end ) )
goto Exit;
- axisCoords = itemStore->varRegionList[i].axisList;
+ axisCoords[j].startCoord = FT_fdot14ToFixed( start );
+ axisCoords[j].peakCoord = FT_fdot14ToFixed( peak );
+ axisCoords[j].endCoord = FT_fdot14ToFixed( end );
+ }
+ }
- for ( j = 0; j < itemStore->axisCount; j++ )
- {
- FT_Short start, peak, end;
+ /* end of region list parse */
+ /* use dataOffsetArray now to parse varData items */
+ if ( FT_NEW_ARRAY( itemStore->varData, itemStore->dataCount ) )
+ goto Exit;
- if ( FT_READ_SHORT( start ) ||
- FT_READ_SHORT( peak ) ||
- FT_READ_SHORT( end ) )
- goto Exit;
+ for ( i = 0; i < itemStore->dataCount; i++ )
+ {
+ varData = &itemStore->varData[i];
- axisCoords[j].startCoord = FT_fdot14ToFixed( start );
- axisCoords[j].peakCoord = FT_fdot14ToFixed( peak );
- axisCoords[j].endCoord = FT_fdot14ToFixed( end );
- }
- }
+ if ( FT_STREAM_SEEK( offset + dataOffsetArray[i] ) )
+ goto Exit;
- /* end of region list parse */
+ if ( FT_READ_USHORT( varData->itemCount ) ||
+ FT_READ_USHORT( shortDeltaCount ) ||
+ FT_READ_USHORT( varData->regionIdxCount ) )
+ goto Exit;
- /* use dataOffsetArray now to parse varData items */
- if ( FT_NEW_ARRAY( itemStore->varData, itemStore->dataCount ) )
+ /* check some data consistency */
+ if ( shortDeltaCount > varData->regionIdxCount )
+ {
+ FT_TRACE2(( "bad short count %d or region count %d\n",
+ shortDeltaCount,
+ varData->regionIdxCount ));
+ error = FT_THROW( Invalid_Table );
goto Exit;
+ }
- for ( i = 0; i < itemStore->dataCount; i++ )
+ if ( varData->regionIdxCount > itemStore->regionCount )
{
- hvarData = &itemStore->varData[i];
+ FT_TRACE2(( "inconsistent regionCount %d in varData[%d]\n",
+ varData->regionIdxCount,
+ i ));
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
- if ( FT_STREAM_SEEK( table_offset +
- store_offset +
- dataOffsetArray[i] ) )
- goto Exit;
+ /* parse region indices */
+ if ( FT_NEW_ARRAY( varData->regionIndices,
+ varData->regionIdxCount ) )
+ goto Exit;
- if ( FT_READ_USHORT( hvarData->itemCount ) ||
- FT_READ_USHORT( shortDeltaCount ) ||
- FT_READ_USHORT( hvarData->regionIdxCount ) )
+ for ( j = 0; j < varData->regionIdxCount; j++ )
+ {
+ if ( FT_READ_USHORT( varData->regionIndices[j] ) )
goto Exit;
- /* check some data consistency */
- if ( shortDeltaCount > hvarData->regionIdxCount )
+ if ( varData->regionIndices[j] >= itemStore->regionCount )
{
- FT_TRACE2(( "bad short count %d or region count %d\n",
- shortDeltaCount,
- hvarData->regionIdxCount ));
+ FT_TRACE2(( "bad region index %d\n",
+ varData->regionIndices[j] ));
error = FT_THROW( Invalid_Table );
goto Exit;
}
+ }
+
+ /* Parse delta set. */
+ /* */
+ /* On input, deltas are (shortDeltaCount + regionIdxCount) bytes */
+ /* each; on output, deltas are expanded to `regionIdxCount' shorts */
+ /* each. */
+ if ( FT_NEW_ARRAY( varData->deltaSet,
+ varData->regionIdxCount * varData->itemCount ) )
+ goto Exit;
- if ( hvarData->regionIdxCount > itemStore->regionCount )
+ /* the delta set is stored as a 2-dimensional array of shorts; */
+ /* sign-extend signed bytes to signed shorts */
+ for ( j = 0; j < varData->itemCount * varData->regionIdxCount; )
+ {
+ for ( k = 0; k < shortDeltaCount; k++, j++ )
{
- FT_TRACE2(( "inconsistent regionCount %d in varData[%d]\n",
- hvarData->regionIdxCount,
- i ));
- error = FT_THROW( Invalid_Table );
- goto Exit;
- }
+ /* read the short deltas */
+ FT_Short delta;
- /* parse region indices */
- if ( FT_NEW_ARRAY( hvarData->regionIndices,
- hvarData->regionIdxCount ) )
- goto Exit;
- for ( j = 0; j < hvarData->regionIdxCount; j++ )
- {
- if ( FT_READ_USHORT( hvarData->regionIndices[j] ) )
+ if ( FT_READ_SHORT( delta ) )
goto Exit;
- if ( hvarData->regionIndices[j] >= itemStore->regionCount )
- {
- FT_TRACE2(( "bad region index %d\n",
- hvarData->regionIndices[j] ));
- error = FT_THROW( Invalid_Table );
- goto Exit;
- }
+ varData->deltaSet[j] = delta;
}
- /* Parse delta set. */
- /* */
- /* On input, deltas are ( shortDeltaCount + regionIdxCount ) bytes */
- /* each; on output, deltas are expanded to `regionIdxCount' shorts */
- /* each. */
- if ( FT_NEW_ARRAY( hvarData->deltaSet,
- hvarData->regionIdxCount * hvarData->itemCount ) )
- goto Exit;
-
- /* the delta set is stored as a 2-dimensional array of shorts; */
- /* sign-extend signed bytes to signed shorts */
- for ( j = 0; j < hvarData->itemCount * hvarData->regionIdxCount; )
+ for ( ; k < varData->regionIdxCount; k++, j++ )
{
- for ( k = 0; k < shortDeltaCount; k++, j++ )
- {
- /* read the short deltas */
- FT_Short delta;
+ /* read the (signed) byte deltas */
+ FT_Char delta;
- if ( FT_READ_SHORT( delta ) )
- goto Exit;
-
- hvarData->deltaSet[j] = delta;
- }
-
- for ( ; k < hvarData->regionIdxCount; k++, j++ )
- {
- /* read the (signed) byte deltas */
- FT_Char delta;
-
-
- if ( FT_READ_CHAR( delta ) )
- goto Exit;
+ if ( FT_READ_CHAR( delta ) )
+ goto Exit;
- hvarData->deltaSet[j] = delta;
- }
+ varData->deltaSet[j] = delta;
}
}
}
- /* end parse item variation store */
+ Exit:
+ FT_FREE( dataOffsetArray );
- /* parse width map */
- {
- GX_WidthMap widthMap;
+ return error;
+ }
- FT_UShort format;
- FT_UInt entrySize;
- FT_UInt innerBitCount;
- FT_UInt innerIndexMask;
- FT_UInt i, j;
+ static FT_Error
+ ft_var_load_delta_set_index_mapping( TT_Face face,
+ FT_ULong offset,
+ GX_DeltaSetIdxMap map,
+ GX_ItemVarStore itemStore )
+ {
+ FT_Stream stream = FT_FACE_STREAM( face );
+ FT_Memory memory = stream->memory;
- widthMap = &blend->hvar_table->widthMap;
+ FT_Error error;
- if ( FT_READ_USHORT( format ) ||
- FT_READ_USHORT( widthMap->mapCount ) )
- goto Exit;
+ FT_UShort format;
+ FT_UInt entrySize;
+ FT_UInt innerBitCount;
+ FT_UInt innerIndexMask;
+ FT_UInt i, j;
- if ( format & 0xFFC0 )
- {
- FT_TRACE2(( "bad map format %d\n", format ));
- error = FT_THROW( Invalid_Table );
- goto Exit;
- }
- /* bytes per entry: 1, 2, 3, or 4 */
- entrySize = ( ( format & 0x0030 ) >> 4 ) + 1;
- innerBitCount = ( format & 0x000F ) + 1;
- innerIndexMask = ( 1 << innerBitCount ) - 1;
+ if ( FT_STREAM_SEEK( offset ) ||
+ FT_READ_USHORT( format ) ||
+ FT_READ_USHORT( map->mapCount ) )
+ goto Exit;
- if ( FT_NEW_ARRAY( widthMap->innerIndex, widthMap->mapCount ) )
- goto Exit;
+ if ( format & 0xFFC0 )
+ {
+ FT_TRACE2(( "bad map format %d\n", format ));
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
- if ( FT_NEW_ARRAY( widthMap->outerIndex, widthMap->mapCount ) )
- goto Exit;
+ /* bytes per entry: 1, 2, 3, or 4 */
+ entrySize = ( ( format & 0x0030 ) >> 4 ) + 1;
+ innerBitCount = ( format & 0x000F ) + 1;
+ innerIndexMask = ( 1 << innerBitCount ) - 1;
- for ( i = 0; i < widthMap->mapCount; i++ )
- {
- FT_UInt mapData = 0;
- FT_UInt outerIndex, innerIndex;
+ if ( FT_NEW_ARRAY( map->innerIndex, map->mapCount ) )
+ goto Exit;
+ if ( FT_NEW_ARRAY( map->outerIndex, map->mapCount ) )
+ goto Exit;
- /* read map data one unsigned byte at a time, big endian */
- for ( j = 0; j < entrySize; j++ )
- {
- FT_Byte data;
+ for ( i = 0; i < map->mapCount; i++ )
+ {
+ FT_UInt mapData = 0;
+ FT_UInt outerIndex, innerIndex;
- if ( FT_READ_BYTE( data ) )
- goto Exit;
-
- mapData = ( mapData << 8 ) | data;
- }
+ /* read map data one unsigned byte at a time, big endian */
+ for ( j = 0; j < entrySize; j++ )
+ {
+ FT_Byte data;
- outerIndex = mapData >> innerBitCount;
- if ( outerIndex >= blend->hvar_table->itemStore.dataCount )
- {
- FT_TRACE2(( "outerIndex[%d] == %d out of range\n",
- i,
- outerIndex ));
- error = FT_THROW( Invalid_Table );
+ if ( FT_READ_BYTE( data ) )
goto Exit;
- }
- widthMap->outerIndex[i] = outerIndex;
+ mapData = ( mapData << 8 ) | data;
+ }
- innerIndex = mapData & innerIndexMask;
+ outerIndex = mapData >> innerBitCount;
- if ( innerIndex >=
- blend->hvar_table->itemStore.varData[outerIndex].itemCount )
- {
- FT_TRACE2(( "innerIndex[%d] == %d out of range\n",
- i,
- innerIndex ));
- error = FT_THROW( Invalid_Table );
- goto Exit;
- }
-
- widthMap->innerIndex[i] = innerIndex;
+ if ( outerIndex >= itemStore->dataCount )
+ {
+ FT_TRACE2(( "outerIndex[%d] == %d out of range\n",
+ i,
+ outerIndex ));
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
}
- }
- /* end parse width map */
+ map->outerIndex[i] = outerIndex;
- FT_TRACE2(( "loaded\n" ));
- error = FT_Err_Ok;
+ innerIndex = mapData & innerIndexMask;
- Exit:
- FT_FREE( dataOffsetArray );
-
- if ( !error )
- {
- blend->hvar_checked = TRUE;
+ if ( innerIndex >= itemStore->varData[outerIndex].itemCount )
+ {
+ FT_TRACE2(( "innerIndex[%d] == %d out of range\n",
+ i,
+ innerIndex ));
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
- /* TODO: implement other HVAR stuff */
- face->variation_support |= TT_FACE_FLAG_VAR_HADVANCE;
+ map->innerIndex[i] = innerIndex;
}
+ Exit:
return error;
}
@@ -756,86 +705,181 @@
/*************************************************************************/
/* */
/* <Function> */
- /* tt_hadvance_adjust */
+ /* ft_var_load_hvvar */
/* */
/* <Description> */
- /* Apply HVAR advance width adjustment of a given glyph. */
+ /* If `vertical' is zero, parse the `HVAR' table and set */
+ /* `blend->hvar_loaded' to TRUE. On success, `blend->hvar_checked' */
+ /* is set to TRUE. */
/* */
- /* <Input> */
- /* gindex :: The glyph index. */
+ /* If `vertical' is not zero, parse the `VVAR' table and set */
+ /* `blend->vvar_loaded' to TRUE. On success, `blend->vvar_checked' */
+ /* is set to TRUE. */
+ /* */
+ /* Some memory may remain allocated on error; it is always freed in */
+ /* `tt_done_blend', however. */
/* */
/* <InOut> */
- /* face :: The font face. */
+ /* face :: The font face. */
/* */
- /* adelta :: Points to width value that gets modified. */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
/* */
- FT_LOCAL_DEF( FT_Error )
- tt_hadvance_adjust( TT_Face face,
- FT_UInt gindex,
- FT_Int *avalue )
+ static FT_Error
+ ft_var_load_hvvar( TT_Face face,
+ FT_Bool vertical )
{
- FT_Error error = FT_Err_Ok;
+ FT_Stream stream = FT_FACE_STREAM( face );
+ FT_Memory memory = stream->memory;
- GX_HVarData varData;
+ GX_Blend blend = face->blend;
- FT_UInt innerIndex, outerIndex;
- FT_UInt master, j;
- FT_Fixed netAdjustment = 0; /* accumulated adjustment */
- FT_Fixed scaledDelta;
- FT_Short* deltaSet;
- FT_Fixed delta;
+ GX_HVVarTable table;
+ FT_Error error;
+ FT_UShort majorVersion;
+ FT_ULong table_len;
+ FT_ULong table_offset;
+ FT_ULong store_offset;
+ FT_ULong widthMap_offset;
- if ( !face->doblend || !face->blend )
- goto Exit;
- if ( !face->blend->hvar_loaded )
+ if ( vertical )
+ {
+ blend->vvar_loaded = TRUE;
+
+ FT_TRACE2(( "VVAR " ));
+
+ error = face->goto_table( face, TTAG_VVAR, stream, &table_len );
+ }
+ else
+ {
+ blend->hvar_loaded = TRUE;
+
+ FT_TRACE2(( "HVAR " ));
+
+ error = face->goto_table( face, TTAG_HVAR, stream, &table_len );
+ }
+
+ if ( error )
{
- /* initialize hvar table */
- face->blend->hvar_error = ft_var_load_hvar( face );
+ FT_TRACE2(( "is missing\n" ));
+ goto Exit;
}
- if ( !face->blend->hvar_checked )
+ table_offset = FT_STREAM_POS();
+
+ /* skip minor version */
+ if ( FT_READ_USHORT( majorVersion ) ||
+ FT_STREAM_SKIP( 2 ) )
+ goto Exit;
+
+ if ( majorVersion != 1 )
{
- error = face->blend->hvar_error;
+ FT_TRACE2(( "bad table version %d\n", majorVersion ));
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
- /* advance width adjustments are always present in an `HVAR' table, */
- /* so need to test for this capability */
+ if ( FT_READ_ULONG( store_offset ) ||
+ FT_READ_ULONG( widthMap_offset ) )
+ goto Exit;
- if ( gindex >= face->blend->hvar_table->widthMap.mapCount )
+ if ( vertical )
+ {
+ if ( FT_NEW( blend->vvar_table ) )
+ goto Exit;
+ table = blend->vvar_table;
+ }
+ else
{
- FT_TRACE2(( "gindex %d out of range\n", gindex ));
- error = FT_THROW( Invalid_Argument );
+ if ( FT_NEW( blend->hvar_table ) )
+ goto Exit;
+ table = blend->hvar_table;
+ }
+
+ error = ft_var_load_item_variation_store(
+ face,
+ table_offset + store_offset,
+ &table->itemStore );
+ if ( error )
goto Exit;
+
+ if ( widthMap_offset )
+ {
+ error = ft_var_load_delta_set_index_mapping(
+ face,
+ table_offset + widthMap_offset,
+ &table->widthMap,
+ &table->itemStore );
+ if ( error )
+ goto Exit;
}
- /* trust that HVAR parser has checked indices */
- outerIndex = face->blend->hvar_table->widthMap.outerIndex[gindex];
- innerIndex = face->blend->hvar_table->widthMap.innerIndex[gindex];
- varData = &face->blend->hvar_table->itemStore.varData[outerIndex];
- deltaSet = &varData->deltaSet[varData->regionIdxCount * innerIndex];
+ FT_TRACE2(( "loaded\n" ));
+ error = FT_Err_Ok;
+
+ Exit:
+ if ( !error )
+ {
+ if ( vertical )
+ {
+ blend->vvar_checked = TRUE;
+
+ /* FreeType doesn't provide functions to quickly retrieve */
+ /* TSB, BSB, or VORG values; we thus don't have to implement */
+ /* support for those three item variation stores. */
+
+ face->variation_support |= TT_FACE_FLAG_VAR_VADVANCE;
+ }
+ else
+ {
+ blend->hvar_checked = TRUE;
+
+ /* FreeType doesn't provide functions to quickly retrieve */
+ /* LSB or RSB values; we thus don't have to implement */
+ /* support for those two item variation stores. */
+
+ face->variation_support |= TT_FACE_FLAG_VAR_HADVANCE;
+ }
+ }
+
+ return error;
+ }
+
+
+ static FT_Int
+ ft_var_get_item_delta( TT_Face face,
+ GX_ItemVarStore itemStore,
+ FT_UInt outerIndex,
+ FT_UInt innerIndex )
+ {
+ GX_ItemVarData varData;
+ FT_Short* deltaSet;
+
+ FT_UInt master, j;
+ FT_Fixed netAdjustment = 0; /* accumulated adjustment */
+ FT_Fixed scaledDelta;
+ FT_Fixed delta;
+
/* See pseudo code from `Font Variations Overview' */
/* in the OpenType specification. */
+ varData = &itemStore->varData[outerIndex];
+ deltaSet = &varData->deltaSet[varData->regionIdxCount * innerIndex];
+
/* outer loop steps through master designs to be blended */
for ( master = 0; master < varData->regionIdxCount; master++ )
{
FT_Fixed scalar = FT_FIXED_ONE;
FT_UInt regionIndex = varData->regionIndices[master];
- GX_AxisCoords axis = face->blend
- ->hvar_table
- ->itemStore.varRegionList[regionIndex]
- .axisList;
+ GX_AxisCoords axis = itemStore->varRegionList[regionIndex].axisList;
/* inner loop steps through axes in this region */
- for ( j = 0;
- j < face->blend->hvar_table->itemStore.axisCount;
- j++, axis++ )
+ for ( j = 0; j < itemStore->axisCount; j++, axis++ )
{
FT_Fixed axisScalar;
@@ -889,18 +933,460 @@
} /* per-region loop */
- /* apply the accumulated adjustment to derive the interpolated value */
- FT_TRACE5(( "horizontal width %d adjusted by %d units (HVAR)\n",
+ return FT_fixedToInt( netAdjustment );
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* tt_hvadvance_adjust */
+ /* */
+ /* <Description> */
+ /* Apply `HVAR' advance width or `VVAR' advance height adjustment of */
+ /* a given glyph. */
+ /* */
+ /* <Input> */
+ /* gindex :: The glyph index. */
+ /* */
+ /* vertical :: If set, handle `VVAR' table. */
+ /* */
+ /* <InOut> */
+ /* face :: The font face. */
+ /* */
+ /* adelta :: Points to width or height value that gets modified. */
+ /* */
+ static FT_Error
+ tt_hvadvance_adjust( TT_Face face,
+ FT_UInt gindex,
+ FT_Int *avalue,
+ FT_Bool vertical )
+ {
+ FT_Error error = FT_Err_Ok;
+ FT_UInt innerIndex, outerIndex;
+ FT_Int delta;
+
+ GX_HVVarTable table;
+
+
+ if ( !face->doblend || !face->blend )
+ goto Exit;
+
+ if ( vertical )
+ {
+ if ( !face->blend->vvar_loaded )
+ {
+ /* initialize vvar table */
+ face->blend->vvar_error = ft_var_load_hvvar( face, 1 );
+ }
+
+ if ( !face->blend->vvar_checked )
+ {
+ error = face->blend->vvar_error;
+ goto Exit;
+ }
+
+ table = face->blend->vvar_table;
+ }
+ else
+ {
+ if ( !face->blend->hvar_loaded )
+ {
+ /* initialize hvar table */
+ face->blend->hvar_error = ft_var_load_hvvar( face, 0 );
+ }
+
+ if ( !face->blend->hvar_checked )
+ {
+ error = face->blend->hvar_error;
+ goto Exit;
+ }
+
+ table = face->blend->hvar_table;
+ }
+
+ /* advance width or height adjustments are always present in an */
+ /* `HVAR' or `VVAR' table; no need to test for this capability */
+
+ if ( table->widthMap.innerIndex )
+ {
+ FT_UInt idx = gindex;
+
+
+ if ( idx >= table->widthMap.mapCount )
+ idx = table->widthMap.mapCount - 1;
+
+ /* trust that HVAR parser has checked indices */
+ outerIndex = table->widthMap.outerIndex[idx];
+ innerIndex = table->widthMap.innerIndex[idx];
+ }
+ else
+ {
+ GX_ItemVarData varData;
+
+
+ /* no widthMap data */
+ outerIndex = 0;
+ innerIndex = gindex;
+
+ varData = &table->itemStore.varData[outerIndex];
+ if ( gindex >= varData->itemCount )
+ {
+ FT_TRACE2(( "gindex %d out of range\n", gindex ));
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+ }
+
+ delta = ft_var_get_item_delta( face,
+ &table->itemStore,
+ outerIndex,
+ innerIndex );
+
+ FT_TRACE5(( "%s value %d adjusted by %d unit%s (%s)\n",
+ vertical ? "vertical height" : "horizontal width",
*avalue,
- FT_fixedToInt( netAdjustment ) ));
+ delta,
+ delta == 1 ? "" : "s",
+ vertical ? "VVAR" : "HVAR" ));
- *avalue += FT_fixedToInt( netAdjustment );
+ *avalue += delta;
Exit:
return error;
}
+ FT_LOCAL_DEF( FT_Error )
+ tt_hadvance_adjust( TT_Face face,
+ FT_UInt gindex,
+ FT_Int *avalue )
+ {
+ return tt_hvadvance_adjust( face, gindex, avalue, 0 );
+ }
+
+
+ FT_LOCAL_DEF( FT_Error )
+ tt_vadvance_adjust( TT_Face face,
+ FT_UInt gindex,
+ FT_Int *avalue )
+ {
+ return tt_hvadvance_adjust( face, gindex, avalue, 1 );
+ }
+
+
+#define GX_VALUE_SIZE 8
+
+ /* all values are FT_Short or FT_UShort entities; */
+ /* we treat them consistently as FT_Short */
+#define GX_VALUE_CASE( tag, dflt ) \
+ case MVAR_TAG_ ## tag : \
+ p = (FT_Short*)&face->dflt; \
+ break
+
+#define GX_GASP_CASE( idx ) \
+ case MVAR_TAG_GASP_ ## idx : \
+ if ( idx < face->gasp.numRanges - 1 ) \
+ p = (FT_Short*)&face->gasp.gaspRanges[idx].maxPPEM; \
+ else \
+ p = NULL; \
+ break
+
+
+ static FT_Short*
+ ft_var_get_value_pointer( TT_Face face,
+ FT_ULong mvar_tag )
+ {
+ FT_Short* p;
+
+
+ switch ( mvar_tag )
+ {
+ GX_GASP_CASE( 0 );
+ GX_GASP_CASE( 1 );
+ GX_GASP_CASE( 2 );
+ GX_GASP_CASE( 3 );
+ GX_GASP_CASE( 4 );
+ GX_GASP_CASE( 5 );
+ GX_GASP_CASE( 6 );
+ GX_GASP_CASE( 7 );
+ GX_GASP_CASE( 8 );
+ GX_GASP_CASE( 9 );
+
+ GX_VALUE_CASE( CPHT, os2.sCapHeight );
+ GX_VALUE_CASE( HASC, os2.sTypoAscender );
+ GX_VALUE_CASE( HCLA, os2.usWinAscent );
+ GX_VALUE_CASE( HCLD, os2.usWinDescent );
+ GX_VALUE_CASE( HCOF, horizontal.caret_Offset );
+ GX_VALUE_CASE( HCRN, horizontal.caret_Slope_Run );
+ GX_VALUE_CASE( HCRS, horizontal.caret_Slope_Rise );
+ GX_VALUE_CASE( HDSC, os2.sTypoDescender );
+ GX_VALUE_CASE( HLGP, os2.sTypoLineGap );
+ GX_VALUE_CASE( SBXO, os2.ySubscriptXOffset);
+ GX_VALUE_CASE( SBXS, os2.ySubscriptXSize );
+ GX_VALUE_CASE( SBYO, os2.ySubscriptYOffset );
+ GX_VALUE_CASE( SBYS, os2.ySubscriptYSize );
+ GX_VALUE_CASE( SPXO, os2.ySuperscriptXOffset );
+ GX_VALUE_CASE( SPXS, os2.ySuperscriptXSize );
+ GX_VALUE_CASE( SPYO, os2.ySuperscriptYOffset );
+ GX_VALUE_CASE( SPYS, os2.ySuperscriptYSize );
+ GX_VALUE_CASE( STRO, os2.yStrikeoutPosition );
+ GX_VALUE_CASE( STRS, os2.yStrikeoutSize );
+ GX_VALUE_CASE( UNDO, postscript.underlinePosition );
+ GX_VALUE_CASE( UNDS, postscript.underlineThickness );
+ GX_VALUE_CASE( VASC, vertical.Ascender );
+ GX_VALUE_CASE( VCOF, vertical.caret_Offset );
+ GX_VALUE_CASE( VCRN, vertical.caret_Slope_Run );
+ GX_VALUE_CASE( VCRS, vertical.caret_Slope_Rise );
+ GX_VALUE_CASE( VDSC, vertical.Descender );
+ GX_VALUE_CASE( VLGP, vertical.Line_Gap );
+ GX_VALUE_CASE( XHGT, os2.sxHeight );
+
+ default:
+ /* ignore unknown tag */
+ p = NULL;
+ }
+
+ return p;
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_var_load_mvar */
+ /* */
+ /* <Description> */
+ /* Parse the `MVAR' table. */
+ /* */
+ /* Some memory may remain allocated on error; it is always freed in */
+ /* `tt_done_blend', however. */
+ /* */
+ /* <InOut> */
+ /* face :: The font face. */
+ /* */
+ static void
+ ft_var_load_mvar( TT_Face face )
+ {
+ FT_Stream stream = FT_FACE_STREAM( face );
+ FT_Memory memory = stream->memory;
+
+ GX_Blend blend = face->blend;
+ GX_ItemVarStore itemStore;
+ GX_Value value, limit;
+
+ FT_Error error;
+ FT_UShort majorVersion;
+ FT_ULong table_len;
+ FT_ULong table_offset;
+ FT_UShort store_offset;
+ FT_ULong records_offset;
+
+
+ FT_TRACE2(( "MVAR " ));
+
+ error = face->goto_table( face, TTAG_MVAR, stream, &table_len );
+ if ( error )
+ {
+ FT_TRACE2(( "is missing\n" ));
+ return;
+ }
+
+ table_offset = FT_STREAM_POS();
+
+ /* skip minor version */
+ if ( FT_READ_USHORT( majorVersion ) ||
+ FT_STREAM_SKIP( 2 ) )
+ return;
+
+ if ( majorVersion != 1 )
+ {
+ FT_TRACE2(( "bad table version %d\n", majorVersion ));
+ return;
+ }
+
+ if ( FT_NEW( blend->mvar_table ) )
+ return;
+
+ /* skip reserved entry and value record size */
+ if ( FT_STREAM_SKIP( 4 ) ||
+ FT_READ_USHORT( blend->mvar_table->valueCount ) ||
+ FT_READ_USHORT( store_offset ) )
+ return;
+
+ records_offset = FT_STREAM_POS();
+
+ error = ft_var_load_item_variation_store(
+ face,
+ table_offset + store_offset,
+ &blend->mvar_table->itemStore );
+ if ( error )
+ return;
+
+ if ( FT_NEW_ARRAY( blend->mvar_table->values,
+ blend->mvar_table->valueCount ) )
+ return;
+
+ if ( FT_STREAM_SEEK( records_offset ) ||
+ FT_FRAME_ENTER( blend->mvar_table->valueCount * GX_VALUE_SIZE ) )
+ return;
+
+ value = blend->mvar_table->values;
+ limit = value + blend->mvar_table->valueCount;
+ itemStore = &blend->mvar_table->itemStore;
+
+ for ( ; value < limit; value++ )
+ {
+ value->tag = FT_GET_ULONG();
+ value->outerIndex = FT_GET_USHORT();
+ value->innerIndex = FT_GET_USHORT();
+
+ if ( value->outerIndex >= itemStore->dataCount ||
+ value->innerIndex >= itemStore->varData[value->outerIndex]
+ .itemCount )
+ {
+ error = FT_THROW( Invalid_Table );
+ break;
+ }
+ }
+
+ FT_FRAME_EXIT();
+
+ if ( error )
+ return;
+
+ FT_TRACE2(( "loaded\n" ));
+
+ value = blend->mvar_table->values;
+ limit = value + blend->mvar_table->valueCount;
+
+ /* save original values of the data MVAR is going to modify */
+ for ( ; value < limit; value++ )
+ {
+ FT_Short* p = ft_var_get_value_pointer( face, value->tag );
+
+
+ if ( p )
+ value->unmodified = *p;
+#ifdef FT_DEBUG_LEVEL_TRACE
+ else
+ FT_TRACE1(( "ft_var_load_mvar: Ignoring unknown tag `%c%c%c%c'\n",
+ (FT_Char)( value->tag >> 24 ),
+ (FT_Char)( value->tag >> 16 ),
+ (FT_Char)( value->tag >> 8 ),
+ (FT_Char)( value->tag ) ));
+#endif
+ }
+
+ face->variation_support |= TT_FACE_FLAG_VAR_MVAR;
+ }
+
+
+ static FT_Error
+ tt_size_reset_iterator( FT_ListNode node,
+ void* user )
+ {
+ TT_Size size = (TT_Size)node->data;
+
+ FT_UNUSED( user );
+
+
+ tt_size_reset( size, 1 );
+
+ return FT_Err_Ok;
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* tt_apply_mvar */
+ /* */
+ /* <Description> */
+ /* Apply `MVAR' table adjustments. */
+ /* */
+ /* <InOut> */
+ /* face :: The font face. */
+ /* */
+ FT_LOCAL_DEF( void )
+ tt_apply_mvar( TT_Face face )
+ {
+ GX_Blend blend = face->blend;
+ GX_Value value, limit;
+
+
+ if ( !( face->variation_support & TT_FACE_FLAG_VAR_MVAR ) )
+ return;
+
+ value = blend->mvar_table->values;
+ limit = value + blend->mvar_table->valueCount;
+
+ for ( ; value < limit; value++ )
+ {
+ FT_Short* p = ft_var_get_value_pointer( face, value->tag );
+ FT_Int delta;
+
+
+ delta = ft_var_get_item_delta( face,
+ &blend->mvar_table->itemStore,
+ value->outerIndex,
+ value->innerIndex );
+
+ if ( p )
+ {
+ FT_TRACE5(( "value %c%c%c%c (%d unit%s) adjusted by %d unit%s (MVAR)\n",
+ (FT_Char)( value->tag >> 24 ),
+ (FT_Char)( value->tag >> 16 ),
+ (FT_Char)( value->tag >> 8 ),
+ (FT_Char)( value->tag ),
+ value->unmodified,
+ value->unmodified == 1 ? "" : "s",
+ delta,
+ delta == 1 ? "" : "s" ));
+
+ /* since we handle both signed and unsigned values as FT_Short, */
+ /* ensure proper overflow arithmetic */
+ *p = (FT_Short)( value->unmodified + (FT_Short)delta );
+ }
+ }
+
+ /* adjust all derived values */
+ {
+ FT_Face root = &face->root;
+
+
+ if ( face->os2.version != 0xFFFFU )
+ {
+ if ( face->os2.sTypoAscender || face->os2.sTypoDescender )
+ {
+ root->ascender = face->os2.sTypoAscender;
+ root->descender = face->os2.sTypoDescender;
+
+ root->height = root->ascender - root->descender +
+ face->os2.sTypoLineGap;
+ }
+ else
+ {
+ root->ascender = (FT_Short)face->os2.usWinAscent;
+ root->descender = -(FT_Short)face->os2.usWinDescent;
+
+ root->height = root->ascender - root->descender;
+ }
+ }
+
+ root->underline_position = face->postscript.underlinePosition -
+ face->postscript.underlineThickness / 2;
+ root->underline_thickness = face->postscript.underlineThickness;
+
+ /* iterate over all FT_Size objects and call `tt_size_reset' */
+ /* to propagate the metrics changes */
+ FT_List_Iterate( &root->sizes_list,
+ tt_size_reset_iterator,
+ NULL );
+ }
+ }
+
+
typedef struct GX_GVar_Head_
{
FT_Long version;
@@ -1000,10 +1486,9 @@
goto Exit;
}
- /* rough sanity check: offsets can be either 2 or 4 bytes, */
- /* and a single variation needs at least 4 bytes per glyph */
+ /* rough sanity check: offsets can be either 2 or 4 bytes */
if ( (FT_ULong)gvar_head.glyphCount *
- ( ( gvar_head.flags & 1 ) ? 8 : 6 ) > table_len )
+ ( ( gvar_head.flags & 1 ) ? 4 : 2 ) > table_len )
{
FT_TRACE1(( "ft_var_load_gvar: invalid number of glyphs\n" ));
error = FT_THROW( Invalid_Table );
@@ -1017,8 +1502,10 @@
blend->gv_glyphcnt = gvar_head.glyphCount;
offsetToData = gvar_start + gvar_head.offsetToData;
- FT_TRACE5(( "gvar: there are %d shared coordinates:\n",
- blend->tuplecount ));
+ FT_TRACE5(( "gvar: there %s %d shared coordinate%s:\n",
+ blend->tuplecount == 1 ? "is" : "are",
+ blend->tuplecount,
+ blend->tuplecount == 1 ? "" : "s" ));
if ( FT_NEW_ARRAY( blend->glyphoffsets, blend->gv_glyphcnt + 1 ) )
goto Exit;
@@ -1216,6 +1703,180 @@
}
+ /* convert from design coordinates to normalized coordinates */
+
+ static void
+ ft_var_to_normalized( TT_Face face,
+ FT_UInt num_coords,
+ FT_Fixed* coords,
+ FT_Fixed* normalized )
+ {
+ GX_Blend blend;
+ FT_MM_Var* mmvar;
+ FT_UInt i, j;
+ FT_Var_Axis* a;
+ GX_AVarSegment av;
+
+
+ blend = face->blend;
+ mmvar = blend->mmvar;
+
+ if ( num_coords > mmvar->num_axis )
+ {
+ FT_TRACE2(( "ft_var_to_normalized:"
+ " only using first %d of %d coordinates\n",
+ mmvar->num_axis, num_coords ));
+ num_coords = mmvar->num_axis;
+ }
+
+ /* Axis normalization is a two-stage process. First we normalize */
+ /* based on the [min,def,max] values for the axis to be [-1,0,1]. */
+ /* Then, if there's an `avar' table, we renormalize this range. */
+
+ a = mmvar->axis;
+ for ( i = 0; i < num_coords; i++, a++ )
+ {
+ FT_Fixed coord = coords[i];
+
+
+ FT_TRACE5(( " %d: %.5f\n", i, coord / 65536.0 ));
+ if ( coord > a->maximum || coord < a->minimum )
+ {
+ FT_TRACE1((
+ "ft_var_to_normalized: design coordinate %.5f\n"
+ " is out of range [%.5f;%.5f]; clamping\n",
+ coord / 65536.0,
+ a->minimum / 65536.0,
+ a->maximum / 65536.0 ));
+
+ if ( coord > a->maximum )
+ coord = a->maximum;
+ else
+ coord = a->minimum;
+ }
+
+ if ( coord < a->def )
+ normalized[i] = -FT_DivFix( coord - a->def,
+ a->minimum - a->def );
+ else if ( coord > a->def )
+ normalized[i] = FT_DivFix( coord - a->def,
+ a->maximum - a->def );
+ else
+ normalized[i] = 0;
+ }
+
+ FT_TRACE5(( "\n" ));
+
+ for ( ; i < mmvar->num_axis; i++ )
+ normalized[i] = 0;
+
+ if ( blend->avar_segment )
+ {
+ FT_TRACE5(( "normalized design coordinates"
+ " before applying `avar' data:\n" ));
+
+ av = blend->avar_segment;
+ for ( i = 0; i < mmvar->num_axis; i++, av++ )
+ {
+ for ( j = 1; j < (FT_UInt)av->pairCount; j++ )
+ {
+ if ( normalized[i] < av->correspondence[j].fromCoord )
+ {
+ FT_TRACE5(( " %.5f\n", normalized[i] / 65536.0 ));
+
+ normalized[i] =
+ FT_MulDiv( normalized[i] - av->correspondence[j - 1].fromCoord,
+ av->correspondence[j].toCoord -
+ av->correspondence[j - 1].toCoord,
+ av->correspondence[j].fromCoord -
+ av->correspondence[j - 1].fromCoord ) +
+ av->correspondence[j - 1].toCoord;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+
+ /* convert from normalized coordinates to design coordinates */
+
+ static void
+ ft_var_to_design( TT_Face face,
+ FT_UInt num_coords,
+ FT_Fixed* coords,
+ FT_Fixed* design )
+ {
+ GX_Blend blend;
+ FT_MM_Var* mmvar;
+ FT_Var_Axis* a;
+
+ FT_UInt i, j, nc;
+
+
+ blend = face->blend;
+
+ nc = num_coords;
+ if ( num_coords > blend->num_axis )
+ {
+ FT_TRACE2(( "ft_var_to_design:"
+ " only using first %d of %d coordinates\n",
+ blend->num_axis, num_coords ));
+ nc = blend->num_axis;
+ }
+
+ for ( i = 0; i < nc; i++ )
+ design[i] = coords[i];
+
+ for ( ; i < num_coords; i++ )
+ design[i] = 0;
+
+ if ( blend->avar_segment )
+ {
+ GX_AVarSegment av = blend->avar_segment;
+
+
+ FT_TRACE5(( "design coordinates"
+ " after removing `avar' distortion:\n" ));
+
+ for ( i = 0; i < nc; i++, av++ )
+ {
+ for ( j = 1; j < (FT_UInt)av->pairCount; j++ )
+ {
+ if ( design[i] < av->correspondence[j].toCoord )
+ {
+ design[i] =
+ FT_MulDiv( design[i] - av->correspondence[j - 1].toCoord,
+ av->correspondence[j].fromCoord -
+ av->correspondence[j - 1].fromCoord,
+ av->correspondence[j].toCoord -
+ av->correspondence[j - 1].toCoord ) +
+ av->correspondence[j - 1].fromCoord;
+
+ FT_TRACE5(( " %.5f\n", design[i] / 65536.0 ));
+ break;
+ }
+ }
+ }
+ }
+
+ mmvar = blend->mmvar;
+ a = mmvar->axis;
+
+ for ( i = 0; i < nc; i++, a++ )
+ {
+ if ( design[i] < 0 )
+ design[i] = a->def + FT_MulFix( design[i],
+ a->def - a->minimum );
+ else if ( design[i] > 0 )
+ design[i] = a->def + FT_MulFix( design[i],
+ a->maximum - a->def );
+ else
+ design[i] = a->def;
+ }
+ }
+
+
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -1229,7 +1890,6 @@
{
FT_Long version;
FT_UShort offsetToData;
- FT_UShort countSizePairs;
FT_UShort axisCount;
FT_UShort axisSize;
FT_UShort instanceCount;
@@ -1257,7 +1917,8 @@
/* */
/* <Description> */
/* Check that the font's `fvar' table is valid, parse it, and return */
- /* those data. */
+ /* those data. It also loads (and parses) the `MVAR' table, if */
+ /* possible. */
/* */
/* <InOut> */
/* face :: The font face. */
@@ -1274,19 +1935,33 @@
TT_Get_MM_Var( TT_Face face,
FT_MM_Var* *master )
{
- FT_Stream stream = face->root.stream;
- FT_Memory memory = face->root.memory;
+ FT_Stream stream = face->root.stream;
+ FT_Memory memory = face->root.memory;
FT_ULong table_len;
- FT_Error error = FT_Err_Ok;
- FT_ULong fvar_start;
- FT_Int i, j;
+ FT_Error error = FT_Err_Ok;
+ FT_ULong fvar_start = 0;
+ FT_UInt i, j;
FT_MM_Var* mmvar = NULL;
FT_Fixed* next_coords;
+ FT_Fixed* nsc;
FT_String* next_name;
FT_Var_Axis* a;
+ FT_Fixed* c;
FT_Var_Named_Style* ns;
GX_FVar_Head fvar_head;
- FT_Bool usePsName;
+ FT_Bool usePsName = 0;
+ FT_UInt num_instances;
+ FT_UInt num_axes;
+ FT_UShort* axis_flags;
+
+ FT_Offset mmvar_size;
+ FT_Offset axis_flags_size;
+ FT_Offset axis_size;
+ FT_Offset namedstyle_size;
+ FT_Offset next_coords_size;
+ FT_Offset next_name_size;
+
+ FT_Bool need_init;
static const FT_Frame_Field fvar_fields[] =
{
@@ -1295,13 +1970,13 @@
#define FT_STRUCTURE GX_FVar_Head
FT_FRAME_START( 16 ),
- FT_FRAME_LONG ( version ),
- FT_FRAME_USHORT( offsetToData ),
- FT_FRAME_USHORT( countSizePairs ),
- FT_FRAME_USHORT( axisCount ),
- FT_FRAME_USHORT( axisSize ),
- FT_FRAME_USHORT( instanceCount ),
- FT_FRAME_USHORT( instanceSize ),
+ FT_FRAME_LONG ( version ),
+ FT_FRAME_USHORT ( offsetToData ),
+ FT_FRAME_SKIP_SHORT,
+ FT_FRAME_USHORT ( axisCount ),
+ FT_FRAME_USHORT ( axisSize ),
+ FT_FRAME_USHORT ( instanceCount ),
+ FT_FRAME_USHORT ( instanceSize ),
FT_FRAME_END
};
@@ -1325,7 +2000,9 @@
/* read the font data and set up the internal representation */
/* if not already done */
- if ( !face->blend )
+ need_init = !face->blend;
+
+ if ( need_init )
{
FT_TRACE2(( "FVAR " ));
@@ -1362,18 +2039,57 @@
FT_TRACE2(( "loaded\n" ));
- FT_TRACE5(( "number of GX style axes: %d\n", fvar_head.axisCount ));
+ FT_TRACE5(( "%d variation ax%s\n",
+ fvar_head.axisCount,
+ fvar_head.axisCount == 1 ? "is" : "es" ));
if ( FT_NEW( face->blend ) )
goto Exit;
- /* cannot overflow 32-bit arithmetic because of limits above */
- face->blend->mmvar_len =
- sizeof ( FT_MM_Var ) +
- fvar_head.axisCount * sizeof ( FT_Var_Axis ) +
- fvar_head.instanceCount * sizeof ( FT_Var_Named_Style ) +
- fvar_head.instanceCount * fvar_head.axisCount * sizeof ( FT_Fixed ) +
- 5 * fvar_head.axisCount;
+ num_axes = fvar_head.axisCount;
+ face->blend->num_axis = num_axes;
+ }
+ else
+ num_axes = face->blend->num_axis;
+
+ /* `num_instances' holds the number of all named instances, */
+ /* including the default instance which might be missing */
+ /* in fvar's table of named instances */
+ num_instances = (FT_UInt)face->root.style_flags >> 16;
+
+ /* prepare storage area for MM data; this cannot overflow */
+ /* 32-bit arithmetic because of the size limits used in the */
+ /* `fvar' table validity check in `sfnt_init_face' */
+
+ /* the various `*_size' variables, which we also use as */
+ /* offsets into the `mmlen' array, must be multiples of the */
+ /* pointer size (except the last one); without such an */
+ /* alignment there might be runtime errors due to */
+ /* misaligned addresses */
+#undef ALIGN_SIZE
+#define ALIGN_SIZE( n ) \
+ ( ( (n) + sizeof (void*) - 1 ) & ~( sizeof (void*) - 1 ) )
+
+ mmvar_size = ALIGN_SIZE( sizeof ( FT_MM_Var ) );
+ axis_flags_size = ALIGN_SIZE( num_axes *
+ sizeof ( FT_UShort ) );
+ axis_size = ALIGN_SIZE( num_axes *
+ sizeof ( FT_Var_Axis ) );
+ namedstyle_size = ALIGN_SIZE( num_instances *
+ sizeof ( FT_Var_Named_Style ) );
+ next_coords_size = ALIGN_SIZE( num_instances *
+ num_axes *
+ sizeof ( FT_Fixed ) );
+ next_name_size = num_axes * 5;
+
+ if ( need_init )
+ {
+ face->blend->mmvar_len = mmvar_size +
+ axis_flags_size +
+ axis_size +
+ namedstyle_size +
+ next_coords_size +
+ next_name_size;
if ( FT_ALLOC( mmvar, face->blend->mmvar_len ) )
goto Exit;
@@ -1383,28 +2099,33 @@
/* the data gets filled in later on */
mmvar->num_axis =
- fvar_head.axisCount;
+ num_axes;
mmvar->num_designs =
~0U; /* meaningless in this context; each glyph */
/* may have a different number of designs */
/* (or tuples, as called by Apple) */
mmvar->num_namedstyles =
- fvar_head.instanceCount;
+ num_instances;
+
+ /* alas, no public field in `FT_Var_Axis' for axis flags */
+ axis_flags =
+ (FT_UShort*)( (char*)mmvar + mmvar_size );
mmvar->axis =
- (FT_Var_Axis*)&( mmvar[1] );
+ (FT_Var_Axis*)( (char*)axis_flags + axis_flags_size );
mmvar->namedstyle =
- (FT_Var_Named_Style*)&( mmvar->axis[fvar_head.axisCount] );
+ (FT_Var_Named_Style*)( (char*)mmvar->axis + axis_size );
- next_coords =
- (FT_Fixed*)&( mmvar->namedstyle[fvar_head.instanceCount] );
- for ( i = 0; i < fvar_head.instanceCount; i++ )
+ next_coords = (FT_Fixed*)( (char*)mmvar->namedstyle +
+ namedstyle_size );
+ for ( i = 0; i < num_instances; i++ )
{
mmvar->namedstyle[i].coords = next_coords;
- next_coords += fvar_head.axisCount;
+ next_coords += num_axes;
}
- next_name = (FT_String*)next_coords;
- for ( i = 0; i < fvar_head.axisCount; i++ )
+ next_name = (FT_String*)( (char*)mmvar->namedstyle +
+ namedstyle_size + next_coords_size );
+ for ( i = 0; i < num_axes; i++ )
{
mmvar->axis[i].name = next_name;
next_name += 5;
@@ -1416,10 +2137,14 @@
goto Exit;
a = mmvar->axis;
- for ( i = 0; i < fvar_head.axisCount; i++ )
+ for ( i = 0; i < num_axes; i++ )
{
GX_FVar_Axis axis_rec;
+#ifdef FT_DEBUG_LEVEL_TRACE
+ int invalid = 0;
+#endif
+
if ( FT_STREAM_READ_FIELDS( fvaraxis_fields, &axis_rec ) )
goto Exit;
@@ -1435,47 +2160,189 @@
a->name[3] = (FT_String)( ( a->tag ) & 0xFF );
a->name[4] = '\0';
+ *axis_flags = axis_rec.flags;
+
if ( a->minimum > a->def ||
a->def > a->maximum )
{
- FT_TRACE2(( "TT_Get_MM_Var:"
- " invalid \"%s\" axis record; disabling\n",
- a->name ));
-
a->minimum = a->def;
a->maximum = a->def;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ invalid = 1;
+#endif
}
- FT_TRACE5(( " \"%s\": minimum=%.5f, default=%.5f, maximum=%.5f\n",
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( i == 0 )
+ FT_TRACE5(( " idx tag "
+ /* " XXX `XXXX'" */
+ " minimum default maximum flags\n" ));
+ /* " XXXX.XXXXX XXXX.XXXXX XXXX.XXXXX 0xXXXX" */
+
+ FT_TRACE5(( " %3d `%s'"
+ " %10.5f %10.5f %10.5f 0x%04X%s\n",
+ i,
a->name,
a->minimum / 65536.0,
a->def / 65536.0,
- a->maximum / 65536.0 ));
+ a->maximum / 65536.0,
+ *axis_flags,
+ invalid ? " (invalid, disabled)" : "" ));
+#endif
a++;
+ axis_flags++;
}
FT_TRACE5(( "\n" ));
- ns = mmvar->namedstyle;
+ /* named instance coordinates are stored as design coordinates; */
+ /* we have to convert them to normalized coordinates also */
+ if ( FT_NEW_ARRAY( face->blend->normalized_stylecoords,
+ num_axes * num_instances ) )
+ goto Exit;
+
+ if ( fvar_head.instanceCount && !face->blend->avar_loaded )
+ {
+ FT_ULong offset = FT_STREAM_POS();
+
+
+ ft_var_load_avar( face );
+
+ if ( FT_STREAM_SEEK( offset ) )
+ goto Exit;
+ }
+
+ FT_TRACE5(( "%d instance%s\n",
+ fvar_head.instanceCount,
+ fvar_head.instanceCount == 1 ? "" : "s" ));
+
+ ns = mmvar->namedstyle;
+ nsc = face->blend->normalized_stylecoords;
for ( i = 0; i < fvar_head.instanceCount; i++, ns++ )
{
/* PostScript names add 2 bytes to the instance record size */
if ( FT_FRAME_ENTER( ( usePsName ? 6L : 4L ) +
- 4L * fvar_head.axisCount ) )
+ 4L * num_axes ) )
goto Exit;
ns->strid = FT_GET_USHORT();
(void) /* flags = */ FT_GET_USHORT();
- for ( j = 0; j < fvar_head.axisCount; j++ )
- ns->coords[j] = FT_GET_LONG();
+ c = ns->coords;
+ for ( j = 0; j < num_axes; j++, c++ )
+ *c = FT_GET_LONG();
+ /* valid psid values are 6, [256;32767], and 0xFFFF */
if ( usePsName )
ns->psid = FT_GET_USHORT();
+ else
+ ns->psid = 0xFFFF;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ SFNT_Service sfnt = (SFNT_Service)face->sfnt;
+
+ FT_String* strname = NULL;
+ FT_String* psname = NULL;
+
+ FT_ULong pos;
+
+
+ pos = FT_STREAM_POS();
+
+ if ( ns->strid != 0xFFFF )
+ {
+ (void)sfnt->get_name( face,
+ (FT_UShort)ns->strid,
+ &strname );
+ if ( strname && !ft_strcmp( strname, ".notdef" ) )
+ strname = NULL;
+ }
+
+ if ( ns->psid != 0xFFFF )
+ {
+ (void)sfnt->get_name( face,
+ (FT_UShort)ns->psid,
+ &psname );
+ if ( psname && !ft_strcmp( psname, ".notdef" ) )
+ psname = NULL;
+ }
+
+ (void)FT_STREAM_SEEK( pos );
+
+ FT_TRACE5(( " instance %d (%s%s%s, %s%s%s)\n",
+ i,
+ strname ? "name: `" : "",
+ strname ? strname : "unnamed",
+ strname ? "'" : "",
+ psname ? "PS name: `" : "",
+ psname ? psname : "no PS name",
+ psname ? "'" : "" ));
+
+ FT_FREE( strname );
+ FT_FREE( psname );
+ }
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
+ ft_var_to_normalized( face, num_axes, ns->coords, nsc );
+ nsc += num_axes;
FT_FRAME_EXIT();
}
+
+ if ( num_instances != fvar_head.instanceCount )
+ {
+ SFNT_Service sfnt = (SFNT_Service)face->sfnt;
+
+ FT_Int found, dummy1, dummy2;
+ FT_UInt strid = ~0U;
+
+
+ /* the default instance is missing in array the */
+ /* of named instances; try to synthesize an entry */
+ found = sfnt->get_name_id( face,
+ TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY,
+ &dummy1,
+ &dummy2 );
+ if ( found )
+ strid = TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY;
+ else
+ {
+ found = sfnt->get_name_id( face,
+ TT_NAME_ID_FONT_SUBFAMILY,
+ &dummy1,
+ &dummy2 );
+ if ( found )
+ strid = TT_NAME_ID_FONT_SUBFAMILY;
+ }
+
+ if ( found )
+ {
+ found = sfnt->get_name_id( face,
+ TT_NAME_ID_PS_NAME,
+ &dummy1,
+ &dummy2 );
+ if ( found )
+ {
+ FT_TRACE5(( "TT_Get_MM_Var:"
+ " Adding default instance to named instances\n" ));
+
+ ns = &mmvar->namedstyle[fvar_head.instanceCount];
+
+ ns->strid = strid;
+ ns->psid = TT_NAME_ID_PS_NAME;
+
+ a = mmvar->axis;
+ c = ns->coords;
+ for ( j = 0; j < num_axes; j++, a++, c++ )
+ *c = a->def;
+ }
+ }
+ }
+
+ ft_var_load_mvar( face );
}
/* fill the output array if requested */
@@ -1489,22 +2356,25 @@
goto Exit;
FT_MEM_COPY( mmvar, face->blend->mmvar, face->blend->mmvar_len );
+ axis_flags =
+ (FT_UShort*)( (char*)mmvar + mmvar_size );
mmvar->axis =
- (FT_Var_Axis*)&( mmvar[1] );
+ (FT_Var_Axis*)( (char*)axis_flags + axis_flags_size );
mmvar->namedstyle =
- (FT_Var_Named_Style*)&( mmvar->axis[mmvar->num_axis] );
- next_coords =
- (FT_Fixed*)&( mmvar->namedstyle[mmvar->num_namedstyles] );
+ (FT_Var_Named_Style*)( (char*)mmvar->axis+ axis_size );
+ next_coords = (FT_Fixed*)( (char*)mmvar->namedstyle +
+ namedstyle_size );
for ( n = 0; n < mmvar->num_namedstyles; n++ )
{
mmvar->namedstyle[n].coords = next_coords;
- next_coords += mmvar->num_axis;
+ next_coords += num_axes;
}
a = mmvar->axis;
- next_name = (FT_String*)next_coords;
- for ( n = 0; n < mmvar->num_axis; n++ )
+ next_name = (FT_String*)( (char*)mmvar->namedstyle +
+ namedstyle_size + next_coords_size );
+ for ( n = 0; n < num_axes; n++ )
{
a->name = next_name;
@@ -1530,41 +2400,19 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* TT_Set_MM_Blend */
- /* */
- /* <Description> */
- /* Set the blend (normalized) coordinates for this instance of the */
- /* font. Check that the `gvar' table is reasonable and does some */
- /* initial preparation. */
- /* */
- /* <InOut> */
- /* face :: The font. */
- /* Initialize the blend structure with `gvar' data. */
- /* */
- /* <Input> */
- /* num_coords :: The number of available coordinates. If it is */
- /* larger than the number of axes, ignore the excess */
- /* values. If it is smaller than the number of axes, */
- /* use the default value (0) for the remaining axes. */
- /* */
- /* coords :: An array of `num_coords', each between [-1,1]. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_LOCAL_DEF( FT_Error )
- TT_Set_MM_Blend( TT_Face face,
+ static FT_Error
+ tt_set_mm_blend( TT_Face face,
FT_UInt num_coords,
- FT_Fixed* coords )
+ FT_Fixed* coords,
+ FT_Bool set_design_coords )
{
FT_Error error = FT_Err_Ok;
GX_Blend blend;
FT_MM_Var* mmvar;
FT_UInt i;
- FT_Bool is_default_instance = 1;
+
+ FT_Bool all_design_coords = FALSE;
+
FT_Memory memory = face->root.memory;
enum
@@ -1589,16 +2437,18 @@
if ( num_coords > mmvar->num_axis )
{
- FT_TRACE2(( "TT_Set_MM_Blend: only using first %d of %d coordinates\n",
+ FT_TRACE2(( "TT_Set_MM_Blend:"
+ " only using first %d of %d coordinates\n",
mmvar->num_axis, num_coords ));
num_coords = mmvar->num_axis;
}
- FT_TRACE5(( "normalized design coordinates:\n" ));
+ FT_TRACE5(( "TT_Set_MM_Blend:\n"
+ " normalized design coordinates:\n" ));
for ( i = 0; i < num_coords; i++ )
{
- FT_TRACE5(( " %.5f\n", coords[i] / 65536.0 ));
+ FT_TRACE5(( " %.5f\n", coords[i] / 65536.0 ));
if ( coords[i] < -0x00010000L || coords[i] > 0x00010000L )
{
FT_TRACE1(( "TT_Set_MM_Blend: normalized design coordinate %.5f\n"
@@ -1607,17 +2457,23 @@
error = FT_THROW( Invalid_Argument );
goto Exit;
}
-
- if ( coords[i] != 0 )
- is_default_instance = 0;
}
FT_TRACE5(( "\n" ));
- if ( !face->isCFF2 && !blend->glyphoffsets )
+ if ( !face->is_cff2 && !blend->glyphoffsets )
if ( FT_SET_ERROR( ft_var_load_gvar( face ) ) )
goto Exit;
+ if ( !blend->coords )
+ {
+ if ( FT_NEW_ARRAY( blend->coords, mmvar->num_axis ) )
+ goto Exit;
+
+ /* the first time we have to compute all design coordinates */
+ all_design_coords = TRUE;
+ }
+
if ( !blend->normalizedcoords )
{
if ( FT_NEW_ARRAY( blend->normalizedcoords, mmvar->num_axis ) )
@@ -1631,6 +2487,12 @@
}
else
{
+ FT_Bool have_diff = 0;
+ FT_UInt j;
+ FT_Fixed* c;
+ FT_Fixed* n;
+
+
manageCvt = mcvt_retain;
for ( i = 0; i < num_coords; i++ )
@@ -1638,10 +2500,34 @@
if ( blend->normalizedcoords[i] != coords[i] )
{
manageCvt = mcvt_load;
+ have_diff = 1;
break;
}
}
+ if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) )
+ {
+ FT_UInt idx = (FT_UInt)face->root.face_index >> 16;
+
+
+ c = blend->normalizedcoords + i;
+ n = blend->normalized_stylecoords + idx * mmvar->num_axis + i;
+ for ( j = i; j < mmvar->num_axis; j++, n++, c++ )
+ if ( *c != *n )
+ have_diff = 1;
+ }
+ else
+ {
+ c = blend->normalizedcoords + i;
+ for ( j = i; j < mmvar->num_axis; j++, c++ )
+ if ( *c != 0 )
+ have_diff = 1;
+ }
+
+ /* return value -1 indicates `no change' */
+ if ( !have_diff )
+ return -1;
+
for ( ; i < mmvar->num_axis; i++ )
{
if ( blend->normalizedcoords[i] != 0 )
@@ -1662,6 +2548,12 @@
coords,
num_coords * sizeof ( FT_Fixed ) );
+ if ( set_design_coords )
+ ft_var_to_design( face,
+ all_design_coords ? blend->num_axis : num_coords,
+ blend->normalizedcoords,
+ blend->coords );
+
face->doblend = TRUE;
if ( face->cvt )
@@ -1689,7 +2581,9 @@
}
}
- face->is_default_instance = is_default_instance;
+ /* enforce recomputation of the PostScript name; */
+ FT_FREE( face->postscript_name );
+ face->postscript_name = NULL;
Exit:
return error;
@@ -1699,6 +2593,52 @@
/*************************************************************************/
/* */
/* <Function> */
+ /* TT_Set_MM_Blend */
+ /* */
+ /* <Description> */
+ /* Set the blend (normalized) coordinates for this instance of the */
+ /* font. Check that the `gvar' table is reasonable and does some */
+ /* initial preparation. */
+ /* */
+ /* <InOut> */
+ /* face :: The font. */
+ /* Initialize the blend structure with `gvar' data. */
+ /* */
+ /* <Input> */
+ /* num_coords :: The number of available coordinates. If it is */
+ /* larger than the number of axes, ignore the excess */
+ /* values. If it is smaller than the number of axes, */
+ /* use the default value (0) for the remaining axes. */
+ /* */
+ /* coords :: An array of `num_coords', each between [-1,1]. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ FT_LOCAL_DEF( FT_Error )
+ TT_Set_MM_Blend( TT_Face face,
+ FT_UInt num_coords,
+ FT_Fixed* coords )
+ {
+ FT_Error error;
+
+
+ error = tt_set_mm_blend( face, num_coords, coords, 1 );
+ if ( error )
+ return error;
+
+ if ( num_coords )
+ face->root.face_flags |= FT_FACE_FLAG_VARIATION;
+ else
+ face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
+
+ return FT_Err_Ok;
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
/* TT_Get_MM_Blend */
/* */
/* <Description> */
@@ -1737,10 +2677,19 @@
blend = face->blend;
+ if ( !blend->coords )
+ {
+ /* select default instance coordinates */
+ /* if no instance is selected yet */
+ if ( FT_SET_ERROR( tt_set_mm_blend( face, 0, NULL, 1 ) ) )
+ return error;
+ }
+
nc = num_coords;
if ( num_coords > blend->num_axis )
{
- FT_TRACE2(( "TT_Get_MM_Blend: only using first %d of %d coordinates\n",
+ FT_TRACE2(( "TT_Get_MM_Blend:"
+ " only using first %d of %d coordinates\n",
blend->num_axis, num_coords ));
nc = blend->num_axis;
}
@@ -1793,14 +2742,17 @@
FT_UInt num_coords,
FT_Fixed* coords )
{
- FT_Error error = FT_Err_Ok;
- FT_Fixed* normalized = NULL;
- GX_Blend blend;
- FT_MM_Var* mmvar;
- FT_UInt i, j;
- FT_Var_Axis* a;
- GX_AVarSegment av;
- FT_Memory memory = face->root.memory;
+ FT_Error error = FT_Err_Ok;
+ GX_Blend blend;
+ FT_MM_Var* mmvar;
+ FT_UInt i;
+ FT_Memory memory = face->root.memory;
+
+ FT_Fixed* c;
+ FT_Fixed* n;
+ FT_Fixed* normalized = NULL;
+
+ FT_Bool have_diff = 0;
if ( !face->blend )
@@ -1820,83 +2772,81 @@
num_coords = mmvar->num_axis;
}
- /* Axis normalization is a two-stage process. First we normalize */
- /* based on the [min,def,max] values for the axis to be [-1,0,1]. */
- /* Then, if there's an `avar' table, we renormalize this range. */
-
- if ( FT_NEW_ARRAY( normalized, mmvar->num_axis ) )
- goto Exit;
-
- FT_TRACE5(( "design coordinates:\n" ));
-
- a = mmvar->axis;
- for ( i = 0; i < num_coords; i++, a++ )
+ if ( !blend->coords )
{
- FT_Fixed coord = coords[i];
-
+ if ( FT_NEW_ARRAY( blend->coords, mmvar->num_axis ) )
+ goto Exit;
+ }
- FT_TRACE5(( " %.5f\n", coord / 65536.0 ));
- if ( coord > a->maximum || coord < a->minimum )
+ c = blend->coords;
+ n = coords;
+ for ( i = 0; i < num_coords; i++, n++, c++ )
+ {
+ if ( *c != *n )
{
- FT_TRACE1((
- "TT_Set_Var_Design: design coordinate %.5f\n"
- " is out of range [%.5f;%.5f]; clamping\n",
- coord / 65536.0,
- a->minimum / 65536.0,
- a->maximum / 65536.0 ));
-
- if ( coord > a->maximum)
- coord = a->maximum;
- else
- coord = a->minimum;
+ *c = *n;
+ have_diff = 1;
}
-
- if ( coord < a->def )
- normalized[i] = -FT_DivFix( coords[i] - a->def,
- a->minimum - a->def );
- else if ( coord > a->def )
- normalized[i] = FT_DivFix( coords[i] - a->def,
- a->maximum - a->def );
- else
- normalized[i] = 0;
}
- FT_TRACE5(( "\n" ));
+ if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) )
+ {
+ FT_UInt instance_index;
+ FT_Var_Named_Style* named_style;
- for ( ; i < mmvar->num_axis; i++ )
- normalized[i] = 0;
- if ( !blend->avar_checked )
- ft_var_load_avar( face );
+ instance_index = (FT_UInt)face->root.face_index >> 16;
+ named_style = mmvar->namedstyle + instance_index - 1;
- if ( blend->avar_segment )
+ n = named_style->coords + num_coords;
+ for ( ; i < mmvar->num_axis; i++, n++, c++ )
+ {
+ if ( *c != *n )
+ {
+ *c = *n;
+ have_diff = 1;
+ }
+ }
+ }
+ else
{
- FT_TRACE5(( "normalized design coordinates"
- " before applying `avar' data:\n" ));
+ FT_Var_Axis* a;
- av = blend->avar_segment;
- for ( i = 0; i < mmvar->num_axis; i++, av++ )
+
+ a = mmvar->axis + num_coords;
+ for ( ; i < mmvar->num_axis; i++, a++, c++ )
{
- for ( j = 1; j < (FT_UInt)av->pairCount; j++ )
+ if ( *c != a->def )
{
- if ( normalized[i] < av->correspondence[j].fromCoord )
- {
- FT_TRACE5(( " %.5f\n", normalized[i] / 65536.0 ));
-
- normalized[i] =
- FT_MulDiv( normalized[i] - av->correspondence[j - 1].fromCoord,
- av->correspondence[j].toCoord -
- av->correspondence[j - 1].toCoord,
- av->correspondence[j].fromCoord -
- av->correspondence[j - 1].fromCoord ) +
- av->correspondence[j - 1].toCoord;
- break;
- }
+ *c = a->def;
+ have_diff = 1;
}
}
}
- error = TT_Set_MM_Blend( face, mmvar->num_axis, normalized );
+ /* return value -1 indicates `no change'; */
+ /* we can exit early if `normalizedcoords' is already computed */
+ if ( blend->normalizedcoords && !have_diff )
+ return -1;
+
+ if ( FT_NEW_ARRAY( normalized, mmvar->num_axis ) )
+ goto Exit;
+
+ if ( !face->blend->avar_loaded )
+ ft_var_load_avar( face );
+
+ FT_TRACE5(( "TT_Set_Var_Design:\n"
+ " normalized design coordinates:\n" ));
+ ft_var_to_normalized( face, num_coords, blend->coords, normalized );
+
+ error = tt_set_mm_blend( face, mmvar->num_axis, normalized, 0 );
+ if ( error )
+ goto Exit;
+
+ if ( num_coords )
+ face->root.face_flags |= FT_FACE_FLAG_VARIATION;
+ else
+ face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
Exit:
FT_FREE( normalized );
@@ -1932,12 +2882,8 @@
FT_Fixed* coords )
{
FT_Error error = FT_Err_Ok;
-
- GX_Blend blend;
- FT_MM_Var* mmvar;
- FT_Var_Axis* a;
-
- FT_UInt i, j, nc;
+ GX_Blend blend;
+ FT_UInt i, nc;
if ( !face->blend )
@@ -1948,10 +2894,19 @@
blend = face->blend;
+ if ( !blend->coords )
+ {
+ /* select default instance coordinates */
+ /* if no instance is selected yet */
+ if ( FT_SET_ERROR( tt_set_mm_blend( face, 0, NULL, 1 ) ) )
+ return error;
+ }
+
nc = num_coords;
if ( num_coords > blend->num_axis )
{
- FT_TRACE2(( "TT_Get_Var_Design: only using first %d of %d coordinates\n",
+ FT_TRACE2(( "TT_Get_Var_Design:"
+ " only using first %d of %d coordinates\n",
blend->num_axis, num_coords ));
nc = blend->num_axis;
}
@@ -1959,7 +2914,7 @@
if ( face->doblend )
{
for ( i = 0; i < nc; i++ )
- coords[i] = blend->normalizedcoords[i];
+ coords[i] = blend->coords[i];
}
else
{
@@ -1970,54 +2925,91 @@
for ( ; i < num_coords; i++ )
coords[i] = 0;
- if ( !blend->avar_checked )
- ft_var_load_avar( face );
+ return FT_Err_Ok;
+ }
- if ( blend->avar_segment )
- {
- GX_AVarSegment av = blend->avar_segment;
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* TT_Set_Named_Instance */
+ /* */
+ /* <Description> */
+ /* Set the given named instance, also resetting any further */
+ /* variation. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to the source face. */
+ /* */
+ /* instance_index :: The instance index, starting with value 1. */
+ /* Value 0 indicates to not use an instance. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0~means success. */
+ /* */
+ FT_LOCAL_DEF( FT_Error )
+ TT_Set_Named_Instance( TT_Face face,
+ FT_UInt instance_index )
+ {
+ FT_Error error = FT_ERR( Invalid_Argument );
+ GX_Blend blend;
+ FT_MM_Var* mmvar;
- FT_TRACE5(( "design coordinates"
- " after removing `avar' distortion:\n" ));
+ FT_UInt num_instances;
- for ( i = 0; i < nc; i++, av++ )
- {
- for ( j = 1; j < (FT_UInt)av->pairCount; j++ )
- {
- if ( coords[i] < av->correspondence[j].toCoord )
- {
- coords[i] =
- FT_MulDiv( coords[i] - av->correspondence[j - 1].toCoord,
- av->correspondence[j].fromCoord -
- av->correspondence[j - 1].fromCoord,
- av->correspondence[j].toCoord -
- av->correspondence[j - 1].toCoord ) +
- av->correspondence[j - 1].fromCoord;
- FT_TRACE5(( " %.5f\n", coords[i] / 65536.0 ));
- break;
- }
- }
- }
+ if ( !face->blend )
+ {
+ if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) )
+ goto Exit;
}
+ blend = face->blend;
mmvar = blend->mmvar;
- a = mmvar->axis;
- for ( i = 0; i < nc; i++, a++ )
+ num_instances = (FT_UInt)face->root.style_flags >> 16;
+
+ /* `instance_index' starts with value 1, thus `>' */
+ if ( instance_index > num_instances )
+ goto Exit;
+
+ if ( instance_index > 0 && mmvar->namedstyle )
{
- if ( coords[i] < 0 )
- coords[i] = a->def + FT_MulFix( coords[i],
- a->def - a->minimum );
- else if ( coords[i] > 0 )
- coords[i] = a->def + FT_MulFix( coords[i],
- a->maximum - a->def );
- else
- coords[i] = a->def;
+ FT_Memory memory = face->root.memory;
+ SFNT_Service sfnt = (SFNT_Service)face->sfnt;
+
+ FT_Var_Named_Style* named_style;
+ FT_String* style_name;
+
+
+ named_style = mmvar->namedstyle + instance_index - 1;
+
+ error = sfnt->get_name( face,
+ (FT_UShort)named_style->strid,
+ &style_name );
+ if ( error )
+ goto Exit;
+
+ /* set (or replace) style name */
+ FT_FREE( face->root.style_name );
+ face->root.style_name = style_name;
+
+ /* finally, select the named instance */
+ error = TT_Set_Var_Design( face,
+ mmvar->num_axis,
+ named_style->coords );
+ if ( error )
+ goto Exit;
}
+ else
+ error = TT_Set_Var_Design( face, 0, NULL );
- return FT_Err_Ok;
+ face->root.face_index = ( instance_index << 16 ) |
+ ( face->root.face_index & 0xFFFFL );
+ face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
+
+ Exit:
+ return error;
}
@@ -2067,8 +3059,10 @@
FT_Fixed* im_start_coords = NULL;
FT_Fixed* im_end_coords = NULL;
GX_Blend blend = face->blend;
- FT_UInt point_count;
- FT_UShort* localpoints;
+ FT_UInt point_count, spoint_count = 0;
+ FT_UShort* sharedpoints = NULL;
+ FT_UShort* localpoints = NULL;
+ FT_UShort* points;
FT_Short* deltas;
@@ -2137,11 +3131,24 @@
offsetToData += table_start;
- /* The documentation implies there are flags packed into */
- /* `tupleCount', but John Jenkins says that shared points don't apply */
- /* to `cvar', and no other flags are defined. */
+ if ( tupleCount & GX_TC_TUPLES_SHARE_POINT_NUMBERS )
+ {
+ here = FT_Stream_FTell( stream );
+
+ FT_Stream_SeekSet( stream, offsetToData );
+
+ sharedpoints = ft_var_readpackedpoints( stream,
+ table_len,
+ &spoint_count );
+ offsetToData = FT_Stream_FTell( stream );
+
+ FT_Stream_SeekSet( stream, here );
+ }
- FT_TRACE5(( "cvar: there are %d tuples:\n", tupleCount & 0xFFF ));
+ FT_TRACE5(( "cvar: there %s %d tuple%s:\n",
+ ( tupleCount & 0xFFF ) == 1 ? "is" : "are",
+ tupleCount & 0xFFF,
+ ( tupleCount & 0xFFF ) == 1 ? "" : "s" ));
for ( i = 0; i < ( tupleCount & 0xFFF ); i++ )
{
@@ -2155,26 +3162,25 @@
tupleDataSize = FT_GET_USHORT();
tupleIndex = FT_GET_USHORT();
- /* There is no provision here for a global tuple coordinate section, */
- /* so John says. There are no tuple indices, just embedded tuples. */
-
if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD )
{
for ( j = 0; j < blend->num_axis; j++ )
tuple_coords[j] = FT_GET_SHORT() * 4; /* convert from */
/* short frac to fixed */
}
- else
+ else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount )
{
- /* skip this tuple; it makes no sense */
-
- if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE )
- for ( j = 0; j < 2 * blend->num_axis; j++ )
- (void)FT_GET_SHORT();
+ FT_TRACE2(( "tt_face_vary_cvt:"
+ " invalid tuple index\n" ));
- offsetToData += tupleDataSize;
- continue;
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
}
+ else
+ FT_MEM_COPY(
+ tuple_coords,
+ &blend->tuplecoords[( tupleIndex & 0xFFF ) * blend->num_axis],
+ blend->num_axis * sizeof ( FT_Fixed ) );
if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE )
{
@@ -2189,11 +3195,8 @@
tuple_coords,
im_start_coords,
im_end_coords );
- if ( /* tuple isn't active for our blend */
- apply == 0 ||
- /* global points not allowed, */
- /* if they aren't local, makes no sense */
- !( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS ) )
+
+ if ( apply == 0 ) /* tuple isn't active for our blend */
{
offsetToData += tupleDataSize;
continue;
@@ -2203,14 +3206,27 @@
FT_Stream_SeekSet( stream, offsetToData );
- localpoints = ft_var_readpackedpoints( stream,
- table_len,
- &point_count );
- deltas = ft_var_readpackeddeltas( stream,
- table_len,
- point_count == 0 ? face->cvt_size
- : point_count );
- if ( !localpoints || !deltas )
+ if ( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS )
+ {
+ localpoints = ft_var_readpackedpoints( stream,
+ table_len,
+ &point_count );
+ points = localpoints;
+ }
+ else
+ {
+ points = sharedpoints;
+ point_count = spoint_count;
+ }
+
+ deltas = ft_var_readpackeddeltas( stream,
+ table_len,
+ point_count == 0 ? face->cvt_size
+ : point_count );
+
+ if ( !points ||
+ !deltas ||
+ ( localpoints == ALL_POINTS && point_count != face->cvt_size ) )
; /* failure, ignore it */
else if ( localpoints == ALL_POINTS )
@@ -2262,7 +3278,7 @@
FT_Long orig_cvt;
- pindex = localpoints[j];
+ pindex = points[j];
if ( (FT_ULong)pindex >= face->cvt_size )
continue;
@@ -2301,6 +3317,8 @@
FT_FRAME_EXIT();
Exit:
+ if ( sharedpoints != ALL_POINTS )
+ FT_FREE( sharedpoints );
FT_FREE( tuple_coords );
FT_FREE( im_start_coords );
FT_FREE( im_end_coords );
@@ -2389,25 +3407,12 @@
d1 = out1 - in1;
d2 = out2 - in2;
- if ( out1 == out2 || in1 == in2 )
+ /* If the reference points have the same coordinate but different */
+ /* delta, inferred delta is zero. Otherwise interpolate. */
+ if ( in1 != in2 || out1 == out2 )
{
- for ( p = p1; p <= p2; p++ )
- {
- out = in_points[p].x;
-
- if ( out <= in1 )
- out += d1;
- else if ( out >= in2 )
- out += d2;
- else
- out = out1;
-
- out_points[p].x = out;
- }
- }
- else
- {
- FT_Fixed scale = FT_DivFix( out2 - out1, in2 - in1 );
+ FT_Fixed scale = in1 != in2 ? FT_DivFix( out2 - out1, in2 - in1 )
+ : 0;
for ( p = p1; p <= p2; p++ )
@@ -2600,7 +3605,6 @@
glyph_start = FT_Stream_FTell( stream );
/* each set of glyph variation data is formatted similarly to `cvar' */
- /* (except we get shared points and global tuples) */
if ( FT_NEW_ARRAY( tuple_coords, blend->num_axis ) ||
FT_NEW_ARRAY( im_start_coords, blend->num_axis ) ||
@@ -2637,8 +3641,10 @@
FT_Stream_SeekSet( stream, here );
}
- FT_TRACE5(( "gvar: there are %d tuples:\n",
- tupleCount & GX_TC_TUPLE_COUNT_MASK ));
+ FT_TRACE5(( "gvar: there %s %d tuple%s:\n",
+ ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ? "is" : "are",
+ tupleCount & GX_TC_TUPLE_COUNT_MASK,
+ ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ? "" : "s" ));
for ( j = 0; j < n_points; j++ )
points_org[j] = outline->points[j];
@@ -2740,7 +3746,7 @@
FT_Pos delta_y = FT_MulFix( deltas_y[j], apply );
- if ( j < n_points - 3 )
+ if ( j < n_points - 4 )
{
outline->points[j].x += delta_x;
outline->points[j].y += delta_y;
@@ -2750,25 +3756,25 @@
/* To avoid double adjustment of advance width or height, */
/* adjust phantom points only if there is no HVAR or VVAR */
/* support, respectively. */
- if ( j == ( n_points - 3 ) &&
- !( face->variation_support &
- TT_FACE_FLAG_VAR_HADVANCE ) )
+ if ( j == ( n_points - 4 ) &&
+ !( face->variation_support &
+ TT_FACE_FLAG_VAR_LSB ) )
+ outline->points[j].x += delta_x;
+
+ else if ( j == ( n_points - 3 ) &&
+ !( face->variation_support &
+ TT_FACE_FLAG_VAR_HADVANCE ) )
outline->points[j].x += delta_x;
else if ( j == ( n_points - 2 ) &&
!( face->variation_support &
- TT_FACE_FLAG_VAR_LSB ) )
- outline->points[j].x += delta_x;
+ TT_FACE_FLAG_VAR_TSB ) )
+ outline->points[j].y += delta_y;
else if ( j == ( n_points - 1 ) &&
!( face->variation_support &
TT_FACE_FLAG_VAR_VADVANCE ) )
outline->points[j].y += delta_y;
-
- else if ( j == ( n_points - 0 ) &&
- !( face->variation_support &
- TT_FACE_FLAG_VAR_TSB ) )
- outline->points[j].y += delta_y;
}
#ifdef FT_DEBUG_LEVEL_TRACE
@@ -2835,8 +3841,36 @@
FT_Pos delta_y = points_out[j].y - points_org[j].y;
- outline->points[j].x += delta_x;
- outline->points[j].y += delta_y;
+ if ( j < n_points - 4 )
+ {
+ outline->points[j].x += delta_x;
+ outline->points[j].y += delta_y;
+ }
+ else
+ {
+ /* To avoid double adjustment of advance width or height, */
+ /* adjust phantom points only if there is no HVAR or VVAR */
+ /* support, respectively. */
+ if ( j == ( n_points - 4 ) &&
+ !( face->variation_support &
+ TT_FACE_FLAG_VAR_LSB ) )
+ outline->points[j].x += delta_x;
+
+ else if ( j == ( n_points - 3 ) &&
+ !( face->variation_support &
+ TT_FACE_FLAG_VAR_HADVANCE ) )
+ outline->points[j].x += delta_x;
+
+ else if ( j == ( n_points - 2 ) &&
+ !( face->variation_support &
+ TT_FACE_FLAG_VAR_TSB ) )
+ outline->points[j].y += delta_y;
+
+ else if ( j == ( n_points - 1 ) &&
+ !( face->variation_support &
+ TT_FACE_FLAG_VAR_VADVANCE ) )
+ outline->points[j].y += delta_y;
+ }
#ifdef FT_DEBUG_LEVEL_TRACE
if ( delta_x || delta_y )
@@ -2902,16 +3936,19 @@
tt_get_var_blend( TT_Face face,
FT_UInt *num_coords,
FT_Fixed* *coords,
+ FT_Fixed* *normalizedcoords,
FT_MM_Var* *mm_var )
{
if ( face->blend )
{
if ( num_coords )
- *num_coords = face->blend->num_axis;
+ *num_coords = face->blend->num_axis;
if ( coords )
- *coords = face->blend->normalizedcoords;
+ *coords = face->blend->coords;
+ if ( normalizedcoords )
+ *normalizedcoords = face->blend->normalizedcoords;
if ( mm_var )
- *mm_var = face->blend->mmvar;
+ *mm_var = face->blend->mmvar;
}
else
{
@@ -2927,6 +3964,35 @@
}
+ static void
+ ft_var_done_item_variation_store( TT_Face face,
+ GX_ItemVarStore itemStore )
+ {
+ FT_Memory memory = FT_FACE_MEMORY( face );
+ FT_UInt i;
+
+
+ if ( itemStore->varData )
+ {
+ for ( i = 0; i < itemStore->dataCount; i++ )
+ {
+ FT_FREE( itemStore->varData[i].regionIndices );
+ FT_FREE( itemStore->varData[i].deltaSet );
+ }
+
+ FT_FREE( itemStore->varData );
+ }
+
+ if ( itemStore->varRegionList )
+ {
+ for ( i = 0; i < itemStore->regionCount; i++ )
+ FT_FREE( itemStore->varRegionList[i].axisList );
+
+ FT_FREE( itemStore->varRegionList );
+ }
+ }
+
+
/*************************************************************************/
/* */
/* <Function> */
@@ -2950,7 +4016,9 @@
/* blend->num_axis might not be set up yet */
num_axes = blend->mmvar->num_axis;
+ FT_FREE( blend->coords );
FT_FREE( blend->normalizedcoords );
+ FT_FREE( blend->normalized_stylecoords );
FT_FREE( blend->mmvar );
if ( blend->avar_segment )
@@ -2962,35 +4030,45 @@
if ( blend->hvar_table )
{
- if ( blend->hvar_table->itemStore.varData )
- {
- for ( i = 0; i < blend->hvar_table->itemStore.dataCount; i++ )
- {
- FT_FREE( blend->hvar_table->itemStore.varData[i].regionIndices );
- FT_FREE( blend->hvar_table->itemStore.varData[i].deltaSet );
- }
- FT_FREE( blend->hvar_table->itemStore.varData );
- }
-
- if ( blend->hvar_table->itemStore.varRegionList )
- {
- for ( i = 0; i < blend->hvar_table->itemStore.regionCount; i++ )
- FT_FREE( blend->hvar_table->itemStore.varRegionList[i].axisList );
- FT_FREE( blend->hvar_table->itemStore.varRegionList );
- }
+ ft_var_done_item_variation_store( face,
+ &blend->hvar_table->itemStore );
FT_FREE( blend->hvar_table->widthMap.innerIndex );
FT_FREE( blend->hvar_table->widthMap.outerIndex );
FT_FREE( blend->hvar_table );
}
+ if ( blend->vvar_table )
+ {
+ ft_var_done_item_variation_store( face,
+ &blend->vvar_table->itemStore );
+
+ FT_FREE( blend->vvar_table->widthMap.innerIndex );
+ FT_FREE( blend->vvar_table->widthMap.outerIndex );
+ FT_FREE( blend->vvar_table );
+ }
+
+ if ( blend->mvar_table )
+ {
+ ft_var_done_item_variation_store( face,
+ &blend->mvar_table->itemStore );
+
+ FT_FREE( blend->mvar_table->values );
+ FT_FREE( blend->mvar_table );
+ }
+
FT_FREE( blend->tuplecoords );
FT_FREE( blend->glyphoffsets );
FT_FREE( blend );
}
}
-#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+#else /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _tt_gxvar_dummy;
+
+#endif /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */
/* END */
diff --git a/modules/freetype2/src/truetype/ttgxvar.h b/modules/freetype2/src/truetype/ttgxvar.h
index 215e109cc..a37bb9026 100644
--- a/modules/freetype2/src/truetype/ttgxvar.h
+++ b/modules/freetype2/src/truetype/ttgxvar.h
@@ -4,7 +4,7 @@
/* */
/* TrueType GX Font Variation loader (specification) */
/* */
-/* Copyright 2004-2016 by */
+/* Copyright 2004-2018 by */
/* David Turner, Robert Wilhelm, Werner Lemberg and George Williams. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,6 +27,8 @@
FT_BEGIN_HEADER
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
/*************************************************************************/
/* */
/* <Struct> */
@@ -61,7 +63,7 @@ FT_BEGIN_HEADER
} GX_AVarSegmentRec, *GX_AVarSegment;
- typedef struct GX_HVarDataRec_
+ typedef struct GX_ItemVarDataRec_
{
FT_UInt itemCount; /* number of delta sets per item */
FT_UInt regionIdxCount; /* number of region indices in this data */
@@ -70,7 +72,7 @@ FT_BEGIN_HEADER
FT_Short* deltaSet; /* array of `itemCount' deltas */
/* use `innerIndex' for this array */
- } GX_HVarDataRec, *GX_HVarData;
+ } GX_ItemVarDataRec, *GX_ItemVarData;
/* contribution of one axis to a region */
@@ -83,53 +85,128 @@ FT_BEGIN_HEADER
} GX_AxisCoordsRec, *GX_AxisCoords;
- typedef struct GX_HVarRegionRec_
+ typedef struct GX_VarRegionRec_
{
GX_AxisCoords axisList; /* array of axisCount records */
- } GX_HVarRegionRec, *GX_HVarRegion;
+ } GX_VarRegionRec, *GX_VarRegion;
- /* HVAR item variation store */
- typedef struct GX_HVStoreRec_
+ /* item variation store */
+ typedef struct GX_ItemVarStoreRec_
{
- FT_UInt dataCount;
- GX_HVarData varData; /* array of dataCount records; */
- /* use `outerIndex' for this array */
- FT_UShort axisCount;
- FT_UInt regionCount; /* total number of regions defined */
- GX_HVarRegion varRegionList;
+ FT_UInt dataCount;
+ GX_ItemVarData varData; /* array of dataCount records; */
+ /* use `outerIndex' for this array */
+ FT_UShort axisCount;
+ FT_UInt regionCount; /* total number of regions defined */
+ GX_VarRegion varRegionList;
- } GX_HVStoreRec, *GX_HVStore;
+ } GX_ItemVarStoreRec, *GX_ItemVarStore;
- typedef struct GX_WidthMapRec_
+ typedef struct GX_DeltaSetIdxMapRec_
{
FT_UInt mapCount;
FT_UInt* outerIndex; /* indices to item var data */
FT_UInt* innerIndex; /* indices to delta set */
- } GX_WidthMapRec, *GX_WidthMap;
+ } GX_DeltaSetIdxMapRec, *GX_DeltaSetIdxMap;
/*************************************************************************/
/* */
/* <Struct> */
- /* GX_HVarTableRec */
+ /* GX_HVVarTableRec */
/* */
/* <Description> */
- /* Data from the `HVAR' table. */
+ /* Data from either the `HVAR' or `VVAR' table. */
/* */
- typedef struct GX_HVarTableRec_
+ typedef struct GX_HVVarTableRec_
{
- GX_HVStoreRec itemStore; /* Item Variation Store */
- GX_WidthMapRec widthMap; /* Advance Width Mapping */
+ GX_ItemVarStoreRec itemStore; /* Item Variation Store */
+ GX_DeltaSetIdxMapRec widthMap; /* Advance Width Mapping */
+
#if 0
- GX_LSBMap LsbMap; /* not implemented */
- GX_RSBMap RsbMap; /* not implemented */
+ GX_DeltaSetIdxMapRec lsbMap; /* not implemented */
+ GX_DeltaSetIdxMapRec rsbMap; /* not implemented */
+
+ GX_DeltaSetIdxMapRec tsbMap; /* not implemented */
+ GX_DeltaSetIdxMapRec bsbMap; /* not implemented */
+ GX_DeltaSetIdxMapRec vorgMap; /* not implemented */
#endif
- } GX_HVarTableRec, *GX_HVarTable;
+ } GX_HVVarTableRec, *GX_HVVarTable;
+
+
+#define MVAR_TAG_GASP_0 FT_MAKE_TAG( 'g', 's', 'p', '0' )
+#define MVAR_TAG_GASP_1 FT_MAKE_TAG( 'g', 's', 'p', '1' )
+#define MVAR_TAG_GASP_2 FT_MAKE_TAG( 'g', 's', 'p', '2' )
+#define MVAR_TAG_GASP_3 FT_MAKE_TAG( 'g', 's', 'p', '3' )
+#define MVAR_TAG_GASP_4 FT_MAKE_TAG( 'g', 's', 'p', '4' )
+#define MVAR_TAG_GASP_5 FT_MAKE_TAG( 'g', 's', 'p', '5' )
+#define MVAR_TAG_GASP_6 FT_MAKE_TAG( 'g', 's', 'p', '6' )
+#define MVAR_TAG_GASP_7 FT_MAKE_TAG( 'g', 's', 'p', '7' )
+#define MVAR_TAG_GASP_8 FT_MAKE_TAG( 'g', 's', 'p', '8' )
+#define MVAR_TAG_GASP_9 FT_MAKE_TAG( 'g', 's', 'p', '9' )
+
+#define MVAR_TAG_CPHT FT_MAKE_TAG( 'c', 'p', 'h', 't' )
+#define MVAR_TAG_HASC FT_MAKE_TAG( 'h', 'a', 's', 'c' )
+#define MVAR_TAG_HCLA FT_MAKE_TAG( 'h', 'c', 'l', 'a' )
+#define MVAR_TAG_HCLD FT_MAKE_TAG( 'h', 'c', 'l', 'd' )
+#define MVAR_TAG_HCOF FT_MAKE_TAG( 'h', 'c', 'o', 'f' )
+#define MVAR_TAG_HCRN FT_MAKE_TAG( 'h', 'c', 'r', 'n' )
+#define MVAR_TAG_HCRS FT_MAKE_TAG( 'h', 'c', 'r', 's' )
+#define MVAR_TAG_HDSC FT_MAKE_TAG( 'h', 'd', 's', 'c' )
+#define MVAR_TAG_HLGP FT_MAKE_TAG( 'h', 'l', 'g', 'p' )
+#define MVAR_TAG_SBXO FT_MAKE_TAG( 's', 'b', 'x', 'o' )
+#define MVAR_TAG_SBXS FT_MAKE_TAG( 's', 'b', 'x', 's' )
+#define MVAR_TAG_SBYO FT_MAKE_TAG( 's', 'b', 'y', 'o' )
+#define MVAR_TAG_SBYS FT_MAKE_TAG( 's', 'b', 'y', 's' )
+#define MVAR_TAG_SPXO FT_MAKE_TAG( 's', 'p', 'x', 'o' )
+#define MVAR_TAG_SPXS FT_MAKE_TAG( 's', 'p', 'x', 's' )
+#define MVAR_TAG_SPYO FT_MAKE_TAG( 's', 'p', 'y', 'o' )
+#define MVAR_TAG_SPYS FT_MAKE_TAG( 's', 'p', 'y', 's' )
+#define MVAR_TAG_STRO FT_MAKE_TAG( 's', 't', 'r', 'o' )
+#define MVAR_TAG_STRS FT_MAKE_TAG( 's', 't', 'r', 's' )
+#define MVAR_TAG_UNDO FT_MAKE_TAG( 'u', 'n', 'd', 'o' )
+#define MVAR_TAG_UNDS FT_MAKE_TAG( 'u', 'n', 'd', 's' )
+#define MVAR_TAG_VASC FT_MAKE_TAG( 'v', 'a', 's', 'c' )
+#define MVAR_TAG_VCOF FT_MAKE_TAG( 'v', 'c', 'o', 'f' )
+#define MVAR_TAG_VCRN FT_MAKE_TAG( 'v', 'c', 'r', 'n' )
+#define MVAR_TAG_VCRS FT_MAKE_TAG( 'v', 'c', 'r', 's' )
+#define MVAR_TAG_VDSC FT_MAKE_TAG( 'v', 'd', 's', 'c' )
+#define MVAR_TAG_VLGP FT_MAKE_TAG( 'v', 'l', 'g', 'p' )
+#define MVAR_TAG_XHGT FT_MAKE_TAG( 'x', 'h', 'g', 't' )
+
+
+ typedef struct GX_ValueRec_
+ {
+ FT_ULong tag;
+ FT_UShort outerIndex;
+ FT_UShort innerIndex;
+
+ FT_Short unmodified; /* values are either FT_Short or FT_UShort */
+
+ } GX_ValueRec, *GX_Value;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* GX_MVarTableRec */
+ /* */
+ /* <Description> */
+ /* Data from the `MVAR' table. */
+ /* */
+ typedef struct GX_MVarTableRec_
+ {
+ FT_UShort valueCount;
+
+ GX_ItemVarStoreRec itemStore; /* Item Variation Store */
+ GX_Value values; /* Value Records */
+
+ } GX_MVarTableRec, *GX_MVarTable;
/*************************************************************************/
@@ -139,37 +216,120 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Data for interpolating a font from a distortable font specified */
- /* by the GX *var tables ([fgca]var). */
+ /* by the GX *var tables ([fgcahvm]var). */
/* */
/* <Fields> */
- /* num_axis :: The number of axes along which interpolation */
- /* may happen */
+ /* num_axis :: */
+ /* The number of axes along which interpolation may happen. */
+ /* */
+ /* coords :: */
+ /* An array of design coordinates (in user space) indicating the */
+ /* contribution along each axis to the final interpolated font. */
+ /* `normalizedcoords' holds the same values. */
+ /* */
+ /* normalizedcoords :: */
+ /* An array of normalized values (between [-1,1]) indicating the */
+ /* contribution along each axis to the final interpolated font. */
+ /* `coords' holds the same values. */
+ /* */
+ /* mmvar :: */
+ /* Data from the `fvar' table. */
+ /* */
+ /* mmvar_len :: */
+ /* The length of the `mmvar' structure. */
+ /* */
+ /* normalized_stylecoords :: */
+ /* A two-dimensional array that holds the named instance data from */
+ /* `mmvar' as normalized values. */
+ /* */
+ /* avar_loaded :: */
+ /* A Boolean; if set, FreeType tried to load (and parse) the `avar' */
+ /* table. */
+ /* */
+ /* avar_segment :: */
+ /* Data from the `avar' table. */
+ /* */
+ /* hvar_loaded :: */
+ /* A Boolean; if set, FreeType tried to load (and parse) the `hvar' */
+ /* table. */
/* */
- /* normalizedcoords :: A normalized value (between [-1,1]) indicating */
- /* the contribution along each axis to the final */
- /* interpolated font. */
+ /* hvar_checked :: */
+ /* A Boolean; if set, FreeType successfully loaded and parsed the */
+ /* `hvar' table. */
+ /* */
+ /* hvar_error :: */
+ /* If loading and parsing of the `hvar' table failed, this field */
+ /* holds the corresponding error code. */
+ /* */
+ /* hvar_table :: */
+ /* Data from the `hvar' table. */
+ /* */
+ /* vvar_loaded :: */
+ /* A Boolean; if set, FreeType tried to load (and parse) the `vvar' */
+ /* table. */
+ /* */
+ /* vvar_checked :: */
+ /* A Boolean; if set, FreeType successfully loaded and parsed the */
+ /* `vvar' table. */
+ /* */
+ /* vvar_error :: */
+ /* If loading and parsing of the `vvar' table failed, this field */
+ /* holds the corresponding error code. */
+ /* */
+ /* vvar_table :: */
+ /* Data from the `vvar' table. */
+ /* */
+ /* mvar_table :: */
+ /* Data from the `mvar' table. */
+ /* */
+ /* tuplecount :: */
+ /* The number of shared tuples in the `gvar' table. */
+ /* */
+ /* tuplecoords :: */
+ /* A two-dimensional array that holds the shared tuple coordinates */
+ /* in the `gvar' table. */
+ /* */
+ /* gv_glyphcnt :: */
+ /* The number of glyphs handled in the `gvar' table. */
+ /* */
+ /* glyphoffsets :: */
+ /* Offsets into the glyph variation data array. */
+ /* */
+ /* gvar_size :: */
+ /* The size of the `gvar' table. */
/* */
typedef struct GX_BlendRec_
{
FT_UInt num_axis;
+ FT_Fixed* coords;
FT_Fixed* normalizedcoords;
FT_MM_Var* mmvar;
FT_Offset mmvar_len;
- FT_Bool avar_checked;
- GX_AVarSegment avar_segment;
+ FT_Fixed* normalized_stylecoords;
+ /* normalized_stylecoords[num_namedstyles][num_axis] */
+
+ FT_Bool avar_loaded;
+ GX_AVarSegment avar_segment; /* avar_segment[num_axis] */
FT_Bool hvar_loaded;
FT_Bool hvar_checked;
FT_Error hvar_error;
- GX_HVarTable hvar_table;
+ GX_HVVarTable hvar_table;
+
+ FT_Bool vvar_loaded;
+ FT_Bool vvar_checked;
+ FT_Error vvar_error;
+ GX_HVVarTable vvar_table;
+
+ GX_MVarTable mvar_table;
- FT_UInt tuplecount; /* shared tuples in `gvar' */
- FT_Fixed* tuplecoords; /* tuplecoords[tuplecount][num_axis] */
+ FT_UInt tuplecount;
+ FT_Fixed* tuplecoords; /* tuplecoords[tuplecount][num_axis] */
FT_UInt gv_glyphcnt;
- FT_ULong* glyphoffsets;
+ FT_ULong* glyphoffsets; /* glyphoffsets[gv_glyphcnt + 1] */
FT_ULong gvar_size;
@@ -244,6 +404,10 @@ FT_BEGIN_HEADER
FT_Fixed* coords );
FT_LOCAL( FT_Error )
+ TT_Set_Named_Instance( TT_Face face,
+ FT_UInt instance_index );
+
+ FT_LOCAL( FT_Error )
tt_face_vary_cvt( TT_Face face,
FT_Stream stream );
@@ -260,14 +424,25 @@ FT_BEGIN_HEADER
FT_Int *adelta );
FT_LOCAL( FT_Error )
+ tt_vadvance_adjust( TT_Face face,
+ FT_UInt gindex,
+ FT_Int *adelta );
+
+ FT_LOCAL( void )
+ tt_apply_mvar( TT_Face face );
+
+ FT_LOCAL( FT_Error )
tt_get_var_blend( TT_Face face,
FT_UInt *num_coords,
FT_Fixed* *coords,
+ FT_Fixed* *normalizedcoords,
FT_MM_Var* *mm_var );
FT_LOCAL( void )
tt_done_blend( TT_Face face );
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+
FT_END_HEADER
diff --git a/modules/freetype2/src/truetype/ttinterp.c b/modules/freetype2/src/truetype/ttinterp.c
index 4a506ee81..da9b595ab 100644
--- a/modules/freetype2/src/truetype/ttinterp.c
+++ b/modules/freetype2/src/truetype/ttinterp.c
@@ -4,7 +4,7 @@
/* */
/* TrueType bytecode interpreter (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -25,7 +25,7 @@
#include FT_INTERNAL_CALC_H
#include FT_TRIGONOMETRY_H
#include FT_SYSTEM_H
-#include FT_TRUETYPE_DRIVER_H
+#include FT_DRIVER_H
#include FT_MULTIPLE_MASTERS_H
#include "ttinterp.h"
@@ -65,11 +65,15 @@
TT_INTERPRETER_VERSION_40 )
#endif
-#define PROJECT( v1, v2 ) \
- exc->func_project( exc, (v1)->x - (v2)->x, (v1)->y - (v2)->y )
+#define PROJECT( v1, v2 ) \
+ exc->func_project( exc, \
+ SUB_LONG( (v1)->x, (v2)->x ), \
+ SUB_LONG( (v1)->y, (v2)->y ) )
-#define DUALPROJ( v1, v2 ) \
- exc->func_dualproj( exc, (v1)->x - (v2)->x, (v1)->y - (v2)->y )
+#define DUALPROJ( v1, v2 ) \
+ exc->func_dualproj( exc, \
+ SUB_LONG( (v1)->x, (v2)->x ), \
+ SUB_LONG( (v1)->y, (v2)->y ) )
#define FAST_PROJECT( v ) \
exc->func_project( exc, (v)->x, (v)->y )
@@ -402,7 +406,7 @@
exec->IDefs = size->instruction_defs;
exec->pointSize = size->point_size;
exec->tt_metrics = size->ttmetrics;
- exec->metrics = size->metrics;
+ exec->metrics = *size->metrics;
exec->maxFunc = size->max_func;
exec->maxIns = size->max_ins;
@@ -1656,7 +1660,7 @@
/* zone :: The affected glyph zone. */
/* */
/* <Note> */
- /* See `ttinterp.h' for details on backwards compatibility mode. */
+ /* See `ttinterp.h' for details on backward compatibility mode. */
/* `Touches' the point. */
/* */
static void
@@ -1676,7 +1680,10 @@
if ( SUBPIXEL_HINTING_INFINALITY &&
( !exc->ignore_x_mode ||
( exc->sph_tweak_flags & SPH_TWEAK_ALLOW_X_DMOVE ) ) )
- zone->cur[point].x += FT_MulDiv( distance, v, exc->F_dot_P );
+ zone->cur[point].x = ADD_LONG( zone->cur[point].x,
+ FT_MulDiv( distance,
+ v,
+ exc->F_dot_P ) );
else
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
@@ -1684,13 +1691,19 @@
/* Exception to the post-IUP curfew: Allow the x component of */
/* diagonal moves, but only post-IUP. DejaVu tries to adjust */
/* diagonal stems like on `Z' and `z' post-IUP. */
- if ( SUBPIXEL_HINTING_MINIMAL && !exc->backwards_compatibility )
- zone->cur[point].x += FT_MulDiv( distance, v, exc->F_dot_P );
+ if ( SUBPIXEL_HINTING_MINIMAL && !exc->backward_compatibility )
+ zone->cur[point].x = ADD_LONG( zone->cur[point].x,
+ FT_MulDiv( distance,
+ v,
+ exc->F_dot_P ) );
else
#endif
if ( NO_SUBPIXEL_HINTING )
- zone->cur[point].x += FT_MulDiv( distance, v, exc->F_dot_P );
+ zone->cur[point].x = ADD_LONG( zone->cur[point].x,
+ FT_MulDiv( distance,
+ v,
+ exc->F_dot_P ) );
zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
@@ -1700,12 +1713,15 @@
if ( v != 0 )
{
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- if ( !( SUBPIXEL_HINTING_MINIMAL &&
- exc->backwards_compatibility &&
- exc->iupx_called &&
- exc->iupy_called ) )
+ if ( !( SUBPIXEL_HINTING_MINIMAL &&
+ exc->backward_compatibility &&
+ exc->iupx_called &&
+ exc->iupy_called ) )
#endif
- zone->cur[point].y += FT_MulDiv( distance, v, exc->F_dot_P );
+ zone->cur[point].y = ADD_LONG( zone->cur[point].y,
+ FT_MulDiv( distance,
+ v,
+ exc->F_dot_P ) );
zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
}
@@ -1741,12 +1757,18 @@
v = exc->GS.freeVector.x;
if ( v != 0 )
- zone->org[point].x += FT_MulDiv( distance, v, exc->F_dot_P );
+ zone->org[point].x = ADD_LONG( zone->org[point].x,
+ FT_MulDiv( distance,
+ v,
+ exc->F_dot_P ) );
v = exc->GS.freeVector.y;
if ( v != 0 )
- zone->org[point].y += FT_MulDiv( distance, v, exc->F_dot_P );
+ zone->org[point].y = ADD_LONG( zone->org[point].y,
+ FT_MulDiv( distance,
+ v,
+ exc->F_dot_P ) );
}
@@ -1756,7 +1778,7 @@
/* */
/* The following versions are used whenever both vectors are both */
/* along one of the coordinate unit vectors, i.e. in 90% of the cases. */
- /* See `ttinterp.h' for details on backwards compatibility mode. */
+ /* See `ttinterp.h' for details on backward compatibility mode. */
/* */
/*************************************************************************/
@@ -1769,18 +1791,18 @@
{
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
if ( SUBPIXEL_HINTING_INFINALITY && !exc->ignore_x_mode )
- zone->cur[point].x += distance;
+ zone->cur[point].x = ADD_LONG( zone->cur[point].x, distance );
else
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- if ( SUBPIXEL_HINTING_MINIMAL && !exc->backwards_compatibility )
- zone->cur[point].x += distance;
+ if ( SUBPIXEL_HINTING_MINIMAL && !exc->backward_compatibility )
+ zone->cur[point].x = ADD_LONG( zone->cur[point].x, distance );
else
#endif
if ( NO_SUBPIXEL_HINTING )
- zone->cur[point].x += distance;
+ zone->cur[point].x = ADD_LONG( zone->cur[point].x, distance );
zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
@@ -1796,10 +1818,10 @@
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
if ( !( SUBPIXEL_HINTING_MINIMAL &&
- exc->backwards_compatibility &&
+ exc->backward_compatibility &&
exc->iupx_called && exc->iupy_called ) )
#endif
- zone->cur[point].y += distance;
+ zone->cur[point].y = ADD_LONG( zone->cur[point].y, distance );
zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
}
@@ -1823,7 +1845,7 @@
{
FT_UNUSED( exc );
- zone->org[point].x += distance;
+ zone->org[point].x = ADD_LONG( zone->org[point].x, distance );
}
@@ -1835,7 +1857,7 @@
{
FT_UNUSED( exc );
- zone->org[point].y += distance;
+ zone->org[point].y = ADD_LONG( zone->org[point].y, distance );
}
@@ -1873,13 +1895,13 @@
if ( distance >= 0 )
{
- val = distance + compensation;
+ val = ADD_LONG( distance, compensation );
if ( val < 0 )
val = 0;
}
else
{
- val = distance - compensation;
+ val = SUB_LONG( distance, compensation );
if ( val > 0 )
val = 0;
}
@@ -1915,13 +1937,14 @@
if ( distance >= 0 )
{
- val = FT_PIX_ROUND( distance + compensation );
+ val = FT_PIX_ROUND_LONG( ADD_LONG( distance, compensation ) );
if ( val < 0 )
val = 0;
}
else
{
- val = -FT_PIX_ROUND( compensation - distance );
+ val = NEG_LONG( FT_PIX_ROUND_LONG( SUB_LONG( compensation,
+ distance ) ) );
if ( val > 0 )
val = 0;
}
@@ -1958,13 +1981,16 @@
if ( distance >= 0 )
{
- val = FT_PIX_FLOOR( distance + compensation ) + 32;
+ val = ADD_LONG( FT_PIX_FLOOR( ADD_LONG( distance, compensation ) ),
+ 32 );
if ( val < 0 )
val = 32;
}
else
{
- val = -( FT_PIX_FLOOR( compensation - distance ) + 32 );
+ val = NEG_LONG( ADD_LONG( FT_PIX_FLOOR( SUB_LONG( compensation,
+ distance ) ),
+ 32 ) );
if ( val > 0 )
val = -32;
}
@@ -2001,13 +2027,13 @@
if ( distance >= 0 )
{
- val = FT_PIX_FLOOR( distance + compensation );
+ val = FT_PIX_FLOOR( ADD_LONG( distance, compensation ) );
if ( val < 0 )
val = 0;
}
else
{
- val = -FT_PIX_FLOOR( compensation - distance );
+ val = NEG_LONG( FT_PIX_FLOOR( SUB_LONG( compensation, distance ) ) );
if ( val > 0 )
val = 0;
}
@@ -2044,13 +2070,14 @@
if ( distance >= 0 )
{
- val = FT_PIX_CEIL( distance + compensation );
+ val = FT_PIX_CEIL_LONG( ADD_LONG( distance, compensation ) );
if ( val < 0 )
val = 0;
}
else
{
- val = -FT_PIX_CEIL( compensation - distance );
+ val = NEG_LONG( FT_PIX_CEIL_LONG( SUB_LONG( compensation,
+ distance ) ) );
if ( val > 0 )
val = 0;
}
@@ -2087,13 +2114,14 @@
if ( distance >= 0 )
{
- val = FT_PAD_ROUND( distance + compensation, 32 );
+ val = FT_PAD_ROUND_LONG( ADD_LONG( distance, compensation ), 32 );
if ( val < 0 )
val = 0;
}
else
{
- val = -FT_PAD_ROUND( compensation - distance, 32 );
+ val = NEG_LONG( FT_PAD_ROUND_LONG( SUB_LONG( compensation, distance ),
+ 32 ) );
if ( val > 0 )
val = 0;
}
@@ -2134,17 +2162,19 @@
if ( distance >= 0 )
{
- val = ( distance - exc->phase + exc->threshold + compensation ) &
+ val = ADD_LONG( distance,
+ exc->threshold - exc->phase + compensation ) &
-exc->period;
- val += exc->phase;
+ val = ADD_LONG( val, exc->phase );
if ( val < 0 )
val = exc->phase;
}
else
{
- val = -( ( exc->threshold - exc->phase - distance + compensation ) &
- -exc->period );
- val -= exc->phase;
+ val = NEG_LONG( SUB_LONG( exc->threshold - exc->phase + compensation,
+ distance ) &
+ -exc->period );
+ val = SUB_LONG( val, exc->phase );
if ( val > 0 )
val = -exc->phase;
}
@@ -2183,17 +2213,19 @@
if ( distance >= 0 )
{
- val = ( ( distance - exc->phase + exc->threshold + compensation ) /
+ val = ( ADD_LONG( distance,
+ exc->threshold - exc->phase + compensation ) /
exc->period ) * exc->period;
- val += exc->phase;
+ val = ADD_LONG( val, exc->phase );
if ( val < 0 )
val = exc->phase;
}
else
{
- val = -( ( ( exc->threshold - exc->phase - distance + compensation ) /
- exc->period ) * exc->period );
- val -= exc->phase;
+ val = NEG_LONG( ( SUB_LONG( exc->threshold - exc->phase + compensation,
+ distance ) /
+ exc->period ) * exc->period );
+ val = SUB_LONG( val, exc->phase );
if ( val > 0 )
val = -exc->phase;
}
@@ -2826,7 +2858,7 @@
static void
Ins_ADD( FT_Long* args )
{
- args[0] += args[1];
+ args[0] = ADD_LONG( args[0], args[1] );
}
@@ -2839,7 +2871,7 @@
static void
Ins_SUB( FT_Long* args )
{
- args[0] -= args[1];
+ args[0] = SUB_LONG( args[0], args[1] );
}
@@ -2882,7 +2914,8 @@
static void
Ins_ABS( FT_Long* args )
{
- args[0] = FT_ABS( args[0] );
+ if ( args[0] < 0 )
+ args[0] = NEG_LONG( args[0] );
}
@@ -2895,7 +2928,7 @@
static void
Ins_NEG( FT_Long* args )
{
- args[0] = -args[0];
+ args[0] = NEG_LONG( args[0] );
}
@@ -2921,7 +2954,7 @@
static void
Ins_CEILING( FT_Long* args )
{
- args[0] = FT_PIX_CEIL( args[0] );
+ args[0] = FT_PIX_CEIL_LONG( args[0] );
}
@@ -3256,7 +3289,10 @@
if ( args[0] < 0 )
exc->error = FT_THROW( Bad_Argument );
else
- exc->GS.loop = args[0];
+ {
+ /* we heuristically limit the number of loops to 16 bits */
+ exc->GS.loop = args[0] > 0xFFFFL ? 0xFFFFL : args[0];
+ }
}
@@ -3564,6 +3600,13 @@
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
+ /* FDEF is only allowed in `prep' or `fpgm' */
+ if ( exc->curRange == tt_coderange_glyph )
+ {
+ exc->error = FT_THROW( DEF_In_Glyf_Bytecode );
+ return;
+ }
+
/* some font programs are broken enough to redefine functions! */
/* We will then parse the current table. */
@@ -3990,6 +4033,13 @@
TT_DefRecord* limit;
+ /* we enable IDEF only in `prep' or `fpgm' */
+ if ( exc->curRange == tt_coderange_glyph )
+ {
+ exc->error = FT_THROW( DEF_In_Glyf_Bytecode );
+ return;
+ }
+
/* First of all, look for the same function in our table */
def = exc->IDefs;
@@ -4197,8 +4247,8 @@
p1 = exc->zp1.cur + aIdx2;
p2 = exc->zp2.cur + aIdx1;
- A = p1->x - p2->x;
- B = p1->y - p2->y;
+ A = SUB_LONG( p1->x, p2->x );
+ B = SUB_LONG( p1->y, p2->y );
/* If p1 == p2, SPvTL and SFvTL behave the same as */
/* SPvTCA[X] and SFvTCA[X], respectively. */
@@ -4213,9 +4263,9 @@
if ( ( opcode & 1 ) != 0 )
{
- C = B; /* counter clockwise rotation */
- B = A;
- A = -C;
+ C = B; /* counter clockwise rotation */
+ B = A;
+ A = NEG_LONG( C );
}
Normalize( A, B, Vec );
@@ -4756,7 +4806,7 @@
K = FAST_PROJECT( &exc->zp2.cur[L] );
- exc->func_move( exc, &exc->zp2, L, args[1] - K );
+ exc->func_move( exc, &exc->zp2, L, SUB_LONG( args[1], K ) );
/* UNDOCUMENTED! The MS rasterizer does that with */
/* twilight points (confirmed by Greg Hitchcock) */
@@ -4880,12 +4930,12 @@
}
{
- FT_Vector* v1 = exc->zp1.org + p2;
- FT_Vector* v2 = exc->zp2.org + p1;
+ FT_Vector* v1 = exc->zp1.org + p2;
+ FT_Vector* v2 = exc->zp2.org + p1;
- A = v1->x - v2->x;
- B = v1->y - v2->y;
+ A = SUB_LONG( v1->x, v2->x );
+ B = SUB_LONG( v1->y, v2->y );
/* If v1 == v2, SDPvTL behaves the same as */
/* SVTCA[X], respectively. */
@@ -4901,9 +4951,9 @@
if ( ( opcode & 1 ) != 0 )
{
- C = B; /* counter clockwise rotation */
- B = A;
- A = -C;
+ C = B; /* counter clockwise rotation */
+ B = A;
+ A = NEG_LONG( C );
}
Normalize( A, B, &exc->GS.dualVector );
@@ -4913,8 +4963,8 @@
FT_Vector* v2 = exc->zp2.cur + p1;
- A = v1->x - v2->x;
- B = v1->y - v2->y;
+ A = SUB_LONG( v1->x, v2->x );
+ B = SUB_LONG( v1->y, v2->y );
if ( A == 0 && B == 0 )
{
@@ -4925,9 +4975,9 @@
if ( ( opcode & 1 ) != 0 )
{
- C = B; /* counter clockwise rotation */
- B = A;
- A = -C;
+ C = B; /* counter clockwise rotation */
+ B = A;
+ A = NEG_LONG( C );
}
Normalize( A, B, &exc->GS.projVector );
@@ -5112,11 +5162,11 @@
#endif
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- /* Native ClearType fonts sign a waiver that turns off all backwards */
+ /* Native ClearType fonts sign a waiver that turns off all backward */
/* compatibility hacks and lets them program points to the grid like */
/* it's 1996. They might sign a waiver for just one glyph, though. */
if ( SUBPIXEL_HINTING_MINIMAL )
- exc->backwards_compatibility = !FT_BOOL( L == 4 );
+ exc->backward_compatibility = !FT_BOOL( L == 4 );
#endif
}
}
@@ -5204,11 +5254,11 @@
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- /* See `ttinterp.h' for details on backwards compatibility mode. */
- if ( SUBPIXEL_HINTING_MINIMAL &&
- exc->backwards_compatibility &&
- exc->iupx_called &&
- exc->iupy_called )
+ /* See `ttinterp.h' for details on backward compatibility mode. */
+ if ( SUBPIXEL_HINTING_MINIMAL &&
+ exc->backward_compatibility &&
+ exc->iupx_called &&
+ exc->iupy_called )
goto Fail;
#endif
@@ -5259,11 +5309,11 @@
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- /* See `ttinterp.h' for details on backwards compatibility mode. */
- if ( SUBPIXEL_HINTING_MINIMAL &&
- exc->backwards_compatibility &&
- exc->iupx_called &&
- exc->iupy_called )
+ /* See `ttinterp.h' for details on backward compatibility mode. */
+ if ( SUBPIXEL_HINTING_MINIMAL &&
+ exc->backward_compatibility &&
+ exc->iupx_called &&
+ exc->iupy_called )
return;
#endif
@@ -5297,11 +5347,11 @@
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- /* See `ttinterp.h' for details on backwards compatibility mode. */
- if ( SUBPIXEL_HINTING_MINIMAL &&
- exc->backwards_compatibility &&
- exc->iupx_called &&
- exc->iupy_called )
+ /* See `ttinterp.h' for details on backward compatibility mode. */
+ if ( SUBPIXEL_HINTING_MINIMAL &&
+ exc->backward_compatibility &&
+ exc->iupx_called &&
+ exc->iupy_called )
return;
#endif
@@ -5364,7 +5414,7 @@
}
- /* See `ttinterp.h' for details on backwards compatibility mode. */
+ /* See `ttinterp.h' for details on backward compatibility mode. */
static void
Move_Zp2_Point( TT_ExecContext exc,
FT_UShort point,
@@ -5375,10 +5425,10 @@
if ( exc->GS.freeVector.x != 0 )
{
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- if ( !( SUBPIXEL_HINTING_MINIMAL &&
- exc->backwards_compatibility ) )
+ if ( !( SUBPIXEL_HINTING_MINIMAL &&
+ exc->backward_compatibility ) )
#endif
- exc->zp2.cur[point].x += dx;
+ exc->zp2.cur[point].x = ADD_LONG( exc->zp2.cur[point].x, dx );
if ( touch )
exc->zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;
@@ -5387,12 +5437,12 @@
if ( exc->GS.freeVector.y != 0 )
{
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- if ( !( SUBPIXEL_HINTING_MINIMAL &&
- exc->backwards_compatibility &&
- exc->iupx_called &&
- exc->iupy_called ) )
+ if ( !( SUBPIXEL_HINTING_MINIMAL &&
+ exc->backward_compatibility &&
+ exc->iupx_called &&
+ exc->iupy_called ) )
#endif
- exc->zp2.cur[point].y += dy;
+ exc->zp2.cur[point].y = ADD_LONG( exc->zp2.cur[point].y, dy );
if ( touch )
exc->zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y;
@@ -5643,7 +5693,11 @@
( B1 & 63 ) != 0 &&
( B2 & 63 ) != 0 &&
B1 != B2 )
- Move_Zp2_Point( exc, point, -dx, -dy, TRUE );
+ Move_Zp2_Point( exc,
+ point,
+ NEG_LONG( dx ),
+ NEG_LONG( dy ),
+ TRUE );
}
}
else if ( exc->face->sph_compatibility_mode )
@@ -5675,7 +5729,7 @@
if ( ( B1 & 63 ) == 0 &&
( B2 & 63 ) != 0 &&
B1 != B2 )
- Move_Zp2_Point( exc, point, 0, -dy, TRUE );
+ Move_Zp2_Point( exc, point, 0, NEG_LONG( dy ), TRUE );
}
}
else if ( exc->sph_in_func_flags & SPH_FDEF_TYPEMAN_DIAGENDCTRL )
@@ -5687,14 +5741,14 @@
else
#endif
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- if ( SUBPIXEL_HINTING_MINIMAL &&
- exc->backwards_compatibility )
+ if ( SUBPIXEL_HINTING_MINIMAL &&
+ exc->backward_compatibility )
{
/* Special case: allow SHPIX to move points in the twilight zone. */
/* Otherwise, treat SHPIX the same as DELTAP. Unbreaks various */
/* fonts such as older versions of Rokkitt and DTL Argo T Light */
- /* that would glitch severly after calling ALIGNRP after a blocked */
- /* SHPIX. */
+ /* that would glitch severely after calling ALIGNRP after a */
+ /* blocked SHPIX. */
if ( in_twilight ||
( !( exc->iupx_called && exc->iupy_called ) &&
( ( exc->is_composite && exc->GS.freeVector.y != 0 ) ||
@@ -5731,6 +5785,7 @@
FT_F26Dot6 distance;
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
FT_F26Dot6 control_value_cutin = 0;
+ FT_F26Dot6 delta;
if ( SUBPIXEL_HINTING_INFINALITY )
@@ -5766,15 +5821,22 @@
distance = PROJECT( exc->zp1.cur + point, exc->zp0.cur + exc->GS.rp0 );
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
+ delta = SUB_LONG( distance, args[1] );
+ if ( delta < 0 )
+ delta = NEG_LONG( delta );
+
/* subpixel hinting - make MSIRP respect CVT cut-in; */
- if ( SUBPIXEL_HINTING_INFINALITY &&
- exc->ignore_x_mode &&
- exc->GS.freeVector.x != 0 &&
- FT_ABS( distance - args[1] ) >= control_value_cutin )
+ if ( SUBPIXEL_HINTING_INFINALITY &&
+ exc->ignore_x_mode &&
+ exc->GS.freeVector.x != 0 &&
+ delta >= control_value_cutin )
distance = args[1];
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
- exc->func_move( exc, &exc->zp1, point, args[1] - distance );
+ exc->func_move( exc,
+ &exc->zp1,
+ point,
+ SUB_LONG( args[1], distance ) );
exc->GS.rp1 = exc->GS.rp0;
exc->GS.rp2 = point;
@@ -5815,16 +5877,18 @@
if ( SUBPIXEL_HINTING_INFINALITY &&
exc->ignore_x_mode &&
exc->GS.freeVector.x != 0 )
- distance = Round_None(
- exc,
- cur_dist,
- exc->tt_metrics.compensations[0] ) - cur_dist;
+ distance = SUB_LONG(
+ Round_None( exc,
+ cur_dist,
+ exc->tt_metrics.compensations[0] ),
+ cur_dist );
else
#endif
- distance = exc->func_round(
- exc,
- cur_dist,
- exc->tt_metrics.compensations[0] ) - cur_dist;
+ distance = SUB_LONG(
+ exc->func_round( exc,
+ cur_dist,
+ exc->tt_metrics.compensations[0] ),
+ cur_dist );
}
else
distance = 0;
@@ -5924,7 +5988,14 @@
if ( ( exc->opcode & 1 ) != 0 ) /* rounding and control cut-in flag */
{
- if ( FT_ABS( distance - org_dist ) > control_value_cutin )
+ FT_F26Dot6 delta;
+
+
+ delta = SUB_LONG( distance, org_dist );
+ if ( delta < 0 )
+ delta = NEG_LONG( delta );
+
+ if ( delta > control_value_cutin )
distance = org_dist;
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
@@ -5941,7 +6012,7 @@
exc->tt_metrics.compensations[0] );
}
- exc->func_move( exc, &exc->zp0, point, distance - org_dist );
+ exc->func_move( exc, &exc->zp0, point, SUB_LONG( distance, org_dist ) );
Fail:
exc->GS.rp0 = point;
@@ -6013,8 +6084,10 @@
FT_Vector vec;
- vec.x = FT_MulFix( vec1->x - vec2->x, exc->metrics.x_scale );
- vec.y = FT_MulFix( vec1->y - vec2->y, exc->metrics.y_scale );
+ vec.x = FT_MulFix( SUB_LONG( vec1->x, vec2->x ),
+ exc->metrics.x_scale );
+ vec.y = FT_MulFix( SUB_LONG( vec1->y, vec2->y ),
+ exc->metrics.y_scale );
org_dist = FAST_DUALPROJ( &vec );
}
@@ -6022,8 +6095,12 @@
/* single width cut-in test */
- if ( FT_ABS( org_dist - exc->GS.single_width_value ) <
- exc->GS.single_width_cutin )
+ /* |org_dist - single_width_value| < single_width_cutin */
+ if ( exc->GS.single_width_cutin > 0 &&
+ org_dist < exc->GS.single_width_value +
+ exc->GS.single_width_cutin &&
+ org_dist > exc->GS.single_width_value -
+ exc->GS.single_width_cutin )
{
if ( org_dist >= 0 )
org_dist = exc->GS.single_width_value;
@@ -6067,8 +6144,8 @@
}
else
{
- if ( distance > -minimum_distance )
- distance = -minimum_distance;
+ if ( distance > NEG_LONG( minimum_distance ) )
+ distance = NEG_LONG( minimum_distance );
}
}
@@ -6076,7 +6153,7 @@
org_dist = PROJECT( exc->zp1.cur + point, exc->zp0.cur + exc->GS.rp0 );
- exc->func_move( exc, &exc->zp1, point, distance - org_dist );
+ exc->func_move( exc, &exc->zp1, point, SUB_LONG( distance, org_dist ) );
Fail:
exc->GS.rp1 = exc->GS.rp0;
@@ -6116,7 +6193,7 @@
minimum_distance = exc->GS.minimum_distance;
control_value_cutin = exc->GS.control_value_cutin;
point = (FT_UShort)args[0];
- cvtEntry = (FT_ULong)( args[1] + 1 );
+ cvtEntry = (FT_ULong)( ADD_LONG( args[1], 1 ) );
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
if ( SUBPIXEL_HINTING_INFINALITY &&
@@ -6199,6 +6276,9 @@
if ( exc->GS.gep0 == exc->GS.gep1 )
{
+ FT_F26Dot6 delta;
+
+
/* XXX: According to Greg Hitchcock, the following wording is */
/* the right one: */
/* */
@@ -6211,7 +6291,11 @@
/* `ttinst2.doc', version 1.66, is thus incorrect since */
/* it implies `>=' instead of `>'. */
- if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin )
+ delta = SUB_LONG( cvt_dist, org_dist );
+ if ( delta < 0 )
+ delta = NEG_LONG( delta );
+
+ if ( delta > control_value_cutin )
cvt_dist = org_dist;
}
@@ -6229,7 +6313,14 @@
exc->ignore_x_mode &&
exc->GS.gep0 == exc->GS.gep1 )
{
- if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin )
+ FT_F26Dot6 delta;
+
+
+ delta = SUB_LONG( cvt_dist, org_dist );
+ if ( delta < 0 )
+ delta = NEG_LONG( delta );
+
+ if ( delta > control_value_cutin )
cvt_dist = org_dist;
}
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
@@ -6251,8 +6342,8 @@
}
else
{
- if ( distance > -minimum_distance )
- distance = -minimum_distance;
+ if ( distance > NEG_LONG( minimum_distance ) )
+ distance = NEG_LONG( minimum_distance );
}
}
@@ -6276,7 +6367,10 @@
}
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
- exc->func_move( exc, &exc->zp1, point, distance - cur_dist );
+ exc->func_move( exc,
+ &exc->zp1,
+ point,
+ SUB_LONG( distance, cur_dist ) );
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
if ( SUBPIXEL_HINTING_INFINALITY )
@@ -6300,7 +6394,10 @@
}
if ( reverse_move )
- exc->func_move( exc, &exc->zp1, point, -( distance - cur_dist ) );
+ exc->func_move( exc,
+ &exc->zp1,
+ point,
+ SUB_LONG( cur_dist, distance ) );
}
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
@@ -6366,7 +6463,7 @@
distance = PROJECT( exc->zp1.cur + point,
exc->zp0.cur + exc->GS.rp0 );
- exc->func_move( exc, &exc->zp1, point, -distance );
+ exc->func_move( exc, &exc->zp1, point, NEG_LONG( distance ) );
}
exc->GS.loop--;
@@ -6423,19 +6520,19 @@
/* Cramer's rule */
- dbx = exc->zp0.cur[b1].x - exc->zp0.cur[b0].x;
- dby = exc->zp0.cur[b1].y - exc->zp0.cur[b0].y;
+ dbx = SUB_LONG( exc->zp0.cur[b1].x, exc->zp0.cur[b0].x );
+ dby = SUB_LONG( exc->zp0.cur[b1].y, exc->zp0.cur[b0].y );
- dax = exc->zp1.cur[a1].x - exc->zp1.cur[a0].x;
- day = exc->zp1.cur[a1].y - exc->zp1.cur[a0].y;
+ dax = SUB_LONG( exc->zp1.cur[a1].x, exc->zp1.cur[a0].x );
+ day = SUB_LONG( exc->zp1.cur[a1].y, exc->zp1.cur[a0].y );
- dx = exc->zp0.cur[b0].x - exc->zp1.cur[a0].x;
- dy = exc->zp0.cur[b0].y - exc->zp1.cur[a0].y;
+ dx = SUB_LONG( exc->zp0.cur[b0].x, exc->zp1.cur[a0].x );
+ dy = SUB_LONG( exc->zp0.cur[b0].y, exc->zp1.cur[a0].y );
- discriminant = FT_MulDiv( dax, -dby, 0x40 ) +
- FT_MulDiv( day, dbx, 0x40 );
- dotproduct = FT_MulDiv( dax, dbx, 0x40 ) +
- FT_MulDiv( day, dby, 0x40 );
+ discriminant = ADD_LONG( FT_MulDiv( dax, NEG_LONG( dby ), 0x40 ),
+ FT_MulDiv( day, dbx, 0x40 ) );
+ dotproduct = ADD_LONG( FT_MulDiv( dax, dbx, 0x40 ),
+ FT_MulDiv( day, dby, 0x40 ) );
/* The discriminant above is actually a cross product of vectors */
/* da and db. Together with the dot product, they can be used as */
@@ -6445,30 +6542,29 @@
/* discriminant = |da||db|sin(angle) . */
/* We use these equations to reject grazing intersections by */
/* thresholding abs(tan(angle)) at 1/19, corresponding to 3 degrees. */
- if ( 19 * FT_ABS( discriminant ) > FT_ABS( dotproduct ) )
+ if ( MUL_LONG( 19, FT_ABS( discriminant ) ) > FT_ABS( dotproduct ) )
{
- val = FT_MulDiv( dx, -dby, 0x40 ) + FT_MulDiv( dy, dbx, 0x40 );
+ val = ADD_LONG( FT_MulDiv( dx, NEG_LONG( dby ), 0x40 ),
+ FT_MulDiv( dy, dbx, 0x40 ) );
R.x = FT_MulDiv( val, dax, discriminant );
R.y = FT_MulDiv( val, day, discriminant );
- /* XXX: Block in backwards_compatibility and/or post-IUP? */
- exc->zp2.cur[point].x = exc->zp1.cur[a0].x + R.x;
- exc->zp2.cur[point].y = exc->zp1.cur[a0].y + R.y;
+ /* XXX: Block in backward_compatibility and/or post-IUP? */
+ exc->zp2.cur[point].x = ADD_LONG( exc->zp1.cur[a0].x, R.x );
+ exc->zp2.cur[point].y = ADD_LONG( exc->zp1.cur[a0].y, R.y );
}
else
{
/* else, take the middle of the middles of A and B */
- /* XXX: Block in backwards_compatibility and/or post-IUP? */
- exc->zp2.cur[point].x = ( exc->zp1.cur[a0].x +
- exc->zp1.cur[a1].x +
- exc->zp0.cur[b0].x +
- exc->zp0.cur[b1].x ) / 4;
- exc->zp2.cur[point].y = ( exc->zp1.cur[a0].y +
- exc->zp1.cur[a1].y +
- exc->zp0.cur[b0].y +
- exc->zp0.cur[b1].y ) / 4;
+ /* XXX: Block in backward_compatibility and/or post-IUP? */
+ exc->zp2.cur[point].x =
+ ADD_LONG( ADD_LONG( exc->zp1.cur[a0].x, exc->zp1.cur[a1].x ),
+ ADD_LONG( exc->zp0.cur[b0].x, exc->zp0.cur[b1].x ) ) / 4;
+ exc->zp2.cur[point].y =
+ ADD_LONG( ADD_LONG( exc->zp1.cur[a0].y, exc->zp1.cur[a1].y ),
+ ADD_LONG( exc->zp0.cur[b0].y, exc->zp0.cur[b1].y ) ) / 4;
}
exc->zp2.tags[point] |= FT_CURVE_TAG_TOUCH_BOTH;
@@ -6503,7 +6599,7 @@
distance = PROJECT( exc->zp0.cur + p2, exc->zp1.cur + p1 ) / 2;
exc->func_move( exc, &exc->zp1, p1, distance );
- exc->func_move( exc, &exc->zp0, p2, -distance );
+ exc->func_move( exc, &exc->zp0, p2, NEG_LONG( distance ) );
}
@@ -6576,9 +6672,11 @@
FT_Vector vec;
- vec.x = FT_MulFix( exc->zp1.orus[exc->GS.rp2].x - orus_base->x,
+ vec.x = FT_MulFix( SUB_LONG( exc->zp1.orus[exc->GS.rp2].x,
+ orus_base->x ),
exc->metrics.x_scale );
- vec.y = FT_MulFix( exc->zp1.orus[exc->GS.rp2].y - orus_base->y,
+ vec.y = FT_MulFix( SUB_LONG( exc->zp1.orus[exc->GS.rp2].y,
+ orus_base->y ),
exc->metrics.y_scale );
old_range = FAST_DUALPROJ( &vec );
@@ -6613,9 +6711,11 @@
FT_Vector vec;
- vec.x = FT_MulFix( exc->zp2.orus[point].x - orus_base->x,
+ vec.x = FT_MulFix( SUB_LONG( exc->zp2.orus[point].x,
+ orus_base->x ),
exc->metrics.x_scale );
- vec.y = FT_MulFix( exc->zp2.orus[point].y - orus_base->y,
+ vec.y = FT_MulFix( SUB_LONG( exc->zp2.orus[point].y,
+ orus_base->y ),
exc->metrics.y_scale );
org_dist = FAST_DUALPROJ( &vec );
@@ -6654,7 +6754,7 @@
exc->func_move( exc,
&exc->zp2,
(FT_UShort)point,
- new_dist - cur_dist );
+ SUB_LONG( new_dist, cur_dist ) );
}
Fail:
@@ -6719,14 +6819,14 @@
FT_F26Dot6 dx;
- dx = worker->curs[p].x - worker->orgs[p].x;
+ dx = SUB_LONG( worker->curs[p].x, worker->orgs[p].x );
if ( dx != 0 )
{
for ( i = p1; i < p; i++ )
- worker->curs[i].x += dx;
+ worker->curs[i].x = ADD_LONG( worker->curs[i].x, dx );
for ( i = p + 1; i <= p2; i++ )
- worker->curs[i].x += dx;
+ worker->curs[i].x = ADD_LONG( worker->curs[i].x, dx );
}
}
@@ -6771,8 +6871,8 @@
org2 = worker->orgs[ref2].x;
cur1 = worker->curs[ref1].x;
cur2 = worker->curs[ref2].x;
- delta1 = cur1 - org1;
- delta2 = cur2 - org2;
+ delta1 = SUB_LONG( cur1, org1 );
+ delta2 = SUB_LONG( cur2, org2 );
if ( cur1 == cur2 || orus1 == orus2 )
{
@@ -6784,10 +6884,10 @@
if ( x <= org1 )
- x += delta1;
+ x = ADD_LONG( x, delta1 );
else if ( x >= org2 )
- x += delta2;
+ x = ADD_LONG( x, delta2 );
else
x = cur1;
@@ -6808,20 +6908,23 @@
if ( x <= org1 )
- x += delta1;
+ x = ADD_LONG( x, delta1 );
else if ( x >= org2 )
- x += delta2;
+ x = ADD_LONG( x, delta2 );
else
{
if ( !scale_valid )
{
scale_valid = 1;
- scale = FT_DivFix( cur2 - cur1, orus2 - orus1 );
+ scale = FT_DivFix( SUB_LONG( cur2, cur1 ),
+ SUB_LONG( orus2, orus1 ) );
}
- x = cur1 + FT_MulFix( worker->orus[i].x - orus1, scale );
+ x = ADD_LONG( cur1,
+ FT_MulFix( SUB_LONG( worker->orus[i].x, orus1 ),
+ scale ) );
}
worker->curs[i].x = x;
}
@@ -6852,11 +6955,11 @@
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- /* See `ttinterp.h' for details on backwards compatibility mode. */
+ /* See `ttinterp.h' for details on backward compatibility mode. */
/* Allow IUP until it has been called on both axes. Immediately */
/* return on subsequent ones. */
- if ( SUBPIXEL_HINTING_MINIMAL &&
- exc->backwards_compatibility )
+ if ( SUBPIXEL_HINTING_MINIMAL &&
+ exc->backward_compatibility )
{
if ( exc->iupx_called && exc->iupy_called )
return;
@@ -7089,7 +7192,7 @@
SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP ) &&
( B1 & 63 ) != 0 &&
( B2 & 63 ) != 0 ) ) )
- exc->func_move( exc, &exc->zp0, A, -B );
+ exc->func_move( exc, &exc->zp0, A, NEG_LONG( B ) );
}
}
else
@@ -7098,10 +7201,10 @@
{
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- /* See `ttinterp.h' for details on backwards compatibility */
- /* mode. */
- if ( SUBPIXEL_HINTING_MINIMAL &&
- exc->backwards_compatibility )
+ /* See `ttinterp.h' for details on backward compatibility */
+ /* mode. */
+ if ( SUBPIXEL_HINTING_MINIMAL &&
+ exc->backward_compatibility )
{
if ( !( exc->iupx_called && exc->iupy_called ) &&
( ( exc->is_composite && exc->GS.freeVector.y != 0 ) ||
@@ -7245,7 +7348,7 @@
{
if ( exc->ignore_x_mode )
{
- /* if in ClearType backwards compatibility mode, */
+ /* if in ClearType backward compatibility mode, */
/* we sometimes change the TrueType version dynamically */
K = exc->rasterizer_version;
FT_TRACE6(( "Setting rasterizer version %d\n",
@@ -7296,7 +7399,11 @@
K |= 1 << 12;
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- if ( SUBPIXEL_HINTING_MINIMAL )
+ /* Toggle the following flags only outside of monochrome mode. */
+ /* Otherwise, instructions may behave weirdly and rendering results */
+ /* may differ between v35 and v40 mode, e.g., in `Times New Roman */
+ /* Bold Italic'. */
+ if ( SUBPIXEL_HINTING_MINIMAL && exc->subpixel_hinting_lean )
{
/********************************/
/* HINTING FOR SUBPIXEL */
@@ -7331,7 +7438,7 @@
/* */
/* The only smoothing method FreeType supports unless someone sets */
/* FT_LOAD_TARGET_MONO. */
- if ( ( args[0] & 2048 ) != 0 )
+ if ( ( args[0] & 2048 ) != 0 && exc->subpixel_hinting_lean )
K |= 1 << 18;
/********************************/
@@ -7456,8 +7563,16 @@
return;
}
- for ( i = 0; i < num_axes; i++ )
- args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */
+ if ( coords )
+ {
+ for ( i = 0; i < num_axes; i++ )
+ args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */
+ }
+ else
+ {
+ for ( i = 0; i < num_axes; i++ )
+ args[i] = 0;
+ }
}
@@ -7575,15 +7690,25 @@
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- /* Toggle backwards compatibility according to what font says, except */
- /* when it's a `tricky' font that heavily relies on the interpreter to */
- /* render glyphs correctly, e.g. DFKai-SB. Backwards compatibility */
- /* hacks may break it. */
+ /*
+ * Toggle backward compatibility according to what font wants, except
+ * when
+ *
+ * 1) we have a `tricky' font that heavily relies on the interpreter to
+ * render glyphs correctly, for example DFKai-SB, or
+ * 2) FT_RENDER_MODE_MONO (i.e, monochome rendering) is requested.
+ *
+ * In those cases, backward compatibility needs to be turned off to get
+ * correct rendering. The rendering is then completely up to the
+ * font's programming.
+ *
+ */
if ( SUBPIXEL_HINTING_MINIMAL &&
+ exc->subpixel_hinting_lean &&
!FT_IS_TRICKY( &exc->face->root ) )
- exc->backwards_compatibility = !( exc->GS.instruct_control & 4 );
+ exc->backward_compatibility = !( exc->GS.instruct_control & 4 );
else
- exc->backwards_compatibility = FALSE;
+ exc->backward_compatibility = FALSE;
exc->iupx_called = FALSE;
exc->iupy_called = FALSE;
@@ -7605,21 +7730,34 @@
exc->twilight.n_points = (FT_UShort)num_twilight_points;
}
- /* Set up loop detectors. We restrict the number of LOOPCALL loops */
- /* and the number of JMPR, JROT, and JROF calls with a negative */
- /* argument to values that depend on the size of the CVT table and */
- /* the number of points in the current glyph (if applicable). */
- /* */
- /* The idea is that in real-world bytecode you either iterate over */
- /* all CVT entries, or over all points (or contours) of a glyph, and */
- /* such iterations don't happen very often. */
+ /* Set up loop detectors. We restrict the number of LOOPCALL loops */
+ /* and the number of JMPR, JROT, and JROF calls with a negative */
+ /* argument to values that depend on various parameters like the */
+ /* size of the CVT table or the number of points in the current */
+ /* glyph (if applicable). */
+ /* */
+ /* The idea is that in real-world bytecode you either iterate over */
+ /* all CVT entries (in the `prep' table), or over all points (or */
+ /* contours, in the `glyf' table) of a glyph, and such iterations */
+ /* don't happen very often. */
exc->loopcall_counter = 0;
exc->neg_jump_counter = 0;
/* The maximum values are heuristic. */
- exc->loopcall_counter_max = FT_MAX( 100,
- 10 * ( exc->pts.n_points +
- exc->cvtSize ) );
+ if ( exc->pts.n_points )
+ exc->loopcall_counter_max = FT_MAX( 50,
+ 10 * exc->pts.n_points ) +
+ FT_MAX( 50,
+ exc->cvtSize / 10 );
+ else
+ exc->loopcall_counter_max = 300 + 8 * exc->cvtSize;
+
+ /* as a protection against an unreasonable number of CVT entries */
+ /* we assume at most 100 control values per glyph for the counter */
+ if ( exc->loopcall_counter_max >
+ 100 * (FT_ULong)exc->face->root.num_glyphs )
+ exc->loopcall_counter_max = 100 * (FT_ULong)exc->face->root.num_glyphs;
+
FT_TRACE5(( "TT_RunIns: Limiting total number of loops in LOOPCALL"
" to %d\n", exc->loopcall_counter_max ));
@@ -8387,30 +8525,27 @@
} while ( !exc->instruction_trap );
LNo_Error_:
- FT_TRACE4(( " %d instructions executed\n", ins_counter ));
+ FT_TRACE4(( " %d instruction%s executed\n",
+ ins_counter,
+ ins_counter == 1 ? "" : "s" ));
return FT_Err_Ok;
LErrorCodeOverflow_:
exc->error = FT_THROW( Code_Overflow );
LErrorLabel_:
- /* If any errors have occurred, function tables may be broken. */
- /* Force a re-execution of `prep' and `fpgm' tables if no */
- /* bytecode debugger is run. */
- if ( exc->error &&
- !exc->instruction_trap &&
- exc->curRange == tt_coderange_glyph )
- {
+ if ( exc->error && !exc->instruction_trap )
FT_TRACE1(( " The interpreter returned error 0x%x\n", exc->error ));
- exc->size->bytecode_ready = -1;
- exc->size->cvt_ready = -1;
- }
return exc->error;
}
+#else /* !TT_USE_BYTECODE_INTERPRETER */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _tt_interp_dummy;
-#endif /* TT_USE_BYTECODE_INTERPRETER */
+#endif /* !TT_USE_BYTECODE_INTERPRETER */
/* END */
diff --git a/modules/freetype2/src/truetype/ttinterp.h b/modules/freetype2/src/truetype/ttinterp.h
index 33a9b122f..2966439ea 100644
--- a/modules/freetype2/src/truetype/ttinterp.h
+++ b/modules/freetype2/src/truetype/ttinterp.h
@@ -4,7 +4,7 @@
/* */
/* TrueType bytecode interpreter (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -253,23 +253,38 @@ FT_BEGIN_HEADER
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
/*
- * Modern TrueType fonts are usually rendered through Microsoft's
- * collection of rendering techniques called ClearType (e.g., subpixel
- * rendering and subpixel hinting). When ClearType was introduced, most
- * fonts were not ready. Microsoft decided to implement a backwards
- * compatibility mode that employed several simple to complicated
- * assumptions and tricks that modified the interpretation of the
- * bytecode contained in these fonts to make them look ClearType-y
- * somehow. Most (web)fonts that were released since then have come to
- * rely on these hacks to render correctly, even some of Microsoft's
- * flagship ClearType fonts (Calibri, Cambria, Segoe UI).
+ * FreeType supports ClearType-like hinting of TrueType fonts through
+ * the version 40 interpreter. This is achieved through several hacks
+ * in the base (v35) interpreter, as detailed below.
*
- * The minimal subpixel hinting code (interpreter version 40) employs a
- * small list of font-agnostic hacks to bludgeon non-native-ClearType
- * fonts (except tricky ones[1]) into submission. It will not try to
- * toggle hacks for specific fonts for performance and complexity
- * reasons. The focus is on modern (web)fonts rather than legacy fonts
- * that were made for black-and-white rendering.
+ * ClearType is an umbrella term for several rendering techniques
+ * employed by Microsoft's various GUI and rendering toolkit
+ * implementations, most importantly: subpixel rendering for using the
+ * RGB subpixels of LCDs to approximately triple the perceived
+ * resolution on the x-axis and subpixel hinting for positioning stems
+ * on subpixel borders. TrueType programming is explicit, i.e., fonts
+ * must be programmed to take advantage of ClearType's possibilities.
+ *
+ * When ClearType was introduced, it seemed unlikely that all fonts
+ * would be reprogrammed, so Microsoft decided to implement a backward
+ * compatibility mode. It employs several simple to complicated
+ * assumptions and tricks, many of them font-dependent, that modify the
+ * interpretation of the bytecode contained in these fonts to retrofit
+ * them into a ClearType-y look. The quality of the results varies.
+ * Most (web)fonts that were released since then have come to rely on
+ * these hacks to render correctly, even some of Microsoft's flagship
+ * fonts (e.g., Calibri, Cambria, Segoe UI).
+ *
+ * FreeType's minimal subpixel hinting code (interpreter version 40)
+ * employs a small list of font-agnostic hacks loosely based on the
+ * public information available on Microsoft's compatibility mode[2].
+ * The focus is on modern (web)fonts rather than legacy fonts that were
+ * made for monochrome rendering. It will not match ClearType rendering
+ * exactly. Unlike the `Infinality' code (interpreter version 38) that
+ * came before, it will not try to toggle hacks for specific fonts for
+ * performance and complexity reasons. It will fall back to version 35
+ * behavior for tricky fonts[1] or when monochrome rendering is
+ * requested.
*
* Major hacks
*
@@ -316,12 +331,12 @@ FT_BEGIN_HEADER
* very specific patterns (`superhinting') for pre-ClearType-displays,
* the worse the results.
*
- * Microsoft defines a way to turn off backwards compatibility and
+ * Microsoft defines a way to turn off backward compatibility and
* interpret instructions as before (called `native ClearType')[2][3].
* The font designer then regains full control and is responsible for
* making the font work correctly with ClearType without any
* hand-holding by the interpreter or rasterizer[4]. The v40
- * interpreter assumes backwards compatibility by default, which can be
+ * interpreter assumes backward compatibility by default, which can be
* turned off the same way by executing the following in the control
* program (cf. `Ins_INSTCTRL').
*
@@ -331,7 +346,7 @@ FT_BEGIN_HEADER
* [1] Tricky fonts as FreeType defines them rely on the bytecode
* interpreter to display correctly. Hacks can interfere with them,
* so they get treated like native ClearType fonts (v40 with
- * backwards compatibility turned off). Cf. `TT_RunIns'.
+ * backward compatibility turned off). Cf. `TT_RunIns'.
*
* [2] Proposed by Microsoft's Greg Hitchcock in
* https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
@@ -347,7 +362,8 @@ FT_BEGIN_HEADER
*
*/
- /* Using v40 implies subpixel hinting. Used to detect interpreter */
+ /* Using v40 implies subpixel hinting, unless FT_RENDER_MODE_MONO has been
+ * requested. Used to detect interpreter */
/* version switches. `_lean' to differentiate from the Infinality */
/* `subpixel_hinting', which is managed differently. */
FT_Bool subpixel_hinting_lean;
@@ -357,10 +373,10 @@ FT_BEGIN_HEADER
/* is managed differently. */
FT_Bool vertical_lcd_lean;
- /* Default to backwards compatibility mode in v40 interpreter. If */
+ /* Default to backward compatibility mode in v40 interpreter. If */
/* this is false, it implies the interpreter is in v35 or in native */
/* ClearType mode. */
- FT_Bool backwards_compatibility;
+ FT_Bool backward_compatibility;
/* Useful for detecting and denying post-IUP trickery that is usually */
/* used to fix pixel patterns (`superhinting'). */
diff --git a/modules/freetype2/src/truetype/ttobjs.c b/modules/freetype2/src/truetype/ttobjs.c
index 7e37113f9..6685dc819 100644
--- a/modules/freetype2/src/truetype/ttobjs.c
+++ b/modules/freetype2/src/truetype/ttobjs.c
@@ -4,7 +4,7 @@
/* */
/* Objects manager (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,7 +21,7 @@
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
#include FT_INTERNAL_SFNT_H
-#include FT_TRUETYPE_DRIVER_H
+#include FT_DRIVER_H
#include "ttgload.h"
#include "ttpload.h"
@@ -147,20 +147,51 @@
{
#define TRICK_NAMES_MAX_CHARACTERS 19
-#define TRICK_NAMES_COUNT 9
+#define TRICK_NAMES_COUNT 26
static const char trick_names[TRICK_NAMES_COUNT]
[TRICK_NAMES_MAX_CHARACTERS + 1] =
{
+ /*
+ PostScript names are given in brackets if they differ from the
+ family name. The version numbers, together with the copyright or
+ release year data, are taken from fonts available to the
+ developers.
+
+ Note that later versions of the fonts might be no longer tricky;
+ for example, `MingLiU' version 7.00 (file `mingliu.ttc' from
+ Windows 7) is an ordinary TTC with non-tricky subfonts.
+ */
+
+ "cpop", /* dftt-p7.ttf; version 1.00, 1992 [DLJGyShoMedium] */
+ "DFGirl-W6-WIN-BF", /* dftt-h6.ttf; version 1.00, 1993 */
+ "DFGothic-EB", /* DynaLab Inc. 1992-1995 */
+ "DFGyoSho-Lt", /* DynaLab Inc. 1992-1995 */
+ "DFHei-Md-HK-BF", /* maybe DynaLab Inc. */
+ "DFHSGothic-W5", /* DynaLab Inc. 1992-1995 */
+ "DFHSMincho-W3", /* DynaLab Inc. 1992-1995 */
+ "DFHSMincho-W7", /* DynaLab Inc. 1992-1995 */
"DFKaiSho-SB", /* dfkaisb.ttf */
"DFKaiShu",
- "DFKai-SB", /* kaiu.ttf */
+ "DFKaiShu-Md-HK-BF", /* maybe DynaLab Inc. */
+ "DFKai-SB", /* kaiu.ttf; version 3.00, 1998 [DFKaiShu-SB-Estd-BF] */
+ "DFMing-Bd-HK-BF", /* maybe DynaLab Inc. */
+ "DLC", /* dftt-m7.ttf; version 1.00, 1993 [DLCMingBold] */
+ /* dftt-f5.ttf; version 1.00, 1993 [DLCFongSung] */
+ "DLCHayMedium", /* dftt-b5.ttf; version 1.00, 1993 */
+ "DLCHayBold", /* dftt-b7.ttf; version 1.00, 1993 */
+ "DLCKaiMedium", /* dftt-k5.ttf; version 1.00, 1992 */
+ "DLCLiShu", /* dftt-l5.ttf; version 1.00, 1992 */
+ "DLCRoundBold", /* dftt-r7.ttf; version 1.00, 1993 */
"HuaTianKaiTi?", /* htkt2.ttf */
"HuaTianSongTi?", /* htst3.ttf */
- "Ming(for ISO10646)", /* hkscsiic.ttf & iicore.ttf */
- "MingLiU", /* mingliu.ttf & mingliu.ttc */
- "PMingLiU", /* mingliu.ttc */
- "MingLi43", /* mingli.ttf */
+ "Ming(for ISO10646)", /* hkscsiic.ttf; version 0.12, 2007 [Ming] */
+ /* iicore.ttf; version 0.07, 2007 [Ming] */
+ "MingLiU", /* mingliu.ttf */
+ /* mingliu.ttc; version 3.21, 2001 */
+ "MingMedium", /* dftt-m5.ttf; version 1.00, 1993 [DLCMingMedium] */
+ "PMingLiU", /* mingliu.ttc; version 3.21, 2001 */
+ "MingLi43", /* mingli.ttf; version 1.00, 1992 */
};
int nn;
@@ -242,7 +273,7 @@
tt_check_trickyness_sfnt_ids( TT_Face face )
{
#define TRICK_SFNT_IDS_PER_FACE 3
-#define TRICK_SFNT_IDS_NUM_FACES 18
+#define TRICK_SFNT_IDS_NUM_FACES 29
static const tt_sfnt_id_rec sfnt_id[TRICK_SFNT_IDS_NUM_FACES]
[TRICK_SFNT_IDS_PER_FACE] = {
@@ -261,16 +292,66 @@
{ 0x28233BF1UL, 0x000087C4UL }, /* fpgm */
{ 0xA344A1EBUL, 0x000001E1UL } /* prep */
},
+ { /* DFGothic-EB */
+ { 0x12C3EBB2UL, 0x00000350UL }, /* cvt */
+ { 0xB680EE64UL, 0x000087A7UL }, /* fpgm */
+ { 0xCE939563UL, 0x00000758UL } /* prep */
+ },
+ { /* DFGyoSho-Lt */
+ { 0x11E5EAD4UL, 0x00000350UL }, /* cvt */
+ { 0xCE5956E9UL, 0x0000BC85UL }, /* fpgm */
+ { 0x8272F416UL, 0x00000045UL } /* prep */
+ },
+ { /* DFHei-Md-HK-BF */
+ { 0x1257EB46UL, 0x00000350UL }, /* cvt */
+ { 0xF699D160UL, 0x0000715FUL }, /* fpgm */
+ { 0xD222F568UL, 0x000003BCUL } /* prep */
+ },
+ { /* DFHSGothic-W5 */
+ { 0x1262EB4EUL, 0x00000350UL }, /* cvt */
+ { 0xE86A5D64UL, 0x00007940UL }, /* fpgm */
+ { 0x7850F729UL, 0x000005FFUL } /* prep */
+ },
+ { /* DFHSMincho-W3 */
+ { 0x122DEB0AUL, 0x00000350UL }, /* cvt */
+ { 0x3D16328AUL, 0x0000859BUL }, /* fpgm */
+ { 0xA93FC33BUL, 0x000002CBUL } /* prep */
+ },
+ { /* DFHSMincho-W7 */
+ { 0x125FEB26UL, 0x00000350UL }, /* cvt */
+ { 0xA5ACC982UL, 0x00007EE1UL }, /* fpgm */
+ { 0x90999196UL, 0x0000041FUL } /* prep */
+ },
{ /* DFKaiShu */
{ 0x11E5EAD4UL, 0x00000350UL }, /* cvt */
{ 0x5A30CA3BUL, 0x00009063UL }, /* fpgm */
{ 0x13A42602UL, 0x0000007EUL } /* prep */
},
- { /* DFKaiShu2 */
+ { /* DFKaiShu, variant */
{ 0x11E5EAD4UL, 0x00000350UL }, /* cvt */
{ 0xA6E78C01UL, 0x00008998UL }, /* fpgm */
{ 0x13A42602UL, 0x0000007EUL } /* prep */
},
+ { /* DFKaiShu-Md-HK-BF */
+ { 0x11E5EAD4UL, 0x00000360UL }, /* cvt */
+ { 0x9DB282B2UL, 0x0000C06EUL }, /* fpgm */
+ { 0x53E6D7CAUL, 0x00000082UL } /* prep */
+ },
+ { /* DFMing-Bd-HK-BF */
+ { 0x1243EB18UL, 0x00000350UL }, /* cvt */
+ { 0xBA0A8C30UL, 0x000074ADUL }, /* fpgm */
+ { 0xF3D83409UL, 0x0000037BUL } /* prep */
+ },
+ { /* DLCLiShu */
+ { 0x07DCF546UL, 0x00000308UL }, /* cvt */
+ { 0x40FE7C90UL, 0x00008E2AUL }, /* fpgm */
+ { 0x608174B5UL, 0x0000007AUL } /* prep */
+ },
+ { /* DLCHayBold */
+ { 0xEB891238UL, 0x00000308UL }, /* cvt */
+ { 0xD2E4DCD4UL, 0x0000676FUL }, /* fpgm */
+ { 0x8EA5F293UL, 0x000003B8UL } /* prep */
+ },
{ /* HuaTianKaiTi */
{ 0xFFFBFFFCUL, 0x00000008UL }, /* cvt */
{ 0x9C9E48B8UL, 0x0000BEA2UL }, /* fpgm */
@@ -340,6 +421,11 @@
{ 0x00000000UL, 0x00000000UL }, /* cvt */
{ 0xF055FC48UL, 0x000001C2UL }, /* fpgm */
{ 0x3900DED3UL, 0x00001E18UL } /* prep */
+ },
+ { /* MINGLI.TTF, 1992 */
+ { 0x00170003UL, 0x00000060UL }, /* cvt */
+ { 0xDBB4306EUL, 0x000058AAUL }, /* fpgm */
+ { 0xD643482AUL, 0x00000035UL } /* prep */
}
};
@@ -536,6 +622,7 @@
goto Exit;
/* check that we have a valid TrueType file */
+ FT_TRACE2(( " " ));
error = sfnt->init_face( stream, face, face_index, num_params, params );
/* Stream may have changed. */
@@ -547,9 +634,11 @@
/* We must also be able to accept Mac/GX fonts, as well as OT ones. */
/* The 0x00020000 tag is completely undocumented; some fonts from */
/* Arphic made for Chinese Windows 3.1 have this. */
- if ( face->format_tag != 0x00010000L && /* MS fonts */
- face->format_tag != 0x00020000L && /* CJK fonts for Win 3.1 */
- face->format_tag != TTAG_true ) /* Mac fonts */
+ if ( face->format_tag != 0x00010000L && /* MS fonts */
+ face->format_tag != 0x00020000L && /* CJK fonts for Win 3.1 */
+ face->format_tag != TTAG_true && /* Mac fonts */
+ face->format_tag != TTAG_0xA5kbd && /* `Keyboard.dfont' (legacy Mac OS X) */
+ face->format_tag != TTAG_0xA5lst ) /* `LastResort.dfont' (legacy Mac OS X) */
{
FT_TRACE2(( " not a TTF font\n" ));
goto Bad_Format;
@@ -626,44 +715,17 @@
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
{
- FT_Int instance_index = face_index >> 16;
+ FT_UInt instance_index = (FT_UInt)face_index >> 16;
if ( FT_HAS_MULTIPLE_MASTERS( ttface ) &&
instance_index > 0 )
{
- error = TT_Get_MM_Var( face, NULL );
+ error = TT_Set_Named_Instance( face, instance_index );
if ( error )
goto Exit;
- if ( face->blend->mmvar->namedstyle )
- {
- FT_Memory memory = ttface->memory;
-
- FT_Var_Named_Style* named_style;
- FT_String* style_name;
-
-
- /* in `face_index', the instance index starts with value 1 */
- named_style = face->blend->mmvar->namedstyle + instance_index - 1;
- error = sfnt->get_name( face,
- (FT_UShort)named_style->strid,
- &style_name );
- if ( error )
- goto Exit;
-
- /* set style name; if already set, replace it */
- if ( face->root.style_name )
- FT_FREE( face->root.style_name );
- face->root.style_name = style_name;
-
- /* finally, select the named instance */
- error = TT_Set_Var_Design( face,
- face->blend->mmvar->num_axis,
- named_style->coords );
- if ( error )
- goto Exit;
- }
+ tt_apply_mvar( face );
}
}
@@ -789,14 +851,14 @@
exec->pedantic_hinting = pedantic;
{
- FT_Size_Metrics* metrics = &exec->metrics;
- TT_Size_Metrics* tt_metrics = &exec->tt_metrics;
+ FT_Size_Metrics* size_metrics = &exec->metrics;
+ TT_Size_Metrics* tt_metrics = &exec->tt_metrics;
- metrics->x_ppem = 0;
- metrics->y_ppem = 0;
- metrics->x_scale = 0;
- metrics->y_scale = 0;
+ size_metrics->x_ppem = 0;
+ size_metrics->y_ppem = 0;
+ size_metrics->x_scale = 0;
+ size_metrics->y_scale = 0;
tt_metrics->ppem = 0;
tt_metrics->scale = 0;
@@ -819,6 +881,11 @@
FT_TRACE4(( "Executing `fpgm' table.\n" ));
error = face->interpreter( exec );
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( error )
+ FT_TRACE4(( " interpretation failed with error code 0x%x\n",
+ error ));
+#endif
}
else
error = FT_Err_Ok;
@@ -882,8 +949,12 @@
TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 );
FT_TRACE4(( "Executing `prep' table.\n" ));
-
error = face->interpreter( exec );
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( error )
+ FT_TRACE4(( " interpretation failed with error code 0x%x\n",
+ error ));
+#endif
}
else
error = FT_Err_Ok;
@@ -1002,17 +1073,17 @@
/* Set default metrics */
{
- TT_Size_Metrics* metrics = &size->ttmetrics;
+ TT_Size_Metrics* tt_metrics = &size->ttmetrics;
- metrics->rotated = FALSE;
- metrics->stretched = FALSE;
+ tt_metrics->rotated = FALSE;
+ tt_metrics->stretched = FALSE;
/* set default engine compensation */
- metrics->compensations[0] = 0; /* gray */
- metrics->compensations[1] = 0; /* black */
- metrics->compensations[2] = 0; /* white */
- metrics->compensations[3] = 0; /* reserved */
+ tt_metrics->compensations[0] = 0; /* gray */
+ tt_metrics->compensations[1] = 0; /* black */
+ tt_metrics->compensations[2] = 0; /* white */
+ tt_metrics->compensations[3] = 0; /* reserved */
}
/* allocate function defs, instruction defs, cvt, and storage area */
@@ -1075,8 +1146,10 @@
if ( size->bytecode_ready < 0 )
error = tt_size_init_bytecode( (FT_Size)size, pedantic );
+ else
+ error = size->bytecode_ready;
- if ( error || size->bytecode_ready )
+ if ( error )
goto Exit;
/* rescale CVT when needed */
@@ -1108,6 +1181,8 @@
error = tt_size_run_prep( size, pedantic );
}
+ else
+ error = size->cvt_ready;
Exit:
return error;
@@ -1184,26 +1259,34 @@
/* have been changed. */
/* */
/* <Input> */
- /* size :: A handle to the target size object. */
+ /* size :: A handle to the target size object. */
+ /* */
+ /* only_height :: Only recompute ascender, descender, and height; */
+ /* this flag is used for variation fonts where */
+ /* `tt_size_reset' is used as an iterator function. */
/* */
FT_LOCAL_DEF( FT_Error )
- tt_size_reset( TT_Size size )
+ tt_size_reset( TT_Size size,
+ FT_Bool only_height )
{
TT_Face face;
- FT_Error error = FT_Err_Ok;
- FT_Size_Metrics* metrics;
-
+ FT_Size_Metrics* size_metrics;
- size->ttmetrics.valid = FALSE;
face = (TT_Face)size->root.face;
- metrics = &size->metrics;
+ /* nothing to do for CFF2 */
+ if ( face->is_cff2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
+ size_metrics = &size->hinted_metrics;
/* copy the result from base layer */
- *metrics = size->root.metrics;
+ *size_metrics = size->root.metrics;
- if ( metrics->x_ppem < 1 || metrics->y_ppem < 1 )
+ if ( size_metrics->x_ppem < 1 || size_metrics->y_ppem < 1 )
return FT_THROW( Invalid_PPem );
/* This bit flag, if set, indicates that the ppems must be */
@@ -1212,48 +1295,66 @@
/* */
if ( face->header.Flags & 8 )
{
- metrics->x_scale = FT_DivFix( metrics->x_ppem << 6,
- face->root.units_per_EM );
- metrics->y_scale = FT_DivFix( metrics->y_ppem << 6,
- face->root.units_per_EM );
-
- metrics->ascender =
- FT_PIX_ROUND( FT_MulFix( face->root.ascender, metrics->y_scale ) );
- metrics->descender =
- FT_PIX_ROUND( FT_MulFix( face->root.descender, metrics->y_scale ) );
- metrics->height =
- FT_PIX_ROUND( FT_MulFix( face->root.height, metrics->y_scale ) );
- metrics->max_advance =
- FT_PIX_ROUND( FT_MulFix( face->root.max_advance_width,
- metrics->x_scale ) );
+ /* the TT spec always asks for ROUND, not FLOOR or CEIL */
+ size_metrics->ascender = FT_PIX_ROUND(
+ FT_MulFix( face->root.ascender,
+ size_metrics->y_scale ) );
+ size_metrics->descender = FT_PIX_ROUND(
+ FT_MulFix( face->root.descender,
+ size_metrics->y_scale ) );
+ size_metrics->height = FT_PIX_ROUND(
+ FT_MulFix( face->root.height,
+ size_metrics->y_scale ) );
+ }
+
+ size->ttmetrics.valid = TRUE;
+
+ if ( only_height )
+ {
+ /* we must not recompute the scaling values here since */
+ /* `tt_size_reset' was already called (with only_height = 0) */
+ return FT_Err_Ok;
+ }
+
+ if ( face->header.Flags & 8 )
+ {
+ /* base scaling values on integer ppem values, */
+ /* as mandated by the TrueType specification */
+ size_metrics->x_scale = FT_DivFix( size_metrics->x_ppem << 6,
+ face->root.units_per_EM );
+ size_metrics->y_scale = FT_DivFix( size_metrics->y_ppem << 6,
+ face->root.units_per_EM );
+
+ size_metrics->max_advance = FT_PIX_ROUND(
+ FT_MulFix( face->root.max_advance_width,
+ size_metrics->x_scale ) );
}
/* compute new transformation */
- if ( metrics->x_ppem >= metrics->y_ppem )
+ if ( size_metrics->x_ppem >= size_metrics->y_ppem )
{
- size->ttmetrics.scale = metrics->x_scale;
- size->ttmetrics.ppem = metrics->x_ppem;
+ size->ttmetrics.scale = size_metrics->x_scale;
+ size->ttmetrics.ppem = size_metrics->x_ppem;
size->ttmetrics.x_ratio = 0x10000L;
- size->ttmetrics.y_ratio = FT_DivFix( metrics->y_ppem,
- metrics->x_ppem );
+ size->ttmetrics.y_ratio = FT_DivFix( size_metrics->y_ppem,
+ size_metrics->x_ppem );
}
else
{
- size->ttmetrics.scale = metrics->y_scale;
- size->ttmetrics.ppem = metrics->y_ppem;
- size->ttmetrics.x_ratio = FT_DivFix( metrics->x_ppem,
- metrics->y_ppem );
+ size->ttmetrics.scale = size_metrics->y_scale;
+ size->ttmetrics.ppem = size_metrics->y_ppem;
+ size->ttmetrics.x_ratio = FT_DivFix( size_metrics->x_ppem,
+ size_metrics->y_ppem );
size->ttmetrics.y_ratio = 0x10000L;
}
+ size->metrics = size_metrics;
+
#ifdef TT_USE_BYTECODE_INTERPRETER
size->cvt_ready = -1;
#endif /* TT_USE_BYTECODE_INTERPRETER */
- if ( !error )
- size->ttmetrics.valid = TRUE;
-
- return error;
+ return FT_Err_Ok;
}
diff --git a/modules/freetype2/src/truetype/ttobjs.h b/modules/freetype2/src/truetype/ttobjs.h
index 98ad38373..38fa30e4e 100644
--- a/modules/freetype2/src/truetype/ttobjs.h
+++ b/modules/freetype2/src/truetype/ttobjs.h
@@ -4,7 +4,7 @@
/* */
/* Objects manager (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -278,7 +278,8 @@ FT_BEGIN_HEADER
/* we have our own copy of metrics so that we can modify */
/* it without affecting auto-hinting (when used) */
- FT_Size_Metrics metrics;
+ FT_Size_Metrics* metrics; /* for the current rendering mode */
+ FT_Size_Metrics hinted_metrics; /* for the hinted rendering mode */
TT_Size_Metrics ttmetrics;
@@ -389,7 +390,8 @@ FT_BEGIN_HEADER
#endif /* TT_USE_BYTECODE_INTERPRETER */
FT_LOCAL( FT_Error )
- tt_size_reset( TT_Size size );
+ tt_size_reset( TT_Size size,
+ FT_Bool only_height );
/*************************************************************************/
diff --git a/modules/freetype2/src/truetype/ttpic.c b/modules/freetype2/src/truetype/ttpic.c
index 54a5b8bed..cdbb80639 100644
--- a/modules/freetype2/src/truetype/ttpic.c
+++ b/modules/freetype2/src/truetype/ttpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for truetype module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/truetype/ttpic.h b/modules/freetype2/src/truetype/ttpic.h
index a71d589df..df878ae6f 100644
--- a/modules/freetype2/src/truetype/ttpic.h
+++ b/modules/freetype2/src/truetype/ttpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for truetype module. */
/* */
-/* Copyright 2009-2016 by */
+/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/truetype/ttpload.c b/modules/freetype2/src/truetype/ttpload.c
index d756d3842..d9526ad08 100644
--- a/modules/freetype2/src/truetype/ttpload.c
+++ b/modules/freetype2/src/truetype/ttpload.c
@@ -4,7 +4,7 @@
/* */
/* TrueType-specific tables loader (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -247,13 +247,13 @@
if ( pos2 > face->glyf_len )
{
/* We try to sanitize the last `loca' entry. */
- if ( gindex == face->num_locations - 1 )
+ if ( gindex == face->num_locations - 2 )
{
FT_TRACE1(( "tt_face_get_location:"
- " too large offset (0x%08lx) found for glyph index %ld,\n"
+ " too large size (%ld bytes) found for glyph index %ld,\n"
" "
- " truncating at the end of `glyf' table (0x%08lx)\n",
- pos2, gindex + 1, face->glyf_len ));
+ " truncating at the end of `glyf' table to %ld bytes\n",
+ pos2 - pos1, gindex, face->glyf_len - pos1 ));
pos2 = face->glyf_len;
}
else
diff --git a/modules/freetype2/src/truetype/ttpload.h b/modules/freetype2/src/truetype/ttpload.h
index aa2e38e6e..fa1252724 100644
--- a/modules/freetype2/src/truetype/ttpload.h
+++ b/modules/freetype2/src/truetype/ttpload.h
@@ -4,7 +4,7 @@
/* */
/* TrueType-specific tables loader (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/truetype/ttsubpix.c b/modules/freetype2/src/truetype/ttsubpix.c
index 03950960a..d94bcc8b5 100644
--- a/modules/freetype2/src/truetype/ttsubpix.c
+++ b/modules/freetype2/src/truetype/ttsubpix.c
@@ -4,7 +4,7 @@
/* */
/* TrueType Subpixel Hinting. */
/* */
-/* Copyright 2010-2016 by */
+/* Copyright 2010-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,12 +22,13 @@
#include FT_INTERNAL_SFNT_H
#include FT_TRUETYPE_TAGS_H
#include FT_OUTLINE_H
-#include FT_TRUETYPE_DRIVER_H
+#include FT_DRIVER_H
#include "ttsubpix.h"
-#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
+#if defined( TT_USE_BYTECODE_INTERPRETER ) && \
+ defined( TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY )
/*************************************************************************/
/* */
@@ -752,24 +753,24 @@
/* Does font name match rule family? */
- if ( strcmp( detected_font_name, rule_font_name ) == 0 )
+ if ( ft_strcmp( detected_font_name, rule_font_name ) == 0 )
return TRUE;
/* Is font name a wildcard ""? */
- if ( strcmp( rule_font_name, "" ) == 0 )
+ if ( ft_strcmp( rule_font_name, "" ) == 0 )
return TRUE;
/* Is font name contained in a class list? */
for ( i = 0; i < FAMILY_CLASS_RULES_SIZE; i++ )
{
- if ( strcmp( FAMILY_CLASS_Rules[i].name, rule_font_name ) == 0 )
+ if ( ft_strcmp( FAMILY_CLASS_Rules[i].name, rule_font_name ) == 0 )
{
for ( j = 0; j < SPH_MAX_CLASS_MEMBERS; j++ )
{
- if ( strcmp( FAMILY_CLASS_Rules[i].member[j], "" ) == 0 )
+ if ( ft_strcmp( FAMILY_CLASS_Rules[i].member[j], "" ) == 0 )
continue;
- if ( strcmp( FAMILY_CLASS_Rules[i].member[j],
- detected_font_name ) == 0 )
+ if ( ft_strcmp( FAMILY_CLASS_Rules[i].member[j],
+ detected_font_name ) == 0 )
return TRUE;
}
}
@@ -787,24 +788,24 @@
/* Does font style match rule style? */
- if ( strcmp( detected_font_style, rule_font_style ) == 0 )
+ if ( ft_strcmp( detected_font_style, rule_font_style ) == 0 )
return TRUE;
/* Is font style a wildcard ""? */
- if ( strcmp( rule_font_style, "" ) == 0 )
+ if ( ft_strcmp( rule_font_style, "" ) == 0 )
return TRUE;
/* Is font style contained in a class list? */
for ( i = 0; i < STYLE_CLASS_RULES_SIZE; i++ )
{
- if ( strcmp( STYLE_CLASS_Rules[i].name, rule_font_style ) == 0 )
+ if ( ft_strcmp( STYLE_CLASS_Rules[i].name, rule_font_style ) == 0 )
{
for ( j = 0; j < SPH_MAX_CLASS_MEMBERS; j++ )
{
- if ( strcmp( STYLE_CLASS_Rules[i].member[j], "" ) == 0 )
+ if ( ft_strcmp( STYLE_CLASS_Rules[i].member[j], "" ) == 0 )
continue;
- if ( strcmp( STYLE_CLASS_Rules[i].member[j],
- detected_font_style ) == 0 )
+ if ( ft_strcmp( STYLE_CLASS_Rules[i].member[j],
+ detected_font_style ) == 0 )
return TRUE;
}
}
@@ -905,7 +906,7 @@
{
TT_Face face = loader->face;
FT_String* family = face->root.family_name;
- FT_UInt ppem = loader->size->metrics.x_ppem;
+ FT_UInt ppem = loader->size->metrics->x_ppem;
FT_String* style = face->root.style_name;
@@ -1000,12 +1001,14 @@
}
}
-#else /* !TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
+#else /* !(TT_USE_BYTECODE_INTERPRETER && */
+ /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY) */
/* ANSI C doesn't like empty source files */
typedef int _tt_subpix_dummy;
-#endif /* !TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
+#endif /* !(TT_USE_BYTECODE_INTERPRETER && */
+ /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY) */
/* END */
diff --git a/modules/freetype2/src/truetype/ttsubpix.h b/modules/freetype2/src/truetype/ttsubpix.h
index 86844da66..1070bb016 100644
--- a/modules/freetype2/src/truetype/ttsubpix.h
+++ b/modules/freetype2/src/truetype/ttsubpix.h
@@ -4,7 +4,7 @@
/* */
/* TrueType Subpixel Hinting. */
/* */
-/* Copyright 2010-2016 by */
+/* Copyright 2010-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type1/Jamfile b/modules/freetype2/src/type1/Jamfile
index 948b40854..b94b7d0aa 100644
--- a/modules/freetype2/src/type1/Jamfile
+++ b/modules/freetype2/src/type1/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/type1 Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/type1/module.mk b/modules/freetype2/src/type1/module.mk
index d7ab520c7..3fea5cc16 100644
--- a/modules/freetype2/src/type1/module.mk
+++ b/modules/freetype2/src/type1/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/type1/rules.mk b/modules/freetype2/src/type1/rules.mk
index bdec29479..cb1a14286 100644
--- a/modules/freetype2/src/type1/rules.mk
+++ b/modules/freetype2/src/type1/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/type1/t1afm.c b/modules/freetype2/src/type1/t1afm.c
index 5c7f38968..61053d9a6 100644
--- a/modules/freetype2/src/type1/t1afm.c
+++ b/modules/freetype2/src/type1/t1afm.c
@@ -4,7 +4,7 @@
/* */
/* AFM support for Type 1 fonts (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,6 +24,8 @@
#include "t1errors.h"
+#ifndef T1_CONFIG_OPTION_NO_AFM
+
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
@@ -402,5 +404,12 @@
return FT_Err_Ok;
}
+#else /* T1_CONFIG_OPTION_NO_AFM */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _t1_afm_dummy;
+
+#endif /* T1_CONFIG_OPTION_NO_AFM */
+
/* END */
diff --git a/modules/freetype2/src/type1/t1afm.h b/modules/freetype2/src/type1/t1afm.h
index 3a864f237..cb8d302b4 100644
--- a/modules/freetype2/src/type1/t1afm.h
+++ b/modules/freetype2/src/type1/t1afm.h
@@ -4,7 +4,7 @@
/* */
/* AFM support for Type 1 fonts (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type1/t1driver.c b/modules/freetype2/src/type1/t1driver.c
index fd9e13e11..029b410b4 100644
--- a/modules/freetype2/src/type1/t1driver.c
+++ b/modules/freetype2/src/type1/t1driver.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 driver interface (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -30,6 +30,8 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_HASH_H
+#include FT_INTERNAL_POSTSCRIPT_PROPS_H
+#include FT_DRIVER_H
#include FT_SERVICE_MULTIPLE_MASTERS_H
#include FT_SERVICE_GLYPH_DICT_H
@@ -37,6 +39,7 @@
#include FT_SERVICE_POSTSCRIPT_NAME_H
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_SERVICE_POSTSCRIPT_INFO_H
+#include FT_SERVICE_PROPERTIES_H
#include FT_SERVICE_KERNING_H
@@ -126,6 +129,7 @@
(FT_Get_MM_Var_Func) T1_Get_MM_Var, /* get_mm_var */
(FT_Set_Var_Design_Func)T1_Set_Var_Design, /* set_var_design */
(FT_Get_Var_Design_Func)T1_Get_Var_Design, /* get_var_design */
+ (FT_Set_Instance_Func) T1_Reset_MM_Blend, /* set_instance */
(FT_Get_Var_Blend_Func) NULL, /* get_var_blend */
(FT_Done_Blend_Func) T1_Done_Blend /* done_blend */
@@ -614,6 +618,18 @@
/*
+ * PROPERTY SERVICE
+ *
+ */
+
+ FT_DEFINE_SERVICE_PROPERTIESREC(
+ t1_service_properties,
+
+ (FT_Properties_SetFunc)ps_property_set, /* set_property */
+ (FT_Properties_GetFunc)ps_property_get ) /* get_property */
+
+
+ /*
* SERVICE LIST
*
*/
@@ -624,6 +640,7 @@
{ FT_SERVICE_ID_GLYPH_DICT, &t1_service_glyph_dict },
{ FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_TYPE_1 },
{ FT_SERVICE_ID_POSTSCRIPT_INFO, &t1_service_ps_info },
+ { FT_SERVICE_ID_PROPERTIES, &t1_service_properties },
#ifndef T1_CONFIG_OPTION_NO_AFM
{ FT_SERVICE_ID_KERNING, &t1_service_kerning },
@@ -713,7 +730,7 @@
FT_MODULE_DRIVER_SCALABLE |
FT_MODULE_DRIVER_HAS_HINTER,
- sizeof ( FT_DriverRec ),
+ sizeof ( PS_DriverRec ),
"type1",
0x10000L,
diff --git a/modules/freetype2/src/type1/t1driver.h b/modules/freetype2/src/type1/t1driver.h
index 78d8e38aa..2b1507233 100644
--- a/modules/freetype2/src/type1/t1driver.h
+++ b/modules/freetype2/src/type1/t1driver.h
@@ -4,7 +4,7 @@
/* */
/* High-level Type 1 driver interface (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type1/t1errors.h b/modules/freetype2/src/type1/t1errors.h
index 9ba470ed6..9e0151b95 100644
--- a/modules/freetype2/src/type1/t1errors.h
+++ b/modules/freetype2/src/type1/t1errors.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 error codes (specification only). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type1/t1gload.c b/modules/freetype2/src/type1/t1gload.c
index ea36f6414..87d40e756 100644
--- a/modules/freetype2/src/type1/t1gload.c
+++ b/modules/freetype2/src/type1/t1gload.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 Glyph Loader (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,6 +23,8 @@
#include FT_INTERNAL_STREAM_H
#include FT_OUTLINE_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include FT_INTERNAL_CFF_TYPES_H
+#include FT_DRIVER_H
#include "t1errors.h"
@@ -37,37 +39,28 @@
#define FT_COMPONENT trace_t1gload
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /********** *********/
- /********** COMPUTE THE MAXIMUM ADVANCE WIDTH *********/
- /********** *********/
- /********** The following code is in charge of computing *********/
- /********** the maximum advance width of the font. It *********/
- /********** quickly processes each glyph charstring to *********/
- /********** extract the value from either a `sbw' or `seac' *********/
- /********** operator. *********/
- /********** *********/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
static FT_Error
T1_Parse_Glyph_And_Get_Char_String( T1_Decoder decoder,
FT_UInt glyph_index,
- FT_Data* char_string )
+ FT_Data* char_string,
+ FT_Bool* force_scaling )
{
T1_Face face = (T1_Face)decoder->builder.face;
T1_Font type1 = &face->type1;
FT_Error error = FT_Err_Ok;
+ PSAux_Service psaux = (PSAux_Service)face->psaux;
+ const T1_Decoder_Funcs decoder_funcs = psaux->t1_decoder_funcs;
+ PS_Decoder psdecoder;
+
#ifdef FT_CONFIG_OPTION_INCREMENTAL
FT_Incremental_InterfaceRec *inc =
face->root.internal->incremental_interface;
#endif
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+ PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( face );
+#endif
decoder->font_matrix = type1->font_matrix;
decoder->font_offset = type1->font_offset;
@@ -90,9 +83,56 @@
}
if ( !error )
- error = decoder->funcs.parse_charstrings(
- decoder, (FT_Byte*)char_string->pointer,
- (FT_UInt)char_string->length );
+ {
+ /* choose which renderer to use */
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+ if ( driver->hinting_engine == FT_HINTING_FREETYPE ||
+ decoder->builder.metrics_only )
+ error = decoder_funcs->parse_charstrings_old(
+ decoder,
+ (FT_Byte*)char_string->pointer,
+ (FT_UInt)char_string->length );
+#else
+ if ( decoder->builder.metrics_only )
+ error = decoder_funcs->parse_metrics(
+ decoder,
+ (FT_Byte*)char_string->pointer,
+ (FT_UInt)char_string->length );
+#endif
+ else
+ {
+ CFF_SubFontRec subfont;
+
+
+ psaux->ps_decoder_init( &psdecoder, decoder, TRUE );
+
+ psaux->t1_make_subfont( FT_FACE( face ),
+ &face->type1.private_dict, &subfont );
+ psdecoder.current_subfont = &subfont;
+
+ error = decoder_funcs->parse_charstrings(
+ &psdecoder,
+ (FT_Byte*)char_string->pointer,
+ (FT_ULong)char_string->length );
+
+ /* Adobe's engine uses 16.16 numbers everywhere; */
+ /* as a consequence, glyphs larger than 2000ppem get rejected */
+ if ( FT_ERR_EQ( error, Glyph_Too_Big ) )
+ {
+ /* this time, we retry unhinted and scale up the glyph later on */
+ /* (the engine uses and sets the hardcoded value 0x10000 / 64 = */
+ /* 0x400 for both `x_scale' and `y_scale' in this case) */
+ ((T1_GlyphSlot)decoder->builder.glyph)->hint = FALSE;
+
+ *force_scaling = TRUE;
+
+ error = decoder_funcs->parse_charstrings(
+ &psdecoder,
+ (FT_Byte*)char_string->pointer,
+ (FT_ULong)char_string->length );
+ }
+ }
+ }
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -126,8 +166,10 @@
FT_UInt glyph_index )
{
FT_Data glyph_data;
- FT_Error error = T1_Parse_Glyph_And_Get_Char_String(
- decoder, glyph_index, &glyph_data );
+ FT_Bool force_scaling = FALSE;
+ FT_Error error = T1_Parse_Glyph_And_Get_Char_String(
+ decoder, glyph_index, &glyph_data,
+ &force_scaling );
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -149,6 +191,23 @@
}
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+ /********** *********/
+ /********** COMPUTE THE MAXIMUM ADVANCE WIDTH *********/
+ /********** *********/
+ /********** The following code is in charge of computing *********/
+ /********** the maximum advance width of the font. It *********/
+ /********** quickly processes each glyph charstring to *********/
+ /********** extract the value from either a `sbw' or `seac' *********/
+ /********** operator. *********/
+ /********** *********/
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
FT_LOCAL_DEF( FT_Error )
T1_Compute_Max_Advance( T1_Face face,
FT_Pos* max_advance )
@@ -278,6 +337,8 @@
T1_DecoderRec decoder;
T1_Face face = (T1_Face)t1glyph->face;
FT_Bool hinting;
+ FT_Bool scaled;
+ FT_Bool force_scaling = FALSE;
T1_Font type1 = &face->type1;
PSAux_Service psaux = (PSAux_Service)face->psaux;
const T1_Decoder_Funcs decoder_funcs = psaux->t1_decoder_funcs;
@@ -325,7 +386,10 @@
hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
( load_flags & FT_LOAD_NO_HINTING ) == 0 );
+ scaled = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 );
+ glyph->hint = hinting;
+ glyph->scaled = scaled;
t1glyph->format = FT_GLYPH_FORMAT_OUTLINE;
error = decoder_funcs->init( &decoder,
@@ -355,13 +419,15 @@
/* now load the unscaled outline */
error = T1_Parse_Glyph_And_Get_Char_String( &decoder, glyph_index,
- &glyph_data );
+ &glyph_data,
+ &force_scaling );
if ( error )
goto Exit;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
glyph_data_loaded = 1;
#endif
+ hinting = glyph->hint;
font_matrix = decoder.font_matrix;
font_offset = decoder.font_offset;
@@ -451,7 +517,7 @@
}
#endif
- if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )
+ if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 || force_scaling )
{
/* scale the outline and the metrics */
FT_Int n;
diff --git a/modules/freetype2/src/type1/t1gload.h b/modules/freetype2/src/type1/t1gload.h
index 975f22785..72ef76f6a 100644
--- a/modules/freetype2/src/type1/t1gload.h
+++ b/modules/freetype2/src/type1/t1gload.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 Glyph Loader (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type1/t1load.c b/modules/freetype2/src/type1/t1load.c
index f6b43dc2f..9dfa637a6 100644
--- a/modules/freetype2/src/type1/t1load.c
+++ b/modules/freetype2/src/type1/t1load.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 font loader (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -329,8 +329,8 @@
for ( i = 0; i < mmaster.num_axis; i++ )
{
mmvar->axis[i].name = mmaster.axis[i].name;
- mmvar->axis[i].minimum = INT_TO_FIXED( mmaster.axis[i].minimum);
- mmvar->axis[i].maximum = INT_TO_FIXED( mmaster.axis[i].maximum);
+ mmvar->axis[i].minimum = INT_TO_FIXED( mmaster.axis[i].minimum );
+ mmvar->axis[i].maximum = INT_TO_FIXED( mmaster.axis[i].maximum );
mmvar->axis[i].def = ( mmvar->axis[i].minimum +
mmvar->axis[i].maximum ) / 2;
/* Does not apply. But this value is in range */
@@ -366,14 +366,16 @@
}
- FT_LOCAL_DEF( FT_Error )
- T1_Set_MM_Blend( T1_Face face,
+ static FT_Error
+ t1_set_mm_blend( T1_Face face,
FT_UInt num_coords,
FT_Fixed* coords )
{
PS_Blend blend = face->blend;
FT_UInt n, m;
+ FT_Bool have_diff = 0;
+
if ( !blend )
return FT_THROW( Invalid_Argument );
@@ -405,9 +407,36 @@
result = FT_MulFix( result, factor );
}
- blend->weight_vector[n] = result;
+
+ if ( blend->weight_vector[n] != result )
+ {
+ blend->weight_vector[n] = result;
+ have_diff = 1;
+ }
}
+ /* return value -1 indicates `no change' */
+ return have_diff ? FT_Err_Ok : -1;
+ }
+
+
+ FT_LOCAL_DEF( FT_Error )
+ T1_Set_MM_Blend( T1_Face face,
+ FT_UInt num_coords,
+ FT_Fixed* coords )
+ {
+ FT_Error error;
+
+
+ error = t1_set_mm_blend( face, num_coords, coords );
+ if ( error )
+ return error;
+
+ if ( num_coords )
+ face->root.face_flags |= FT_FACE_FLAG_VARIATION;
+ else
+ face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
+
return FT_Err_Ok;
}
@@ -452,6 +481,7 @@
FT_UInt num_coords,
FT_Long* coords )
{
+ FT_Error error;
PS_Blend blend = face->blend;
FT_UInt n, p;
FT_Fixed final_blends[T1_MAX_MM_DESIGNS];
@@ -518,7 +548,28 @@
final_blends[n] = the_blend;
}
- return T1_Set_MM_Blend( face, blend->num_axis, final_blends );
+ error = t1_set_mm_blend( face, blend->num_axis, final_blends );
+ if ( error )
+ return error;
+
+ if ( num_coords )
+ face->root.face_flags |= FT_FACE_FLAG_VARIATION;
+ else
+ face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
+
+ return FT_Err_Ok;
+ }
+
+
+ /* MM fonts don't have named instances, so only the design is reset */
+
+ FT_LOCAL_DEF( FT_Error )
+ T1_Reset_MM_Blend( T1_Face face,
+ FT_UInt instance_index )
+ {
+ FT_UNUSED( instance_index );
+
+ return T1_Set_MM_Blend( face, 0, NULL );
}
@@ -1266,7 +1317,7 @@
if ( ft_isdigit( *cur ) || *cur == '[' )
{
T1_Encoding encode = &face->type1.encoding;
- FT_Int count, n;
+ FT_Int count, array_size, n;
PS_Table char_table = &loader->encoding_table;
FT_Memory memory = parser->root.memory;
FT_Error error;
@@ -1283,13 +1334,12 @@
else
count = (FT_Int)T1_ToInt( parser );
- /* only composite fonts (which we don't support) */
- /* can have larger values */
+ array_size = count;
if ( count > 256 )
{
- FT_ERROR(( "parse_encoding: invalid encoding array size\n" ));
- parser->root.error = FT_THROW( Invalid_File_Format );
- return;
+ FT_TRACE2(( "parse_encoding:"
+ " only using first 256 encoding array entries\n" ));
+ array_size = 256;
}
T1_Skip_Spaces( parser );
@@ -1305,18 +1355,18 @@
}
/* we use a T1_Table to store our charnames */
- loader->num_chars = encode->num_chars = count;
- if ( FT_NEW_ARRAY( encode->char_index, count ) ||
- FT_NEW_ARRAY( encode->char_name, count ) ||
+ loader->num_chars = encode->num_chars = array_size;
+ if ( FT_NEW_ARRAY( encode->char_index, array_size ) ||
+ FT_NEW_ARRAY( encode->char_name, array_size ) ||
FT_SET_ERROR( psaux->ps_table_funcs->init(
- char_table, count, memory ) ) )
+ char_table, array_size, memory ) ) )
{
parser->root.error = error;
return;
}
/* We need to `zero' out encoding_table.elements */
- for ( n = 0; n < count; n++ )
+ for ( n = 0; n < array_size; n++ )
{
char* notdef = (char *)".notdef";
@@ -1409,11 +1459,14 @@
len = (FT_UInt)( parser->root.cursor - cur );
- parser->root.error = T1_Add_Table( char_table, charcode,
- cur, len + 1 );
- if ( parser->root.error )
- return;
- char_table->elements[charcode][len] = '\0';
+ if ( n < array_size )
+ {
+ parser->root.error = T1_Add_Table( char_table, charcode,
+ cur, len + 1 );
+ if ( parser->root.error )
+ return;
+ char_table->elements[charcode][len] = '\0';
+ }
n++;
}
@@ -2440,6 +2493,24 @@
type1->encoding.num_chars = loader.num_chars;
}
+ /* some sanitizing to avoid overflows later on; */
+ /* the upper limits are ad-hoc values */
+ if ( priv->blue_shift > 1000 || priv->blue_shift < 0 )
+ {
+ FT_TRACE2(( "T1_Open_Face:"
+ " setting unlikely BlueShift value %d to default (7)\n",
+ priv->blue_shift ));
+ priv->blue_shift = 7;
+ }
+
+ if ( priv->blue_fuzz > 1000 || priv->blue_fuzz < 0 )
+ {
+ FT_TRACE2(( "T1_Open_Face:"
+ " setting unlikely BlueFuzz value %d to default (1)\n",
+ priv->blue_fuzz ));
+ priv->blue_fuzz = 1;
+ }
+
Exit:
t1_done_loader( &loader );
return error;
diff --git a/modules/freetype2/src/type1/t1load.h b/modules/freetype2/src/type1/t1load.h
index 72445c531..03be3f7f9 100644
--- a/modules/freetype2/src/type1/t1load.h
+++ b/modules/freetype2/src/type1/t1load.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 font loader (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -90,6 +90,10 @@ FT_BEGIN_HEADER
FT_Long* coords );
FT_LOCAL( FT_Error )
+ T1_Reset_MM_Blend( T1_Face face,
+ FT_UInt instance_index );
+
+ FT_LOCAL( FT_Error )
T1_Get_Var_Design( T1_Face face,
FT_UInt num_coords,
FT_Fixed* coords );
diff --git a/modules/freetype2/src/type1/t1objs.c b/modules/freetype2/src/type1/t1objs.c
index a00911713..7333c4c95 100644
--- a/modules/freetype2/src/type1/t1objs.c
+++ b/modules/freetype2/src/type1/t1objs.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 objects manager (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,6 +21,7 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_IDS_H
+#include FT_DRIVER_H
#include "t1gload.h"
#include "t1load.h"
@@ -49,9 +50,6 @@
/* */
/* SIZE FUNCTIONS */
/* */
- /* note that we store the global hints in the size's "internal" root */
- /* field */
- /* */
/*************************************************************************/
@@ -77,16 +75,16 @@
T1_Size size = (T1_Size)t1size;
- if ( size->root.internal )
+ if ( t1size->internal->module_data )
{
PSH_Globals_Funcs funcs;
funcs = T1_Size_Get_Globals_Funcs( size );
if ( funcs )
- funcs->destroy( (PSH_Globals)size->root.internal );
+ funcs->destroy( (PSH_Globals)t1size->internal->module_data );
- size->root.internal = NULL;
+ t1size->internal->module_data = NULL;
}
}
@@ -108,7 +106,7 @@
error = funcs->create( size->root.face->memory,
&face->type1.private_dict, &globals );
if ( !error )
- size->root.internal = (FT_Size_Internal)(void*)globals;
+ t1size->internal->module_data = globals;
}
return error;
@@ -126,7 +124,7 @@
FT_Request_Metrics( size->root.face, req );
if ( funcs )
- funcs->set_scale( (PSH_Globals)size->root.internal,
+ funcs->set_scale( (PSH_Globals)t1size->internal->module_data,
size->root.metrics.x_scale,
size->root.metrics.y_scale,
0, 0 );
@@ -382,7 +380,7 @@
/* simplistic and might get some things wrong. For a full-featured */
/* algorithm you might have a look at the whitepaper given at */
/* */
- /* http://blogs.msdn.com/text/archive/2007/04/23/wpf-font-selection-model.aspx */
+ /* https://blogs.msdn.com/text/archive/2007/04/23/wpf-font-selection-model.aspx */
/* get style name -- be careful, some broken fonts only */
/* have a `/FontName' dictionary entry! */
@@ -558,12 +556,6 @@
if ( clazz )
error = FT_CMap_New( clazz, NULL, &charmap, NULL );
-
-#if 0
- /* Select default charmap */
- if (root->num_charmaps)
- root->charmap = root->charmaps[0];
-#endif
}
}
@@ -587,9 +579,42 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- T1_Driver_Init( FT_Module driver )
+ T1_Driver_Init( FT_Module module )
{
- FT_UNUSED( driver );
+ PS_Driver driver = (PS_Driver)module;
+
+ FT_UInt32 seed;
+
+
+ /* set default property values, cf. `ftt1drv.h' */
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+ driver->hinting_engine = FT_HINTING_FREETYPE;
+#else
+ driver->hinting_engine = FT_HINTING_ADOBE;
+#endif
+
+ driver->no_stem_darkening = TRUE;
+
+ driver->darken_params[0] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1;
+ driver->darken_params[1] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1;
+ driver->darken_params[2] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2;
+ driver->darken_params[3] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2;
+ driver->darken_params[4] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3;
+ driver->darken_params[5] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3;
+ driver->darken_params[6] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4;
+ driver->darken_params[7] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4;
+
+ /* compute random seed from some memory addresses */
+ seed = (FT_UInt32)( (FT_Offset)(char*)&seed ^
+ (FT_Offset)(char*)&module ^
+ (FT_Offset)(char*)module->memory );
+ seed = seed ^ ( seed >> 10 ) ^ ( seed >> 20 );
+
+ driver->random_seed = (FT_Int32)seed;
+ if ( driver->random_seed < 0 )
+ driver->random_seed = -driver->random_seed;
+ else if ( driver->random_seed == 0 )
+ driver->random_seed = 123456789;
return FT_Err_Ok;
}
diff --git a/modules/freetype2/src/type1/t1objs.h b/modules/freetype2/src/type1/t1objs.h
index 94fbdee9a..8298e036f 100644
--- a/modules/freetype2/src/type1/t1objs.h
+++ b/modules/freetype2/src/type1/t1objs.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 objects manager (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -120,12 +120,12 @@ FT_BEGIN_HEADER
FT_Bool hint;
FT_Bool scaled;
- FT_Int max_points;
- FT_Int max_contours;
-
FT_Fixed x_scale;
FT_Fixed y_scale;
+ FT_Int max_points;
+ FT_Int max_contours;
+
} T1_GlyphSlotRec;
diff --git a/modules/freetype2/src/type1/t1parse.c b/modules/freetype2/src/type1/t1parse.c
index 478c80bce..8e201e5ef 100644
--- a/modules/freetype2/src/type1/t1parse.c
+++ b/modules/freetype2/src/type1/t1parse.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 parser (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type1/t1parse.h b/modules/freetype2/src/type1/t1parse.h
index affa818e6..4ac82ae91 100644
--- a/modules/freetype2/src/type1/t1parse.h
+++ b/modules/freetype2/src/type1/t1parse.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 parser (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type1/t1tokens.h b/modules/freetype2/src/type1/t1tokens.h
index a84f291a6..43a65d88e 100644
--- a/modules/freetype2/src/type1/t1tokens.h
+++ b/modules/freetype2/src/type1/t1tokens.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 tokenizer (specification). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type1/type1.c b/modules/freetype2/src/type1/type1.c
index bb8aca97f..72eff59bf 100644
--- a/modules/freetype2/src/type1/type1.c
+++ b/modules/freetype2/src/type1/type1.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Type 1 driver component (body only). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,17 +17,14 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "t1parse.c"
-#include "t1load.c"
-#include "t1objs.c"
-#include "t1driver.c"
-#include "t1gload.c"
-#ifndef T1_CONFIG_OPTION_NO_AFM
#include "t1afm.c"
-#endif
+#include "t1driver.c"
+#include "t1gload.c"
+#include "t1load.c"
+#include "t1objs.c"
+#include "t1parse.c"
/* END */
diff --git a/modules/freetype2/src/type42/Jamfile b/modules/freetype2/src/type42/Jamfile
index a504ad17d..b98de05a7 100644
--- a/modules/freetype2/src/type42/Jamfile
+++ b/modules/freetype2/src/type42/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/type42 Jamfile
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/type42/module.mk b/modules/freetype2/src/type42/module.mk
index a7e27b723..3d4732bb6 100644
--- a/modules/freetype2/src/type42/module.mk
+++ b/modules/freetype2/src/type42/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/type42/rules.mk b/modules/freetype2/src/type42/rules.mk
index 80710eff6..9325d3898 100644
--- a/modules/freetype2/src/type42/rules.mk
+++ b/modules/freetype2/src/type42/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2002-2016 by
+# Copyright 2002-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/type42/t42drivr.c b/modules/freetype2/src/type42/t42drivr.c
index dad35c2b1..f579b2708 100644
--- a/modules/freetype2/src/type42/t42drivr.c
+++ b/modules/freetype2/src/type42/t42drivr.c
@@ -4,7 +4,7 @@
/* */
/* High-level Type 42 driver interface (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type42/t42drivr.h b/modules/freetype2/src/type42/t42drivr.h
index 6ddfb639d..3667f3e06 100644
--- a/modules/freetype2/src/type42/t42drivr.h
+++ b/modules/freetype2/src/type42/t42drivr.h
@@ -4,7 +4,7 @@
/* */
/* High-level Type 42 driver interface (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type42/t42error.h b/modules/freetype2/src/type42/t42error.h
index e1097cc81..e3978a760 100644
--- a/modules/freetype2/src/type42/t42error.h
+++ b/modules/freetype2/src/type42/t42error.h
@@ -4,7 +4,7 @@
/* */
/* Type 42 error codes (specification only). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type42/t42objs.c b/modules/freetype2/src/type42/t42objs.c
index 1e4907b86..66e5c4038 100644
--- a/modules/freetype2/src/type42/t42objs.c
+++ b/modules/freetype2/src/type42/t42objs.c
@@ -4,7 +4,7 @@
/* */
/* Type 42 objects manager (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -394,12 +394,6 @@
if ( clazz )
error = FT_CMap_New( clazz, NULL, &charmap, NULL );
-
-#if 0
- /* Select default charmap */
- if ( root->num_charmaps )
- root->charmap = root->charmaps[0];
-#endif
}
}
Exit:
diff --git a/modules/freetype2/src/type42/t42objs.h b/modules/freetype2/src/type42/t42objs.h
index 87a40452f..3bad5135e 100644
--- a/modules/freetype2/src/type42/t42objs.h
+++ b/modules/freetype2/src/type42/t42objs.h
@@ -4,7 +4,7 @@
/* */
/* Type 42 objects manager (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type42/t42parse.c b/modules/freetype2/src/type42/t42parse.c
index ef36ffe3c..4813d1f3f 100644
--- a/modules/freetype2/src/type42/t42parse.c
+++ b/modules/freetype2/src/type42/t42parse.c
@@ -4,7 +4,7 @@
/* */
/* Type 42 font parser (body). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type42/t42parse.h b/modules/freetype2/src/type42/t42parse.h
index ba9e85719..f35d23de6 100644
--- a/modules/freetype2/src/type42/t42parse.h
+++ b/modules/freetype2/src/type42/t42parse.h
@@ -4,7 +4,7 @@
/* */
/* Type 42 font parser (specification). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type42/t42types.h b/modules/freetype2/src/type42/t42types.h
index 850a156e4..d0aa2de57 100644
--- a/modules/freetype2/src/type42/t42types.h
+++ b/modules/freetype2/src/type42/t42types.h
@@ -4,7 +4,7 @@
/* */
/* Type 42 font data types (specification only). */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/type42/type42.c b/modules/freetype2/src/type42/type42.c
index 0d17a9b1d..6a89cfbed 100644
--- a/modules/freetype2/src/type42/type42.c
+++ b/modules/freetype2/src/type42/type42.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Type 42 driver component. */
/* */
-/* Copyright 2002-2016 by */
+/* Copyright 2002-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -15,11 +15,13 @@
/* */
/***************************************************************************/
-#define FT_MAKE_OPTION_SINGLE_OBJECT
+#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
+
+#include "t42drivr.c"
#include "t42objs.c"
#include "t42parse.c"
-#include "t42drivr.c"
+
/* END */
diff --git a/modules/freetype2/src/winfonts/Jamfile b/modules/freetype2/src/winfonts/Jamfile
index d81165e92..4385e3b39 100644
--- a/modules/freetype2/src/winfonts/Jamfile
+++ b/modules/freetype2/src/winfonts/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/winfonts Jamfile
#
-# Copyright 2001-2016 by
+# Copyright 2001-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/winfonts/fnterrs.h b/modules/freetype2/src/winfonts/fnterrs.h
index 6835d3e64..3a86af5aa 100644
--- a/modules/freetype2/src/winfonts/fnterrs.h
+++ b/modules/freetype2/src/winfonts/fnterrs.h
@@ -4,7 +4,7 @@
/* */
/* Win FNT/FON error codes (specification only). */
/* */
-/* Copyright 2001-2016 by */
+/* Copyright 2001-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/modules/freetype2/src/winfonts/module.mk b/modules/freetype2/src/winfonts/module.mk
index 83da5732f..13f9077cf 100644
--- a/modules/freetype2/src/winfonts/module.mk
+++ b/modules/freetype2/src/winfonts/module.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/winfonts/rules.mk b/modules/freetype2/src/winfonts/rules.mk
index 2fd7b822a..d694d1a77 100644
--- a/modules/freetype2/src/winfonts/rules.mk
+++ b/modules/freetype2/src/winfonts/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2016 by
+# Copyright 1996-2018 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/modules/freetype2/src/winfonts/winfnt.c b/modules/freetype2/src/winfonts/winfnt.c
index 99cc96617..36bd3148d 100644
--- a/modules/freetype2/src/winfonts/winfnt.c
+++ b/modules/freetype2/src/winfonts/winfnt.c
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver for Windows FNT/FON files */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* Copyright 2003 Huw D M Davies for Codeweavers */
/* Copyright 2007 Dmitry Timoshkov for Codeweavers */
@@ -561,7 +561,7 @@
error = fnt_font_load( face->font, stream );
if ( error )
{
- FT_TRACE2(( "font #%lu load error %d\n",
+ FT_TRACE2(( "font #%lu load error 0x%x\n",
dir_entry2.name, error ));
goto Fail;
}
@@ -859,10 +859,6 @@
NULL );
if ( error )
goto Fail;
-
- /* Select default charmap */
- if ( root->num_charmaps )
- root->charmap = root->charmaps[0];
}
/* set up remaining flags */
@@ -1095,7 +1091,7 @@
/* note: since glyphs are stored in columns and not in rows we */
/* can't use ft_glyphslot_set_bitmap */
- if ( FT_ALLOC_MULT( bitmap->buffer, pitch, bitmap->rows ) )
+ if ( FT_ALLOC_MULT( bitmap->buffer, bitmap->rows, pitch ) )
goto Exit;
column = (FT_Byte*)bitmap->buffer;
diff --git a/modules/freetype2/src/winfonts/winfnt.h b/modules/freetype2/src/winfonts/winfnt.h
index 9a4f32d5b..4885c9d74 100644
--- a/modules/freetype2/src/winfonts/winfnt.h
+++ b/modules/freetype2/src/winfonts/winfnt.h
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver for Windows FNT/FON files */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* Copyright 2007 Dmitry Timoshkov for Codeweavers */
/* */
diff --git a/modules/freetype2/vms_make.com b/modules/freetype2/vms_make.com
index be8c61538..7b8a49b3b 100644
--- a/modules/freetype2/vms_make.com
+++ b/modules/freetype2/vms_make.com
@@ -1,6 +1,6 @@
-$! make Freetype2 under OpenVMS
+$! make FreeType 2 under OpenVMS
$!
-$! Copyright 2003-2016 by
+$! Copyright 2003-2018 by
$! David Turner, Robert Wilhelm, and Werner Lemberg.
$!
$! This file is part of the FreeType project, and may only be used, modified,
@@ -10,7 +10,7 @@ $! indicate that you have read the license and understand and accept it
$! fully.
$!
$!
-$! External libraries (like Freetype, XPM, etc.) are supported via the
+$! External libraries (like FreeType, XPM, etc.) are supported via the
$! config file VMSLIB.DAT. Please check the sample file, which is part of this
$! distribution, for the information you need to provide
$!
@@ -26,12 +26,12 @@ $! In case of problems with the install you might contact me at
$! zinser@zinser.no-ip.info (preferred) or
$! zinser@sysdev.deutsche-boerse.com (work)
$!
-$! Make procedure history for Freetype2
+$! Make procedure history for FreeType 2
$!
$!------------------------------------------------------------------------------
$! Version history
$! 0.01 20040401 First version to receive a number
-$! 0.02 20041030 Add error handling, Freetype 2.1.9
+$! 0.02 20041030 Add error handling, FreeType 2.1.9
$!
$ on error then goto err_exit
$ true = 1
@@ -128,7 +128,7 @@ $ERR_LIB:
$ write sys$output "Error reading config file vmslib.dat"
$ goto err_exit
$FT2_ERR:
-$ write sys$output "Could not locate Freetype 2 include files"
+$ write sys$output "Could not locate FreeType 2 include files"
$ goto err_exit
$ERR_EXIT:
$ set message/facil/ident/sever/text
@@ -356,8 +356,8 @@ $ deck
CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.builds.vms],[--.include],[--.src.base])
OBJS=ftbase.obj,ftinit.obj,ftglyph.obj,ftdebug.obj,ftbdf.obj,ftmm.obj,\
- fttype1.obj,ftfntfmt.obj,ftpfr.obj,ftstroke.obj,ftwinfnt.obj,ftbbox.obj,\
- ftbitmap.obj,ftlcdfil.obj,ftgasp.obj
+ fttype1.obj,ftpfr.obj,ftstroke.obj,ftwinfnt.obj,ftbbox.obj,\
+ ftbitmap.obj,ftgasp.obj
all : $(OBJS)
library [--.lib]freetype.olb $(OBJS)
@@ -1070,7 +1070,7 @@ $ then
$ type/out=vmslib.dat sys$input
!
! This is a simple driver file with information used by vms_make.com to
-! check if external libraries (like t1lib and freetype) are available on
+! check if external libraries (like t1lib and FreeType) are available on
! the system.
!
! Layout of the file:
@@ -1148,7 +1148,7 @@ $ if f$locate("EXE",libtype) .lt. f$length(libtype) then lqual = "/share"
$ write optf libloc , lqual
$ if (f$trnlnm("topt") .nes. "") then write topt libloc , lqual
$!
-$! Nasty hack to get the freetype includes to work
+$! Nasty hack to get the FreeType includes to work
$!
$ ft2def = false
$ if ((libname .eqs. "FREETYPE") .and. -
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index a1016a820..d2266f812 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2158,19 +2158,9 @@ pref("security.block_script_with_wrong_mime", true);
// Block images of wrong MIME for XCTO: nosniff.
pref("security.xcto_nosniff_block_images", false);
-// OCSP must-staple
-pref("security.ssl.enable_ocsp_must_staple", true);
-
// Insecure Form Field Warning
pref("security.insecure_field_warning.contextual.enabled", false);
-// Disable pinning checks by default.
-pref("security.cert_pinning.enforcement_level", 0);
-// Do not process hpkp headers rooted by not built in roots by default.
-// This is to prevent accidental pinning from MITM devices and is used
-// for tests.
-pref("security.cert_pinning.process_headers_from_non_builtin_roots", false);
-
// If set to true, allow view-source URIs to be opened from URIs that share
// their protocol with the inner URI of the view-source URI
pref("security.view-source.reachable-from-inner-protocol", false);
@@ -4853,18 +4843,6 @@ pref("memory.dump_reports_on_oom", false);
// Number of stack frames to capture in createObjectURL for about:memory.
pref("memory.blob_report.stack_frames", 0);
-// comma separated list of domain origins (e.g. https://domain.com) that still
-// need localStorage in the frameworker
-pref("social.whitelist", "https://mozsocial.cliqz.com");
-// comma separated list of domain origins (e.g. https://domain.com) for
-// directory websites (e.g. AMO) that can install providers for other sites
-pref("social.directories", "https://activations.cdn.mozilla.net");
-// remote-install allows any website to activate a provider, with extended UI
-// notifying user of installation. we can later pref off remote install if
-// necessary. This does not affect whitelisted and directory installs.
-pref("social.remote-install.enabled", true);
-pref("social.toast-notifications.enabled", true);
-
// Disable idle observer fuzz, because only privileged content can access idle
// observers (bug 780507).
pref("dom.idle-observers-api.fuzz_time.disabled", true);
@@ -4990,6 +4968,7 @@ pref("dom.flyweb.enabled", false);
// Enable mapped array buffer by default.
pref("dom.mapped_arraybuffer.enabled", true);
+#ifdef MOZ_SAFE_BROWSING
// The tables used for Safebrowsing phishing and malware checks.
pref("urlclassifier.malwareTable", "goog-malware-shavar,goog-unwanted-shavar,test-malware-simple,test-unwanted-simple");
@@ -5097,6 +5076,7 @@ pref("browser.safebrowsing.id", "navclient-auto-ffox");
#else
pref("browser.safebrowsing.id", "Firefox");
#endif
+#endif
// Turn off Spatial navigation by default.
pref("snav.enabled", false);
@@ -5445,28 +5425,11 @@ pref("media.block-autoplay-until-in-foreground", false);
pref("layout.css.servo.enabled", true);
#endif
-// HSTS Priming
-// If a request is mixed-content, send an HSTS priming request to attempt to
-// see if it is available over HTTPS.
-#ifdef RELEASE_OR_BETA
-// Don't change the order of evaluation of mixed-content and HSTS upgrades in
-// order to be most compatible with current standards
-pref("security.mixed_content.send_hsts_priming", false);
-pref("security.mixed_content.use_hsts", false);
-#else
-// Change the order of evaluation so HSTS upgrades happen before
-// mixed-content blocking
-pref("security.mixed_content.send_hsts_priming", true);
-pref("security.mixed_content.use_hsts", true);
-#endif
-// Approximately 1 week default cache for HSTS priming failures
-pref ("security.mixed_content.hsts_priming_cache_timeout", 10080);
-
-// TODO: Bug 1380959: Block toplevel data: URI navigations
+// Block toplevel data: URI navigations
// If true, all toplevel data: URI navigations will be blocked.
// Please note that manually entering a data: URI in the
// URL-Bar will not be blocked when flipping this pref.
-pref("security.data_uri.block_toplevel_data_uri_navigations", false);
+pref("security.data_uri.block_toplevel_data_uri_navigations", true);
// Disable Storage api in release builds.
#ifdef NIGHTLY_BUILD
diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp
index ede825b8f..a8c9a5a25 100644
--- a/netwerk/base/LoadInfo.cpp
+++ b/netwerk/base/LoadInfo.cpp
@@ -67,8 +67,6 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
, mForcePreflight(false)
, mIsPreflight(false)
, mLoadTriggeredFromExternal(false)
- , mForceHSTSPriming(false)
- , mMixedContentWouldBlock(false)
{
MOZ_ASSERT(mLoadingPrincipal);
MOZ_ASSERT(mTriggeringPrincipal);
@@ -243,8 +241,6 @@ LoadInfo::LoadInfo(nsPIDOMWindowOuter* aOuterWindow,
, mForcePreflight(false)
, mIsPreflight(false)
, mLoadTriggeredFromExternal(false)
- , mForceHSTSPriming(false)
- , mMixedContentWouldBlock(false)
{
// Top-level loads are never third-party
// Grab the information we can out of the window.
@@ -308,8 +304,6 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
, mForcePreflight(rhs.mForcePreflight)
, mIsPreflight(rhs.mIsPreflight)
, mLoadTriggeredFromExternal(rhs.mLoadTriggeredFromExternal)
- , mForceHSTSPriming(rhs.mForceHSTSPriming)
- , mMixedContentWouldBlock(rhs.mMixedContentWouldBlock)
{
}
@@ -337,9 +331,7 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
const nsTArray<nsCString>& aCorsUnsafeHeaders,
bool aForcePreflight,
bool aIsPreflight,
- bool aLoadTriggeredFromExternal,
- bool aForceHSTSPriming,
- bool aMixedContentWouldBlock)
+ bool aLoadTriggeredFromExternal)
: mLoadingPrincipal(aLoadingPrincipal)
, mTriggeringPrincipal(aTriggeringPrincipal)
, mPrincipalToInherit(aPrincipalToInherit)
@@ -363,8 +355,6 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
, mForcePreflight(aForcePreflight)
, mIsPreflight(aIsPreflight)
, mLoadTriggeredFromExternal(aLoadTriggeredFromExternal)
- , mForceHSTSPriming (aForceHSTSPriming)
- , mMixedContentWouldBlock(aMixedContentWouldBlock)
{
// Only top level TYPE_DOCUMENT loads can have a null loadingPrincipal
MOZ_ASSERT(mLoadingPrincipal || aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT);
@@ -933,34 +923,6 @@ LoadInfo::GetLoadTriggeredFromExternal(bool* aLoadTriggeredFromExternal)
}
NS_IMETHODIMP
-LoadInfo::GetForceHSTSPriming(bool* aForceHSTSPriming)
-{
- *aForceHSTSPriming = mForceHSTSPriming;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-LoadInfo::GetMixedContentWouldBlock(bool *aMixedContentWouldBlock)
-{
- *aMixedContentWouldBlock = mMixedContentWouldBlock;
- return NS_OK;
-}
-
-void
-LoadInfo::SetHSTSPriming(bool aMixedContentWouldBlock)
-{
- mForceHSTSPriming = true;
- mMixedContentWouldBlock = aMixedContentWouldBlock;
-}
-
-void
-LoadInfo::ClearHSTSPriming()
-{
- mForceHSTSPriming = false;
- mMixedContentWouldBlock = false;
-}
-
-NS_IMETHODIMP
LoadInfo::GetTainting(uint32_t* aTaintingOut)
{
MOZ_ASSERT(aTaintingOut);
diff --git a/netwerk/base/LoadInfo.h b/netwerk/base/LoadInfo.h
index 0ae6061b3..2b1e8c9e8 100644
--- a/netwerk/base/LoadInfo.h
+++ b/netwerk/base/LoadInfo.h
@@ -111,9 +111,7 @@ private:
const nsTArray<nsCString>& aUnsafeHeaders,
bool aForcePreflight,
bool aIsPreflight,
- bool aLoadTriggeredFromExternal,
- bool aForceHSTSPriming,
- bool aMixedContentWouldBlock);
+ bool aLoadTriggeredFromExternal);
LoadInfo(const LoadInfo& rhs);
friend nsresult
@@ -159,9 +157,6 @@ private:
bool mForcePreflight;
bool mIsPreflight;
bool mLoadTriggeredFromExternal;
-
- bool mForceHSTSPriming : 1;
- bool mMixedContentWouldBlock : 1;
};
} // namespace net
diff --git a/netwerk/base/nsILoadGroup.idl b/netwerk/base/nsILoadGroup.idl
index 4f89bd0e3..d0cad5ece 100644
--- a/netwerk/base/nsILoadGroup.idl
+++ b/netwerk/base/nsILoadGroup.idl
@@ -95,10 +95,4 @@ interface nsILoadGroup : nsIRequest
* the docShell has created the default request.)
*/
attribute nsLoadFlags defaultLoadFlags;
-
- /**
- * The cached user agent override created by UserAgentOverrides.jsm. Used
- * for all sub-resource requests in the loadgroup.
- */
- attribute ACString userAgentOverrideCache;
};
diff --git a/netwerk/base/nsILoadInfo.idl b/netwerk/base/nsILoadInfo.idl
index 4ec29b972..9a883ff98 100644
--- a/netwerk/base/nsILoadInfo.idl
+++ b/netwerk/base/nsILoadInfo.idl
@@ -671,32 +671,6 @@ interface nsILoadInfo : nsISupports
[infallible] readonly attribute boolean isPreflight;
/**
- * When this request would be mixed-content and we do not have an
- * entry in the HSTS cache, we send an HSTS priming request to
- * determine if it is ok to upgrade the request to HTTPS.
- */
- /**
- * True if this is a mixed-content load and HSTS priming request will be sent.
- */
- [noscript, infallible] readonly attribute boolean forceHSTSPriming;
- /**
- * Carry the decision whether this load would be blocked by mixed content so
- * that if HSTS priming fails, the correct decision can be made.
- */
- [noscript, infallible] readonly attribute boolean mixedContentWouldBlock;
-
- /**
- * Mark this LoadInfo as needing HSTS Priming
- *
- * @param wouldBlock Carry the decision of Mixed Content Blocking to be
- * applied when HSTS priming is complete.
- */
- [noscript, notxpcom, nostdcall]
- void setHSTSPriming(in boolean mixeContentWouldBlock);
- [noscript, notxpcom, nostdcall]
- void clearHSTSPriming();
-
- /**
* Constants reflecting the channel tainting. These are mainly defined here
* for script. Internal C++ code should use the enum defined in LoadTainting.h.
* See LoadTainting.h for documentation.
diff --git a/netwerk/base/nsLoadGroup.cpp b/netwerk/base/nsLoadGroup.cpp
index 7b75f7942..51d5a9ca7 100644
--- a/netwerk/base/nsLoadGroup.cpp
+++ b/netwerk/base/nsLoadGroup.cpp
@@ -809,20 +809,6 @@ nsLoadGroup::SetDefaultLoadFlags(uint32_t aFlags)
return NS_OK;
}
-NS_IMETHODIMP
-nsLoadGroup::GetUserAgentOverrideCache(nsACString & aUserAgentOverrideCache)
-{
- aUserAgentOverrideCache = mUserAgentOverrideCache;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsLoadGroup::SetUserAgentOverrideCache(const nsACString & aUserAgentOverrideCache)
-{
- mUserAgentOverrideCache = aUserAgentOverrideCache;
- return NS_OK;
-}
-
////////////////////////////////////////////////////////////////////////////////
diff --git a/netwerk/base/nsLoadGroup.h b/netwerk/base/nsLoadGroup.h
index da89ca1b3..20dd94cf9 100644
--- a/netwerk/base/nsLoadGroup.h
+++ b/netwerk/base/nsLoadGroup.h
@@ -95,8 +95,6 @@ protected:
/* For nsPILoadGroupInternal */
uint32_t mTimedNonCachedRequestsUntilOnEndPageLoad;
-
- nsCString mUserAgentOverrideCache;
};
} // namespace net
diff --git a/netwerk/base/security-prefs.js b/netwerk/base/security-prefs.js
index 329a4c6b7..5351d7c04 100644
--- a/netwerk/base/security-prefs.js
+++ b/netwerk/base/security-prefs.js
@@ -111,6 +111,17 @@ pref("security.ssl.errorReporting.enabled", true);
pref("security.ssl.errorReporting.url", "https://incoming.telemetry.mozilla.org/submit/sslreports/");
pref("security.ssl.errorReporting.automatic", false);
+// OCSP must-staple
+pref("security.ssl.enable_ocsp_must_staple", true);
+
+// HPKP settings
+
+// Enable pinning checks by default.
+pref("security.cert_pinning.enforcement_level", 2);
+// Do not process hpkp headers rooted by not built in roots by default.
+// This is to prevent accidental pinning from MITM devices and is used
+// for tests.
+pref("security.cert_pinning.process_headers_from_non_builtin_roots", false);
// Impose a maximum age on HPKP headers, to avoid sites getting permanently
// blacking themselves out by setting a bad pin. (60 days by default)
// https://tools.ietf.org/html/rfc7469#section-4.1
diff --git a/netwerk/ipc/NeckoChannelParams.ipdlh b/netwerk/ipc/NeckoChannelParams.ipdlh
index bb7562c64..2633ef608 100644
--- a/netwerk/ipc/NeckoChannelParams.ipdlh
+++ b/netwerk/ipc/NeckoChannelParams.ipdlh
@@ -56,8 +56,6 @@ struct LoadInfoArgs
bool forcePreflight;
bool isPreflight;
bool loadTriggeredFromExternal;
- bool forceHSTSPriming;
- bool mixedContentWouldBlock;
};
/**
diff --git a/netwerk/protocol/http/HSTSPrimerListener.cpp b/netwerk/protocol/http/HSTSPrimerListener.cpp
deleted file mode 100644
index 8c9d28d36..000000000
--- a/netwerk/protocol/http/HSTSPrimerListener.cpp
+++ /dev/null
@@ -1,273 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsHttp.h"
-
-#include "HSTSPrimerListener.h"
-#include "nsIHstsPrimingCallback.h"
-#include "nsIPrincipal.h"
-#include "nsSecurityHeaderParser.h"
-#include "nsISiteSecurityService.h"
-#include "nsISocketProvider.h"
-#include "nsISSLStatus.h"
-#include "nsISSLStatusProvider.h"
-#include "nsStreamUtils.h"
-#include "nsHttpChannel.h"
-#include "LoadInfo.h"
-
-namespace mozilla {
-namespace net {
-
-using namespace mozilla;
-
-NS_IMPL_ISUPPORTS(HSTSPrimingListener, nsIStreamListener,
- nsIRequestObserver, nsIInterfaceRequestor)
-
-NS_IMETHODIMP
-HSTSPrimingListener::GetInterface(const nsIID & aIID, void **aResult)
-{
- return QueryInterface(aIID, aResult);
-}
-
-NS_IMETHODIMP
-HSTSPrimingListener::OnStartRequest(nsIRequest *aRequest,
- nsISupports *aContext)
-{
- nsresult primingResult = CheckHSTSPrimingRequestStatus(aRequest);
- nsCOMPtr<nsIHstsPrimingCallback> callback(mCallback);
- mCallback = nullptr;
-
- nsCOMPtr<nsITimedChannel> timingChannel =
- do_QueryInterface(callback);
- if (timingChannel) {
- TimeStamp channelCreationTime;
- nsresult rv = timingChannel->GetChannelCreation(&channelCreationTime);
- if (NS_SUCCEEDED(rv) && !channelCreationTime.IsNull()) {
- PRUint32 interval =
- (PRUint32) (TimeStamp::Now() - channelCreationTime).ToMilliseconds();
- Telemetry::Accumulate(Telemetry::HSTS_PRIMING_REQUEST_DURATION,
- (NS_SUCCEEDED(primingResult)) ? NS_LITERAL_CSTRING("success")
- : NS_LITERAL_CSTRING("failure"),
- interval);
- }
- }
-
- if (NS_FAILED(primingResult)) {
- LOG(("HSTS Priming Failed (request was not approved)"));
- return callback->OnHSTSPrimingFailed(primingResult, false);
- }
-
- LOG(("HSTS Priming Succeeded (request was approved)"));
- return callback->OnHSTSPrimingSucceeded(false);
-}
-
-NS_IMETHODIMP
-HSTSPrimingListener::OnStopRequest(nsIRequest *aRequest,
- nsISupports *aContext,
- nsresult aStatus)
-{
- return NS_OK;
-}
-
-nsresult
-HSTSPrimingListener::CheckHSTSPrimingRequestStatus(nsIRequest* aRequest)
-{
- nsresult status;
- nsresult rv = aRequest->GetStatus(&status);
- NS_ENSURE_SUCCESS(rv, rv);
- if (NS_FAILED(status)) {
- return NS_ERROR_CONTENT_BLOCKED;
- }
-
- // Test that things worked on a HTTP level
- nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest);
- NS_ENSURE_STATE(httpChannel);
- nsCOMPtr<nsIHttpChannelInternal> internal = do_QueryInterface(aRequest);
- NS_ENSURE_STATE(internal);
-
- bool succeedded;
- rv = httpChannel->GetRequestSucceeded(&succeedded);
- if (NS_FAILED(rv) || !succeedded) {
- // If the request did not return a 2XX response, don't process it
- return NS_ERROR_CONTENT_BLOCKED;
- }
-
- bool synthesized = false;
- nsHttpChannel* rawHttpChannel = static_cast<nsHttpChannel*>(httpChannel.get());
- rv = rawHttpChannel->GetResponseSynthesized(&synthesized);
- NS_ENSURE_SUCCESS(rv, rv);
- if (synthesized) {
- // Don't consider synthesized responses
- return NS_ERROR_CONTENT_BLOCKED;
- }
-
- // check to see if the HSTS cache was updated
- nsCOMPtr<nsISiteSecurityService> sss = do_GetService(NS_SSSERVICE_CONTRACTID, &rv);
- NS_ENSURE_SUCCESS(rv, rv);
-
- nsCOMPtr<nsIURI> uri;
- rv = httpChannel->GetURI(getter_AddRefs(uri));
- NS_ENSURE_SUCCESS(rv, rv);
- NS_ENSURE_TRUE(uri, NS_ERROR_CONTENT_BLOCKED);
-
- bool hsts;
- rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, uri, 0, nullptr, &hsts);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (hsts) {
- // An HSTS upgrade was found
- return NS_OK;
- }
-
- // There is no HSTS upgrade available
- return NS_ERROR_CONTENT_BLOCKED;
-}
-
-/** nsIStreamListener methods **/
-
-NS_IMETHODIMP
-HSTSPrimingListener::OnDataAvailable(nsIRequest *aRequest,
- nsISupports *ctxt,
- nsIInputStream *inStr,
- uint64_t sourceOffset,
- uint32_t count)
-{
- uint32_t totalRead;
- return inStr->ReadSegments(NS_DiscardSegment, nullptr, count, &totalRead);
-}
-
-// static
-nsresult
-HSTSPrimingListener::StartHSTSPriming(nsIChannel* aRequestChannel,
- nsIHstsPrimingCallback* aCallback)
-{
-
- nsCOMPtr<nsIURI> finalChannelURI;
- nsresult rv = NS_GetFinalChannelURI(aRequestChannel, getter_AddRefs(finalChannelURI));
- NS_ENSURE_SUCCESS(rv, rv);
-
- nsCOMPtr<nsIURI> uri;
- rv = NS_GetSecureUpgradedURI(finalChannelURI, getter_AddRefs(uri));
- NS_ENSURE_SUCCESS(rv,rv);
-
- // check the HSTS cache
- bool hsts;
- bool cached;
- nsCOMPtr<nsISiteSecurityService> sss = do_GetService(NS_SSSERVICE_CONTRACTID, &rv);
- NS_ENSURE_SUCCESS(rv, rv);
- rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, uri, 0, &cached, &hsts);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (hsts) {
- // already saw this host and will upgrade if allowed by preferences
- return aCallback->OnHSTSPrimingSucceeded(true);
- }
-
- if (cached) {
- // there is a non-expired entry in the cache that doesn't allow us to
- // upgrade, so go ahead and fail early.
- return aCallback->OnHSTSPrimingFailed(NS_ERROR_CONTENT_BLOCKED, true);
- }
-
- // Either it wasn't cached or the cached result has expired. Build a
- // channel for the HEAD request.
-
- nsCOMPtr<nsILoadInfo> originalLoadInfo = aRequestChannel->GetLoadInfo();
- MOZ_ASSERT(originalLoadInfo, "can not perform HSTS priming without a loadInfo");
- if (!originalLoadInfo) {
- return NS_ERROR_FAILURE;
- }
-
- nsCOMPtr<nsILoadInfo> loadInfo = static_cast<mozilla::LoadInfo*>
- (originalLoadInfo.get())->CloneForNewRequest();
-
- // the LoadInfo must have a security flag set in order to pass through priming
- // if none of these security flags are set, go ahead and fail now instead of
- // crashing in nsContentSecurityManager::ValidateSecurityFlags
- nsSecurityFlags securityMode = loadInfo->GetSecurityMode();
- if (securityMode != nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS &&
- securityMode != nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED &&
- securityMode != nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS &&
- securityMode != nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL &&
- securityMode != nsILoadInfo::SEC_REQUIRE_CORS_DATA_INHERITS) {
- return aCallback->OnHSTSPrimingFailed(NS_ERROR_CONTENT_BLOCKED, true);
- }
-
- nsCOMPtr<nsILoadGroup> loadGroup;
- rv = aRequestChannel->GetLoadGroup(getter_AddRefs(loadGroup));
- NS_ENSURE_SUCCESS(rv, rv);
-
- nsLoadFlags loadFlags;
- rv = aRequestChannel->GetLoadFlags(&loadFlags);
- NS_ENSURE_SUCCESS(rv, rv);
-
- loadFlags &= HttpBaseChannel::INHIBIT_CACHING |
- HttpBaseChannel::INHIBIT_PERSISTENT_CACHING |
- HttpBaseChannel::LOAD_BYPASS_CACHE |
- HttpBaseChannel::LOAD_FROM_CACHE |
- HttpBaseChannel::VALIDATE_ALWAYS;
- // Priming requests should never be intercepted by service workers and
- // are always anonymous.
- loadFlags |= nsIChannel::LOAD_BYPASS_SERVICE_WORKER |
- nsIRequest::LOAD_ANONYMOUS;
-
- // Create a new channel to send the priming request
- nsCOMPtr<nsIChannel> primingChannel;
- rv = NS_NewChannelInternal(getter_AddRefs(primingChannel),
- uri,
- loadInfo,
- loadGroup,
- nullptr, // aCallbacks are set later
- loadFlags);
- NS_ENSURE_SUCCESS(rv, rv);
-
- // Set method and headers
- nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(primingChannel);
- if (!httpChannel) {
- NS_ERROR("HSTSPrimingListener: Failed to QI to nsIHttpChannel!");
- return NS_ERROR_FAILURE;
- }
-
- // Currently using HEAD per the draft, but under discussion to change to GET
- // with credentials so if the upgrade is approved the result is already cached.
- rv = httpChannel->SetRequestMethod(NS_LITERAL_CSTRING("HEAD"));
- NS_ENSURE_SUCCESS(rv, rv);
-
- rv = httpChannel->
- SetRequestHeader(NS_LITERAL_CSTRING("Upgrade-Insecure-Requests"),
- NS_LITERAL_CSTRING("1"), false);
- NS_ENSURE_SUCCESS(rv, rv);
-
- // attempt to set the class of service flags on the new channel
- nsCOMPtr<nsIClassOfService> requestClass = do_QueryInterface(aRequestChannel);
- if (!requestClass) {
- NS_ERROR("HSTSPrimingListener: aRequestChannel is not an nsIClassOfService");
- return NS_ERROR_FAILURE;
- }
- nsCOMPtr<nsIClassOfService> primingClass = do_QueryInterface(httpChannel);
- if (!primingClass) {
- NS_ERROR("HSTSPrimingListener: aRequestChannel is not an nsIClassOfService");
- return NS_ERROR_FAILURE;
- }
-
- uint32_t classFlags = 0;
- rv = requestClass ->GetClassFlags(&classFlags);
- NS_ENSURE_SUCCESS(rv, rv);
- rv = primingClass->SetClassFlags(classFlags);
- NS_ENSURE_SUCCESS(rv, rv);
-
- // Set up listener which will start the original channel
- nsCOMPtr<nsIStreamListener> primingListener(new HSTSPrimingListener(aCallback));
-
- // Start priming
- rv = primingChannel->AsyncOpen2(primingListener);
- NS_ENSURE_SUCCESS(rv, rv);
-
- return NS_OK;
-}
-
-} // namespace net
-} // namespace mozilla
diff --git a/netwerk/protocol/http/HSTSPrimerListener.h b/netwerk/protocol/http/HSTSPrimerListener.h
deleted file mode 100644
index 05089911b..000000000
--- a/netwerk/protocol/http/HSTSPrimerListener.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef HSTSPrimingListener_h__
-#define HSTSPrimingListener_h__
-
-#include "nsCOMPtr.h"
-#include "nsIChannelEventSink.h"
-#include "nsIInterfaceRequestor.h"
-#include "nsIStreamListener.h"
-#include "nsIThreadRetargetableStreamListener.h"
-
-#include "mozilla/Attributes.h"
-
-class nsIPrincipal;
-class nsINetworkInterceptController;
-class nsIHstsPrimingCallback;
-
-namespace mozilla {
-namespace net {
-
-class HttpChannelParent;
-class nsHttpChannel;
-
-/*
- * How often do we get back an HSTS priming result which upgrades the connection to HTTPS?
- */
-enum HSTSPrimingResult {
- // This site has been seen before and won't be upgraded
- eHSTS_PRIMING_CACHED_NO_UPGRADE = 0,
- // This site has been seen before and will be upgraded
- eHSTS_PRIMING_CACHED_DO_UPGRADE = 1,
- // This site has been seen before and will be blocked
- eHSTS_PRIMING_CACHED_BLOCK = 2,
- // The request was already upgraded, probably through
- // upgrade-insecure-requests
- eHSTS_PRIMING_ALREADY_UPGRADED = 3,
- // HSTS priming is successful and the connection will be upgraded to HTTPS
- eHSTS_PRIMING_SUCCEEDED = 4,
- // When priming succeeds, but preferences require preservation of the order
- // of mixed-content and hsts, and mixed-content blocks the load
- eHSTS_PRIMING_SUCCEEDED_BLOCK = 5,
- // When priming succeeds, but preferences require preservation of the order
- // of mixed-content and hsts, and mixed-content allows the load over http
- eHSTS_PRIMING_SUCCEEDED_HTTP = 6,
- // HSTS priming failed, and the load is blocked by mixed-content
- eHSTS_PRIMING_FAILED_BLOCK = 7,
- // HSTS priming failed, and the load is allowed by mixed-content
- eHSTS_PRIMING_FAILED_ACCEPT = 8
-};
-
-//////////////////////////////////////////////////////////////////////////
-// Class used as streamlistener and notification callback when
-// doing the HEAD request for an HSTS Priming check. Needs to be an
-// nsIStreamListener in order to receive events from AsyncOpen2
-class HSTSPrimingListener final : public nsIStreamListener,
- public nsIInterfaceRequestor
-{
-public:
- explicit HSTSPrimingListener(nsIHstsPrimingCallback* aCallback)
- : mCallback(aCallback)
- {
- }
-
- NS_DECL_ISUPPORTS
- NS_DECL_NSISTREAMLISTENER
- NS_DECL_NSIREQUESTOBSERVER
- NS_DECL_NSIINTERFACEREQUESTOR
-
-private:
- ~HSTSPrimingListener() {}
-
- // Only nsHttpChannel can invoke HSTS priming
- friend class mozilla::net::nsHttpChannel;
-
- /**
- * Start the HSTS priming request. This will send an anonymous HEAD request to
- * the URI aRequestChannel is attempting to load. On success, the new HSTS
- * priming channel is allocated in aHSTSPrimingChannel.
- *
- * @param aRequestChannel the reference channel used to initialze the HSTS
- * priming channel
- * @param aCallback the callback stored to handle the results of HSTS priming.
- * @param aHSTSPrimingChannel if the new HSTS priming channel is allocated
- * successfully, it will be placed here.
- */
- static nsresult StartHSTSPriming(nsIChannel* aRequestChannel,
- nsIHstsPrimingCallback* aCallback);
-
- /**
- * Given a request, return NS_OK if it has resulted in a cached HSTS update.
- * We don't need to check for the header as that has already been done for us.
- */
- nsresult CheckHSTSPrimingRequestStatus(nsIRequest* aRequest);
-
- /**
- * the nsIHttpChannel to notify with the result of HSTS priming.
- */
- nsCOMPtr<nsIHstsPrimingCallback> mCallback;
-};
-
-
-}} // mozilla::net
-
-#endif // HSTSPrimingListener_h__
diff --git a/netwerk/protocol/http/HttpChannelChild.cpp b/netwerk/protocol/http/HttpChannelChild.cpp
index 6d09135c4..0a1e0f859 100644
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -1681,8 +1681,8 @@ NS_IMETHODIMP
HttpChannelChild::OnRedirectVerifyCallback(nsresult result)
{
LOG(("HttpChannelChild::OnRedirectVerifyCallback [this=%p]\n", this));
- nsresult rv;
OptionalURIParams redirectURI;
+ nsresult rv;
nsCOMPtr<nsIHttpChannel> newHttpChannel =
do_QueryInterface(mRedirectChannelChild);
@@ -1697,18 +1697,9 @@ HttpChannelChild::OnRedirectVerifyCallback(nsresult result)
result = NS_ERROR_DOM_BAD_URI;
}
- bool forceHSTSPriming = false;
- bool mixedContentWouldBlock = false;
if (newHttpChannel) {
// Must not be called until after redirect observers called.
newHttpChannel->SetOriginalURI(mOriginalURI);
-
- nsCOMPtr<nsILoadInfo> newLoadInfo;
- rv = newHttpChannel->GetLoadInfo(getter_AddRefs(newLoadInfo));
- if (NS_SUCCEEDED(rv) && newLoadInfo) {
- forceHSTSPriming = newLoadInfo->GetForceHSTSPriming();
- mixedContentWouldBlock = newLoadInfo->GetMixedContentWouldBlock();
- }
}
if (mRedirectingForSubsequentSynthesizedResponse) {
@@ -1756,7 +1747,7 @@ HttpChannelChild::OnRedirectVerifyCallback(nsresult result)
do_QueryInterface(mRedirectChannelChild);
if (newHttpChannelInternal) {
nsCOMPtr<nsIURI> apiRedirectURI;
- nsresult rv = newHttpChannelInternal->GetApiRedirectToURI(
+ rv = newHttpChannelInternal->GetApiRedirectToURI(
getter_AddRefs(apiRedirectURI));
if (NS_SUCCEEDED(rv) && apiRedirectURI) {
/* If there was an API redirect of this channel, we need to send it
@@ -1780,8 +1771,7 @@ HttpChannelChild::OnRedirectVerifyCallback(nsresult result)
if (mIPCOpen)
SendRedirect2Verify(result, *headerTuples, loadFlags, redirectURI,
- corsPreflightArgs, forceHSTSPriming,
- mixedContentWouldBlock, chooseAppcache);
+ corsPreflightArgs, chooseAppcache);
return NS_OK;
}
diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp
index 90ed597a6..d1c67f01b 100644
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -733,8 +733,6 @@ HttpChannelParent::RecvRedirect2Verify(const nsresult& result,
const uint32_t& loadFlags,
const OptionalURIParams& aAPIRedirectURI,
const OptionalCorsPreflightArgs& aCorsPreflightArgs,
- const bool& aForceHSTSPriming,
- const bool& aMixedContentWouldBlock,
const bool& aChooseAppcache)
{
LOG(("HttpChannelParent::RecvRedirect2Verify [this=%p result=%x]\n",
@@ -774,14 +772,6 @@ HttpChannelParent::RecvRedirect2Verify(const nsresult& result,
newInternalChannel->SetCorsPreflightParameters(args.unsafeHeaders());
}
- if (aForceHSTSPriming) {
- nsCOMPtr<nsILoadInfo> newLoadInfo;
- rv = newHttpChannel->GetLoadInfo(getter_AddRefs(newLoadInfo));
- if (NS_SUCCEEDED(rv) && newLoadInfo) {
- newLoadInfo->SetHSTSPriming(aMixedContentWouldBlock);
- }
- }
-
nsCOMPtr<nsIApplicationCacheChannel> appCacheChannel =
do_QueryInterface(newHttpChannel);
if (appCacheChannel) {
diff --git a/netwerk/protocol/http/HttpChannelParent.h b/netwerk/protocol/http/HttpChannelParent.h
index 56854bb55..91f9bac8b 100644
--- a/netwerk/protocol/http/HttpChannelParent.h
+++ b/netwerk/protocol/http/HttpChannelParent.h
@@ -162,8 +162,6 @@ protected:
const uint32_t& loadFlags,
const OptionalURIParams& apiRedirectUri,
const OptionalCorsPreflightArgs& aCorsPreflightArgs,
- const bool& aForceHSTSPriming,
- const bool& aMixedContentWouldBlock,
const bool& aChooseAppcache) override;
virtual bool RecvUpdateAssociatedContentSecurity(const int32_t& broken,
const int32_t& no) override;
diff --git a/netwerk/protocol/http/PHttpChannel.ipdl b/netwerk/protocol/http/PHttpChannel.ipdl
index 1eb25a403..c77a53e40 100644
--- a/netwerk/protocol/http/PHttpChannel.ipdl
+++ b/netwerk/protocol/http/PHttpChannel.ipdl
@@ -47,7 +47,6 @@ parent:
async Redirect2Verify(nsresult result, RequestHeaderTuples changedHeaders,
uint32_t loadFlags, OptionalURIParams apiRedirectTo,
OptionalCorsPreflightArgs corsPreflightArgs,
- bool forceHSTSPriming, bool mixedContentWouldBlock,
bool chooseAppcache);
// For document loads we keep this protocol open after child's
diff --git a/netwerk/protocol/http/UserAgentOverrides.jsm b/netwerk/protocol/http/UserAgentOverrides.jsm
index 22c676f06..037aa575b 100644
--- a/netwerk/protocol/http/UserAgentOverrides.jsm
+++ b/netwerk/protocol/http/UserAgentOverrides.jsm
@@ -46,9 +46,9 @@ this.UserAgentOverrides = {
Services.prefs.addObserver(PREF_OVERRIDES_ENABLED, buildOverrides, false);
try {
- Services.obs.addObserver(HTTP_on_useragent_request, "http-on-useragent-request", false);
+ Services.obs.addObserver(HTTP_on_modify_request, "http-on-modify-request", false);
} catch (x) {
- // The http-on-useragent-request notification is disallowed in content processes.
+ // The http-on-modify-request notification is disallowed in content processes.
}
UserAgentUpdates.init(function(overrides) {
@@ -118,7 +118,7 @@ this.UserAgentOverrides = {
Services.prefs.removeObserver(PREF_OVERRIDES_ENABLED, buildOverrides);
- Services.obs.removeObserver(HTTP_on_useragent_request, "http-on-useragent-request");
+ Services.obs.removeObserver(HTTP_on_modify_request, "http-on-modify-request");
},
receiveMessage: function(aMessage) {
@@ -169,7 +169,7 @@ function buildOverrides() {
}
}
-function HTTP_on_useragent_request(aSubject, aTopic, aData) {
+function HTTP_on_modify_request(aSubject, aTopic, aData) {
let channel = aSubject.QueryInterface(Ci.nsIHttpChannel);
for (let callback of gOverrideFunctions) {
diff --git a/netwerk/protocol/http/moz.build b/netwerk/protocol/http/moz.build
index e13101aa0..1368ee707 100644
--- a/netwerk/protocol/http/moz.build
+++ b/netwerk/protocol/http/moz.build
@@ -5,7 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
XPIDL_SOURCES += [
- 'nsIHstsPrimingCallback.idl',
'nsIHttpActivityObserver.idl',
'nsIHttpAuthenticableChannel.idl',
'nsIHttpAuthenticator.idl',
@@ -58,7 +57,6 @@ UNIFIED_SOURCES += [
'AltDataOutputStreamParent.cpp',
'CacheControlParser.cpp',
'ConnectionDiagnostics.cpp',
- 'HSTSPrimerListener.cpp',
'Http2Compression.cpp',
'Http2Push.cpp',
'Http2Session.cpp',
diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
index 05699df62..7bcec146d 100644
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -100,7 +100,6 @@
#include "mozilla/net/Predictor.h"
#include "CacheControlParser.h"
#include "nsMixedContentBlocker.h"
-#include "HSTSPrimerListener.h"
#include "CacheStorageService.h"
namespace mozilla { namespace net {
@@ -465,50 +464,12 @@ nsHttpChannel::Connect()
// otherwise, let's just proceed without using the cache.
}
- return TryHSTSPriming();
-}
-
-nsresult
-nsHttpChannel::TryHSTSPriming()
-{
- if (mLoadInfo) {
- // HSTS priming requires the LoadInfo provided with AsyncOpen2
- bool requireHSTSPriming =
- mLoadInfo->GetForceHSTSPriming();
-
- if (requireHSTSPriming &&
- nsMixedContentBlocker::sSendHSTSPriming &&
- mInterceptCache == DO_NOT_INTERCEPT) {
- bool isHttpsScheme;
- nsresult rv = mURI->SchemeIs("https", &isHttpsScheme);
- NS_ENSURE_SUCCESS(rv, rv);
- if (!isHttpsScheme) {
- rv = HSTSPrimingListener::StartHSTSPriming(this, this);
-
- if (NS_FAILED(rv)) {
- CloseCacheEntry(false);
- return rv;
- }
-
- return NS_OK;
- }
-
- // The request was already upgraded, for example by
- // upgrade-insecure-requests or a prior successful priming request
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING_RESULT,
- HSTSPrimingResult::eHSTS_PRIMING_ALREADY_UPGRADED);
- mLoadInfo->ClearHSTSPriming();
- }
- }
-
return ContinueConnect();
}
nsresult
nsHttpChannel::ContinueConnect()
{
- // If we have had HSTS priming, we need to reevaluate whether we need
- // a CORS preflight. Bug: 1272440
// If we need to start a CORS preflight, do it now!
// Note that it is important to do this before the early returns below.
if (!mIsCorsPreflightDone && mRequireCORSPreflight &&
@@ -4283,7 +4244,7 @@ nsHttpChannel::OnCacheEntryAvailableInternal(nsICacheEntry *entry,
return NS_OK;
}
- return TryHSTSPriming();
+ return ContinueConnect();
}
nsresult
@@ -5699,7 +5660,6 @@ NS_INTERFACE_MAP_BEGIN(nsHttpChannel)
NS_INTERFACE_MAP_ENTRY(nsIDNSListener)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_ENTRY(nsICorsPreflightCallback)
- NS_INTERFACE_MAP_ENTRY(nsIHstsPrimingCallback)
NS_INTERFACE_MAP_ENTRY(nsIChannelWithDivertableParentListener)
// we have no macro that covers this case.
if (aIID.Equals(NS_GET_IID(nsHttpChannel)) ) {
@@ -6031,8 +5991,6 @@ nsHttpChannel::BeginConnect()
// notify "http-on-modify-request" observers
CallOnModifyRequestObservers();
- SetLoadGroupUserAgentOverride();
-
// Check if request was cancelled during on-modify-request or on-useragent.
if (mCanceled) {
return mStatus;
@@ -8188,107 +8146,6 @@ nsHttpChannel::OnPreflightFailed(nsresult aError)
}
//-----------------------------------------------------------------------------
-// nsIHstsPrimingCallback functions
-//-----------------------------------------------------------------------------
-
-/*
- * May be invoked synchronously if HSTS priming has already been performed
- * for the host.
- */
-nsresult
-nsHttpChannel::OnHSTSPrimingSucceeded(bool aCached)
-{
- if (nsMixedContentBlocker::sUseHSTS) {
- // redirect the channel to HTTPS if the pref
- // "security.mixed_content.use_hsts" is true
- LOG(("HSTS Priming succeeded, redirecting to HTTPS [this=%p]", this));
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING_RESULT,
- (aCached) ? HSTSPrimingResult::eHSTS_PRIMING_CACHED_DO_UPGRADE :
- HSTSPrimingResult::eHSTS_PRIMING_SUCCEEDED);
- return AsyncCall(&nsHttpChannel::HandleAsyncRedirectChannelToHttps);
- }
-
- // If "security.mixed_content.use_hsts" is false, record the result of
- // HSTS priming and block or proceed with the load as required by
- // mixed-content blocking
- bool wouldBlock = mLoadInfo->GetMixedContentWouldBlock();
-
- // preserve the mixed-content-before-hsts order and block if required
- if (wouldBlock) {
- LOG(("HSTS Priming succeeded, blocking for mixed-content [this=%p]",
- this));
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING_RESULT,
- HSTSPrimingResult::eHSTS_PRIMING_SUCCEEDED_BLOCK);
- CloseCacheEntry(false);
- return AsyncAbort(NS_ERROR_CONTENT_BLOCKED);
- }
-
- LOG(("HSTS Priming succeeded, loading insecure: [this=%p]", this));
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING_RESULT,
- HSTSPrimingResult::eHSTS_PRIMING_SUCCEEDED_HTTP);
-
- nsresult rv = ContinueConnect();
- if (NS_FAILED(rv)) {
- CloseCacheEntry(false);
- return AsyncAbort(rv);
- }
-
- return NS_OK;
-}
-
-/*
- * May be invoked synchronously if HSTS priming has already been performed
- * for the host.
- */
-nsresult
-nsHttpChannel::OnHSTSPrimingFailed(nsresult aError, bool aCached)
-{
- bool wouldBlock = mLoadInfo->GetMixedContentWouldBlock();
-
- LOG(("HSTS Priming Failed [this=%p], %s the load", this,
- (wouldBlock) ? "blocking" : "allowing"));
- if (aCached) {
- // Between the time we marked for priming and started the priming request,
- // the host was found to not allow the upgrade, probably from another
- // priming request.
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING_RESULT,
- (wouldBlock) ? HSTSPrimingResult::eHSTS_PRIMING_CACHED_BLOCK :
- HSTSPrimingResult::eHSTS_PRIMING_CACHED_NO_UPGRADE);
- } else {
- // A priming request was sent, and no HSTS header was found that allows
- // the upgrade.
- Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS_PRIMING_RESULT,
- (wouldBlock) ? HSTSPrimingResult::eHSTS_PRIMING_FAILED_BLOCK :
- HSTSPrimingResult::eHSTS_PRIMING_FAILED_ACCEPT);
- }
-
- // Don't visit again for at least
- // security.mixed_content.hsts_priming_cache_timeout seconds.
- nsISiteSecurityService* sss = gHttpHandler->GetSSService();
- NS_ENSURE_TRUE(sss, NS_ERROR_OUT_OF_MEMORY);
- nsresult rv = sss->CacheNegativeHSTSResult(mURI,
- nsMixedContentBlocker::sHSTSPrimingCacheTimeout);
- if (NS_FAILED(rv)) {
- NS_ERROR("nsISiteSecurityService::CacheNegativeHSTSResult failed");
- }
-
- // If we would block, go ahead and abort with the error provided
- if (wouldBlock) {
- CloseCacheEntry(false);
- return AsyncAbort(aError);
- }
-
- // we can continue the load and the UI has been updated as mixed content
- rv = ContinueConnect();
- if (NS_FAILED(rv)) {
- CloseCacheEntry(false);
- return AsyncAbort(rv);
- }
-
- return NS_OK;
-}
-
-//-----------------------------------------------------------------------------
// AChannelHasDivertableParentChannelAsListener internal functions
//-----------------------------------------------------------------------------
@@ -8400,50 +8257,6 @@ nsHttpChannel::MaybeWarnAboutAppCache()
}
void
-nsHttpChannel::SetLoadGroupUserAgentOverride()
-{
- nsCOMPtr<nsIURI> uri;
- GetURI(getter_AddRefs(uri));
- nsAutoCString uriScheme;
- if (uri) {
- uri->GetScheme(uriScheme);
- }
-
- // We don't need a UA for file: protocols.
- if (uriScheme.EqualsLiteral("file")) {
- gHttpHandler->OnUserAgentRequest(this);
- return;
- }
-
- nsIRequestContextService* rcsvc = gHttpHandler->GetRequestContextService();
- nsCOMPtr<nsIRequestContext> rc;
- if (rcsvc) {
- rcsvc->GetRequestContext(mRequestContextID,
- getter_AddRefs(rc));
- }
-
- nsAutoCString ua;
- if (nsContentUtils::IsNonSubresourceRequest(this)) {
- gHttpHandler->OnUserAgentRequest(this);
- if (rc) {
- GetRequestHeader(NS_LITERAL_CSTRING("User-Agent"), ua);
- rc->SetUserAgentOverride(ua);
- }
- } else {
- GetRequestHeader(NS_LITERAL_CSTRING("User-Agent"), ua);
- // Don't overwrite the UA if it is already set (eg by an XHR with explicit UA).
- if (ua.IsEmpty()) {
- if (rc) {
- rc->GetUserAgentOverride(ua);
- SetRequestHeader(NS_LITERAL_CSTRING("User-Agent"), ua, false);
- } else {
- gHttpHandler->OnUserAgentRequest(this);
- }
- }
- }
-}
-
-void
nsHttpChannel::SetDoNotTrack()
{
/**
diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h
index 7578b1173..3a322e8e2 100644
--- a/netwerk/protocol/http/nsHttpChannel.h
+++ b/netwerk/protocol/http/nsHttpChannel.h
@@ -28,7 +28,6 @@
#include "nsISupportsPrimitives.h"
#include "nsICorsPreflightCallback.h"
#include "AlternateServices.h"
-#include "nsIHstsPrimingCallback.h"
class nsDNSPrefetch;
class nsICancelable;
@@ -76,7 +75,6 @@ class nsHttpChannel final : public HttpBaseChannel
, public nsSupportsWeakReference
, public nsICorsPreflightCallback
, public nsIChannelWithDivertableParentListener
- , public nsIHstsPrimingCallback
{
public:
NS_DECL_ISUPPORTS_INHERITED
@@ -92,7 +90,6 @@ public:
NS_DECL_NSIAPPLICATIONCACHECONTAINER
NS_DECL_NSIAPPLICATIONCACHECHANNEL
NS_DECL_NSIASYNCVERIFYREDIRECTCALLBACK
- NS_DECL_NSIHSTSPRIMINGCALLBACK
NS_DECL_NSITHREADRETARGETABLEREQUEST
NS_DECL_NSIDNSLISTENER
NS_DECL_NSICHANNELWITHDIVERTABLEPARENTLISTENER
@@ -211,9 +208,6 @@ public: /* internal necko use only */
nsresult OpenCacheEntry(bool usingSSL);
nsresult ContinueConnect();
- // If the load is mixed-content, build and send an HSTS priming request.
- nsresult TryHSTSPriming();
-
nsresult StartRedirectChannelToURI(nsIURI *, uint32_t);
// This allows cache entry to be marked as foreign even after channel itself
@@ -460,8 +454,6 @@ private:
void MaybeWarnAboutAppCache();
- void SetLoadGroupUserAgentOverride();
-
void SetDoNotTrack();
private:
diff --git a/netwerk/protocol/http/nsHttpHandler.h b/netwerk/protocol/http/nsHttpHandler.h
index 35b14a511..0904af893 100644
--- a/netwerk/protocol/http/nsHttpHandler.h
+++ b/netwerk/protocol/http/nsHttpHandler.h
@@ -280,12 +280,6 @@ public:
NotifyObservers(chan, NS_HTTP_ON_MODIFY_REQUEST_TOPIC);
}
- // Called by the channel and cached in the loadGroup
- void OnUserAgentRequest(nsIHttpChannel *chan)
- {
- NotifyObservers(chan, NS_HTTP_ON_USERAGENT_REQUEST_TOPIC);
- }
-
// Called by the channel once headers are available
void OnExamineResponse(nsIHttpChannel *chan)
{
diff --git a/netwerk/protocol/http/nsIHstsPrimingCallback.idl b/netwerk/protocol/http/nsIHstsPrimingCallback.idl
deleted file mode 100644
index 01f53a5b2..000000000
--- a/netwerk/protocol/http/nsIHstsPrimingCallback.idl
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-/**
- * HSTS priming attempts to prevent mixed-content by looking for the
- * Strict-Transport-Security header as a signal from the server that it is
- * safe to upgrade HTTP to HTTPS.
- *
- * Since mixed-content blocking happens very early in the process in AsyncOpen2,
- * the status of mixed-content blocking is stored in the LoadInfo and then used
- * to determine whether to send a priming request or not.
- *
- * This interface is implemented by nsHttpChannel so that it can receive the
- * result of HSTS priming.
- */
-[builtinclass, uuid(eca6daca-3f2a-4a2a-b3bf-9f24f79bc999)]
-interface nsIHstsPrimingCallback : nsISupports
-{
- /**
- * HSTS priming has succeeded with an STS header, and the site asserts it is
- * safe to upgrade the request from HTTP to HTTPS. The request may still be
- * blocked based on the user's preferences.
- *
- * May be invoked synchronously if HSTS priming has already been performed
- * for the host.
- *
- * @param aCached whether the result was already in the HSTS cache
- */
- [noscript, nostdcall]
- void onHSTSPrimingSucceeded(in bool aCached);
- /**
- * HSTS priming has seen no STS header, the request itself has failed,
- * or some other failure which does not constitute a positive signal that the
- * site can be upgraded safely to HTTPS. The request may still be allowed
- * based on the user's preferences.
- *
- * May be invoked synchronously if HSTS priming has already been performed
- * for the host.
- *
- * @param aError The error which caused this failure, or NS_ERROR_CONTENT_BLOCKED
- * @param aCached whether the result was already in the HSTS cache
- */
- [noscript, nostdcall]
- void onHSTSPrimingFailed(in nsresult aError, in bool aCached);
-};
diff --git a/netwerk/protocol/http/nsIHttpProtocolHandler.idl b/netwerk/protocol/http/nsIHttpProtocolHandler.idl
index f333a557c..82ac83fe4 100644
--- a/netwerk/protocol/http/nsIHttpProtocolHandler.idl
+++ b/netwerk/protocol/http/nsIHttpProtocolHandler.idl
@@ -113,14 +113,5 @@ interface nsIHttpProtocolHandler : nsIProxiedProtocolHandler
*/
#define NS_HTTP_ON_EXAMINE_CACHED_RESPONSE_TOPIC "http-on-examine-cached-response"
-/**
- * Before an HTTP request corresponding to a channel with the LOAD_DOCUMENT_URI
- * flag is sent to the server, this observer topic is notified. The observer of
- * this topic can then choose to modify the user agent for this request before
- * the request is actually sent to the server. Additionally, the modified user
- * agent will be propagated to sub-resource requests from the same load group.
- */
-#define NS_HTTP_ON_USERAGENT_REQUEST_TOPIC "http-on-useragent-request"
-
%}
diff --git a/netwerk/wifi/nsWifiScannerDBus.cpp b/netwerk/wifi/nsWifiScannerDBus.cpp
index 182553e18..6fa0a0b02 100644
--- a/netwerk/wifi/nsWifiScannerDBus.cpp
+++ b/netwerk/wifi/nsWifiScannerDBus.cpp
@@ -62,7 +62,7 @@ nsWifiScannerDBus::SendMessage(const char* aInterface,
return NS_ERROR_FAILURE;
}
} else if (!strcmp(aFuncCall, "GetAll")) {
- const char* param = "";
+ const char* param = "org.freedesktop.NetworkManager.AccessPoint";
if (!dbus_message_iter_append_basic(&argsIter, DBUS_TYPE_STRING, &param)) {
return NS_ERROR_FAILURE;
}
diff --git a/old-configure.in b/old-configure.in
index 1670a90b6..13f6915b4 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -720,17 +720,6 @@ if test "$MOZ_PROFILING" -a -z "$STRIP_FLAGS"; then
fi
dnl ========================================================
-dnl = Enable DMD
-dnl ========================================================
-
-if test "$MOZ_DMD"; then
- if test "${CPU_ARCH}" = "arm"; then
- CFLAGS="$CFLAGS -funwind-tables"
- CXXFLAGS="$CXXFLAGS -funwind-tables"
- fi
-fi
-
-dnl ========================================================
dnl System overrides of the defaults for host
dnl ========================================================
case "$host" in
@@ -2058,9 +2047,7 @@ if test -n "$_USE_SYSTEM_NSS"; then
AM_PATH_NSS(3.28.6, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
fi
-if test -n "$MOZ_SYSTEM_NSS"; then
- NSS_LIBS="$NSS_LIBS -lcrmf"
-else
+if test -z "$MOZ_SYSTEM_NSS"; then
NSS_CFLAGS="-I${DIST}/include/nss"
fi
@@ -2237,6 +2224,7 @@ LIBJPEG_TURBO_AS=
LIBJPEG_TURBO_ASFLAGS=
MOZ_PREF_EXTENSIONS=1
MOZ_REFLOW_PERF=
+MOZ_SAFE_BROWSING=
MOZ_SPELLCHECK=1
MOZ_TOOLKIT_SEARCH=1
MOZ_UI_LOCALE=en-US
@@ -2257,7 +2245,6 @@ MOZ_JETPACK=1
MOZ_DEVTOOLS_SERVER=1
MOZ_DEVTOOLS=
MOZ_PLACES=1
-MOZ_SOCIAL=1
MOZ_SERVICES_HEALTHREPORT=1
MOZ_SERVICES_SYNC=1
MOZ_SERVICES_CLOUDSYNC=1
@@ -3952,8 +3939,24 @@ fi
AC_SUBST(MOZ_SYSTEM_SQLITE)
dnl ========================================================
+dnl = Enable Google safe browsing (anti-phishing)
+dnl ========================================================
+MOZ_ARG_ENABLE_BOOL(safe-browsing,
+[ --enable-safe-browsing Enable safe browsing (anti-phishing) implementation],
+ MOZ_SAFE_BROWSING=1,
+ MOZ_SAFE_BROWSING= )
+if test -n "$MOZ_SAFE_BROWSING"; then
+ AC_DEFINE(MOZ_SAFE_BROWSING)
+fi
+AC_SUBST(MOZ_SAFE_BROWSING)
+
+dnl ========================================================
dnl = Enable url-classifier
dnl ========================================================
+dnl Implicitly enabled by default if building with safe-browsing
+if test -n "$MOZ_SAFE_BROWSING"; then
+ MOZ_URL_CLASSIFIER=1
+fi
MOZ_ARG_ENABLE_BOOL(url-classifier,
[ --enable-url-classifier Enable url classifier module],
MOZ_URL_CLASSIFIER=1,
@@ -4460,7 +4463,7 @@ fi
# Demangle only for debug or DMD builds
MOZ_DEMANGLE_SYMBOLS=
-if test "$HAVE_DEMANGLE" && test "$MOZ_DEBUG" -o "$MOZ_DMD"; then
+if test "$HAVE_DEMANGLE" && test "$MOZ_DEBUG"; then
MOZ_DEMANGLE_SYMBOLS=1
AC_DEFINE(MOZ_DEMANGLE_SYMBOLS)
fi
@@ -5029,12 +5032,6 @@ if test "$MOZ_PLACES"; then
AC_DEFINE(MOZ_PLACES)
fi
-dnl Build SocialAPI if required
-AC_SUBST(MOZ_SOCIAL)
-if test "$MOZ_SOCIAL"; then
- AC_DEFINE(MOZ_SOCIAL)
-fi
-
dnl Build Firefox Health Reporter Service
AC_SUBST(MOZ_SERVICES_HEALTHREPORT)
if test -n "$MOZ_SERVICES_HEALTHREPORT"; then
@@ -5055,7 +5052,7 @@ fi
dnl ========================================================
-if test "$MOZ_DEBUG" -o "$MOZ_DMD"; then
+if test "$MOZ_DEBUG"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
fi
diff --git a/security/manager/ssl/nsISiteSecurityService.idl b/security/manager/ssl/nsISiteSecurityService.idl
index fa20fe307..753f32b57 100644
--- a/security/manager/ssl/nsISiteSecurityService.idl
+++ b/security/manager/ssl/nsISiteSecurityService.idl
@@ -188,15 +188,6 @@ interface nsISiteSecurityService : nsISupports
in int64_t aExpires, in unsigned long aPinCount,
[array, size_is(aPinCount)] in string aSha256Pins,
[optional] in boolean aIsPreload);
-
- /**
- * Mark a host as declining to provide a given security state so that features
- * such as HSTS priming will not flood a server with requests.
- *
- * @param aURI the nsIURI that this applies to
- * @param aMaxAge lifetime (in seconds) of this negative cache
- */
- [noscript] void cacheNegativeHSTSResult(in nsIURI aURI, in unsigned long long aMaxAge);
};
%{C++
diff --git a/security/manager/ssl/nsSiteSecurityService.cpp b/security/manager/ssl/nsSiteSecurityService.cpp
index 322ef6570..d461f6b61 100644
--- a/security/manager/ssl/nsSiteSecurityService.cpp
+++ b/security/manager/ssl/nsSiteSecurityService.cpp
@@ -356,14 +356,6 @@ nsSiteSecurityService::SetHSTSState(uint32_t aType,
}
NS_IMETHODIMP
-nsSiteSecurityService::CacheNegativeHSTSResult(nsIURI* aSourceURI,
- uint64_t aMaxAge)
-{
- return SetHSTSState(nsISiteSecurityService::HEADER_HSTS, aSourceURI,
- aMaxAge, false, 0, SecurityPropertyNegative);
-}
-
-NS_IMETHODIMP
nsSiteSecurityService::RemoveState(uint32_t aType, nsIURI* aURI,
uint32_t aFlags)
{
diff --git a/storage/TelemetryVFS.cpp b/storage/TelemetryVFS.cpp
index f4f28b36c..5a025e29e 100644
--- a/storage/TelemetryVFS.cpp
+++ b/storage/TelemetryVFS.cpp
@@ -110,18 +110,6 @@ public:
// We don't report SQLite I/O on Windows because we have a comprehensive
// mechanism for intercepting I/O on that platform that captures a superset
// of the data captured here.
-#if defined(MOZ_ENABLE_PROFILER_SPS) && !defined(XP_WIN)
- if (IOInterposer::IsObservedOperation(op)) {
- const char* main_ref = "sqlite-mainthread";
- const char* other_ref = "sqlite-otherthread";
-
- // Create observation
- IOInterposeObserver::Observation ob(op, start, end,
- (mainThread ? main_ref : other_ref));
- // Report observation
- IOInterposer::Report(ob);
- }
-#endif /* defined(MOZ_ENABLE_PROFILER_SPS) && !defined(XP_WIN) */
}
private:
diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp
index 4f288ad42..8c6f65232 100644
--- a/storage/mozStorageService.cpp
+++ b/storage/mozStorageService.cpp
@@ -36,9 +36,6 @@
#ifdef MOZ_STORAGE_MEMORY
# include "mozmemory.h"
-# ifdef MOZ_DMD
-# include "DMD.h"
-# endif
#endif
////////////////////////////////////////////////////////////////////////////////
@@ -59,10 +56,6 @@ namespace storage {
////////////////////////////////////////////////////////////////////////////////
//// Memory Reporting
-#ifdef MOZ_DMD
-static mozilla::Atomic<size_t> gSqliteMemoryUsed;
-#endif
-
static int64_t
StorageSQLiteDistinguishedAmount()
{
@@ -165,13 +158,6 @@ Service::CollectReports(nsIHandleReportCallback *aHandleReport,
NS_LITERAL_CSTRING("schema"), schemaDesc,
SQLITE_DBSTATUS_SCHEMA_USED, &totalConnSize);
}
-
-#ifdef MOZ_DMD
- if (::sqlite3_memory_used() != int64_t(gSqliteMemoryUsed)) {
- NS_WARNING("memory consumption reported by SQLite doesn't match "
- "our measurements");
- }
-#endif
}
int64_t other = ::sqlite3_memory_used() - totalConnSize;
@@ -410,58 +396,20 @@ namespace {
// from the standard ones -- they use int instead of size_t. But we don't need
// a wrapper for free.
-#ifdef MOZ_DMD
-
-// sqlite does its own memory accounting, and we use its numbers in our memory
-// reporters. But we don't want sqlite's heap blocks to show up in DMD's
-// output as unreported, so we mark them as reported when they're allocated and
-// mark them as unreported when they are freed.
-//
-// In other words, we are marking all sqlite heap blocks as reported even
-// though we're not reporting them ourselves. Instead we're trusting that
-// sqlite is fully and correctly accounting for all of its heap blocks via its
-// own memory accounting. Well, we don't have to trust it entirely, because
-// it's easy to keep track (while doing this DMD-specific marking) of exactly
-// how much memory SQLite is using. And we can compare that against what
-// SQLite reports it is using.
-
-MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(SqliteMallocSizeOfOnAlloc)
-MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(SqliteMallocSizeOfOnFree)
-
-#endif
-
static void *sqliteMemMalloc(int n)
{
void* p = ::malloc(n);
-#ifdef MOZ_DMD
- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-#endif
return p;
}
static void sqliteMemFree(void *p)
{
-#ifdef MOZ_DMD
- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-#endif
::free(p);
}
static void *sqliteMemRealloc(void *p, int n)
{
-#ifdef MOZ_DMD
- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
- void *pnew = ::realloc(p, n);
- if (pnew) {
- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(pnew);
- } else {
- // realloc failed; undo the SqliteMallocSizeOfOnFree from above
- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
- }
- return pnew;
-#else
return ::realloc(p, n);
-#endif
}
static int sqliteMemSize(void *p)
diff --git a/testing/mochitest/browser-test.js b/testing/mochitest/browser-test.js
index dbaaf29a8..b1be62519 100644
--- a/testing/mochitest/browser-test.js
+++ b/testing/mochitest/browser-test.js
@@ -588,7 +588,6 @@ Tester.prototype = {
sidebar.setAttribute("src", "about:blank");
SelfSupportBackend.uninit();
- SocialShare.uninit();
}
// Destroy BackgroundPageThumbs resources.
diff --git a/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py b/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py
index 8e908bf43..56a1f0ef7 100644
--- a/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py
+++ b/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py
@@ -289,26 +289,45 @@ class SystemResourceMonitor(object):
assert self._running
assert not self._stopped
- self._pipe.send(('terminate',))
+ try:
+ self._pipe.send(('terminate',))
+ except Exception:
+ pass
self._running = False
self._stopped = True
self.measurements = []
- done = False
-
# The child process will send each data sample over the pipe
# as a separate data structure. When it has finished sending
# samples, it sends a special "done" message to indicate it
# is finished.
- while self._pipe.poll(1.0):
- start_time, end_time, io_diff, cpu_diff, cpu_percent, virt_mem, \
- swap_mem = self._pipe.recv()
+
+ # multiprocessing.Pipe is not actually a pipe on at least Linux. that
+ # has an effect on the expected outcome of reading from it when the
+ # other end of the pipe dies, leading to possibly hanging on revc()
+ # below. So we must poll().
+ def poll():
+ try:
+ return self._pipe.poll(0.1)
+ except Exception:
+ # Poll might throw an exception even though there's still
+ # data to read. That happens when the underlying system call
+ # returns both POLLERR and POLLIN, but python doesn't tell us
+ # about it. So assume there is something to read, and we'll
+ # get an exception when trying to read the data.
+ return True
+ while poll():
+ try:
+ start_time, end_time, io_diff, cpu_diff, cpu_percent, virt_mem, \
+ swap_mem = self._pipe.recv()
+ except Exception:
+ # Let's assume we're done here
+ break
# There should be nothing after the "done" message so
# terminate.
if start_time == 'done':
- done = True
break
io = self._io_type(*io_diff)
@@ -325,11 +344,6 @@ class SystemResourceMonitor(object):
if self._process.is_alive():
self._process.terminate()
self._process.join(10)
- else:
- # We should have received a "done" message from the
- # child indicating it shut down properly. This only
- # happens if the child shuts down cleanly.
- assert done
if len(self.measurements):
self.start_time = self.measurements[0].start
diff --git a/testing/runtimes/mochitest-browser-chrome-e10s.runtimes.json b/testing/runtimes/mochitest-browser-chrome-e10s.runtimes.json
index 5c97d58f0..211e98e05 100644
--- a/testing/runtimes/mochitest-browser-chrome-e10s.runtimes.json
+++ b/testing/runtimes/mochitest-browser-chrome-e10s.runtimes.json
@@ -648,13 +648,6 @@
"dom/security/test/contentverifier/browser_verify_content_about_newtab.js": 14195,
"dom/security/test/contentverifier/browser_verify_content_about_newtab2.js": 12159,
"dom/security/test/csp/browser_test_web_manifest.js": 6022,
- "dom/security/test/hsts/browser_hsts-priming_allow_active.js": 2840,
- "dom/security/test/hsts/browser_hsts-priming_block_active.js": 3459,
- "dom/security/test/hsts/browser_hsts-priming_block_active_with_redir_same.js": 3233,
- "dom/security/test/hsts/browser_hsts-priming_cache-timeout.js": 3469,
- "dom/security/test/hsts/browser_hsts-priming_hsts_after_mixed.js": 2658,
- "dom/security/test/hsts/browser_hsts-priming_no-duplicates.js": 3793,
- "dom/security/test/hsts/browser_hsts-priming_timeout.js": 4040,
"dom/tests/browser/browser_ConsoleStoragePBTest_perwindowpb.js": 3659,
"dom/tests/browser/browser_bug396843.js": 6574,
"dom/tests/browser/browser_focus_steal_from_chrome.js": 25508,
diff --git a/testing/runtimes/mochitest-browser-chrome.runtimes.json b/testing/runtimes/mochitest-browser-chrome.runtimes.json
index ac0b9f10d..73b2437a2 100644
--- a/testing/runtimes/mochitest-browser-chrome.runtimes.json
+++ b/testing/runtimes/mochitest-browser-chrome.runtimes.json
@@ -621,14 +621,6 @@
"dom/security/test/contentverifier/browser_verify_content_about_newtab2.js": 10284,
"dom/security/test/csp/browser_manifest-src-override-default-src.js": 1939,
"dom/security/test/csp/browser_test_web_manifest.js": 5639,
- "dom/security/test/hsts/browser_hsts-priming_allow_active.js": 2280,
- "dom/security/test/hsts/browser_hsts-priming_allow_display.js": 1974,
- "dom/security/test/hsts/browser_hsts-priming_block_active.js": 2803,
- "dom/security/test/hsts/browser_hsts-priming_block_active_with_redir_same.js": 2682,
- "dom/security/test/hsts/browser_hsts-priming_cache-timeout.js": 3110,
- "dom/security/test/hsts/browser_hsts-priming_hsts_after_mixed.js": 2328,
- "dom/security/test/hsts/browser_hsts-priming_no-duplicates.js": 2831,
- "dom/security/test/hsts/browser_hsts-priming_timeout.js": 3798,
"dom/tests/browser/browser_ConsoleAPITests.js": 3520,
"dom/tests/browser/browser_ConsoleStoragePBTest_perwindowpb.js": 2914,
"dom/tests/browser/browser_bug396843.js": 6050,
diff --git a/testing/web-platform/tests/fetch/api/request/request-init-003.sub.html b/testing/web-platform/tests/fetch/api/request/request-init-003.sub.html
index 8860d6074..1f95c5ae9 100644
--- a/testing/web-platform/tests/fetch/api/request/request-init-003.sub.html
+++ b/testing/web-platform/tests/fetch/api/request/request-init-003.sub.html
@@ -44,7 +44,7 @@
"referrer" : "http://{{host}}:{{ports[http][0]}}/",
"referrerPolicy" : "",
"mode" : "cors",
- "credentials" : "omit",
+ "credentials" : "same-origin",
"cache" : "default",
"redirect" : "follow",
"integrity" : "",
diff --git a/testing/web-platform/tests/fetch/api/request/request-structure.html b/testing/web-platform/tests/fetch/api/request/request-structure.html
index cbe6cee99..9494689c7 100644
--- a/testing/web-platform/tests/fetch/api/request/request-structure.html
+++ b/testing/web-platform/tests/fetch/api/request/request-structure.html
@@ -82,7 +82,7 @@
break;
case "credentials":
- defaultValue = "omit";
+ defaultValue = "same-origin";
newValue = "cors";
break;
diff --git a/toolkit/components/aboutmemory/content/aboutMemory.js b/toolkit/components/aboutmemory/content/aboutMemory.js
index c62416dc5..dcc1ce3ac 100644
--- a/toolkit/components/aboutmemory/content/aboutMemory.js
+++ b/toolkit/components/aboutmemory/content/aboutMemory.js
@@ -367,22 +367,6 @@ function onLoad()
appendButton(row4, GCAndCCAllLogDesc,
saveGCLogAndVerboseCCLog, "Save verbose", 'saveLogsVerbose');
- // Three cases here:
- // - DMD is disabled (i.e. not built): don't show the button.
- // - DMD is enabled but is not running: show the button, but disable it.
- // - DMD is enabled and is running: show the button and enable it.
- if (gMgr.isDMDEnabled) {
- let row5 = appendElement(ops, "div", "opsRow");
-
- appendElementWithText(row5, "div", "opsRowLabel", "Save DMD output");
- let enableButtons = gMgr.isDMDRunning;
-
- let dmdButton =
- appendButton(row5, enableButtons ? DMDEnabledDesc : DMDDisabledDesc,
- doDMD, "Save");
- dmdButton.disabled = !enableButtons;
- }
-
// Generate the main div, where content ("section" divs) will go. It's
// hidden at first.
diff --git a/toolkit/components/blocklist/blocklist.manifest b/toolkit/components/blocklist/blocklist.manifest
new file mode 100644
index 000000000..c770b4e7d
--- /dev/null
+++ b/toolkit/components/blocklist/blocklist.manifest
@@ -0,0 +1,7 @@
+component {66354bc9-7ed1-4692-ae1d-8da97d6b205e} nsBlocklistService.js process=main
+contract @mozilla.org/extensions/blocklist;1 {66354bc9-7ed1-4692-ae1d-8da97d6b205e} process=main
+category profile-after-change nsBlocklistService @mozilla.org/extensions/blocklist;1 process=main
+component {e0a106ed-6ad4-47a4-b6af-2f1c8aa4712d} nsBlocklistServiceContent.js process=content
+contract @mozilla.org/extensions/blocklist;1 {e0a106ed-6ad4-47a4-b6af-2f1c8aa4712d} process=content
+
+category update-timer nsBlocklistService @mozilla.org/extensions/blocklist;1,getService,blocklist-background-update-timer,extensions.blocklist.interval,86400 \ No newline at end of file
diff --git a/tools/jprof/stub/moz.build b/toolkit/components/blocklist/moz.build
index a2f514a54..3dc3be5ba 100644
--- a/tools/jprof/stub/moz.build
+++ b/toolkit/components/blocklist/moz.build
@@ -4,14 +4,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-EXPORTS += [
- 'jprof.h',
+EXTRA_COMPONENTS += [
+ 'blocklist.manifest',
+ 'nsBlocklistServiceContent.js',
]
-SOURCES += [
- 'libmalloc.cpp',
+EXTRA_PP_COMPONENTS += [
+ 'nsBlocklistService.js',
]
-
-SharedLibrary('jprof')
-
-DEFINES['_IMPL_JPROF_API'] = True
diff --git a/toolkit/mozapps/webextensions/nsBlocklistService.js b/toolkit/components/blocklist/nsBlocklistService.js
index 268c197fc..891346b72 100644
--- a/toolkit/mozapps/webextensions/nsBlocklistService.js
+++ b/toolkit/components/blocklist/nsBlocklistService.js
@@ -12,7 +12,6 @@ const Cr = Components.results;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
try {
// AddonManager.jsm doesn't allow itself to be imported in the child
@@ -25,8 +24,13 @@ try {
XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
"resource://gre/modules/FileUtils.jsm");
+#ifdef MOZ_WEBEXTENSIONS
XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
"resource://gre/modules/UpdateUtils.jsm");
+#else
+XPCOMUtils.defineLazyModuleGetter(this, "UpdateChannel",
+ "resource://gre/modules/UpdateChannel.jsm");
+#endif
XPCOMUtils.defineLazyModuleGetter(this, "OS",
"resource://gre/modules/osfile.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ServiceRequest",
@@ -115,15 +119,15 @@ XPCOMUtils.defineLazyGetter(this, "gABI", function() {
LOG("BlockList Global gABI: XPCOM ABI unknown.");
}
- if (AppConstants.platform == "macosx") {
- // Mac universal build should report a different ABI than either macppc
- // or mactel.
- let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
- getService(Ci.nsIMacUtils);
+#ifdef XP_MACOSX
+ // Mac universal build should report a different ABI than either macppc
+ // or mactel.
+ let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
+ getService(Ci.nsIMacUtils);
- if (macutils.isUniversalBinary)
- abi += "-u-" + macutils.architecturesInBinary;
- }
+ if (macutils.isUniversalBinary)
+ abi += "-u-" + macutils.architecturesInBinary;
+#endif
return abi;
});
@@ -567,7 +571,11 @@ Blocklist.prototype = {
dsURI = dsURI.replace(/%BUILD_TARGET%/g, gApp.OS + "_" + gABI);
dsURI = dsURI.replace(/%OS_VERSION%/g, gOSVersion);
dsURI = dsURI.replace(/%LOCALE%/g, getLocale());
+#ifdef MOZ_WEBEXTENSIONS
dsURI = dsURI.replace(/%CHANNEL%/g, UpdateUtils.UpdateChannel);
+#else
+ dsURI = dsURI.replace(/%CHANNEL%/g, UpdateChannel.get());
+#endif
dsURI = dsURI.replace(/%PLATFORM_VERSION%/g, gApp.platformVersion);
dsURI = dsURI.replace(/%DISTRIBUTION%/g,
getDistributionPrefValue(PREF_APP_DISTRIBUTION));
@@ -1147,9 +1155,9 @@ Blocklist.prototype = {
/* See nsIBlocklistService */
getPluginBlocklistState: function(plugin, appVersion, toolkitVersion) {
- if (AppConstants.platform == "android") {
- return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
- }
+#ifdef MOZ_WIDGET_ANDROID
+ return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
+#endif
if (!this._isBlocklistLoaded())
this._loadBlocklist();
return this._getPluginBlocklistState(plugin, this._pluginEntries,
diff --git a/toolkit/mozapps/webextensions/nsBlocklistServiceContent.js b/toolkit/components/blocklist/nsBlocklistServiceContent.js
index 1752924b5..1752924b5 100644
--- a/toolkit/mozapps/webextensions/nsBlocklistServiceContent.js
+++ b/toolkit/components/blocklist/nsBlocklistServiceContent.js
diff --git a/toolkit/components/build/nsToolkitCompsModule.cpp b/toolkit/components/build/nsToolkitCompsModule.cpp
index 2c7287d8c..190c4da06 100644
--- a/toolkit/components/build/nsToolkitCompsModule.cpp
+++ b/toolkit/components/build/nsToolkitCompsModule.cpp
@@ -26,11 +26,13 @@
#include "nsTypeAheadFind.h"
+#ifdef MOZ_URL_CLASSIFIER
#include "ApplicationReputation.h"
#include "nsUrlClassifierDBService.h"
#include "nsUrlClassifierStreamUpdater.h"
#include "nsUrlClassifierUtils.h"
#include "nsUrlClassifierPrefixSet.h"
+#endif
#include "nsBrowserStatusFilter.h"
#include "mozilla/FinalizationWitnessService.h"
@@ -91,6 +93,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadProxy)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTypeAheadFind)
+#ifdef MOZ_URL_CLASSIFIER
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(ApplicationReputationService,
ApplicationReputationService::GetSingleton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUrlClassifierPrefixSet)
@@ -115,6 +118,7 @@ nsUrlClassifierDBServiceConstructor(nsISupports *aOuter, REFNSIID aIID,
return rv;
}
+#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter)
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
@@ -148,11 +152,13 @@ NS_DEFINE_NAMED_CID(NS_DOWNLOADPLATFORM_CID);
NS_DEFINE_NAMED_CID(NS_DOWNLOAD_CID);
NS_DEFINE_NAMED_CID(NS_FIND_SERVICE_CID);
NS_DEFINE_NAMED_CID(NS_TYPEAHEADFIND_CID);
+#ifdef MOZ_URL_CLASSIFIER
NS_DEFINE_NAMED_CID(NS_APPLICATION_REPUTATION_SERVICE_CID);
NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERPREFIXSET_CID);
NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERDBSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERSTREAMUPDATER_CID);
NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERUTILS_CID);
+#endif
NS_DEFINE_NAMED_CID(NS_BROWSERSTATUSFILTER_CID);
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
NS_DEFINE_NAMED_CID(NS_UPDATEPROCESSOR_CID);
@@ -184,11 +190,13 @@ static const Module::CIDEntry kToolkitCIDs[] = {
{ &kNS_DOWNLOAD_CID, false, nullptr, nsDownloadProxyConstructor },
{ &kNS_FIND_SERVICE_CID, false, nullptr, nsFindServiceConstructor },
{ &kNS_TYPEAHEADFIND_CID, false, nullptr, nsTypeAheadFindConstructor },
+#ifdef MOZ_URL_CLASSIFIER
{ &kNS_APPLICATION_REPUTATION_SERVICE_CID, false, nullptr, ApplicationReputationServiceConstructor },
{ &kNS_URLCLASSIFIERPREFIXSET_CID, false, nullptr, nsUrlClassifierPrefixSetConstructor },
{ &kNS_URLCLASSIFIERDBSERVICE_CID, false, nullptr, nsUrlClassifierDBServiceConstructor },
{ &kNS_URLCLASSIFIERSTREAMUPDATER_CID, false, nullptr, nsUrlClassifierStreamUpdaterConstructor },
{ &kNS_URLCLASSIFIERUTILS_CID, false, nullptr, nsUrlClassifierUtilsConstructor },
+#endif
{ &kNS_BROWSERSTATUSFILTER_CID, false, nullptr, nsBrowserStatusFilterConstructor },
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
{ &kNS_UPDATEPROCESSOR_CID, false, nullptr, nsUpdateProcessorConstructor },
@@ -221,12 +229,14 @@ static const Module::ContractIDEntry kToolkitContracts[] = {
{ NS_DOWNLOADPLATFORM_CONTRACTID, &kNS_DOWNLOADPLATFORM_CID },
{ NS_FIND_SERVICE_CONTRACTID, &kNS_FIND_SERVICE_CID },
{ NS_TYPEAHEADFIND_CONTRACTID, &kNS_TYPEAHEADFIND_CID },
+#ifdef MOZ_URL_CLASSIFIER
{ NS_APPLICATION_REPUTATION_SERVICE_CONTRACTID, &kNS_APPLICATION_REPUTATION_SERVICE_CID },
{ NS_URLCLASSIFIERPREFIXSET_CONTRACTID, &kNS_URLCLASSIFIERPREFIXSET_CID },
{ NS_URLCLASSIFIERDBSERVICE_CONTRACTID, &kNS_URLCLASSIFIERDBSERVICE_CID },
{ NS_URICLASSIFIERSERVICE_CONTRACTID, &kNS_URLCLASSIFIERDBSERVICE_CID },
{ NS_URLCLASSIFIERSTREAMUPDATER_CONTRACTID, &kNS_URLCLASSIFIERSTREAMUPDATER_CID },
{ NS_URLCLASSIFIERUTILS_CONTRACTID, &kNS_URLCLASSIFIERUTILS_CID },
+#endif
{ NS_BROWSERSTATUSFILTER_CONTRACTID, &kNS_BROWSERSTATUSFILTER_CID },
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
{ NS_UPDATEPROCESSOR_CONTRACTID, &kNS_UPDATEPROCESSOR_CID },
diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build
index 477db0bd6..20394a70d 100644
--- a/toolkit/components/downloads/moz.build
+++ b/toolkit/components/downloads/moz.build
@@ -32,8 +32,6 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'downloads'
UNIFIED_SOURCES += [
- 'ApplicationReputation.cpp',
- 'chromium/chrome/common/safe_browsing/csd.pb.cc',
'nsDownloadManager.cpp'
]
@@ -42,6 +40,12 @@ SOURCES += [
'SQLFunctions.cpp',
]
+if CONFIG['MOZ_URL_CLASSIFIER']:
+ UNIFIED_SOURCES += [
+ 'ApplicationReputation.cpp',
+ 'chromium/chrome/common/safe_browsing/csd.pb.cc'
+ ]
+
if CONFIG['OS_ARCH'] == 'WINNT':
# Can't build unified because we need CreateEvent which some IPC code
# included in LoadContext ends up undefining.
diff --git a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
index bee5bf269..305284749 100644
--- a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
@@ -473,6 +473,12 @@ this.DownloadIntegration = {
* }
*/
shouldBlockForReputationCheck(aDownload) {
+#ifndef MOZ_URL_CLASSIFIER
+ return Promise.resolve({
+ shouldBlock: false,
+ verdict: "",
+ });
+#else
let hash;
let sigInfo;
let channelRedirects;
@@ -513,6 +519,7 @@ this.DownloadIntegration = {
});
});
return deferred.promise;
+#endif
},
#ifdef XP_WIN
diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build
index e0b412428..c11f62792 100644
--- a/toolkit/components/moz.build
+++ b/toolkit/components/moz.build
@@ -17,6 +17,7 @@ DIRS += [
'alerts',
'apppicker',
'asyncshutdown',
+ 'blocklist',
'commandlines',
'console',
'contentprefs',
@@ -60,7 +61,6 @@ DIRS += [
'tooltiptext',
'typeaheadfind',
'utils',
- 'url-classifier',
'urlformatter',
'viewconfig',
'workerloader',
@@ -93,6 +93,9 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
if CONFIG['MOZ_TOOLKIT_SEARCH']:
DIRS += ['search']
+if CONFIG['MOZ_URL_CLASSIFIER']:
+ DIRS += ['url-classifier']
+
DIRS += ['captivedetect']
if CONFIG['OS_TARGET'] != 'Android':
diff --git a/toolkit/components/narrate/NarrateControls.jsm b/toolkit/components/narrate/NarrateControls.jsm
index 7d8794b18..be3ce636c 100644
--- a/toolkit/components/narrate/NarrateControls.jsm
+++ b/toolkit/components/narrate/NarrateControls.jsm
@@ -16,9 +16,9 @@ this.EXPORTED_SYMBOLS = ["NarrateControls"];
var gStrings = Services.strings.createBundle("chrome://global/locale/narrate.properties");
-function NarrateControls(mm, win) {
- this._mm = mm;
+function NarrateControls(win, languagePromise) {
this._winRef = Cu.getWeakReference(win);
+ this._languagePromise = languagePromise;
win.addEventListener("unload", this);
@@ -37,16 +37,12 @@ function NarrateControls(mm, win) {
}
let dropdown = win.document.createElement("ul");
- dropdown.className = "dropdown";
- dropdown.id = "narrate-dropdown";
+ dropdown.className = "dropdown narrate-dropdown";
// We need inline svg here for the animation to work (bug 908634 & 1190881).
- // The style animation can't be scoped (bug 830056).
+ // eslint-disable-next-line no-unsanitized/property
dropdown.innerHTML =
- localize`<style scoped>
- @import url("chrome://global/skin/narrateControls.css");
- </style>
- <li>
- <button class="dropdown-toggle button" id="narrate-toggle"
+ localize`<li>
+ <button class="dropdown-toggle button narrate-toggle"
title="${"narrate"}" hidden>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
@@ -60,11 +56,11 @@ function NarrateControls(mm, win) {
100% { transform: scaleY(1); }
}
- #waveform > rect {
+ .waveform > rect {
fill: #808080;
}
- .speaking #waveform > rect {
+ .speaking .waveform > rect {
fill: #58bf43;
transform-box: fill-box;
transform-origin: 50% 50%;
@@ -74,15 +70,15 @@ function NarrateControls(mm, win) {
animation-timing-function: linear;
}
- #waveform > rect:nth-child(2) { animation-delay: 250ms; }
- #waveform > rect:nth-child(3) { animation-delay: 500ms; }
- #waveform > rect:nth-child(4) { animation-delay: 750ms; }
- #waveform > rect:nth-child(5) { animation-delay: 1000ms; }
- #waveform > rect:nth-child(6) { animation-delay: 1250ms; }
- #waveform > rect:nth-child(7) { animation-delay: 1500ms; }
+ .waveform > rect:nth-child(2) { animation-delay: 250ms; }
+ .waveform > rect:nth-child(3) { animation-delay: 500ms; }
+ .waveform > rect:nth-child(4) { animation-delay: 750ms; }
+ .waveform > rect:nth-child(5) { animation-delay: 1000ms; }
+ .waveform > rect:nth-child(6) { animation-delay: 1250ms; }
+ .waveform > rect:nth-child(7) { animation-delay: 1500ms; }
</style>
- <g id="waveform">
+ <g class="waveform">
<rect x="1" y="8" width="2" height="8" rx=".5" ry=".5" />
<rect x="4" y="5" width="2" height="14" rx=".5" ry=".5" />
<rect x="7" y="8" width="2" height="8" rx=".5" ry=".5" />
@@ -95,35 +91,35 @@ function NarrateControls(mm, win) {
</button>
</li>
<li class="dropdown-popup">
- <div id="narrate-control" class="narrate-row">
- <button disabled id="narrate-skip-previous"
+ <div class="narrate-row narrate-control">
+ <button disabled class="narrate-skip-previous"
title="${"back"}"></button>
- <button id="narrate-start-stop" title="${"start"}"></button>
- <button disabled id="narrate-skip-next"
+ <button class="narrate-start-stop" title="${"start"}"></button>
+ <button disabled class="narrate-skip-next"
title="${"forward"}"></button>
</div>
- <div id="narrate-rate" class="narrate-row">
- <input id="narrate-rate-input" value="0" title="${"speed"}"
+ <div class="narrate-row narrate-rate">
+ <input class="narrate-rate-input" value="0" title="${"speed"}"
step="5" max="100" min="-100" type="range">
</div>
- <div id="narrate-voices" class="narrate-row"></div>
+ <div class="narrate-row narrate-voices"></div>
<div class="dropdown-arrow"></div>
</li>`;
- this.narrator = new Narrator(win);
+ this.narrator = new Narrator(win, languagePromise);
let branch = Services.prefs.getBranch("narrate.");
let selectLabel = gStrings.GetStringFromName("selectvoicelabel");
this.voiceSelect = new VoiceSelect(win, selectLabel);
this.voiceSelect.element.addEventListener("change", this);
- this.voiceSelect.element.id = "voice-select";
+ this.voiceSelect.element.classList.add("voice-select");
win.speechSynthesis.addEventListener("voiceschanged", this);
- dropdown.querySelector("#narrate-voices").appendChild(
+ dropdown.querySelector(".narrate-voices").appendChild(
this.voiceSelect.element);
dropdown.addEventListener("click", this, true);
- let rateRange = dropdown.querySelector("#narrate-rate > input");
+ let rateRange = dropdown.querySelector(".narrate-rate > input");
rateRange.addEventListener("change", this);
// The rate is stored as an integer.
@@ -131,15 +127,15 @@ function NarrateControls(mm, win) {
this._setupVoices();
- let tb = win.document.getElementById("reader-toolbar");
+ let tb = win.document.querySelector(".reader-toolbar");
tb.appendChild(dropdown);
}
NarrateControls.prototype = {
- handleEvent: function(evt) {
+ handleEvent(evt) {
switch (evt.type) {
case "change":
- if (evt.target.id == "narrate-rate-input") {
+ if (evt.target.classList.contains("narrate-rate-input")) {
this._onRateInput(evt);
} else {
this._onVoiceChange();
@@ -162,8 +158,8 @@ NarrateControls.prototype = {
/**
* Returns true if synth voices are available.
*/
- _setupVoices: function() {
- return this.narrator.languagePromise.then(language => {
+ _setupVoices() {
+ return this._languagePromise.then(language => {
this.voiceSelect.clear();
let win = this._win;
let voicePrefs = this._getVoicePref();
@@ -190,7 +186,7 @@ NarrateControls.prototype = {
this.voiceSelect.addOptions(options);
}
- let narrateToggle = win.document.getElementById("narrate-toggle");
+ let narrateToggle = win.document.querySelector(".narrate-toggle");
let histogram = Services.telemetry.getKeyedHistogramById(
"NARRATE_CONTENT_BY_LANGUAGE_2");
let initial = !this._voicesInitialized;
@@ -210,7 +206,7 @@ NarrateControls.prototype = {
});
},
- _getVoicePref: function() {
+ _getVoicePref() {
let voicePref = Services.prefs.getCharPref("narrate.voice");
try {
return JSON.parse(voicePref);
@@ -219,15 +215,15 @@ NarrateControls.prototype = {
}
},
- _onRateInput: function(evt) {
+ _onRateInput(evt) {
AsyncPrefs.set("narrate.rate", parseInt(evt.target.value, 10));
this.narrator.setRate(this._convertRate(evt.target.value));
},
- _onVoiceChange: function() {
+ _onVoiceChange() {
let voice = this.voice;
this.narrator.setVoice(voice);
- this.narrator.languagePromise.then(language => {
+ this._languagePromise.then(language => {
if (language) {
let voicePref = this._getVoicePref();
voicePref[language || "default"] = voice;
@@ -236,42 +232,39 @@ NarrateControls.prototype = {
});
},
- _onButtonClick: function(evt) {
- switch (evt.target.id) {
- case "narrate-skip-previous":
- this.narrator.skipPrevious();
- break;
- case "narrate-skip-next":
- this.narrator.skipNext();
- break;
- case "narrate-start-stop":
- if (this.narrator.speaking) {
- this.narrator.stop();
- } else {
- this._updateSpeechControls(true);
- let options = { rate: this.rate, voice: this.voice };
- this.narrator.start(options).then(() => {
- this._updateSpeechControls(false);
- }, err => {
- Cu.reportError(`Narrate failed: ${err}.`);
- this._updateSpeechControls(false);
- });
- }
- break;
+ _onButtonClick(evt) {
+ let classList = evt.target.classList;
+ if (classList.contains("narrate-skip-previous")) {
+ this.narrator.skipPrevious();
+ } else if (classList.contains("narrate-skip-next")) {
+ this.narrator.skipNext();
+ } else if (classList.contains("narrate-start-stop")) {
+ if (this.narrator.speaking) {
+ this.narrator.stop();
+ } else {
+ this._updateSpeechControls(true);
+ let options = { rate: this.rate, voice: this.voice };
+ this.narrator.start(options).then(() => {
+ this._updateSpeechControls(false);
+ }, err => {
+ Cu.reportError(`Narrate failed: ${err}.`);
+ this._updateSpeechControls(false);
+ });
+ }
}
},
- _updateSpeechControls: function(speaking) {
- let dropdown = this._doc.getElementById("narrate-dropdown");
+ _updateSpeechControls(speaking) {
+ let dropdown = this._doc.querySelector(".narrate-dropdown");
dropdown.classList.toggle("keep-open", speaking);
dropdown.classList.toggle("speaking", speaking);
- let startStopButton = this._doc.getElementById("narrate-start-stop");
+ let startStopButton = this._doc.querySelector(".narrate-start-stop");
startStopButton.title =
gStrings.GetStringFromName(speaking ? "stop" : "start");
- this._doc.getElementById("narrate-skip-previous").disabled = !speaking;
- this._doc.getElementById("narrate-skip-next").disabled = !speaking;
+ this._doc.querySelector(".narrate-skip-previous").disabled = !speaking;
+ this._doc.querySelector(".narrate-skip-next").disabled = !speaking;
if (speaking) {
TelemetryStopwatch.start("NARRATE_CONTENT_SPEAKTIME_MS", this);
@@ -280,7 +273,7 @@ NarrateControls.prototype = {
}
},
- _createVoiceLabel: function(voice) {
+ _createVoiceLabel(voice) {
// This is a highly imperfect method of making human-readable labels
// for system voices. Because each platform has a different naming scheme
// for voices, we use a different method for each platform.
@@ -303,7 +296,7 @@ NarrateControls.prototype = {
}
},
- _getLanguageName: function(lang) {
+ _getLanguageName(lang) {
if (!this._langStrings) {
this._langStrings = Services.strings.createBundle(
"chrome://global/locale/languageNames.properties ");
@@ -317,7 +310,7 @@ NarrateControls.prototype = {
}
},
- _convertRate: function(rate) {
+ _convertRate(rate) {
// We need to convert a relative percentage value to a fraction rate value.
// eg. -100 is half the speed, 100 is twice the speed in percentage,
// 0.5 is half the speed and 2 is twice the speed in fractions.
@@ -334,7 +327,7 @@ NarrateControls.prototype = {
get rate() {
return this._convertRate(
- this._doc.getElementById("narrate-rate-input").value);
+ this._doc.querySelector(".narrate-rate-input").value);
},
get voice() {
diff --git a/toolkit/components/narrate/Narrator.jsm b/toolkit/components/narrate/Narrator.jsm
index ade06510e..ac0b2e040 100644
--- a/toolkit/components/narrate/Narrator.jsm
+++ b/toolkit/components/narrate/Narrator.jsm
@@ -8,8 +8,6 @@ const { interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "LanguageDetector",
- "resource:///modules/translation/LanguageDetector.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Services",
"resource://gre/modules/Services.jsm");
@@ -24,29 +22,13 @@ const kTextStylesRules = ["font-family", "font-kerning", "font-size",
"line-height", "letter-spacing", "text-orientation",
"text-transform", "word-spacing"];
-function Narrator(win) {
+function Narrator(win, languagePromise) {
this._winRef = Cu.getWeakReference(win);
+ this._languagePromise = languagePromise;
this._inTest = Services.prefs.getBoolPref("narrate.test");
this._speechOptions = {};
this._startTime = 0;
this._stopped = false;
-
- this.languagePromise = new Promise(resolve => {
- let detect = () => {
- win.document.removeEventListener("AboutReaderContentReady", detect);
- let sampleText = this._doc.getElementById(
- "moz-reader-content").textContent.substring(0, 60 * 1024);
- LanguageDetector.detectLanguage(sampleText).then(result => {
- resolve(result.confident ? result.language : null);
- });
- };
-
- if (win.document.body.classList.contains("loaded")) {
- detect();
- } else {
- win.document.addEventListener("AboutReaderContentReady", detect);
- }
- });
}
Narrator.prototype = {
@@ -71,7 +53,7 @@ Narrator.prototype = {
// For example, paragraphs. But nested anchors and other elements
// are not interesting since their text already appears in their
// parent's textContent.
- acceptNode: function(node) {
+ acceptNode(node) {
if (this._matches.has(node.parentNode)) {
// Reject sub-trees of accepted nodes.
return nf.FILTER_REJECT;
@@ -107,7 +89,7 @@ Narrator.prototype = {
// are no other strong references, and it will be GC'ed. Instead,
// we rely on the window's lifetime and use it as a weak reference.
this._treeWalkerRef.set(this._win,
- this._doc.createTreeWalker(this._doc.getElementById("container"),
+ this._doc.createTreeWalker(this._doc.querySelector(".container"),
nf.SHOW_ELEMENT, filter, false));
}
@@ -124,7 +106,7 @@ Narrator.prototype = {
this._win.speechSynthesis.pending;
},
- _getVoice: function(voiceURI) {
+ _getVoice(voiceURI) {
if (!this._voiceMap || !this._voiceMap.has(voiceURI)) {
this._voiceMap = new Map(
this._win.speechSynthesis.getVoices().map(v => [v.voiceURI, v]));
@@ -133,7 +115,7 @@ Narrator.prototype = {
return this._voiceMap.get(voiceURI);
},
- _isParagraphInView: function(paragraph) {
+ _isParagraphInView(paragraph) {
if (!paragraph) {
return false;
}
@@ -142,13 +124,13 @@ Narrator.prototype = {
return bb.top >= 0 && bb.top < this._win.innerHeight;
},
- _sendTestEvent: function(eventType, detail) {
+ _sendTestEvent(eventType, detail) {
let win = this._win;
win.dispatchEvent(new win.CustomEvent(eventType,
{ detail: Cu.cloneInto(detail, win.document) }));
},
- _speakInner: function() {
+ _speakInner() {
this._win.speechSynthesis.cancel();
let tw = this._treeWalker;
let paragraph = tw.currentNode;
@@ -238,18 +220,12 @@ Narrator.prototype = {
return;
}
- // Match non-whitespace. This isn't perfect, but the most universal
- // solution for now.
- let reWordBoundary = /\S+/g;
- // Match the first word from the boundary event offset.
- reWordBoundary.lastIndex = e.charIndex;
- let firstIndex = reWordBoundary.exec(paragraph.textContent);
- if (firstIndex) {
- highlighter.highlight(firstIndex.index, reWordBoundary.lastIndex);
+ if (e.charLength) {
+ highlighter.highlight(e.charIndex, e.charLength);
if (this._inTest) {
this._sendTestEvent("wordhighlight", {
- start: firstIndex.index,
- end: reWordBoundary.lastIndex
+ start: e.charIndex,
+ end: e.charIndex + e.charLength
});
}
}
@@ -259,14 +235,14 @@ Narrator.prototype = {
});
},
- start: function(speechOptions) {
+ start(speechOptions) {
this._speechOptions = {
rate: speechOptions.rate,
voice: this._getVoice(speechOptions.voice)
};
this._stopped = false;
- return this.languagePromise.then(language => {
+ return this._languagePromise.then(language => {
if (!this._speechOptions.voice) {
this._speechOptions.lang = language;
}
@@ -288,32 +264,32 @@ Narrator.prototype = {
});
},
- stop: function() {
+ stop() {
this._stopped = true;
this._win.speechSynthesis.cancel();
},
- skipNext: function() {
+ skipNext() {
this._win.speechSynthesis.cancel();
},
- skipPrevious: function() {
+ skipPrevious() {
this._goBackParagraphs(this._timeIntoParagraph < PREV_THRESHOLD ? 2 : 1);
},
- setRate: function(rate) {
+ setRate(rate) {
this._speechOptions.rate = rate;
/* repeat current paragraph */
this._goBackParagraphs(1);
},
- setVoice: function(voice) {
+ setVoice(voice) {
this._speechOptions.voice = this._getVoice(voice);
/* repeat current paragraph */
this._goBackParagraphs(1);
},
- _goBackParagraphs: function(count) {
+ _goBackParagraphs(count) {
let tw = this._treeWalker;
for (let i = 0; i < count; i++) {
if (!tw.previousNode()) {
@@ -338,13 +314,13 @@ Highlighter.prototype = {
* Highlight the range within offsets relative to the container.
*
* @param {Number} startOffset the start offset
- * @param {Number} endOffset the end offset
+ * @param {Number} length the length in characters of the range
*/
- highlight: function(startOffset, endOffset) {
+ highlight(startOffset, length) {
let containerRect = this.container.getBoundingClientRect();
- let range = this._getRange(startOffset, endOffset);
+ let range = this._getRange(startOffset, startOffset + length);
let rangeRects = range.getClientRects();
- let win = this.container.ownerDocument.defaultView;
+ let win = this.container.ownerGlobal;
let computedStyle = win.getComputedStyle(range.endContainer.parentNode);
let nodes = this._getFreshHighlightNodes(rangeRects.length);
@@ -386,7 +362,7 @@ Highlighter.prototype = {
/**
* Releases reference to container and removes all highlight nodes.
*/
- remove: function() {
+ remove() {
for (let node of this._nodes) {
node.remove();
}
@@ -400,7 +376,7 @@ Highlighter.prototype = {
*
* @param {Number} count number of nodes needed
*/
- _getFreshHighlightNodes: function(count) {
+ _getFreshHighlightNodes(count) {
let doc = this.container.ownerDocument;
let nodes = Array.from(this._nodes);
@@ -427,7 +403,7 @@ Highlighter.prototype = {
* @param {Number} startOffset the start offset
* @param {Number} endOffset the end offset
*/
- _getRange: function(startOffset, endOffset) {
+ _getRange(startOffset, endOffset) {
let doc = this.container.ownerDocument;
let i = 0;
let treeWalker = doc.createTreeWalker(
diff --git a/toolkit/components/narrate/VoiceSelect.jsm b/toolkit/components/narrate/VoiceSelect.jsm
index b283a06b3..861a21c97 100644
--- a/toolkit/components/narrate/VoiceSelect.jsm
+++ b/toolkit/components/narrate/VoiceSelect.jsm
@@ -13,6 +13,7 @@ function VoiceSelect(win, label) {
let element = win.document.createElement("div");
element.classList.add("voiceselect");
+ // eslint-disable-next-line no-unsanitized/property
element.innerHTML =
`<button class="select-toggle" aria-controls="voice-options">
<span class="label">${label}</span> <span class="current-voice"></span>
@@ -37,7 +38,7 @@ function VoiceSelect(win, label) {
}
VoiceSelect.prototype = {
- add: function(label, value) {
+ add(label, value) {
let option = this._doc.createElement("button");
option.dataset.value = value;
option.classList.add("option");
@@ -48,7 +49,7 @@ VoiceSelect.prototype = {
return option;
},
- addOptions: function(options) {
+ addOptions(options) {
let selected = null;
for (let option of options) {
if (option.selected) {
@@ -61,11 +62,11 @@ VoiceSelect.prototype = {
this._select(selected || this.options[0], true);
},
- clear: function() {
+ clear() {
this.listbox.innerHTML = "";
},
- toggleList: function(force, focus = true) {
+ toggleList(force, focus = true) {
if (this.element.classList.toggle("open", force)) {
if (focus) {
(this.selected || this.options[0]).focus();
@@ -84,7 +85,7 @@ VoiceSelect.prototype = {
}
},
- handleEvent: function(evt) {
+ handleEvent(evt) {
let target = evt.target;
switch (evt.type) {
@@ -131,7 +132,7 @@ VoiceSelect.prototype = {
}
},
- _getPagedOption: function(option, up) {
+ _getPagedOption(option, up) {
let height = elem => elem.getBoundingClientRect().height;
let listboxHeight = height(this.listbox);
@@ -148,7 +149,7 @@ VoiceSelect.prototype = {
return next;
},
- _keyPressedButton: function(evt) {
+ _keyPressedButton(evt) {
if (evt.altKey && (evt.key === "ArrowUp" || evt.key === "ArrowUp")) {
this.toggleList(true);
return;
@@ -178,7 +179,7 @@ VoiceSelect.prototype = {
}
},
- _keyPressedInBox: function(evt) {
+ _keyPressedInBox(evt) {
let toFocus;
let cur = this._doc.activeElement;
@@ -212,7 +213,7 @@ VoiceSelect.prototype = {
}
},
- _select: function(option, suppressEvent = false) {
+ _select(option, suppressEvent = false) {
let oldSelected = this.selected;
if (oldSelected) {
oldSelected.removeAttribute("aria-selected");
@@ -233,7 +234,7 @@ VoiceSelect.prototype = {
}
},
- _updateDropdownHeight: function(now) {
+ _updateDropdownHeight(now) {
let updateInner = () => {
let winHeight = this._win.innerHeight;
let listbox = this.listbox;
@@ -252,7 +253,7 @@ VoiceSelect.prototype = {
}
},
- _getOptionFromValue: function(value) {
+ _getOptionFromValue(value) {
return Array.from(this.options).find(o => o.dataset.value === value);
},
diff --git a/toolkit/components/printing/content/simplifyMode.css b/toolkit/components/printing/content/simplifyMode.css
index 2a8706c75..d02f216dc 100644
--- a/toolkit/components/printing/content/simplifyMode.css
+++ b/toolkit/components/printing/content/simplifyMode.css
@@ -3,7 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/* This file defines specific rules for print preview when using simplify mode.
- * These rules already exist on aboutReaderControls.css, however, we decoupled it
+ * These rules already exist on aboutReader.css, however, we decoupled it
* from the original file so we don't need to load a bunch of extra queries that
* will not take effect when using the simplify page checkbox. This file defines
* styling for title and author on the header element. */
diff --git a/toolkit/components/reader/AboutReader.jsm b/toolkit/components/reader/AboutReader.jsm
index 1fb9db123..fb82e5789 100644
--- a/toolkit/components/reader/AboutReader.jsm
+++ b/toolkit/components/reader/AboutReader.jsm
@@ -15,12 +15,12 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AsyncPrefs", "resource://gre/modules/AsyncPrefs.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NarrateControls", "resource://gre/modules/narrate/NarrateControls.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Rect", "resource://gre/modules/Geometry.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "UITelemetry", "resource://gre/modules/UITelemetry.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", "resource://gre/modules/PluralForm.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
var gStrings = Services.strings.createBundle("chrome://global/locale/aboutReader.properties");
-var AboutReader = function(mm, win, articlePromise) {
+var AboutReader = function(win, articlePromise) {
let url = this._getOriginalUrl(win);
if (!(url.startsWith("http://") || url.startsWith("https://"))) {
let errorMsg = "Only http:// and https:// URLs can be loaded in about:reader.";
@@ -33,57 +33,59 @@ var AboutReader = function(mm, win, articlePromise) {
let doc = win.document;
- this._mm = mm;
- this._mm.addMessageListener("Reader:CloseDropdown", this);
- this._mm.addMessageListener("Reader:AddButton", this);
- this._mm.addMessageListener("Reader:RemoveButton", this);
- this._mm.addMessageListener("Reader:GetStoredArticleData", this);
-
this._docRef = Cu.getWeakReference(doc);
this._winRef = Cu.getWeakReference(win);
this._innerWindowId = win.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID;
this._article = null;
+ this._languagePromise = new Promise(resolve => {
+ this._foundLanguage = resolve;
+ });
if (articlePromise) {
this._articlePromise = articlePromise;
}
- this._headerElementRef = Cu.getWeakReference(doc.getElementById("reader-header"));
- this._domainElementRef = Cu.getWeakReference(doc.getElementById("reader-domain"));
- this._titleElementRef = Cu.getWeakReference(doc.getElementById("reader-title"));
- this._creditsElementRef = Cu.getWeakReference(doc.getElementById("reader-credits"));
- this._contentElementRef = Cu.getWeakReference(doc.getElementById("moz-reader-content"));
- this._toolbarElementRef = Cu.getWeakReference(doc.getElementById("reader-toolbar"));
- this._messageElementRef = Cu.getWeakReference(doc.getElementById("reader-message"));
+ this._headerElementRef = Cu.getWeakReference(doc.querySelector(".reader-header"));
+ this._domainElementRef = Cu.getWeakReference(doc.querySelector(".reader-domain"));
+ this._titleElementRef = Cu.getWeakReference(doc.querySelector(".reader-title"));
+ this._readTimeElementRef = Cu.getWeakReference(doc.querySelector(".reader-estimated-time"));
+ this._creditsElementRef = Cu.getWeakReference(doc.querySelector(".reader-credits"));
+ this._contentElementRef = Cu.getWeakReference(doc.querySelector(".moz-reader-content"));
+ this._toolbarElementRef = Cu.getWeakReference(doc.querySelector(".reader-toolbar"));
+ this._messageElementRef = Cu.getWeakReference(doc.querySelector(".reader-message"));
+ this._containerElementRef = Cu.getWeakReference(doc.querySelector(".container"));
this._scrollOffset = win.pageYOffset;
- doc.addEventListener("click", this, false);
+ doc.addEventListener("click", this);
+
+ win.addEventListener("pagehide", this);
+ win.addEventListener("scroll", this);
+ win.addEventListener("resize", this);
- win.addEventListener("pagehide", this, false);
- win.addEventListener("scroll", this, false);
- win.addEventListener("resize", this, false);
+ win.addEventListener("AboutReaderAddButton", this, false, true);
+ win.addEventListener("AboutReaderRemoveButton", this, false, true);
Services.obs.addObserver(this, "inner-window-destroyed", false);
- doc.addEventListener("visibilitychange", this, false);
+ doc.addEventListener("visibilitychange", this);
this._setupStyleDropdown();
this._setupButton("close-button", this._onReaderClose.bind(this), "aboutReader.toolbar.close");
- const gIsFirefoxDesktop = Services.appinfo.ID == "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}";
- if (gIsFirefoxDesktop) {
- // we're ready for any external setup, send a signal for that.
- this._mm.sendAsyncMessage("Reader:OnSetup");
- }
+ // we're ready for any external setup, send a signal for that.
+ doc.dispatchEvent(
+ new win.CustomEvent("AboutReaderOnSetup", { bubbles: true, cancelable: false }));
let colorSchemeValues = JSON.parse(Services.prefs.getCharPref("reader.color_scheme.values"));
let colorSchemeOptions = colorSchemeValues.map((value) => {
- return { name: gStrings.GetStringFromName("aboutReader.colorScheme." + value),
- value: value,
- itemClass: value + "-button" };
+ return {
+ name: gStrings.GetStringFromName("aboutReader.colorScheme." + value),
+ value,
+ itemClass: value + "-button"
+ };
});
let colorScheme = Services.prefs.getCharPref("reader.color_scheme");
@@ -114,7 +116,7 @@ var AboutReader = function(mm, win, articlePromise) {
this._setupLineHeightButtons();
if (win.speechSynthesis && Services.prefs.getBoolPref("narrate.enabled")) {
- new NarrateControls(mm, win);
+ new NarrateControls(win, this._languagePromise);
}
this._loadArticle();
@@ -146,6 +148,10 @@ AboutReader.prototype = {
return this._titleElementRef.get();
},
+ get _readTimeElement() {
+ return this._readTimeElementRef.get();
+ },
+
get _creditsElement() {
return this._creditsElementRef.get();
},
@@ -162,6 +168,10 @@ AboutReader.prototype = {
return this._messageElementRef.get();
},
+ get _containerElement() {
+ return this._containerElementRef.get();
+ },
+
get _isToolbarVertical() {
if (this._toolbarVertical !== undefined) {
return this._toolbarVertical;
@@ -178,72 +188,31 @@ AboutReader.prototype = {
return _viewId;
},
- receiveMessage: function (message) {
- switch (message.name) {
- // Triggered by Android user pressing BACK while the banner font-dropdown is open.
- case "Reader:CloseDropdown": {
- // Just close it.
- this._closeDropdowns();
- break;
- }
-
- case "Reader:AddButton": {
- if (message.data.id && message.data.image &&
- !this._doc.getElementById(message.data.id)) {
- let btn = this._doc.createElement("button");
- btn.setAttribute("class", "button");
- btn.setAttribute("style", "background-image: url('" + message.data.image + "')");
- btn.setAttribute("id", message.data.id);
- if (message.data.title)
- btn.setAttribute("title", message.data.title);
- if (message.data.text)
- btn.textContent = message.data.text;
- let tb = this._doc.getElementById("reader-toolbar");
- tb.appendChild(btn);
- this._setupButton(message.data.id, button => {
- this._mm.sendAsyncMessage("Reader:Clicked-" + button.getAttribute("id"), { article: this._article });
- });
- }
- break;
- }
- case "Reader:RemoveButton": {
- if (message.data.id) {
- let btn = this._doc.getElementById(message.data.id);
- if (btn)
- btn.remove();
- }
- break;
- }
- case "Reader:GetStoredArticleData": {
- this._mm.sendAsyncMessage("Reader:StoredArticleData", { article: this._article });
- }
- }
- },
-
- handleEvent: function(aEvent) {
+ handleEvent(aEvent) {
if (!aEvent.isTrusted)
return;
switch (aEvent.type) {
case "click":
let target = aEvent.target;
- if (target.classList.contains('dropdown-toggle')) {
+ if (target.classList.contains("dropdown-toggle")) {
this._toggleDropdownClicked(aEvent);
- } else if (!target.closest('.dropdown-popup')) {
+ } else if (!target.closest(".dropdown-popup")) {
this._closeDropdowns();
}
+ if (target.tagName == "A" && !target.classList.contains("reader-domain")) {
+ this._linkClicked(aEvent);
+ }
break;
case "scroll":
this._closeDropdowns(true);
- let isScrollingUp = this._scrollOffset > aEvent.pageY;
- this._setSystemUIVisibility(isScrollingUp);
this._scrollOffset = aEvent.pageY;
break;
case "resize":
this._updateImageMargins();
if (this._isToolbarVertical) {
this._win.setTimeout(() => {
- for (let dropdown of this._doc.querySelectorAll('.dropdown.open')) {
+ for (let dropdown of this._doc.querySelectorAll(".dropdown.open")) {
this._updatePopupPosition(dropdown);
}
}, 0);
@@ -261,35 +230,57 @@ AboutReader.prototype = {
case "pagehide":
// Close the Banners Font-dropdown, cleanup Android BackPressListener.
this._closeDropdowns();
-
- this._mm.removeMessageListener("Reader:CloseDropdown", this);
- this._mm.removeMessageListener("Reader:AddButton", this);
- this._mm.removeMessageListener("Reader:RemoveButton", this);
- this._mm.removeMessageListener("Reader:GetStoredArticleData", this);
this._windowUnloaded = true;
break;
+
+ case "AboutReaderAddButton": {
+ if (aEvent.detail.id && aEvent.detail.image &&
+ !this._doc.getElementById(aEvent.detail.id)) {
+ let btn = this._doc.createElement("button");
+ btn.setAttribute("class", "button " + aEvent.detail.id);
+ btn.setAttribute("style", "background-image: url('" + aEvent.detail.image + "')");
+ btn.setAttribute("id", aEvent.detail.id);
+ if (aEvent.detail.title)
+ btn.setAttribute("title", aEvent.detail.title);
+ if (aEvent.detail.text)
+ btn.textContent = aEvent.detail.text;
+ let tb = this._toolbarElement;
+ tb.appendChild(btn);
+ this._setupButton(aEvent.detail.id, button => {
+ var data = { article: this._article };
+ this._doc.dispatchEvent(
+ new this._win.CustomEvent("AboutReaderButtonClicked-" + button.getAttribute("id"), {detail: data, bubbles: true, cancelable: false}));
+ });
+ }
+ break;
+ }
+
+ case "AboutReaderRemoveButton": {
+ if (aEvent.detail.id) {
+ let btn = this._doc.getElementById(aEvent.detail.id);
+ if (btn)
+ btn.remove();
+ }
+ break;
+ }
}
},
- observe: function(subject, topic, data) {
+ observe(subject, topic, data) {
if (subject.QueryInterface(Ci.nsISupportsPRUint64).data != this._innerWindowId) {
return;
}
- Services.obs.removeObserver(this, "inner-window-destroyed", false);
-
- this._mm.removeMessageListener("Reader:CloseDropdown", this);
- this._mm.removeMessageListener("Reader:AddButton", this);
- this._mm.removeMessageListener("Reader:RemoveButton", this);
+ Services.obs.removeObserver(this, "inner-window-destroyed");
this._windowUnloaded = true;
},
- _onReaderClose: function() {
- ReaderMode.leaveReaderMode(this._mm.docShell, this._win);
+ _onReaderClose() {
+ ReaderMode.leaveReaderMode(this._win.document.docShell, this._win);
},
- _setFontSize: function(newFontSize) {
- let containerClasses = this._doc.getElementById("container").classList;
+ _setFontSize(newFontSize) {
+ let containerClasses = this._containerElement.classList;
if (this._fontSize > 0)
containerClasses.remove("font-size" + this._fontSize);
@@ -299,19 +290,19 @@ AboutReader.prototype = {
return AsyncPrefs.set("reader.font_size", this._fontSize);
},
- _setupFontSizeButtons: function() {
+ _setupFontSizeButtons() {
const FONT_SIZE_MIN = 1;
const FONT_SIZE_MAX = 9;
// Sample text shown in Android UI.
- let sampleText = this._doc.getElementById("font-size-sample");
+ let sampleText = this._doc.querySelector(".font-size-sample");
sampleText.textContent = gStrings.GetStringFromName("aboutReader.fontTypeSample");
let currentSize = Services.prefs.getIntPref("reader.font_size");
currentSize = Math.max(FONT_SIZE_MIN, Math.min(FONT_SIZE_MAX, currentSize));
- let plusButton = this._doc.getElementById("font-size-plus");
- let minusButton = this._doc.getElementById("font-size-minus");
+ let plusButton = this._doc.querySelector(".plus-button");
+ let minusButton = this._doc.querySelector(".minus-button");
function updateControls() {
if (currentSize === FONT_SIZE_MIN) {
@@ -360,8 +351,8 @@ AboutReader.prototype = {
}, true);
},
- _setContentWidth: function(newContentWidth) {
- let containerClasses = this._doc.getElementById("container").classList;
+ _setContentWidth(newContentWidth) {
+ let containerClasses = this._containerElement.classList;
if (this._contentWidth > 0)
containerClasses.remove("content-width" + this._contentWidth);
@@ -371,15 +362,15 @@ AboutReader.prototype = {
return AsyncPrefs.set("reader.content_width", this._contentWidth);
},
- _setupContentWidthButtons: function() {
+ _setupContentWidthButtons() {
const CONTENT_WIDTH_MIN = 1;
const CONTENT_WIDTH_MAX = 9;
let currentContentWidth = Services.prefs.getIntPref("reader.content_width");
currentContentWidth = Math.max(CONTENT_WIDTH_MIN, Math.min(CONTENT_WIDTH_MAX, currentContentWidth));
- let plusButton = this._doc.getElementById("content-width-plus");
- let minusButton = this._doc.getElementById("content-width-minus");
+ let plusButton = this._doc.querySelector(".content-width-plus-button");
+ let minusButton = this._doc.querySelector(".content-width-minus-button");
function updateControls() {
if (currentContentWidth === CONTENT_WIDTH_MIN) {
@@ -428,8 +419,8 @@ AboutReader.prototype = {
}, true);
},
- _setLineHeight: function(newLineHeight) {
- let contentClasses = this._doc.getElementById("moz-reader-content").classList;
+ _setLineHeight(newLineHeight) {
+ let contentClasses = this._contentElement.classList;
if (this._lineHeight > 0)
contentClasses.remove("line-height" + this._lineHeight);
@@ -439,15 +430,15 @@ AboutReader.prototype = {
return AsyncPrefs.set("reader.line_height", this._lineHeight);
},
- _setupLineHeightButtons: function() {
+ _setupLineHeightButtons() {
const LINE_HEIGHT_MIN = 1;
const LINE_HEIGHT_MAX = 9;
let currentLineHeight = Services.prefs.getIntPref("reader.line_height");
currentLineHeight = Math.max(LINE_HEIGHT_MIN, Math.min(LINE_HEIGHT_MAX, currentLineHeight));
- let plusButton = this._doc.getElementById("line-height-plus");
- let minusButton = this._doc.getElementById("line-height-minus");
+ let plusButton = this._doc.querySelector(".line-height-plus-button");
+ let minusButton = this._doc.querySelector(".line-height-minus-button");
function updateControls() {
if (currentLineHeight === LINE_HEIGHT_MIN) {
@@ -496,7 +487,7 @@ AboutReader.prototype = {
}, true);
},
- _handleDeviceLight: function(newLux) {
+ _handleDeviceLight(newLux) {
// Desired size of the this._luxValues array.
let luxValuesSize = 10;
// Add new lux value at the front of the array.
@@ -513,7 +504,7 @@ AboutReader.prototype = {
return;
}
// Holds the average of the lux values collected in this._luxValues.
- let averageLuxValue = this._totalLux/luxValuesSize;
+ let averageLuxValue = this._totalLux / luxValuesSize;
this._updateColorScheme(averageLuxValue);
// Pop the oldest value off the array.
@@ -522,7 +513,7 @@ AboutReader.prototype = {
this._totalLux -= oldLux;
},
- _handleVisibilityChange: function() {
+ _handleVisibilityChange() {
let colorScheme = Services.prefs.getCharPref("reader.color_scheme");
if (colorScheme != "auto") {
return;
@@ -533,19 +524,19 @@ AboutReader.prototype = {
},
// Setup or teardown the ambient light tracking system.
- _enableAmbientLighting: function(enable) {
+ _enableAmbientLighting(enable) {
if (enable) {
- this._win.addEventListener("devicelight", this, false);
+ this._win.addEventListener("devicelight", this);
this._luxValues = [];
this._totalLux = 0;
} else {
- this._win.removeEventListener("devicelight", this, false);
+ this._win.removeEventListener("devicelight", this);
delete this._luxValues;
delete this._totalLux;
}
},
- _updateColorScheme: function(luxValue) {
+ _updateColorScheme(luxValue) {
// Upper bound value for "dark" color scheme beyond which it changes to "light".
let upperBoundDark = 50;
// Lower bound value for "light" color scheme beyond which it changes to "dark".
@@ -564,7 +555,7 @@ AboutReader.prototype = {
this._setColorScheme("light");
},
- _setColorScheme: function(newColorScheme) {
+ _setColorScheme(newColorScheme) {
// "auto" is not a real color scheme
if (this._colorScheme === newColorScheme || newColorScheme === "auto")
return;
@@ -580,14 +571,14 @@ AboutReader.prototype = {
// Pref values include "dark", "light", and "auto", which automatically switches
// between light and dark color schemes based on the ambient light level.
- _setColorSchemePref: function(colorSchemePref) {
+ _setColorSchemePref(colorSchemePref) {
this._enableAmbientLighting(colorSchemePref === "auto");
this._setColorScheme(colorSchemePref);
AsyncPrefs.set("reader.color_scheme", colorSchemePref);
},
- _setFontType: function(newFontType) {
+ _setFontType(newFontType) {
if (this._fontType === newFontType)
return;
@@ -602,20 +593,34 @@ AboutReader.prototype = {
AsyncPrefs.set("reader.font_type", this._fontType);
},
- _setSystemUIVisibility: function(visible) {
- this._mm.sendAsyncMessage("Reader:SystemUIVisibility", { visible: visible });
+ _setToolbarVisibility(visible) {
+ let tb = this._toolbarElement;
+
+ if (visible) {
+ if (tb.style.opacity != "1") {
+ tb.removeAttribute("hidden");
+ tb.style.opacity = "1";
+ }
+ } else if (tb.style.opacity != "0") {
+ tb.addEventListener("transitionend", evt => {
+ if (tb.style.opacity == "0") {
+ tb.setAttribute("hidden", "");
+ }
+ }, { once: true });
+ tb.style.opacity = "0";
+ }
},
- _loadArticle: Task.async(function* () {
+ async _loadArticle() {
let url = this._getOriginalUrl();
this._showProgressDelayed();
let article;
if (this._articlePromise) {
- article = yield this._articlePromise;
+ article = await this._articlePromise;
} else {
try {
- article = yield this._getArticle(url);
+ article = await this._getArticle(url);
} catch (e) {
if (e && e.newURL) {
let readerURL = "about:reader?url=" + encodeURIComponent(e.newURL);
@@ -638,47 +643,37 @@ AboutReader.prototype = {
}
this._showContent(article);
- }),
-
- _getArticle: function(url) {
- return new Promise((resolve, reject) => {
- let listener = (message) => {
- this._mm.removeMessageListener("Reader:ArticleData", listener);
- if (message.data.newURL) {
- reject({ newURL: message.data.newURL });
- return;
- }
- resolve(message.data.article);
- };
- this._mm.addMessageListener("Reader:ArticleData", listener);
- this._mm.sendAsyncMessage("Reader:ArticleGet", { url: url });
- });
},
- _requestFavicon: function() {
- let handleFaviconReturn = (message) => {
- this._mm.removeMessageListener("Reader:FaviconReturn", handleFaviconReturn);
- this._loadFavicon(message.data.url, message.data.faviconUrl);
- };
+ _getArticle(url) {
+ return ReaderMode.downloadAndParseDocument(url);
+ },
- this._mm.addMessageListener("Reader:FaviconReturn", handleFaviconReturn);
- this._mm.sendAsyncMessage("Reader:FaviconRequest", { url: this._article.url });
+ _requestFavicon() {
+ let faviconUrl = PlacesUtils.promiseFaviconLinkUrl(this._article.url);
+ var self = this;
+ faviconUrl.then(function onResolution(favicon) {
+ self._loadFavicon(self._article.url, favicon.path.replace(/^favicon:/, ""));
+ },
+ function onRejection(reason) {
+ Cu.reportError("Error requesting favicon URL for about:reader content: " + reason);
+ }).catch(Cu.reportError);
},
- _loadFavicon: function(url, faviconUrl) {
+ _loadFavicon(url, faviconUrl) {
if (this._article.url !== url)
return;
let doc = this._doc;
- let link = doc.createElement('link');
- link.rel = 'shortcut icon';
+ let link = doc.createElement("link");
+ link.rel = "shortcut icon";
link.href = faviconUrl;
- doc.getElementsByTagName('head')[0].appendChild(link);
+ doc.getElementsByTagName("head")[0].appendChild(link);
},
- _updateImageMargins: function() {
+ _updateImageMargins() {
let windowWidth = this._win.innerWidth;
let bodyWidth = this._doc.body.clientWidth;
@@ -691,7 +686,7 @@ AboutReader.prototype = {
}
// If the image is at least half as wide as the body, center it on desktop.
- if (img.naturalWidth >= bodyWidth/2) {
+ if (img.naturalWidth >= bodyWidth / 2) {
img.setAttribute("moz-reader-center", true);
} else {
img.removeAttribute("moz-reader-center");
@@ -713,30 +708,32 @@ AboutReader.prototype = {
},
_maybeSetTextDirection: function Read_maybeSetTextDirection(article) {
- if (!article.dir)
- return;
+ if (article.dir) {
+ // Set "dir" attribute on content
+ this._contentElement.setAttribute("dir", article.dir);
+ this._headerElement.setAttribute("dir", article.dir);
+
+ // The native locale could be set differently than the article's text direction.
+ var localeDirection = Services.locale.isAppLocaleRTL ? "rtl" : "ltr";
+ this._readTimeElement.setAttribute("dir", localeDirection);
+ this._readTimeElement.style.textAlign = article.dir == "rtl" ? "right" : "left";
+ }
+ },
- // Set "dir" attribute on content
- this._contentElement.setAttribute("dir", article.dir);
- this._headerElement.setAttribute("dir", article.dir);
- },
-
- _fixLocalLinks() {
- // We need to do this because preprocessing the content through nsIParserUtils
- // gives back a DOM with a <base> element. That influences how these URLs get
- // resolved, making them no longer match the document URI (which is
- // about:reader?url=...). To fix this, make all the hash URIs absolute. This
- // is hacky, but the alternative of removing the base element has potential
- // security implications if Readability has not successfully made all the URLs
- // absolute, so we pick just fixing these in-document links explicitly.
- let localLinks = this._contentElement.querySelectorAll("a[href^='#']");
- for (let localLink of localLinks) {
- // Have to get the attribute because .href provides an absolute URI.
- localLink.href = this._doc.documentURI + localLink.getAttribute("href");
+ _formatReadTime(slowEstimate, fastEstimate) {
+ let displayStringKey = "aboutReader.estimatedReadTimeRange1";
+
+ // only show one reading estimate when they are the same value
+ if (slowEstimate == fastEstimate) {
+ displayStringKey = "aboutReader.estimatedReadTimeValue1";
}
+
+ return PluralForm.get(slowEstimate, gStrings.GetStringFromName(displayStringKey))
+ .replace("#1", fastEstimate)
+ .replace("#2", slowEstimate);
},
- _showError: function() {
+ _showError() {
this._headerElement.style.display = "none";
this._contentElement.style.display = "none";
@@ -746,11 +743,16 @@ AboutReader.prototype = {
this._doc.title = errorMessage;
+ this._doc.documentElement.dataset.isError = true;
+
this._error = true;
+
+ this._doc.dispatchEvent(
+ new this._win.CustomEvent("AboutReaderContentError", { bubbles: true, cancelable: false }));
},
// This function is the JS version of Java's StringUtils.stripCommonSubdomains.
- _stripHost: function(host) {
+ _stripHost(host) {
if (!host)
return host;
@@ -766,17 +768,18 @@ AboutReader.prototype = {
return host.substring(start);
},
- _showContent: function(article) {
+ _showContent(article) {
this._messageElement.style.display = "none";
this._article = article;
this._domainElement.href = article.url;
- let articleUri = Services.io.newURI(article.url, null, null);
+ let articleUri = Services.io.newURI(article.url);
this._domainElement.textContent = this._stripHost(articleUri.host);
this._creditsElement.textContent = article.byline;
this._titleElement.textContent = article.title;
+ this._readTimeElement.textContent = this._formatReadTime(article.readingTimeMinsSlow, article.readingTimeMinsFast);
this._doc.title = article.title;
this._headerElement.style.display = "block";
@@ -787,8 +790,8 @@ AboutReader.prototype = {
false, articleUri, this._contentElement);
this._contentElement.innerHTML = "";
this._contentElement.appendChild(contentFragment);
- this._fixLocalLinks();
this._maybeSetTextDirection(article);
+ this._foundLanguage(article.language);
this._contentElement.style.display = "block";
this._updateImageMargins();
@@ -804,13 +807,13 @@ AboutReader.prototype = {
new this._win.CustomEvent("AboutReaderContentReady", { bubbles: true, cancelable: false }));
},
- _hideContent: function() {
+ _hideContent() {
this._headerElement.style.display = "none";
this._contentElement.style.display = "none";
},
- _showProgressDelayed: function() {
- this._win.setTimeout(function() {
+ _showProgressDelayed() {
+ this._win.setTimeout(() => {
// No need to show progress if the article has been loaded,
// if the window has been unloaded, or if there was an error
// trying to load the article.
@@ -823,20 +826,20 @@ AboutReader.prototype = {
this._messageElement.textContent = gStrings.GetStringFromName("aboutReader.loading2");
this._messageElement.style.display = "block";
- }.bind(this), 300);
+ }, 300);
},
/**
* Returns the original article URL for this about:reader view.
*/
- _getOriginalUrl: function(win) {
+ _getOriginalUrl(win) {
let url = win ? win.location.href : this._win.location.href;
return ReaderMode.getOriginalUrl(url) || url;
},
- _setupSegmentedButton: function(id, options, initialValue, callback) {
+ _setupSegmentedButton(id, options, initialValue, callback) {
let doc = this._doc;
- let segmentedButton = doc.getElementById(id);
+ let segmentedButton = doc.getElementsByClassName(id)[0];
for (let i = 0; i < options.length; i++) {
let option = options[i];
@@ -867,10 +870,6 @@ AboutReader.prototype = {
aEvent.stopPropagation();
- // Just pass the ID of the button as an extra and hope the ID doesn't change
- // unless the context changes
- UITelemetry.addEvent("action.1", "button", null, id);
-
let items = segmentedButton.children;
for (let j = items.length - 1; j >= 0; j--) {
items[j].classList.remove("selected");
@@ -878,19 +877,19 @@ AboutReader.prototype = {
item.classList.add("selected");
callback(option.value);
- }.bind(this), true);
+ }, true);
if (option.value === initialValue)
item.classList.add("selected");
}
},
- _setupButton: function(id, callback, titleEntity, textEntity) {
+ _setupButton(id, callback, titleEntity, textEntity) {
if (titleEntity) {
this._setButtonTip(id, titleEntity);
}
- let button = this._doc.getElementById(id);
+ let button = this._doc.getElementsByClassName(id)[0];
if (textEntity) {
button.textContent = gStrings.GetStringFromName(textEntity);
}
@@ -910,17 +909,17 @@ AboutReader.prototype = {
* and dynamically as button state changes.
* @param Localizable string providing UI element usage tip.
*/
- _setButtonTip: function(id, titleEntity) {
- let button = this._doc.getElementById(id);
+ _setButtonTip(id, titleEntity) {
+ let button = this._doc.getElementsByClassName(id)[0];
button.setAttribute("title", gStrings.GetStringFromName(titleEntity));
},
- _setupStyleDropdown: function() {
- let dropdownToggle = this._doc.querySelector("#style-dropdown .dropdown-toggle");
+ _setupStyleDropdown() {
+ let dropdownToggle = this._doc.querySelector(".style-dropdown .dropdown-toggle");
dropdownToggle.setAttribute("title", gStrings.GetStringFromName("aboutReader.toolbar.typeControls"));
},
- _updatePopupPosition: function(dropdown) {
+ _updatePopupPosition(dropdown) {
let dropdownToggle = dropdown.querySelector(".dropdown-toggle");
let dropdownPopup = dropdown.querySelector(".dropdown-popup");
@@ -931,8 +930,8 @@ AboutReader.prototype = {
dropdownPopup.style.top = popupTop + "px";
},
- _toggleDropdownClicked: function(event) {
- let dropdown = event.target.closest('.dropdown');
+ _toggleDropdownClicked(event) {
+ let dropdown = event.target.closest(".dropdown");
if (!dropdown)
return;
@@ -952,16 +951,13 @@ AboutReader.prototype = {
/*
* If the ReaderView banner font-dropdown is closed, open it.
*/
- _openDropdown: function(dropdown) {
+ _openDropdown(dropdown) {
if (dropdown.classList.contains("open")) {
return;
}
this._closeDropdowns();
-
- // Trigger BackPressListener initialization in Android.
dropdown.classList.add("open");
- this._mm.sendAsyncMessage("Reader:DropdownOpened", this.viewId);
},
/*
@@ -969,7 +965,7 @@ AboutReader.prototype = {
* dropdowns because the page is scrolling, allow popups to stay open with
* the keep-open class.
*/
- _closeDropdowns: function(scrolling) {
+ _closeDropdowns(scrolling) {
let selector = ".dropdown.open";
if (scrolling) {
selector += ":not(.keep-open)";
@@ -979,10 +975,17 @@ AboutReader.prototype = {
for (let dropdown of openDropdowns) {
dropdown.classList.remove("open");
}
+ },
- // Trigger BackPressListener cleanup in Android.
- if (openDropdowns.length) {
- this._mm.sendAsyncMessage("Reader:DropdownClosed", this.viewId);
+ /*
+ * Override link handling for same-page references so we don't exit Reader View.
+ */
+ _linkClicked(event) {
+ var originalUrl = Services.io.newURI(this._getOriginalUrl(), null, null);
+ var targetUrl = Services.io.newURI(event.target.href, null, null);
+ if (originalUrl.specIgnoringRef == targetUrl.specIgnoringRef) {
+ event.preventDefault();
+ this._goToReference(targetUrl.ref);
}
},
diff --git a/toolkit/components/reader/JSDOMParser.js b/toolkit/components/reader/JSDOMParser.js
index 853649775..38f59c4ea 100644
--- a/toolkit/components/reader/JSDOMParser.js
+++ b/toolkit/components/reader/JSDOMParser.js
@@ -1017,46 +1017,6 @@
}
},
- readScript: function (node) {
- while (this.currentChar < this.html.length) {
- var c = this.nextChar();
- var nextC = this.peekNext();
- if (c === "<") {
- if (nextC === "!" || nextC === "?") {
- // We're still before the ! or ? that is starting this comment:
- this.currentChar++;
- node.appendChild(this.discardNextComment());
- continue;
- }
- if (nextC === "/" && this.html.substr(this.currentChar, 8 /*"/script>".length */).toLowerCase() == "/script>") {
- // Go back before the '<' so we find the end tag.
- this.currentChar--;
- // Done with this script tag, the caller will close:
- return;
- }
- }
- // Either c wasn't a '<' or it was but we couldn't find either a comment
- // or a closing script tag, so we should just parse as text until the next one
- // comes along:
-
- var haveTextNode = node.lastChild && node.lastChild.nodeType === Node.TEXT_NODE;
- var textNode = haveTextNode ? node.lastChild : new Text();
- var n = this.html.indexOf("<", this.currentChar);
- // Decrement this to include the current character *afterwards* so we don't get stuck
- // looking for the same < all the time.
- this.currentChar--;
- if (n === -1) {
- textNode.innerHTML += this.html.substring(this.currentChar, this.html.length);
- this.currentChar = this.html.length;
- } else {
- textNode.innerHTML += this.html.substring(this.currentChar, n);
- this.currentChar = n;
- }
- if (!haveTextNode)
- node.appendChild(textNode);
- }
- },
-
discardNextComment: function() {
if (this.match("--")) {
this.discardTo("-->");
@@ -1131,11 +1091,7 @@
// If this isn't a void Element, read its child nodes
if (!closed) {
- if (localName == "script") {
- this.readScript(node);
- } else {
- this.readChildren(node);
- }
+ this.readChildren(node);
var closingTag = "</" + localName + ">";
if (!this.match(closingTag)) {
this.error("expected '" + closingTag + "' and got " + this.html.substr(this.currentChar, closingTag.length));
diff --git a/toolkit/components/reader/Readability.js b/toolkit/components/reader/Readability.js
index 491461a8e..04949dc61 100644
--- a/toolkit/components/reader/Readability.js
+++ b/toolkit/components/reader/Readability.js
@@ -38,32 +38,22 @@ function Readability(uri, doc, options) {
this._uri = uri;
this._doc = doc;
- this._biggestFrame = false;
+ this._articleTitle = null;
this._articleByline = null;
this._articleDir = null;
- // Configureable options
+ // Configurable options
this._debug = !!options.debug;
this._maxElemsToParse = options.maxElemsToParse || this.DEFAULT_MAX_ELEMS_TO_PARSE;
this._nbTopCandidates = options.nbTopCandidates || this.DEFAULT_N_TOP_CANDIDATES;
- this._maxPages = options.maxPages || this.DEFAULT_MAX_PAGES;
+ this._wordThreshold = options.wordThreshold || this.DEFAULT_WORD_THRESHOLD;
+ this._classesToPreserve = this.CLASSES_TO_PRESERVE.concat(options.classesToPreserve || []);
// Start with all flags set
this._flags = this.FLAG_STRIP_UNLIKELYS |
this.FLAG_WEIGHT_CLASSES |
this.FLAG_CLEAN_CONDITIONALLY;
- // The list of pages we've parsed in this call of readability,
- // for autopaging. As a key store for easier searching.
- this._parsedPages = {};
-
- // A list of the ETag headers of pages we've parsed, in case they happen to match,
- // we'll know it's a duplicate.
- this._pageETags = {};
-
- // Make an AJAX request for each page and append it to the document.
- this._curPageNum = 1;
-
var logEl;
// Control whether log messages are sent to the console
@@ -82,12 +72,12 @@ function Readability(uri, doc, options) {
return rv + elDesc;
};
this.log = function () {
- if (typeof dump !== undefined) {
+ if (typeof dump !== "undefined") {
var msg = Array.prototype.map.call(arguments, function(x) {
return (x && x.nodeName) ? logEl(x) : x;
}).join(" ");
dump("Reader: (Readability) " + msg + "\n");
- } else if (typeof console !== undefined) {
+ } else if (typeof console !== "undefined") {
var args = ["Reader: (Readability) "].concat(arguments);
console.log.apply(console, args);
}
@@ -109,20 +99,19 @@ Readability.prototype = {
// tight the competition is among candidates.
DEFAULT_N_TOP_CANDIDATES: 5,
- // The maximum number of pages to loop through before we call
- // it quits and just show a link.
- DEFAULT_MAX_PAGES: 5,
-
// Element tags to score by default.
DEFAULT_TAGS_TO_SCORE: "section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),
+ // The default number of words an article must have in order to return a result
+ DEFAULT_WORD_THRESHOLD: 500,
+
// All of the regular expressions in use within readability.
// Defined up here so we don't instantiate them repeatedly in loops.
REGEXPS: {
- unlikelyCandidates: /banner|combx|comment|community|disqus|extra|foot|header|menu|modal|related|remark|rss|share|shoutbox|sidebar|skyscraper|sponsor|ad-break|agegate|pagination|pager|popup/i,
+ unlikelyCandidates: /banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|foot|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,
okMaybeItsACandidate: /and|article|body|column|main|shadow/i,
positive: /article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,
- negative: /hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|masthead|media|meta|modal|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,
+ negative: /hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,
extraneous: /print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,
byline: /byline|author|dateline|writtenby|p-author/i,
replaceFonts: /<(\/?)font[^>]*>/gi,
@@ -138,6 +127,13 @@ Readability.prototype = {
ALTER_TO_DIV_EXCEPTIONS: ["DIV", "ARTICLE", "SECTION", "P"],
+ PRESENTATIONAL_ATTRIBUTES: [ "align", "background", "bgcolor", "border", "cellpadding", "cellspacing", "frame", "hspace", "rules", "style", "valign", "vspace" ],
+
+ DEPRECATED_SIZE_ATTRIBUTE_ELEMS: [ "TABLE", "TH", "TD", "HR", "PRE" ],
+
+ // These are the classes that readability sets itself.
+ CLASSES_TO_PRESERVE: [ "readability-styled", "page" ],
+
/**
* Run any post-process modifications to article content as necessary.
*
@@ -147,6 +143,9 @@ Readability.prototype = {
_postProcessContent: function(articleContent) {
// Readability cannot open relative uris so we convert them to absolute uris.
this._fixRelativeUris(articleContent);
+
+ // Remove classes.
+ this._cleanClasses(articleContent);
},
/**
@@ -155,8 +154,8 @@ Readability.prototype = {
*
* If function is not passed, removes all the nodes in node list.
*
- * @param NodeList nodeList The no
- * @param Function filterFn
+ * @param NodeList nodeList The nodes to operate on
+ * @param Function filterFn the function to use as a filter
* @return void
*/
_removeNodes: function(nodeList, filterFn) {
@@ -172,6 +171,20 @@ Readability.prototype = {
},
/**
+ * Iterates over a NodeList, and calls _setNodeTag for each node.
+ *
+ * @param NodeList nodeList The nodes to operate on
+ * @param String newTagName the new tag name to use
+ * @return void
+ */
+ _replaceNodeTags: function(nodeList, newTagName) {
+ for (var i = nodeList.length - 1; i >= 0; i--) {
+ var node = nodeList[i];
+ this._setNodeTag(node, newTagName);
+ }
+ },
+
+ /**
* Iterate over a NodeList, which doesn't natively fully implement the Array
* interface.
*
@@ -180,10 +193,9 @@ Readability.prototype = {
*
* @param NodeList nodeList The NodeList.
* @param Function fn The iterate function.
- * @param Boolean backward Whether to use backward iteration.
* @return void
*/
- _forEachNode: function(nodeList, fn, backward) {
+ _forEachNode: function(nodeList, fn) {
Array.prototype.forEach.call(nodeList, fn, this);
},
@@ -228,6 +240,34 @@ Readability.prototype = {
},
/**
+ * Removes the class="" attribute from every element in the given
+ * subtree, except those that match CLASSES_TO_PRESERVE and
+ * the classesToPreserve array from the options object.
+ *
+ * @param Element
+ * @return void
+ */
+ _cleanClasses: function(node) {
+ var classesToPreserve = this._classesToPreserve;
+ var className = (node.getAttribute("class") || "")
+ .split(/\s+/)
+ .filter(function(cls) {
+ return classesToPreserve.indexOf(cls) != -1;
+ })
+ .join(" ");
+
+ if (className) {
+ node.setAttribute("class", className);
+ } else {
+ node.removeAttribute("class");
+ }
+
+ for (node = node.firstElementChild; node; node = node.nextElementSibling) {
+ this._cleanClasses(node);
+ }
+ },
+
+ /**
* Converts each <a> and <img> uri in the given element to an absolute URI,
* ignoring #ref URIs.
*
@@ -307,11 +347,20 @@ Readability.prototype = {
curTitle = origTitle = this._getInnerText(doc.getElementsByTagName('title')[0]);
} catch (e) {/* ignore exceptions setting the title. */}
- if (curTitle.match(/ [\|\-] /)) {
- curTitle = origTitle.replace(/(.*)[\|\-] .*/gi, '$1');
+ var titleHadHierarchicalSeparators = false;
+ function wordCount(str) {
+ return str.split(/\s+/).length;
+ }
+
+ // If there's a separator in the title, first remove the final part
+ if ((/ [\|\-\\\/>»] /).test(curTitle)) {
+ titleHadHierarchicalSeparators = / [\\\/>»] /.test(curTitle);
+ curTitle = origTitle.replace(/(.*)[\|\-\\\/>»] .*/gi, '$1');
- if (curTitle.split(' ').length < 3)
- curTitle = origTitle.replace(/[^\|\-]*[\|\-](.*)/gi, '$1');
+ // If the resulting title is too short (3 words or fewer), remove
+ // the first part instead:
+ if (wordCount(curTitle) < 3)
+ curTitle = origTitle.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi, '$1');
} else if (curTitle.indexOf(': ') !== -1) {
// Check if we have an heading containing this exact string, so we
// could assume it's the full title.
@@ -328,8 +377,13 @@ Readability.prototype = {
curTitle = origTitle.substring(origTitle.lastIndexOf(':') + 1);
// If the title is now too short, try the first colon instead:
- if (curTitle.split(' ').length < 3)
+ if (wordCount(curTitle) < 3) {
curTitle = origTitle.substring(origTitle.indexOf(':') + 1);
+ // But if we have too many words before the colon there's something weird
+ // with the titles and the H tags so let's just use the original title instead
+ } else if (wordCount(origTitle.substr(0, origTitle.indexOf(':'))) > 5) {
+ curTitle = origTitle;
+ }
}
} else if (curTitle.length > 150 || curTitle.length < 15) {
var hOnes = doc.getElementsByTagName('h1');
@@ -339,9 +393,16 @@ Readability.prototype = {
}
curTitle = curTitle.trim();
-
- if (curTitle.split(' ').length <= 4)
+ // If we now have 4 words or fewer as our title, and either no
+ // 'hierarchical' separators (\, /, > or ») were found in the original
+ // title or we decreased the number of words by more than 1 word, use
+ // the original title.
+ var curTitleWordCount = wordCount(curTitle);
+ if (curTitleWordCount <= 4 &&
+ (!titleHadHierarchicalSeparators ||
+ curTitleWordCount != wordCount(origTitle.replace(/[\|\-\\\/>»]+/g, "")) - 1)) {
curTitle = origTitle;
+ }
return curTitle;
},
@@ -362,9 +423,7 @@ Readability.prototype = {
this._replaceBrs(doc.body);
}
- this._forEachNode(doc.getElementsByTagName("font"), function(fontNode) {
- this._setNodeTag(fontNode, "SPAN");
- });
+ this._replaceNodeTags(doc.getElementsByTagName("font"), "SPAN");
},
/**
@@ -464,19 +523,49 @@ Readability.prototype = {
_prepArticle: function(articleContent) {
this._cleanStyles(articleContent);
+ // Check for data tables before we continue, to avoid removing items in
+ // those tables, which will often be isolated even though they're
+ // visually linked to other content-ful elements (text, images, etc.).
+ this._markDataTables(articleContent);
+
// Clean out junk from the article content
this._cleanConditionally(articleContent, "form");
+ this._cleanConditionally(articleContent, "fieldset");
this._clean(articleContent, "object");
this._clean(articleContent, "embed");
this._clean(articleContent, "h1");
this._clean(articleContent, "footer");
- // If there is only one h2, they are probably using it as a header
- // and not a subheader, so remove it since we already have a header.
- if (articleContent.getElementsByTagName('h2').length === 1)
- this._clean(articleContent, "h2");
+ // Clean out elements have "share" in their id/class combinations from final top candidates,
+ // which means we don't remove the top candidates even they have "share".
+ this._forEachNode(articleContent.children, function(topCandidate) {
+ this._cleanMatchedNodes(topCandidate, /share/);
+ });
+
+ // If there is only one h2 and its text content substantially equals article title,
+ // they are probably using it as a header and not a subheader,
+ // so remove it since we already extract the title separately.
+ var h2 = articleContent.getElementsByTagName('h2');
+ if (h2.length === 1) {
+ var lengthSimilarRate = (h2[0].textContent.length - this._articleTitle.length) / this._articleTitle.length;
+ if (Math.abs(lengthSimilarRate) < 0.5) {
+ var titlesMatch = false;
+ if (lengthSimilarRate > 0) {
+ titlesMatch = h2[0].textContent.includes(this._articleTitle);
+ } else {
+ titlesMatch = this._articleTitle.includes(h2[0].textContent);
+ }
+ if (titlesMatch) {
+ this._clean(articleContent, "h2");
+ }
+ }
+ }
this._clean(articleContent, "iframe");
+ this._clean(articleContent, "input");
+ this._clean(articleContent, "textarea");
+ this._clean(articleContent, "select");
+ this._clean(articleContent, "button");
this._cleanHeaders(articleContent);
// Do these last as the previous stuff may have removed junk
@@ -662,9 +751,6 @@ Readability.prototype = {
var pageCacheHtml = page.innerHTML;
- // Check if any "dir" is set on the toplevel document element
- this._articleDir = doc.documentElement.getAttribute("dir");
-
while (true) {
var stripUnlikelyCandidates = this._flagIsActive(this.FLAG_STRIP_UNLIKELYS);
@@ -695,6 +781,15 @@ Readability.prototype = {
}
}
+ // Remove DIV, SECTION, and HEADER nodes without any content(e.g. text, image, video, or iframe).
+ if ((node.tagName === "DIV" || node.tagName === "SECTION" || node.tagName === "HEADER" ||
+ node.tagName === "H1" || node.tagName === "H2" || node.tagName === "H3" ||
+ node.tagName === "H4" || node.tagName === "H5" || node.tagName === "H6") &&
+ this._isElementWithoutContent(node)) {
+ node = this._removeAndGetNext(node);
+ continue;
+ }
+
if (this.DEFAULT_TAGS_TO_SCORE.indexOf(node.tagName) !== -1) {
elementsToScore.push(node);
}
@@ -709,13 +804,14 @@ Readability.prototype = {
var newNode = node.children[0];
node.parentNode.replaceChild(newNode, node);
node = newNode;
+ elementsToScore.push(node);
} else if (!this._hasChildBlockElement(node)) {
node = this._setNodeTag(node, "P");
elementsToScore.push(node);
} else {
// EXPERIMENTAL
this._forEachNode(node.childNodes, function(childNode) {
- if (childNode.nodeType === Node.TEXT_NODE) {
+ if (childNode.nodeType === Node.TEXT_NODE && childNode.textContent.trim().length > 0) {
var p = doc.createElement('p');
p.textContent = childNode.textContent;
p.style.display = 'inline';
@@ -812,6 +908,7 @@ Readability.prototype = {
var topCandidate = topCandidates[0] || null;
var neededToCreateTopCandidate = false;
+ var parentOfTopCandidate;
// If we still have no top candidate, just use the body as a last resort.
// We also have to copy the body node so it is something we can modify.
@@ -831,6 +928,33 @@ Readability.prototype = {
this._initializeNode(topCandidate);
} else if (topCandidate) {
+ // Find a better top candidate node if it contains (at least three) nodes which belong to `topCandidates` array
+ // and whose scores are quite closed with current `topCandidate` node.
+ var alternativeCandidateAncestors = [];
+ for (var i = 1; i < topCandidates.length; i++) {
+ if (topCandidates[i].readability.contentScore / topCandidate.readability.contentScore >= 0.75) {
+ alternativeCandidateAncestors.push(this._getNodeAncestors(topCandidates[i]));
+ }
+ }
+ var MINIMUM_TOPCANDIDATES = 3;
+ if (alternativeCandidateAncestors.length >= MINIMUM_TOPCANDIDATES) {
+ parentOfTopCandidate = topCandidate.parentNode;
+ while (parentOfTopCandidate.tagName !== "BODY") {
+ var listsContainingThisAncestor = 0;
+ for (var ancestorIndex = 0; ancestorIndex < alternativeCandidateAncestors.length && listsContainingThisAncestor < MINIMUM_TOPCANDIDATES; ancestorIndex++) {
+ listsContainingThisAncestor += Number(alternativeCandidateAncestors[ancestorIndex].includes(parentOfTopCandidate));
+ }
+ if (listsContainingThisAncestor >= MINIMUM_TOPCANDIDATES) {
+ topCandidate = parentOfTopCandidate;
+ break;
+ }
+ parentOfTopCandidate = parentOfTopCandidate.parentNode;
+ }
+ }
+ if (!topCandidate.readability) {
+ this._initializeNode(topCandidate);
+ }
+
// Because of our bonus system, parents of candidates might have scores
// themselves. They get half of the node. There won't be nodes with higher
// scores than our topCandidate, but if we see the score going *up* in the first
@@ -838,11 +962,15 @@ Readability.prototype = {
// lurking in other places that we want to unify in. The sibling stuff
// below does some of that - but only if we've looked high enough up the DOM
// tree.
- var parentOfTopCandidate = topCandidate.parentNode;
+ parentOfTopCandidate = topCandidate.parentNode;
var lastScore = topCandidate.readability.contentScore;
// The scores shouldn't get too low.
var scoreThreshold = lastScore / 3;
- while (parentOfTopCandidate && parentOfTopCandidate.readability) {
+ while (parentOfTopCandidate.tagName !== "BODY") {
+ if (!parentOfTopCandidate.readability) {
+ parentOfTopCandidate = parentOfTopCandidate.parentNode;
+ continue;
+ }
var parentScore = parentOfTopCandidate.readability.contentScore;
if (parentScore < scoreThreshold)
break;
@@ -854,6 +982,17 @@ Readability.prototype = {
lastScore = parentOfTopCandidate.readability.contentScore;
parentOfTopCandidate = parentOfTopCandidate.parentNode;
}
+
+ // If the top candidate is the only child, use parent instead. This will help sibling
+ // joining logic when adjacent content is actually located in parent's sibling node.
+ parentOfTopCandidate = topCandidate.parentNode;
+ while (parentOfTopCandidate.tagName != "BODY" && parentOfTopCandidate.children.length == 1) {
+ topCandidate = parentOfTopCandidate;
+ parentOfTopCandidate = topCandidate.parentNode;
+ }
+ if (!topCandidate.readability) {
+ this._initializeNode(topCandidate);
+ }
}
// Now that we have the top candidate, look through its siblings for content
@@ -864,7 +1003,9 @@ Readability.prototype = {
articleContent.id = "readability-content";
var siblingScoreThreshold = Math.max(10, topCandidate.readability.contentScore * 0.2);
- var siblings = topCandidate.parentNode.children;
+ // Keep potential top candidate's parent node to try to get text direction of it later.
+ parentOfTopCandidate = topCandidate.parentNode;
+ var siblings = parentOfTopCandidate.children;
for (var s = 0, sl = siblings.length; s < sl; s++) {
var sibling = siblings[s];
@@ -927,24 +1068,22 @@ Readability.prototype = {
if (this._debug)
this.log("Article content post-prep: " + articleContent.innerHTML);
- if (this._curPageNum === 1) {
- if (neededToCreateTopCandidate) {
- // We already created a fake div thing, and there wouldn't have been any siblings left
- // for the previous loop, so there's no point trying to create a new div, and then
- // move all the children over. Just assign IDs and class names here. No need to append
- // because that already happened anyway.
- topCandidate.id = "readability-page-1";
- topCandidate.className = "page";
- } else {
- var div = doc.createElement("DIV");
- div.id = "readability-page-1";
- div.className = "page";
- var children = articleContent.childNodes;
- while (children.length) {
- div.appendChild(children[0]);
- }
- articleContent.appendChild(div);
+ if (neededToCreateTopCandidate) {
+ // We already created a fake div thing, and there wouldn't have been any siblings left
+ // for the previous loop, so there's no point trying to create a new div, and then
+ // move all the children over. Just assign IDs and class names here. No need to append
+ // because that already happened anyway.
+ topCandidate.id = "readability-page-1";
+ topCandidate.className = "page";
+ } else {
+ var div = doc.createElement("DIV");
+ div.id = "readability-page-1";
+ div.className = "page";
+ var children = articleContent.childNodes;
+ while (children.length) {
+ div.appendChild(children[0]);
}
+ articleContent.appendChild(div);
}
if (this._debug)
@@ -955,7 +1094,7 @@ Readability.prototype = {
// grabArticle with different flags set. This gives us a higher likelihood of
// finding the content, and the sieve approach gives us a higher likelihood of
// finding the -right- content.
- if (this._getInnerText(articleContent, true).length < 500) {
+ if (this._getInnerText(articleContent, true).length < this._wordThreshold) {
page.innerHTML = pageCacheHtml;
if (this._flagIsActive(this.FLAG_STRIP_UNLIKELYS)) {
@@ -968,6 +1107,18 @@ Readability.prototype = {
return null;
}
} else {
+ // Find out text direction from ancestors of final top candidate.
+ var ancestors = [parentOfTopCandidate, topCandidate].concat(this._getNodeAncestors(parentOfTopCandidate));
+ this._someNode(ancestors, function(ancestor) {
+ if (!ancestor.tagName)
+ return false;
+ var articleDir = ancestor.getAttribute("dir");
+ if (articleDir) {
+ this._articleDir = articleDir;
+ return true;
+ }
+ return false;
+ });
return articleContent;
}
}
@@ -1044,12 +1195,15 @@ Readability.prototype = {
metadata.excerpt = values["twitter:description"];
}
- if ("og:title" in values) {
- // Use facebook open graph title.
- metadata.title = values["og:title"];
- } else if ("twitter:title" in values) {
- // Use twitter cards title.
- metadata.title = values["twitter:title"];
+ metadata.title = this._getArticleTitle();
+ if (!metadata.title) {
+ if ("og:title" in values) {
+ // Use facebook open graph title.
+ metadata.title = values["og:title"];
+ } else if ("twitter:title" in values) {
+ // Use twitter cards title.
+ metadata.title = values["twitter:title"];
+ }
}
return metadata;
@@ -1089,6 +1243,13 @@ Readability.prototype = {
});
},
+ _isElementWithoutContent: function(node) {
+ return node.nodeType === Node.ELEMENT_NODE &&
+ node.textContent.trim().length == 0 &&
+ (node.children.length == 0 ||
+ node.children.length == node.getElementsByTagName("br").length + node.getElementsByTagName("hr").length);
+ },
+
/**
* Determine whether element has any children block level elements.
*
@@ -1139,26 +1300,25 @@ Readability.prototype = {
* @return void
**/
_cleanStyles: function(e) {
- e = e || this._doc;
- if (!e)
+ if (!e || e.tagName.toLowerCase() === 'svg')
return;
- var cur = e.firstChild;
- // Remove any root styles, if we're able.
- if (typeof e.removeAttribute === 'function' && e.className !== 'readability-styled')
- e.removeAttribute('style');
-
- // Go until there are no more child nodes
- while (cur !== null) {
- if (cur.nodeType === cur.ELEMENT_NODE) {
- // Remove style attribute(s) :
- if (cur.className !== "readability-styled")
- cur.removeAttribute("style");
+ if (e.className !== 'readability-styled') {
+ // Remove `style` and deprecated presentational attributes
+ for (var i = 0; i < this.PRESENTATIONAL_ATTRIBUTES.length; i++) {
+ e.removeAttribute(this.PRESENTATIONAL_ATTRIBUTES[i]);
+ }
- this._cleanStyles(cur);
+ if (this.DEPRECATED_SIZE_ATTRIBUTE_ELEMS.indexOf(e.tagName) !== -1) {
+ e.removeAttribute('width');
+ e.removeAttribute('height');
}
+ }
- cur = cur.nextSibling;
+ var cur = e.firstElementChild;
+ while (cur !== null) {
+ this._cleanStyles(cur);
+ cur = cur.nextElementSibling;
}
},
@@ -1185,368 +1345,6 @@ Readability.prototype = {
},
/**
- * Find a cleaned up version of the current URL, to use for comparing links for possible next-pageyness.
- *
- * @author Dan Lacy
- * @return string the base url
- **/
- _findBaseUrl: function() {
- var uri = this._uri;
- var noUrlParams = uri.path.split("?")[0];
- var urlSlashes = noUrlParams.split("/").reverse();
- var cleanedSegments = [];
- var possibleType = "";
-
- for (var i = 0, slashLen = urlSlashes.length; i < slashLen; i += 1) {
- var segment = urlSlashes[i];
-
- // Split off and save anything that looks like a file type.
- if (segment.indexOf(".") !== -1) {
- possibleType = segment.split(".")[1];
-
- // If the type isn't alpha-only, it's probably not actually a file extension.
- if (!possibleType.match(/[^a-zA-Z]/))
- segment = segment.split(".")[0];
- }
-
- // EW-CMS specific segment replacement. Ugly.
- // Example: http://www.ew.com/ew/article/0,,20313460_20369436,00.html
- if (segment.indexOf(',00') !== -1)
- segment = segment.replace(',00', '');
-
- // If our first or second segment has anything looking like a page number, remove it.
- if (segment.match(/((_|-)?p[a-z]*|(_|-))[0-9]{1,2}$/i) && ((i === 1) || (i === 0)))
- segment = segment.replace(/((_|-)?p[a-z]*|(_|-))[0-9]{1,2}$/i, "");
-
- var del = false;
-
- // If this is purely a number, and it's the first or second segment,
- // it's probably a page number. Remove it.
- if (i < 2 && segment.match(/^\d{1,2}$/))
- del = true;
-
- // If this is the first segment and it's just "index", remove it.
- if (i === 0 && segment.toLowerCase() === "index")
- del = true;
-
- // If our first or second segment is smaller than 3 characters,
- // and the first segment was purely alphas, remove it.
- if (i < 2 && segment.length < 3 && !urlSlashes[0].match(/[a-z]/i))
- del = true;
-
- // If it's not marked for deletion, push it to cleanedSegments.
- if (!del)
- cleanedSegments.push(segment);
- }
-
- // This is our final, cleaned, base article URL.
- return uri.scheme + "://" + uri.host + cleanedSegments.reverse().join("/");
- },
-
- /**
- * Look for any paging links that may occur within the document.
- *
- * @param body
- * @return object (array)
- **/
- _findNextPageLink: function(elem) {
- var uri = this._uri;
- var possiblePages = {};
- var allLinks = elem.getElementsByTagName('a');
- var articleBaseUrl = this._findBaseUrl();
-
- // Loop through all links, looking for hints that they may be next-page links.
- // Things like having "page" in their textContent, className or id, or being a child
- // of a node with a page-y className or id.
- //
- // Also possible: levenshtein distance? longest common subsequence?
- //
- // After we do that, assign each page a score, and
- for (var i = 0, il = allLinks.length; i < il; i += 1) {
- var link = allLinks[i];
- var linkHref = allLinks[i].href.replace(/#.*$/, '').replace(/\/$/, '');
-
- // If we've already seen this page, ignore it.
- if (linkHref === "" ||
- linkHref === articleBaseUrl ||
- linkHref === uri.spec ||
- linkHref in this._parsedPages) {
- continue;
- }
-
- // If it's on a different domain, skip it.
- if (uri.host !== linkHref.split(/\/+/g)[1])
- continue;
-
- var linkText = this._getInnerText(link);
-
- // If the linkText looks like it's not the next page, skip it.
- if (linkText.match(this.REGEXPS.extraneous) || linkText.length > 25)
- continue;
-
- // If the leftovers of the URL after removing the base URL don't contain
- // any digits, it's certainly not a next page link.
- var linkHrefLeftover = linkHref.replace(articleBaseUrl, '');
- if (!linkHrefLeftover.match(/\d/))
- continue;
-
- if (!(linkHref in possiblePages)) {
- possiblePages[linkHref] = {"score": 0, "linkText": linkText, "href": linkHref};
- } else {
- possiblePages[linkHref].linkText += ' | ' + linkText;
- }
-
- var linkObj = possiblePages[linkHref];
-
- // If the articleBaseUrl isn't part of this URL, penalize this link. It could
- // still be the link, but the odds are lower.
- // Example: http://www.actionscript.org/resources/articles/745/1/JavaScript-and-VBScript-Injection-in-ActionScript-3/Page1.html
- if (linkHref.indexOf(articleBaseUrl) !== 0)
- linkObj.score -= 25;
-
- var linkData = linkText + ' ' + link.className + ' ' + link.id;
- if (linkData.match(this.REGEXPS.nextLink))
- linkObj.score += 50;
-
- if (linkData.match(/pag(e|ing|inat)/i))
- linkObj.score += 25;
-
- if (linkData.match(/(first|last)/i)) {
- // -65 is enough to negate any bonuses gotten from a > or » in the text,
- // If we already matched on "next", last is probably fine.
- // If we didn't, then it's bad. Penalize.
- if (!linkObj.linkText.match(this.REGEXPS.nextLink))
- linkObj.score -= 65;
- }
-
- if (linkData.match(this.REGEXPS.negative) || linkData.match(this.REGEXPS.extraneous))
- linkObj.score -= 50;
-
- if (linkData.match(this.REGEXPS.prevLink))
- linkObj.score -= 200;
-
- // If a parentNode contains page or paging or paginat
- var parentNode = link.parentNode;
- var positiveNodeMatch = false;
- var negativeNodeMatch = false;
-
- while (parentNode) {
- var parentNodeClassAndId = parentNode.className + ' ' + parentNode.id;
-
- if (!positiveNodeMatch && parentNodeClassAndId && parentNodeClassAndId.match(/pag(e|ing|inat)/i)) {
- positiveNodeMatch = true;
- linkObj.score += 25;
- }
-
- if (!negativeNodeMatch && parentNodeClassAndId && parentNodeClassAndId.match(this.REGEXPS.negative)) {
- // If this is just something like "footer", give it a negative.
- // If it's something like "body-and-footer", leave it be.
- if (!parentNodeClassAndId.match(this.REGEXPS.positive)) {
- linkObj.score -= 25;
- negativeNodeMatch = true;
- }
- }
-
- parentNode = parentNode.parentNode;
- }
-
- // If the URL looks like it has paging in it, add to the score.
- // Things like /page/2/, /pagenum/2, ?p=3, ?page=11, ?pagination=34
- if (linkHref.match(/p(a|g|ag)?(e|ing|ination)?(=|\/)[0-9]{1,2}/i) || linkHref.match(/(page|paging)/i))
- linkObj.score += 25;
-
- // If the URL contains negative values, give a slight decrease.
- if (linkHref.match(this.REGEXPS.extraneous))
- linkObj.score -= 15;
-
- /**
- * Minor punishment to anything that doesn't match our current URL.
- * NOTE: I'm finding this to cause more harm than good where something is exactly 50 points.
- * Dan, can you show me a counterexample where this is necessary?
- * if (linkHref.indexOf(window.location.href) !== 0) {
- * linkObj.score -= 1;
- * }
- **/
-
- // If the link text can be parsed as a number, give it a minor bonus, with a slight
- // bias towards lower numbered pages. This is so that pages that might not have 'next'
- // in their text can still get scored, and sorted properly by score.
- var linkTextAsNumber = parseInt(linkText, 10);
- if (linkTextAsNumber) {
- // Punish 1 since we're either already there, or it's probably
- // before what we want anyways.
- if (linkTextAsNumber === 1) {
- linkObj.score -= 10;
- } else {
- linkObj.score += Math.max(0, 10 - linkTextAsNumber);
- }
- }
- }
-
- // Loop thrugh all of our possible pages from above and find our top
- // candidate for the next page URL. Require at least a score of 50, which
- // is a relatively high confidence that this page is the next link.
- var topPage = null;
- for (var page in possiblePages) {
- if (possiblePages.hasOwnProperty(page)) {
- if (possiblePages[page].score >= 50 &&
- (!topPage || topPage.score < possiblePages[page].score))
- topPage = possiblePages[page];
- }
- }
-
- var nextHref = null;
- if (topPage) {
- nextHref = topPage.href.replace(/\/$/, '');
-
- this.log('NEXT PAGE IS ' + nextHref);
- this._parsedPages[nextHref] = true;
- }
- return nextHref;
- },
-
- _successfulRequest: function(request) {
- return (request.status >= 200 && request.status < 300) ||
- request.status === 304 ||
- (request.status === 0 && request.responseText);
- },
-
- _ajax: function(url, options) {
- var request = new XMLHttpRequest();
-
- function respondToReadyState(readyState) {
- if (request.readyState === 4) {
- if (this._successfulRequest(request)) {
- if (options.success)
- options.success(request);
- } else if (options.error) {
- options.error(request);
- }
- }
- }
-
- if (typeof options === 'undefined')
- options = {};
-
- request.onreadystatechange = respondToReadyState;
-
- request.open('get', url, true);
- request.setRequestHeader('Accept', 'text/html');
-
- try {
- request.send(options.postBody);
- } catch (e) {
- if (options.error)
- options.error();
- }
-
- return request;
- },
-
- _appendNextPage: function(nextPageLink) {
- var doc = this._doc;
- this._curPageNum += 1;
-
- var articlePage = doc.createElement("DIV");
- articlePage.id = 'readability-page-' + this._curPageNum;
- articlePage.className = 'page';
- articlePage.innerHTML = '<p class="page-separator" title="Page ' + this._curPageNum + '">&sect;</p>';
-
- doc.getElementById("readability-content").appendChild(articlePage);
-
- if (this._curPageNum > this._maxPages) {
- var nextPageMarkup = "<div style='text-align: center'><a href='" + nextPageLink + "'>View Next Page</a></div>";
- articlePage.innerHTML = articlePage.innerHTML + nextPageMarkup;
- return;
- }
-
- // Now that we've built the article page DOM element, get the page content
- // asynchronously and load the cleaned content into the div we created for it.
- (function(pageUrl, thisPage) {
- this._ajax(pageUrl, {
- success: function(r) {
-
- // First, check to see if we have a matching ETag in headers - if we do, this is a duplicate page.
- var eTag = r.getResponseHeader('ETag');
- if (eTag) {
- if (eTag in this._pageETags) {
- this.log("Exact duplicate page found via ETag. Aborting.");
- articlePage.style.display = 'none';
- return;
- }
- this._pageETags[eTag] = 1;
- }
-
- // TODO: this ends up doubling up page numbers on NYTimes articles. Need to generically parse those away.
- var page = doc.createElement("DIV");
-
- // Do some preprocessing to our HTML to make it ready for appending.
- // - Remove any script tags. Swap and reswap newlines with a unicode
- // character because multiline regex doesn't work in javascript.
- // - Turn any noscript tags into divs so that we can parse them. This
- // allows us to find any next page links hidden via javascript.
- // - Turn all double br's into p's - was handled by prepDocument in the original view.
- // Maybe in the future abstract out prepDocument to work for both the original document
- // and AJAX-added pages.
- var responseHtml = r.responseText.replace(/\n/g, '\uffff').replace(/<script.*?>.*?<\/script>/gi, '');
- responseHtml = responseHtml.replace(/\n/g, '\uffff').replace(/<script.*?>.*?<\/script>/gi, '');
- responseHtml = responseHtml.replace(/\uffff/g, '\n').replace(/<(\/?)noscript/gi, '<$1div');
- responseHtml = responseHtml.replace(this.REGEXPS.replaceFonts, '<$1span>');
-
- page.innerHTML = responseHtml;
- this._replaceBrs(page);
-
- // Reset all flags for the next page, as they will search through it and
- // disable as necessary at the end of grabArticle.
- this._flags = 0x1 | 0x2 | 0x4;
-
- var secondNextPageLink = this._findNextPageLink(page);
-
- // NOTE: if we end up supporting _appendNextPage(), we'll need to
- // change this call to be async
- var content = this._grabArticle(page);
-
- if (!content) {
- this.log("No content found in page to append. Aborting.");
- return;
- }
-
- // Anti-duplicate mechanism. Essentially, get the first paragraph of our new page.
- // Compare it against all of the the previous document's we've gotten. If the previous
- // document contains exactly the innerHTML of this first paragraph, it's probably a duplicate.
- var firstP = content.getElementsByTagName("P").length ? content.getElementsByTagName("P")[0] : null;
- if (firstP && firstP.innerHTML.length > 100) {
- for (var i = 1; i <= this._curPageNum; i += 1) {
- var rPage = doc.getElementById('readability-page-' + i);
- if (rPage && rPage.innerHTML.indexOf(firstP.innerHTML) !== -1) {
- this.log('Duplicate of page ' + i + ' - skipping.');
- articlePage.style.display = 'none';
- this._parsedPages[pageUrl] = true;
- return;
- }
- }
- }
-
- this._removeScripts(content);
-
- thisPage.innerHTML = thisPage.innerHTML + content.innerHTML;
-
- // After the page has rendered, post process the content. This delay is necessary because,
- // in webkit at least, offsetWidth is not set in time to determine image width. We have to
- // wait a little bit for reflow to finish before we can fix floating images.
- setTimeout((function() {
- this._postProcessContent(thisPage);
- }).bind(this), 500);
-
-
- if (secondNextPageLink)
- this._appendNextPage(secondNextPageLink);
- }
- });
- }).bind(this)(nextPageLink, articlePage);
- },
-
- /**
* Get an elements class/id weight. Uses regular expressions to tell if this
* element looks good or bad.
*
@@ -1617,16 +1415,17 @@ Readability.prototype = {
* @param HTMLElement node
* @param String tagName
* @param Number maxDepth
+ * @param Function filterFn a filter to invoke to determine whether this node 'counts'
* @return Boolean
*/
- _hasAncestorTag: function(node, tagName, maxDepth) {
+ _hasAncestorTag: function(node, tagName, maxDepth, filterFn) {
maxDepth = maxDepth || 3;
tagName = tagName.toUpperCase();
var depth = 0;
while (node.parentNode) {
- if (depth > maxDepth)
+ if (maxDepth > 0 && depth > maxDepth)
return false;
- if (node.parentNode.tagName === tagName)
+ if (node.parentNode.tagName === tagName && (!filterFn || filterFn(node.parentNode)))
return true;
node = node.parentNode;
depth++;
@@ -1635,6 +1434,93 @@ Readability.prototype = {
},
/**
+ * Return an object indicating how many rows and columns this table has.
+ */
+ _getRowAndColumnCount: function(table) {
+ var rows = 0;
+ var columns = 0;
+ var trs = table.getElementsByTagName("tr");
+ for (var i = 0; i < trs.length; i++) {
+ var rowspan = trs[i].getAttribute("rowspan") || 0;
+ if (rowspan) {
+ rowspan = parseInt(rowspan, 10);
+ }
+ rows += (rowspan || 1);
+
+ // Now look for column-related info
+ var columnsInThisRow = 0;
+ var cells = trs[i].getElementsByTagName("td");
+ for (var j = 0; j < cells.length; j++) {
+ var colspan = cells[j].getAttribute("colspan") || 0;
+ if (colspan) {
+ colspan = parseInt(colspan, 10);
+ }
+ columnsInThisRow += (colspan || 1);
+ }
+ columns = Math.max(columns, columnsInThisRow);
+ }
+ return {rows: rows, columns: columns};
+ },
+
+ /**
+ * Look for 'data' (as opposed to 'layout') tables, for which we use
+ * similar checks as
+ * https://dxr.mozilla.org/mozilla-central/rev/71224049c0b52ab190564d3ea0eab089a159a4cf/accessible/html/HTMLTableAccessible.cpp#920
+ */
+ _markDataTables: function(root) {
+ var tables = root.getElementsByTagName("table");
+ for (var i = 0; i < tables.length; i++) {
+ var table = tables[i];
+ var role = table.getAttribute("role");
+ if (role == "presentation") {
+ table._readabilityDataTable = false;
+ continue;
+ }
+ var datatable = table.getAttribute("datatable");
+ if (datatable == "0") {
+ table._readabilityDataTable = false;
+ continue;
+ }
+ var summary = table.getAttribute("summary");
+ if (summary) {
+ table._readabilityDataTable = true;
+ continue;
+ }
+
+ var caption = table.getElementsByTagName("caption")[0];
+ if (caption && caption.childNodes.length > 0) {
+ table._readabilityDataTable = true;
+ continue;
+ }
+
+ // If the table has a descendant with any of these tags, consider a data table:
+ var dataTableDescendants = ["col", "colgroup", "tfoot", "thead", "th"];
+ var descendantExists = function(tag) {
+ return !!table.getElementsByTagName(tag)[0];
+ };
+ if (dataTableDescendants.some(descendantExists)) {
+ this.log("Data table because found data-y descendant");
+ table._readabilityDataTable = true;
+ continue;
+ }
+
+ // Nested tables indicate a layout table:
+ if (table.getElementsByTagName("table")[0]) {
+ table._readabilityDataTable = false;
+ continue;
+ }
+
+ var sizeInfo = this._getRowAndColumnCount(table);
+ if (sizeInfo.rows >= 10 || sizeInfo.columns > 4) {
+ table._readabilityDataTable = true;
+ continue;
+ }
+ // Now just go by size entirely:
+ table._readabilityDataTable = sizeInfo.rows * sizeInfo.columns > 10;
+ }
+ },
+
+ /**
* Clean an element of all tags of type "tag" if they look fishy.
* "Fishy" is an algorithm based on content length, classnames, link density, number of images & embeds, etc.
*
@@ -1652,6 +1538,15 @@ Readability.prototype = {
//
// TODO: Consider taking into account original contentScore here.
this._removeNodes(e.getElementsByTagName(tag), function(node) {
+ // First check if we're in a data table, in which case don't remove us.
+ var isDataTable = function(t) {
+ return t._readabilityDataTable;
+ };
+
+ if (this._hasAncestorTag(node, "table", -1, isDataTable)) {
+ return false;
+ }
+
var weight = this._getClassWeight(node);
var contentScore = 0;
@@ -1667,7 +1562,7 @@ Readability.prototype = {
// ominous signs, remove the element.
var p = node.getElementsByTagName("p").length;
var img = node.getElementsByTagName("img").length;
- var li = node.getElementsByTagName("li").length-100;
+ var li = node.getElementsByTagName("li").length - 100;
var input = node.getElementsByTagName("input").length;
var embedCount = 0;
@@ -1681,11 +1576,10 @@ Readability.prototype = {
var contentLength = this._getInnerText(node).length;
var haveToRemove =
- // Make an exception for elements with no p's and exactly 1 img.
- (img > p && !this._hasAncestorTag(node, "figure")) ||
+ (img > 1 && p / img < 0.5 && !this._hasAncestorTag(node, "figure")) ||
(!isList && li > p) ||
(input > Math.floor(p/3)) ||
- (!isList && contentLength < 25 && (img === 0 || img > 2)) ||
+ (!isList && contentLength < 25 && (img === 0 || img > 2) && !this._hasAncestorTag(node, "figure")) ||
(!isList && weight < 25 && linkDensity > 0.2) ||
(weight >= 25 && linkDensity > 0.5) ||
((embedCount === 1 && contentLength < 75) || embedCount > 1);
@@ -1696,6 +1590,25 @@ Readability.prototype = {
},
/**
+ * Clean out elements whose id/class combinations match specific string.
+ *
+ * @param Element
+ * @param RegExp match id/class combination.
+ * @return void
+ **/
+ _cleanMatchedNodes: function(e, regex) {
+ var endOfSearchMarkerNode = this._getNextNode(e, true);
+ var next = this._getNextNode(e);
+ while (next && next != endOfSearchMarkerNode) {
+ if (regex.test(next.className + " " + next.id)) {
+ next = this._removeAndGetNext(next);
+ } else {
+ next = this._getNextNode(next);
+ }
+ }
+ },
+
+ /**
* Clean out spurious headers from an Element. Checks things like classnames and link density.
*
* @param Element
@@ -1713,10 +1626,6 @@ Readability.prototype = {
return (this._flags & flag) > 0;
},
- _addFlag: function(flag) {
- this._flags = this._flags | flag;
- },
-
_removeFlag: function(flag) {
this._flags = this._flags & ~flag;
},
@@ -1807,20 +1716,10 @@ Readability.prototype = {
// Remove script tags from the document.
this._removeScripts(this._doc);
- // FIXME: Disabled multi-page article support for now as it
- // needs more work on infrastructure.
-
- // Make sure this document is added to the list of parsed pages first,
- // so we don't double up on the first page.
- // this._parsedPages[uri.spec.replace(/\/$/, '')] = true;
-
- // Pull out any possible next page link first.
- // var nextPageLink = this._findNextPageLink(doc.body);
-
this._prepDocument();
var metadata = this._getArticleMetadata();
- var articleTitle = metadata.title || this._getArticleTitle();
+ this._articleTitle = metadata.title;
var articleContent = this._grabArticle();
if (!articleContent)
@@ -1830,14 +1729,6 @@ Readability.prototype = {
this._postProcessContent(articleContent);
- // if (nextPageLink) {
- // // Append any additional pages after a small timeout so that people
- // // can start reading without having to wait for this to finish processing.
- // setTimeout((function() {
- // this._appendNextPage(nextPageLink);
- // }).bind(this), 500);
- // }
-
// If we haven't found an excerpt in the article's metadata, use the article's
// first paragraph as the excerpt. This is used for displaying a preview of
// the article's content.
@@ -1851,7 +1742,7 @@ Readability.prototype = {
var textContent = articleContent.textContent;
return {
uri: this._uri,
- title: articleTitle,
+ title: this._articleTitle,
byline: metadata.byline || this._articleByline,
dir: this._articleDir,
content: articleContent.innerHTML,
@@ -1861,3 +1752,7 @@ Readability.prototype = {
};
}
};
+
+if (typeof module === "object") {
+ module.exports = Readability;
+}
diff --git a/toolkit/components/reader/ReaderMode.jsm b/toolkit/components/reader/ReaderMode.jsm
index 033a02489..e9eb83154 100644
--- a/toolkit/components/reader/ReaderMode.jsm
+++ b/toolkit/components/reader/ReaderMode.jsm
@@ -8,15 +8,18 @@ this.EXPORTED_SYMBOLS = ["ReaderMode"];
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-// Constants for telemetry.
-const DOWNLOAD_SUCCESS = 0;
-const DOWNLOAD_ERROR_XHR = 1;
-const DOWNLOAD_ERROR_NO_DOC = 2;
-
-const PARSE_SUCCESS = 0;
-const PARSE_ERROR_TOO_MANY_ELEMENTS = 1;
-const PARSE_ERROR_WORKER = 2;
-const PARSE_ERROR_NO_ARTICLE = 3;
+// Class names to preserve in the readerized output. We preserve these class
+// names so that rules in aboutReader.css can match them.
+const CLASSES_TO_PRESERVE = [
+ "caption",
+ "hidden",
+ "invisble",
+ "sr-only",
+ "visually-hidden",
+ "visuallyhidden",
+ "wp-caption",
+ "wp-caption-text",
+];
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -24,17 +27,15 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.importGlobalProperties(["XMLHttpRequest"]);
XPCOMUtils.defineLazyModuleGetter(this, "CommonUtils", "resource://services-common/utils.js");
-XPCOMUtils.defineLazyModuleGetter(this, "Messaging", "resource://gre/modules/Messaging.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "EventDispatcher", "resource://gre/modules/Messaging.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ReaderWorker", "resource://gre/modules/reader/ReaderWorker.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch", "resource://gre/modules/TelemetryStopwatch.jsm");
XPCOMUtils.defineLazyGetter(this, "Readability", function() {
let scope = {};
scope.dump = this.dump;
Services.scriptloader.loadSubScript("resource://gre/modules/reader/Readability.js", scope);
- return scope["Readability"];
+ return scope.Readability;
});
this.ReaderMode = {
@@ -61,21 +62,13 @@ this.ReaderMode = {
return this.isEnabledForParseOnLoad = this._getStateForParseOnLoad();
},
- get isOnLowMemoryPlatform() {
- let memory = Cc["@mozilla.org/xpcom/memory-service;1"].getService(Ci.nsIMemory);
- delete this.isOnLowMemoryPlatform;
- return this.isOnLowMemoryPlatform = memory.isLowMemoryPlatform();
- },
-
- _getStateForParseOnLoad: function () {
+ _getStateForParseOnLoad() {
let isEnabled = Services.prefs.getBoolPref("reader.parse-on-load.enabled");
let isForceEnabled = Services.prefs.getBoolPref("reader.parse-on-load.force-enabled");
- // For low-memory devices, don't allow reader mode since it takes up a lot of memory.
- // See https://bugzilla.mozilla.org/show_bug.cgi?id=792603 for details.
- return isForceEnabled || (isEnabled && !this.isOnLowMemoryPlatform);
+ return isForceEnabled || isEnabled;
},
- observe: function(aMessage, aTopic, aData) {
+ observe(aMessage, aTopic, aData) {
switch (aTopic) {
case "nsPref:changed":
if (aData.startsWith("reader.parse-on-load.")) {
@@ -91,7 +84,7 @@ this.ReaderMode = {
* Enter the reader mode by going forward one step in history if applicable,
* if not, append the about:reader page in the history instead.
*/
- enterReaderMode: function(docShell, win) {
+ enterReaderMode(docShell, win) {
let url = win.document.location.href;
let readerURL = "about:reader?url=" + encodeURIComponent(url);
let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
@@ -112,7 +105,7 @@ this.ReaderMode = {
* Exit the reader mode by going back one step in history if applicable,
* if not, append the original page in the history instead.
*/
- leaveReaderMode: function(docShell, win) {
+ leaveReaderMode(docShell, win) {
let url = win.document.location.href;
let originalURL = this.getOriginalUrl(url);
let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
@@ -136,14 +129,14 @@ this.ReaderMode = {
* @return The original URL for the article, or null if we did not find
* a properly formatted about:reader URL.
*/
- getOriginalUrl: function(url) {
+ getOriginalUrl(url) {
if (!url.startsWith("about:reader?")) {
return null;
}
let outerHash = "";
try {
- let uriObj = Services.io.newURI(url, null, null);
+ let uriObj = Services.io.newURI(url);
url = uriObj.specIgnoringRef;
outerHash = uriObj.ref;
} catch (ex) { /* ignore, use the raw string */ }
@@ -155,27 +148,45 @@ this.ReaderMode = {
let originalUrl = searchParams.get("url");
if (outerHash) {
try {
- let uriObj = Services.io.newURI(originalUrl, null, null);
- uriObj = Services.io.newURI('#' + outerHash, null, uriObj);
+ let uriObj = Services.io.newURI(originalUrl);
+ uriObj = Services.io.newURI("#" + outerHash, null, uriObj);
originalUrl = uriObj.spec;
} catch (ex) {}
}
return originalUrl;
},
+ getOriginalUrlObjectForDisplay(url) {
+ let originalUrl = this.getOriginalUrl(url);
+ if (originalUrl) {
+ let uriObj;
+ try {
+ uriObj = Services.uriFixup.createFixupURI(originalUrl, Services.uriFixup.FIXUP_FLAG_NONE);
+ } catch (ex) {
+ return null;
+ }
+ try {
+ return Services.uriFixup.createExposableURI(uriObj);
+ } catch (ex) {
+ return null;
+ }
+ }
+ return null;
+ },
+
/**
* Decides whether or not a document is reader-able without parsing the whole thing.
*
* @param doc A document to parse.
* @return boolean Whether or not we should show the reader mode button.
*/
- isProbablyReaderable: function(doc) {
+ isProbablyReaderable(doc) {
// Only care about 'real' HTML documents:
if (doc.mozSyntheticDocument || !(doc instanceof doc.defaultView.HTMLDocument)) {
return false;
}
- let uri = Services.io.newURI(doc.location.href, null, null);
+ let uri = Services.io.newURI(doc.location.href);
if (!this._shouldCheckUri(uri)) {
return false;
}
@@ -187,12 +198,12 @@ this.ReaderMode = {
return new Readability(uri, doc).isProbablyReaderable(this.isNodeVisible.bind(this, utils));
},
- isNodeVisible: function(utils, node) {
+ isNodeVisible(utils, node) {
let bounds = utils.getBoundsWithoutFlushing(node);
return bounds.height > 0 && bounds.width > 0;
},
- getUtilsForWin: function(win) {
+ getUtilsForWin(win) {
return win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
},
@@ -204,16 +215,14 @@ this.ReaderMode = {
* @return {Promise}
* @resolves JS object representing the article, or null if no article is found.
*/
- parseDocument: Task.async(function* (doc) {
- let documentURI = Services.io.newURI(doc.documentURI, null, null);
- let baseURI = Services.io.newURI(doc.baseURI, null, null);
- if (!this._shouldCheckUri(documentURI) || !this._shouldCheckUri(baseURI, true)) {
+ parseDocument(doc) {
+ if (!this._shouldCheckUri(doc.documentURIObject) || !this._shouldCheckUri(doc.baseURIObject, true)) {
this.log("Reader mode disabled for URI");
return null;
}
- return yield this._readerParse(baseURI, doc);
- }),
+ return this._readerParse(doc);
+ },
/**
* Downloads and parses a document from a URL.
@@ -222,19 +231,28 @@ this.ReaderMode = {
* @return {Promise}
* @resolves JS object representing the article, or null if no article is found.
*/
- downloadAndParseDocument: Task.async(function* (url) {
- let doc = yield this._downloadDocument(url);
- let uri = Services.io.newURI(doc.baseURI, null, null);
- if (!this._shouldCheckUri(uri, true)) {
+ async downloadAndParseDocument(url) {
+ let doc = await this._downloadDocument(url);
+ if (!doc) {
+ return null;
+ }
+ if (!this._shouldCheckUri(doc.documentURIObject) || !this._shouldCheckUri(doc.baseURIObject, true)) {
this.log("Reader mode disabled for URI");
return null;
}
- return yield this._readerParse(uri, doc);
- }),
+ return await this._readerParse(doc);
+ },
- _downloadDocument: function (url) {
- let histogram = Services.telemetry.getHistogramById("READER_MODE_DOWNLOAD_RESULT");
+ _downloadDocument(url) {
+ try {
+ if (!this._shouldCheckUri(Services.io.newURI(url))) {
+ return null;
+ }
+ } catch (ex) {
+ Cu.reportError(new Error(`Couldn't create URI from ${url} to download: ${ex}`));
+ return null;
+ }
return new Promise((resolve, reject) => {
let xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
@@ -243,14 +261,12 @@ this.ReaderMode = {
xhr.onload = evt => {
if (xhr.status !== 200) {
reject("Reader mode XHR failed with status: " + xhr.status);
- histogram.add(DOWNLOAD_ERROR_XHR);
return;
}
let doc = xhr.responseXML;
if (!doc) {
reject("Reader mode XHR didn't return a document");
- histogram.add(DOWNLOAD_ERROR_NO_DOC);
return;
}
@@ -261,7 +277,7 @@ this.ReaderMode = {
if (content) {
let urlIndex = content.toUpperCase().indexOf("URL=");
if (urlIndex > -1) {
- let baseURI = Services.io.newURI(url, null, null);
+ let baseURI = Services.io.newURI(url);
let newURI = Services.io.newURI(content.substring(urlIndex + 4), null, baseURI);
let newURL = newURI.spec;
let ssm = Services.scriptSecurityManager;
@@ -290,10 +306,10 @@ this.ReaderMode = {
// Convert these to real URIs to make sure the escaping (or lack
// thereof) is identical:
try {
- responseURL = Services.io.newURI(responseURL, null, null).specIgnoringRef;
+ responseURL = Services.io.newURI(responseURL).specIgnoringRef;
} catch (ex) { /* Ignore errors - we'll use what we had before */ }
try {
- givenURL = Services.io.newURI(givenURL, null, null).specIgnoringRef;
+ givenURL = Services.io.newURI(givenURL).specIgnoringRef;
} catch (ex) { /* Ignore errors - we'll use what we had before */ }
if (responseURL != givenURL) {
@@ -303,7 +319,6 @@ this.ReaderMode = {
return;
}
resolve(doc);
- histogram.add(DOWNLOAD_SUCCESS);
};
xhr.send();
});
@@ -318,17 +333,17 @@ this.ReaderMode = {
* @resolves JS object representing the article, or null if no article is found.
* @rejects OS.File.Error
*/
- getArticleFromCache: Task.async(function* (url) {
+ async getArticleFromCache(url) {
let path = this._toHashedPath(url);
try {
- let array = yield OS.File.read(path);
+ let array = await OS.File.read(path);
return JSON.parse(new TextDecoder().decode(array));
} catch (e) {
if (!(e instanceof OS.File.Error) || !e.becauseNoSuchFile)
throw e;
return null;
}
- }),
+ },
/**
* Stores an article in the cache.
@@ -338,14 +353,14 @@ this.ReaderMode = {
* @resolves When the article is stored.
* @rejects OS.File.Error
*/
- storeArticleInCache: Task.async(function* (article) {
+ async storeArticleInCache(article) {
let array = new TextEncoder().encode(JSON.stringify(article));
let path = this._toHashedPath(article.url);
- yield this._ensureCacheDir();
+ await this._ensureCacheDir();
return OS.File.writeAtomic(path, array, { tmpPath: path + ".tmp" })
.then(success => {
OS.File.stat(path).then(info => {
- return Messaging.sendRequest({
+ return EventDispatcher.instance.sendRequest({
type: "Reader:AddedToCache",
url: article.url,
size: info.size,
@@ -353,7 +368,7 @@ this.ReaderMode = {
});
});
});
- }),
+ },
/**
* Removes an article from the cache given an article URI.
@@ -363,26 +378,29 @@ this.ReaderMode = {
* @resolves When the article is removed.
* @rejects OS.File.Error
*/
- removeArticleFromCache: Task.async(function* (url) {
+ async removeArticleFromCache(url) {
let path = this._toHashedPath(url);
- yield OS.File.remove(path);
- }),
+ await OS.File.remove(path);
+ },
- log: function(msg) {
+ log(msg) {
if (this.DEBUG)
dump("Reader: " + msg);
},
_blockedHosts: [
- "mail.google.com",
+ "amazon.com",
+ "basilisk-browser.org",
"github.com",
+ "mail.google.com",
+ "palemoon.org",
"pinterest.com",
"reddit.com",
"twitter.com",
"youtube.com",
],
- _shouldCheckUri: function (uri, isBaseUri = false) {
+ _shouldCheckUri(uri, isBaseUri = false) {
if (!(uri.schemeIs("http") || uri.schemeIs("https"))) {
this.log("Not parsing URI scheme: " + uri.scheme);
return false;
@@ -412,59 +430,77 @@ this.ReaderMode = {
* Attempts to parse a document into an article. Heavy lifting happens
* in readerWorker.js.
*
- * @param uri The base URI of the article.
* @param doc The document to parse.
* @return {Promise}
* @resolves JS object representing the article, or null if no article is found.
*/
- _readerParse: Task.async(function* (uri, doc) {
- let histogram = Services.telemetry.getHistogramById("READER_MODE_PARSE_RESULT");
+ async _readerParse(doc) {
if (this.parseNodeLimit) {
let numTags = doc.getElementsByTagName("*").length;
if (numTags > this.parseNodeLimit) {
- this.log("Aborting parse for " + uri.spec + "; " + numTags + " elements found");
- histogram.add(PARSE_ERROR_TOO_MANY_ELEMENTS);
+ this.log("Aborting parse for " + doc.baseURIObject.spec + "; " + numTags + " elements found");
return null;
}
}
+ // Fetch this here before we send `doc` off to the worker thread, as later on the
+ // document might be nuked but we will still want the URI.
+ let {documentURI} = doc;
+
let uriParam = {
- spec: uri.spec,
- host: uri.host,
- prePath: uri.prePath,
- scheme: uri.scheme,
- pathBase: Services.io.newURI(".", null, uri).spec
+ spec: doc.baseURIObject.spec,
+ host: doc.baseURIObject.host,
+ prePath: doc.baseURIObject.prePath,
+ scheme: doc.baseURIObject.scheme,
+ pathBase: Services.io.newURI(".", null, doc.baseURIObject).spec
+ };
+
+ let langAttributes = {
+ charset: doc.characterSet,
+ lang: doc.documentElement.lang
};
let serializer = Cc["@mozilla.org/xmlextras/xmlserializer;1"].
createInstance(Ci.nsIDOMSerializer);
let serializedDoc = serializer.serializeToString(doc);
+ let options = {
+ classesToPreserve: CLASSES_TO_PRESERVE,
+ };
+
let article = null;
try {
- article = yield ReaderWorker.post("parseDocument", [uriParam, serializedDoc]);
+ article = await ReaderWorker.post("parseDocument", [uriParam, serializedDoc, options]);
} catch (e) {
Cu.reportError("Error in ReaderWorker: " + e);
- histogram.add(PARSE_ERROR_WORKER);
}
+ // Explicitly null out doc to make it clear it might not be available from this
+ // point on.
+ doc = null;
+
if (!article) {
this.log("Worker did not return an article");
- histogram.add(PARSE_ERROR_NO_ARTICLE);
return null;
}
- // Readability returns a URI object, but we only care about the URL.
- article.url = article.uri.spec;
+ // Readability returns a URI object based on the baseURI, but we only care
+ // about the original document's URL from now on. This also avoids spoofing
+ // attempts where the baseURI doesn't match the domain of the documentURI
+ article.url = documentURI;
delete article.uri;
let flags = Ci.nsIDocumentEncoder.OutputSelectionOnly | Ci.nsIDocumentEncoder.OutputAbsoluteLinks;
article.title = Cc["@mozilla.org/parserutils;1"].getService(Ci.nsIParserUtils)
.convertToPlainText(article.title, flags, 0);
- histogram.add(PARSE_SUCCESS);
+ await this._assignLanguage(article, langAttributes);
+ this._maybeAssignTextDirection(article);
+
+ this._assignReadTime(article);
+
return article;
- }),
+ },
get _cryptoHash() {
delete this._cryptoHash;
@@ -485,7 +521,7 @@ this.ReaderMode = {
* @param url The article URL. This should have referrers removed.
* @return The file path to the cached article.
*/
- _toHashedPath: function (url) {
+ _toHashedPath(url) {
let value = this._unicodeConverter.convertToByteArray(url);
this._cryptoHash.init(this._cryptoHash.MD5);
this._cryptoHash.update(value, value.length);
@@ -502,7 +538,7 @@ this.ReaderMode = {
* @resolves When the cache directory exists.
* @rejects OS.File.Error
*/
- _ensureCacheDir: function () {
+ _ensureCacheDir() {
let dir = OS.Path.join(OS.Constants.Path.profileDir, "readercache");
return OS.File.exists(dir).then(exists => {
if (!exists) {
@@ -510,5 +546,107 @@ this.ReaderMode = {
}
return undefined;
});
- }
+ },
+
+ /**
+ * Sets a global language string value if possible. If langauge detection is
+ * available, use that. Otherwise, revert to a simpler mechanism using the
+ * document's lang attribute or charset.
+ *
+ * @return Promise
+ * @resolves when the language is detected
+ */
+ _assignLanguage(article, attributes) {
+ try {
+ Cu.import("resource://modules/translation/LanguageDetector.jsm");
+ return LanguageDetector.detectLanguage(article.textContent).then(result => {
+ article.language = result.confident ? result.language : null;
+ });
+ } catch(ex) {
+ return new Promise((resolve) => {
+ resolve(this._assignSimpleLanguage(attributes));
+ }).then(result => {
+ article.language = result;
+ });
+ }
+ },
+
+ _assignSimpleLanguage(attributes) {
+ var lang = attributes.lang.substring(0,2);
+ if (lang) {
+ return lang;
+ }
+
+ // If there is no lang attribute, try the charset.
+ // We can only use this for charsets that are specific to one language.
+ const charsetLang = new Map([
+ [ "us-ascii", "en" ],
+ [ "iso-8859-6", "ar" ],
+ [ "iso-8859-7", "el" ],
+ [ "iso-8859-8", "he" ],
+ [ "iso-8859-9", "tr" ],
+ [ "iso-8859-11", "th" ],
+ [ "jis_x0201", "ja" ],
+ [ "shift_jis", "ja" ],
+ [ "euc-jp", "ja" ]
+ ]);
+
+ return charsetLang.get(attributes.charset);
+ },
+
+ _maybeAssignTextDirection(article) {
+ // TODO: Remove the hardcoded language codes below once bug 1320265 is resolved.
+ if (!article.dir && ["ar", "fa", "he", "ug", "ur"].includes(article.language)) {
+ article.dir = "rtl";
+ }
+ },
+
+ /**
+ * Assigns the estimated reading time range of the article to the article object.
+ *
+ * @param article the article object to assign the reading time estimate to.
+ */
+ _assignReadTime(article) {
+ let lang = article.language || "en";
+ const readingSpeed = this._getReadingSpeedForLanguage(lang);
+ const charactersPerMinuteLow = readingSpeed.cpm - readingSpeed.variance;
+ const charactersPerMinuteHigh = readingSpeed.cpm + readingSpeed.variance;
+ const length = article.length;
+
+ article.readingTimeMinsSlow = Math.ceil(length / charactersPerMinuteLow);
+ article.readingTimeMinsFast = Math.ceil(length / charactersPerMinuteHigh);
+ },
+
+ /**
+ * Returns the reading speed of a selection of languages with likely variance.
+ *
+ * Reading speed estimated from a study done on reading speeds in various languages.
+ * study can be found here: http://iovs.arvojournals.org/article.aspx?articleid=2166061
+ *
+ * @return object with characters per minute and variance. Defaults to English
+ * if no suitable language is found in the collection.
+ */
+ _getReadingSpeedForLanguage(lang) {
+ const readingSpeed = new Map([
+ [ "en", {cpm: 987, variance: 118 } ],
+ [ "ar", {cpm: 612, variance: 88 } ],
+ [ "de", {cpm: 920, variance: 86 } ],
+ [ "es", {cpm: 1025, variance: 127 } ],
+ [ "fi", {cpm: 1078, variance: 121 } ],
+ [ "fr", {cpm: 998, variance: 126 } ],
+ [ "he", {cpm: 833, variance: 130 } ],
+ [ "it", {cpm: 950, variance: 140 } ],
+ [ "jw", {cpm: 357, variance: 56 } ],
+ [ "nl", {cpm: 978, variance: 143 } ],
+ [ "pl", {cpm: 916, variance: 126 } ],
+ [ "pt", {cpm: 913, variance: 145 } ],
+ [ "ru", {cpm: 986, variance: 175 } ],
+ [ "sk", {cpm: 885, variance: 145 } ],
+ [ "sv", {cpm: 917, variance: 156 } ],
+ [ "tr", {cpm: 1054, variance: 156 } ],
+ [ "zh", {cpm: 255, variance: 29 } ],
+ ]);
+
+ return readingSpeed.get(lang) || readingSpeed.get("en");
+ },
};
diff --git a/toolkit/components/reader/ReaderWorker.js b/toolkit/components/reader/ReaderWorker.js
index 20023d4e0..9ae589d7d 100644
--- a/toolkit/components/reader/ReaderWorker.js
+++ b/toolkit/components/reader/ReaderWorker.js
@@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* eslint-env mozilla/chrome-worker */
+
"use strict";
/**
@@ -40,11 +42,12 @@ var Agent = {
*
* @param {object} uri URI data for the document.
* @param {string} serializedDoc The serialized document.
+ * @param {object} options Options object to pass to Readability.
*
* @return {object} Article object returned from Readability.
*/
- parseDocument: function (uri, serializedDoc) {
+ parseDocument(uri, serializedDoc, options) {
let doc = new JSDOMParser().parse(serializedDoc);
- return new Readability(uri, doc).parse();
+ return new Readability(uri, doc, options).parse();
},
};
diff --git a/toolkit/components/reader/content/aboutReader.html b/toolkit/components/reader/content/aboutReader.html
index b9c1139f6..1aa644474 100644
--- a/toolkit/components/reader/content/aboutReader.html
+++ b/toolkit/components/reader/content/aboutReader.html
@@ -7,63 +7,56 @@
<link rel="stylesheet" href="chrome://global/skin/aboutReader.css" type="text/css"/>
- <script type="text/javascript;version=1.8" src="chrome://global/content/reader/aboutReader.js"></script>
+ <script type="text/javascript" src="chrome://global/content/reader/aboutReader.js"></script>
</head>
<body>
- <div id="container" class="container">
- <div id="reader-header" class="header">
- <style scoped>
- @import url("chrome://global/skin/aboutReaderControls.css");
- </style>
- <a id="reader-domain" class="domain"></a>
+ <div class="container">
+ <div class="header reader-header">
+ <a class="domain reader-domain"></a>
<div class="domain-border"></div>
- <h1 id="reader-title"></h1>
- <div id="reader-credits" class="credits"></div>
+ <h1 class="reader-title"></h1>
+ <div class="credits reader-credits"></div>
+ <div class="meta-data">
+ <div class="reader-estimated-time"></div>
+ </div>
</div>
+ <hr>
+
<div class="content">
- <style scoped>
- @import url("chrome://global/skin/aboutReaderContent.css");
- </style>
- <div id="moz-reader-content"></div>
+ <div class="moz-reader-content"></div>
</div>
<div>
- <style scoped>
- @import url("chrome://global/skin/aboutReaderControls.css");
- </style>
- <div id="reader-message"></div>
+ <div class="reader-message"></div>
</div>
</div>
- <ul id="reader-toolbar" class="toolbar">
- <style scoped>
- @import url("chrome://global/skin/aboutReaderControls.css");
- </style>
- <li><button id="close-button" class="button close-button"/></li>
- <ul id="style-dropdown" class="dropdown">
+ <ul class="toolbar reader-toolbar">
+ <li><button class="button close-button"/></li>
+ <ul class="dropdown style-dropdown">
<li><button class="dropdown-toggle button style-button"/></li>
- <li id="reader-popup" class="dropdown-popup">
- <div id="font-type-buttons"></div>
- <hr></hr>
- <div id="font-size-buttons">
- <button id="font-size-minus" class="minus-button"/>
- <button id="font-size-sample"/>
- <button id="font-size-plus" class="plus-button"/>
+ <li class="dropdown-popup">
+ <div class="font-type-buttons"></div>
+ <hr>
+ <div class="font-size-buttons">
+ <button class="minus-button"/>
+ <button class="font-size-sample"/>
+ <button class="plus-button"/>
</div>
- <hr></hr>
- <div id="content-width-buttons">
- <button id="content-width-minus" class="content-width-minus-button"/>
- <button id="content-width-plus" class="content-width-plus-button"/>
+ <hr>
+ <div class="content-width-buttons">
+ <button class="content-width-minus-button"/>
+ <button class="content-width-plus-button"/>
</div>
- <hr></hr>
- <div id="line-height-buttons">
- <button id="line-height-minus" class="line-height-minus-button"/>
- <button id="line-height-plus" class="line-height-plus-button"/>
+ <hr>
+ <div class="line-height-buttons">
+ <button class="line-height-minus-button"/>
+ <button class="line-height-plus-button"/>
</div>
- <hr></hr>
- <div id="color-scheme-buttons"></div>
+ <hr>
+ <div class="color-scheme-buttons"></div>
<div class="dropdown-arrow"/>
</li>
</ul>
diff --git a/toolkit/components/reader/content/aboutReader.js b/toolkit/components/reader/content/aboutReader.js
index 17133e69d..6c963382e 100644
--- a/toolkit/components/reader/content/aboutReader.js
+++ b/toolkit/components/reader/content/aboutReader.js
@@ -4,6 +4,6 @@
"use strict";
-window.addEventListener("DOMContentLoaded", function () {
+window.addEventListener("DOMContentLoaded", function() {
document.dispatchEvent(new CustomEvent("AboutReaderContentLoaded", { bubbles: true }));
});
diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json
index ade308cfa..7132c07b0 100644
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -6677,11 +6677,6 @@
"kind": "boolean",
"description": "If we are on Windows and neither the Windows countryCode nor the geoip countryCode indicates we are in the US, set to false if they both agree on the value or true otherwise"
},
- "SOCIAL_ENABLED_ON_SESSION": {
- "expires_in_version": "never",
- "kind": "flag",
- "description": "Social has been enabled at least once on the current session"
- },
"ENABLE_PRIVILEGE_EVER_CALLED": {
"expires_in_version": "never",
"kind": "flag",
@@ -8312,33 +8307,6 @@
"n_values": 10,
"description": "How often would blocked mixed content be allowed if HSTS upgrades were allowed? 0=display/no-HSTS, 1=display/HSTS, 2=active/no-HSTS, 3=active/HSTS"
},
- "MIXED_CONTENT_HSTS_PRIMING": {
- "alert_emails": ["seceng@mozilla.org"],
- "bug_numbers": [1246540],
- "expires_in_version": "60",
- "kind": "enumerated",
- "n_values": 16,
- "description": "How often would blocked mixed content be allowed if HSTS upgrades were allowed, including how often would we send an HSTS priming request? 0=display/no-HSTS, 1=display/HSTS, 2=active/no-HSTS, 3=active/HSTS, 4=display/no-HSTS-priming, 5=display/do-HSTS-priming, 6=active/no-HSTS-priming, 7=active/do-HSTS-priming"
- },
- "MIXED_CONTENT_HSTS_PRIMING_RESULT": {
- "alert_emails": ["seceng@mozilla.org"],
- "bug_numbers": [1246540],
- "expires_in_version": "60",
- "kind": "enumerated",
- "n_values": 16,
- "description": "How often do we get back an HSTS priming result which upgrades the connection to HTTPS? 0=cached (no upgrade), 1=cached (do upgrade), 2=cached (blocked), 3=already upgraded, 4=priming succeeded, 5=priming succeeded (block due to pref), 6=priming succeeded (no upgrade due to pref), 7=priming failed (block), 8=priming failed (accept)"
- },
- "HSTS_PRIMING_REQUEST_DURATION": {
- "alert_emails": ["seceng-telemetry@mozilla.org"],
- "bug_numbers": [1311893],
- "expires_in_version": "58",
- "kind": "exponential",
- "low": 100,
- "high": 30000,
- "n_buckets": 100,
- "keyed": true,
- "description": "The amount of time required for HSTS priming requests (ms), keyed by success or failure of the priming request. (success, failure)"
- },
"MIXED_CONTENT_OBJECT_SUBREQUEST": {
"alert_emails": ["seceng@mozilla.org"],
"bug_numbers": [1244116],
@@ -8968,30 +8936,6 @@
"description": "Scaling percentage for the display where the first window is opened (Linux only)",
"cpp_guard": "XP_LINUX"
},
- "SOCIAL_SIDEBAR_STATE": {
- "expires_in_version": "never",
- "kind": "boolean",
- "description": "Social Sidebar state 0: closed, 1: opened. Toggling between providers will result in a higher opened rate."
- },
- "SOCIAL_TOOLBAR_BUTTONS": {
- "expires_in_version": "never",
- "kind": "enumerated",
- "n_values": 3,
- "description": "Social toolbar button has been used (0:share, 1:status, 2:bookmark)"
- },
- "SOCIAL_PANEL_CLICKS": {
- "expires_in_version": "never",
- "kind": "enumerated",
- "n_values": 4,
- "description": "Social content has been interacted with (0:share, 1:status, 2:bookmark, 3: sidebar)"
- },
- "SOCIAL_SIDEBAR_OPEN_DURATION": {
- "expires_in_version": "never",
- "kind": "exponential",
- "high": 10000000,
- "n_buckets": 10,
- "description": "Sidebar showing: seconds that the sidebar has been opened"
- },
"SHUTDOWN_PHASE_DURATION_TICKS_QUIT_APPLICATION": {
"expires_in_version": "never",
"kind": "exponential",
diff --git a/toolkit/components/telemetry/Telemetry.cpp b/toolkit/components/telemetry/Telemetry.cpp
index 6dbd59bcf..f0a1789d6 100644
--- a/toolkit/components/telemetry/Telemetry.cpp
+++ b/toolkit/components/telemetry/Telemetry.cpp
@@ -73,9 +73,6 @@
#include "mozilla/PoisonIOInterposer.h"
#include "mozilla/StartupTimeline.h"
#include "mozilla/HangMonitor.h"
-#if defined(MOZ_ENABLE_PROFILER_SPS)
-#include "shared-libraries.h"
-#endif
namespace {
@@ -682,13 +679,6 @@ public:
static void ShutdownTelemetry();
static void RecordSlowStatement(const nsACString &sql, const nsACString &dbName,
uint32_t delay);
-#if defined(MOZ_ENABLE_PROFILER_SPS)
- static void RecordChromeHang(uint32_t aDuration,
- Telemetry::ProcessedStack &aStack,
- int32_t aSystemUptime,
- int32_t aFirefoxUptime,
- HangAnnotationsPtr aAnnotations);
-#endif
static void RecordThreadHangStats(Telemetry::ThreadHangStats& aStats);
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf);
struct Stat {
@@ -2224,31 +2214,6 @@ TelemetryImpl::RecordIceCandidates(const uint32_t iceCandidateBitmask,
sTelemetry->mWebrtcTelemetry.RecordIceCandidateMask(iceCandidateBitmask, success);
}
-#if defined(MOZ_ENABLE_PROFILER_SPS)
-void
-TelemetryImpl::RecordChromeHang(uint32_t aDuration,
- Telemetry::ProcessedStack &aStack,
- int32_t aSystemUptime,
- int32_t aFirefoxUptime,
- HangAnnotationsPtr aAnnotations)
-{
- if (!sTelemetry || !TelemetryHistogram::CanRecordExtended())
- return;
-
- HangAnnotationsPtr annotations;
- // We only pass aAnnotations if it is not empty.
- if (aAnnotations && !aAnnotations->IsEmpty()) {
- annotations = Move(aAnnotations);
- }
-
- MutexAutoLock hangReportMutex(sTelemetry->mHangReportsMutex);
-
- sTelemetry->mHangReports.AddHang(aStack, aDuration,
- aSystemUptime, aFirefoxUptime,
- Move(annotations));
-}
-#endif
-
void
TelemetryImpl::RecordThreadHangStats(Telemetry::ThreadHangStats& aStats)
{
@@ -2452,18 +2417,6 @@ struct StackFrame
uint16_t mModIndex; // The index of module that has this program counter.
};
-#ifdef MOZ_ENABLE_PROFILER_SPS
-static bool CompareByPC(const StackFrame &a, const StackFrame &b)
-{
- return a.mPC < b.mPC;
-}
-
-static bool CompareByIndex(const StackFrame &a, const StackFrame &b)
-{
- return a.mIndex < b.mIndex;
-}
-#endif
-
} // namespace
@@ -2629,60 +2582,6 @@ GetStackAndModules(const std::vector<uintptr_t>& aPCs)
rawStack.push_back(Frame);
}
-#ifdef MOZ_ENABLE_PROFILER_SPS
- // Remove all modules not referenced by a PC on the stack
- std::sort(rawStack.begin(), rawStack.end(), CompareByPC);
-
- size_t moduleIndex = 0;
- size_t stackIndex = 0;
- size_t stackSize = rawStack.size();
-
- SharedLibraryInfo rawModules = SharedLibraryInfo::GetInfoForSelf();
- rawModules.SortByAddress();
-
- while (moduleIndex < rawModules.GetSize()) {
- const SharedLibrary& module = rawModules.GetEntry(moduleIndex);
- uintptr_t moduleStart = module.GetStart();
- uintptr_t moduleEnd = module.GetEnd() - 1;
- // the interval is [moduleStart, moduleEnd)
-
- bool moduleReferenced = false;
- for (;stackIndex < stackSize; ++stackIndex) {
- uintptr_t pc = rawStack[stackIndex].mPC;
- if (pc >= moduleEnd)
- break;
-
- if (pc >= moduleStart) {
- // If the current PC is within the current module, mark
- // module as used
- moduleReferenced = true;
- rawStack[stackIndex].mPC -= moduleStart;
- rawStack[stackIndex].mModIndex = moduleIndex;
- } else {
- // PC does not belong to any module. It is probably from
- // the JIT. Use a fixed mPC so that we don't get different
- // stacks on different runs.
- rawStack[stackIndex].mPC =
- std::numeric_limits<uintptr_t>::max();
- }
- }
-
- if (moduleReferenced) {
- ++moduleIndex;
- } else {
- // Remove module if no PCs within its address range
- rawModules.RemoveEntries(moduleIndex, moduleIndex + 1);
- }
- }
-
- for (;stackIndex < stackSize; ++stackIndex) {
- // These PCs are past the last module.
- rawStack[stackIndex].mPC = std::numeric_limits<uintptr_t>::max();
- }
-
- std::sort(rawStack.begin(), rawStack.end(), CompareByIndex);
-#endif
-
// Copy the information to the return value.
ProcessedStack Ret;
for (std::vector<StackFrame>::iterator i = rawStack.begin(),
@@ -2692,28 +2591,6 @@ GetStackAndModules(const std::vector<uintptr_t>& aPCs)
Ret.AddFrame(frame);
}
-#ifdef MOZ_ENABLE_PROFILER_SPS
- for (unsigned i = 0, n = rawModules.GetSize(); i != n; ++i) {
- const SharedLibrary &info = rawModules.GetEntry(i);
- const std::string &name = info.GetName();
- std::string basename = name;
-#ifdef XP_MACOSX
- // FIXME: We want to use just the basename as the libname, but the
- // current profiler addon needs the full path name, so we compute the
- // basename in here.
- size_t pos = name.rfind('/');
- if (pos != std::string::npos) {
- basename = name.substr(pos + 1);
- }
-#endif
- mozilla::Telemetry::ProcessedStack::Module module = {
- basename,
- info.GetBreakpadId()
- };
- Ret.AddModule(module);
- }
-#endif
-
return Ret;
}
@@ -2910,19 +2787,6 @@ void Init()
MOZ_ASSERT(telemetryService);
}
-#if defined(MOZ_ENABLE_PROFILER_SPS)
-void RecordChromeHang(uint32_t duration,
- ProcessedStack &aStack,
- int32_t aSystemUptime,
- int32_t aFirefoxUptime,
- HangAnnotationsPtr aAnnotations)
-{
- TelemetryImpl::RecordChromeHang(duration, aStack,
- aSystemUptime, aFirefoxUptime,
- Move(aAnnotations));
-}
-#endif
-
void RecordThreadHangStats(ThreadHangStats& aStats)
{
TelemetryImpl::RecordThreadHangStats(aStats);
diff --git a/toolkit/components/telemetry/Telemetry.h b/toolkit/components/telemetry/Telemetry.h
index 64f50013a..d86876376 100644
--- a/toolkit/components/telemetry/Telemetry.h
+++ b/toolkit/components/telemetry/Telemetry.h
@@ -311,25 +311,6 @@ const uint32_t kSlowSQLThresholdForMainThread = 50;
const uint32_t kSlowSQLThresholdForHelperThreads = 100;
class ProcessedStack;
-
-/**
- * Record the main thread's call stack after it hangs.
- *
- * @param aDuration - Approximate duration of main thread hang, in seconds
- * @param aStack - Array of PCs from the hung call stack
- * @param aSystemUptime - System uptime at the time of the hang, in minutes
- * @param aFirefoxUptime - Firefox uptime at the time of the hang, in minutes
- * @param aAnnotations - Any annotations to be added to the report
- */
-#if defined(MOZ_ENABLE_PROFILER_SPS)
-void RecordChromeHang(uint32_t aDuration,
- ProcessedStack &aStack,
- int32_t aSystemUptime,
- int32_t aFirefoxUptime,
- mozilla::UniquePtr<mozilla::HangMonitor::HangAnnotations>
- aAnnotations);
-#endif
-
class ThreadHangStats;
/**
diff --git a/toolkit/components/telemetry/histogram-whitelists.json b/toolkit/components/telemetry/histogram-whitelists.json
index 486178199..deb1bd5b3 100644
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -610,11 +610,6 @@
"SHUTDOWN_PHASE_DURATION_TICKS_XPCOM_WILL_SHUTDOWN",
"SLOW_ADDON_WARNING_RESPONSE_TIME",
"SLOW_ADDON_WARNING_STATES",
- "SOCIAL_ENABLED_ON_SESSION",
- "SOCIAL_PANEL_CLICKS",
- "SOCIAL_SIDEBAR_OPEN_DURATION",
- "SOCIAL_SIDEBAR_STATE",
- "SOCIAL_TOOLBAR_BUTTONS",
"SPDY_CHUNK_RECVD",
"SPDY_GOAWAY_LOCAL",
"SPDY_GOAWAY_PEER",
@@ -1501,11 +1496,6 @@
"SLOW_ADDON_WARNING_RESPONSE_TIME",
"SLOW_ADDON_WARNING_STATES",
"SLOW_SCRIPT_NOTICE_COUNT",
- "SOCIAL_ENABLED_ON_SESSION",
- "SOCIAL_PANEL_CLICKS",
- "SOCIAL_SIDEBAR_OPEN_DURATION",
- "SOCIAL_SIDEBAR_STATE",
- "SOCIAL_TOOLBAR_BUTTONS",
"SPDY_CHUNK_RECVD",
"SPDY_GOAWAY_LOCAL",
"SPDY_GOAWAY_PEER",
diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js
index 1376f70a3..b392aaf88 100644
--- a/toolkit/content/browser-content.js
+++ b/toolkit/content/browser-content.js
@@ -594,12 +594,6 @@ var Printing = {
contentElement.setAttribute("class", "content");
containerElement.appendChild(contentElement);
- // Create style element for content div and import aboutReaderContent.css
- let controlContentStyle = content.document.createElement("style");
- controlContentStyle.setAttribute("scoped", "");
- controlContentStyle.textContent = "@import url(\"chrome://global/skin/aboutReaderContent.css\");";
- contentElement.appendChild(controlContentStyle);
-
// Jam the article's content into content div
let readerContent = content.document.createElement("div");
readerContent.setAttribute("id", "moz-reader-content");
diff --git a/toolkit/content/contentAreaUtils.js b/toolkit/content/contentAreaUtils.js
index 2b7af30de..736fb7dfc 100644
--- a/toolkit/content/contentAreaUtils.js
+++ b/toolkit/content/contentAreaUtils.js
@@ -1108,6 +1108,7 @@ function getDefaultFileName(aDefaultFileName, aURI, aDocument,
function validateFileName(aFileName)
{
+ aFileName = aFileName.replace(/[\u200e\u200f\u202a-\u202e]/g, "");
var re = /[\/]+/g;
if (navigator.appVersion.indexOf("Windows") != -1) {
re = /[\\\/\|]+/g;
diff --git a/toolkit/crashreporter/nsExceptionHandler.cpp b/toolkit/crashreporter/nsExceptionHandler.cpp
index 0d1286bdc..4d0b8cdfe 100644
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
@@ -10,8 +10,6 @@
#include "nsDirectoryServiceDefs.h"
#include "nsDataHashtable.h"
#include "mozilla/ArrayUtils.h"
-#include "mozilla/dom/CrashReporterChild.h"
-#include "mozilla/ipc/CrashReporterClient.h"
#include "mozilla/Services.h"
#include "nsIObserverService.h"
#include "mozilla/Unused.h"
@@ -115,9 +113,6 @@ using google_breakpad::FileID;
using google_breakpad::PageAllocator;
#endif
using namespace mozilla;
-using mozilla::dom::CrashReporterChild;
-using mozilla::dom::PCrashReporterChild;
-using mozilla::ipc::CrashReporterClient;
namespace CrashReporter {
@@ -2233,13 +2228,7 @@ nsresult AnnotateCrashReport(const nsACString& key, const nsACString& data)
return rv;
if (!XRE_IsParentProcess()) {
- // The newer CrashReporterClient can be used from any thread.
- if (RefPtr<CrashReporterClient> client = CrashReporterClient::GetSingleton()) {
- client->AnnotateCrashReport(nsCString(key), escapedData);
- return NS_OK;
- }
-
- // Otherwise, we have to handle this on the main thread since we will go
+ // We have to handle this on the main thread since we will go
// through IPDL.
if (!NS_IsMainThread()) {
// Child process needs to handle this in the main thread:
@@ -2249,13 +2238,7 @@ nsresult AnnotateCrashReport(const nsACString& key, const nsACString& data)
}
MOZ_ASSERT(NS_IsMainThread());
- PCrashReporterChild* reporter = CrashReporterChild::GetCrashReporter();
- if (!reporter) {
- EnqueueDelayedNote(new DelayedNote(key, data));
- return NS_OK;
- }
- if (!reporter->SendAnnotateCrashReport(nsCString(key), escapedData))
- return NS_ERROR_FAILURE;
+ EnqueueDelayedNote(new DelayedNote(key, data));
return NS_OK;
}
@@ -2321,11 +2304,6 @@ nsresult AppendAppNotesToCrashReport(const nsACString& data)
if (NS_FAILED(rv))
return rv;
- if (RefPtr<CrashReporterClient> client = CrashReporterClient::GetSingleton()) {
- client->AppendAppNotes(escapedData);
- return NS_OK;
- }
-
if (!NS_IsMainThread()) {
// Child process needs to handle this in the main thread:
nsCOMPtr<nsIRunnable> r = new CrashReporterHelperRunnable(data);
@@ -2334,14 +2312,7 @@ nsresult AppendAppNotesToCrashReport(const nsACString& data)
}
MOZ_ASSERT(NS_IsMainThread());
- PCrashReporterChild* reporter = CrashReporterChild::GetCrashReporter();
- if (!reporter) {
- EnqueueDelayedNote(new DelayedNote(data));
- return NS_OK;
- }
-
- if (!reporter->SendAppendAppNotes(escapedData))
- return NS_ERROR_FAILURE;
+ EnqueueDelayedNote(new DelayedNote(data));
return NS_OK;
}
diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
index 102ebb44b..71f9a86de 100644
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -135,11 +135,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
'mozgtk_stub',
]
-if CONFIG['MOZ_JPROF']:
- USE_LIBS += [
- 'jprof',
- ]
-
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT'] or \
CONFIG['MOZ_TREE_FREETYPE']:
USE_LIBS += [
diff --git a/toolkit/locales/en-US/chrome/global/aboutReader.properties b/toolkit/locales/en-US/chrome/global/aboutReader.properties
index 8826630c2..ac004c545 100644
--- a/toolkit/locales/en-US/chrome/global/aboutReader.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutReader.properties
@@ -13,6 +13,22 @@ aboutReader.colorScheme.dark=Dark
aboutReader.colorScheme.sepia=Sepia
aboutReader.colorScheme.auto=Auto
+# LOCALIZATION NOTE (aboutReader.estimatedReadTimeValue1): Semi-colon list of plural forms.
+# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
+# #1 is the number of minutes it is estimated to take to read the article
+# example: `3 minutes`
+aboutReader.estimatedReadTimeValue1=#1 minute;#1 minutes
+
+#LOCALIZATION NOTE (aboutReader.estimatedReadingTimeRange1): Semi-colon list of plural forms.
+# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
+# When there is some uncertainty in how long the article will take to read show a range of
+# minutes it is expected to take.
+# #1 is the number of minutes it is estimated to take to read the article for a fast reader
+# #2 is the number of minutes it is estimated to take to read the article for a slow reader
+# #2 is the variable used to determine the plural form to use.
+# example: `5-8 minutes`
+aboutReader.estimatedReadTimeRange1=#1-#2 minute;#1-#2 minutes
+
# LOCALIZATION NOTE (aboutReader.fontType.serif, aboutReader.fontType.sans-serif):
# These are the styles of typeface that are options in the reader view controls.
aboutReader.fontType.serif=Serif
diff --git a/toolkit/locales/en-US/chrome/mozapps/extensions/blocklist.dtd b/toolkit/locales/en-US/chrome/mozapps/extensions/blocklist.dtd
index f393cc906..a9490db5e 100644
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/blocklist.dtd
+++ b/toolkit/locales/en-US/chrome/mozapps/extensions/blocklist.dtd
@@ -4,10 +4,10 @@
<!ENTITY blocklist.title "Add-ons may be causing problems">
<!ENTITY blocklist.style "width: 45em; height: 30em">
-<!ENTITY blocklist.summary "&brandShortName; has determined that the following add-ons are known to cause stability or security problems:">
-<!ENTITY blocklist.softblocked "For your protection, it is highly recommended that you restart with these add-ons disabled.">
+<!ENTITY blocklist.summary "&brandShortName; has determined that the following add-ons are known to cause issues:">
+<!ENTITY blocklist.softblocked "It is highly recommended, but not required, that you restart with these add-ons disabled.">
<!ENTITY blocklist.hardblocked "These add-ons have a high risk of causing stability or security problems and have been blocked, but a restart is required to disable them completely.">
-<!ENTITY blocklist.softandhard "The add-ons that have a high risk of causing stability or security problems have been blocked. The others are lower risk, but it is highly recommended that you restart with them disabled.">
+<!ENTITY blocklist.softandhard "Some listed add-ons have a high risk of causing stability or security problems and have been blocked. For the others it is highly recommended, but not required, that you restart with them disabled.">
<!ENTITY blocklist.moreinfo "More information">
<!ENTITY blocklist.accept.label "Restart &brandShortName;">
diff --git a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
index c4e2660ee..9d976e0e3 100644
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
+++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
@@ -28,7 +28,7 @@ notification.jetsdk=This is a Jetpack/SDK extension which are not supported in %
notification.blocked=%1$S has been disabled due to security or stability issues.
notification.blocked.link=More Information
#LOCALIZATION NOTE (notification.softblocked) %1$S is the add-on name
-notification.softblocked=%1$S is known to cause security or stability issues.
+notification.softblocked=%1$S is known to cause issues.
notification.softblocked.link=More Information
#LOCALIZATION NOTE (notification.outdated) %1$S is the add-on name
notification.outdated=An important update is available for %1$S.
@@ -79,7 +79,7 @@ details.notification.incompatible=%1$S is incompatible with %2$S %3$S.
details.notification.blocked=%1$S has been disabled due to security or stability issues.
details.notification.blocked.link=More Information
#LOCALIZATION NOTE (details.notification.softblocked) %1$S is the add-on name
-details.notification.softblocked=%1$S is known to cause security or stability issues.
+details.notification.softblocked=%1$S is known to cause issues.
details.notification.softblocked.link=More Information
#LOCALIZATION NOTE (details.notification.outdated) %1$S is the add-on name
details.notification.outdated=An important update is available for %1$S.
diff --git a/toolkit/locales/en-US/chrome/mozapps/webextensions/blocklist.dtd b/toolkit/locales/en-US/chrome/mozapps/webextensions/blocklist.dtd
index f393cc906..a9490db5e 100644
--- a/toolkit/locales/en-US/chrome/mozapps/webextensions/blocklist.dtd
+++ b/toolkit/locales/en-US/chrome/mozapps/webextensions/blocklist.dtd
@@ -4,10 +4,10 @@
<!ENTITY blocklist.title "Add-ons may be causing problems">
<!ENTITY blocklist.style "width: 45em; height: 30em">
-<!ENTITY blocklist.summary "&brandShortName; has determined that the following add-ons are known to cause stability or security problems:">
-<!ENTITY blocklist.softblocked "For your protection, it is highly recommended that you restart with these add-ons disabled.">
+<!ENTITY blocklist.summary "&brandShortName; has determined that the following add-ons are known to cause issues:">
+<!ENTITY blocklist.softblocked "It is highly recommended, but not required, that you restart with these add-ons disabled.">
<!ENTITY blocklist.hardblocked "These add-ons have a high risk of causing stability or security problems and have been blocked, but a restart is required to disable them completely.">
-<!ENTITY blocklist.softandhard "The add-ons that have a high risk of causing stability or security problems have been blocked. The others are lower risk, but it is highly recommended that you restart with them disabled.">
+<!ENTITY blocklist.softandhard "Some listed add-ons have a high risk of causing stability or security problems and have been blocked. For the others it is highly recommended, but not required, that you restart with them disabled.">
<!ENTITY blocklist.moreinfo "More information">
<!ENTITY blocklist.accept.label "Restart &brandShortName;">
diff --git a/toolkit/locales/en-US/chrome/mozapps/webextensions/extensions.properties b/toolkit/locales/en-US/chrome/mozapps/webextensions/extensions.properties
index 10c0f81c3..b51c3e12d 100644
--- a/toolkit/locales/en-US/chrome/mozapps/webextensions/extensions.properties
+++ b/toolkit/locales/en-US/chrome/mozapps/webextensions/extensions.properties
@@ -31,7 +31,7 @@ notification.unsigned.link=More Information
notification.blocked=%1$S has been disabled due to security or stability issues.
notification.blocked.link=More Information
#LOCALIZATION NOTE (notification.softblocked) %1$S is the add-on name
-notification.softblocked=%1$S is known to cause security or stability issues.
+notification.softblocked=%1$S is known to cause issues.
notification.softblocked.link=More Information
#LOCALIZATION NOTE (notification.outdated) %1$S is the add-on name
notification.outdated=An important update is available for %1$S.
@@ -86,7 +86,7 @@ details.notification.unsigned.link=More Information
details.notification.blocked=%1$S has been disabled due to security or stability issues.
details.notification.blocked.link=More Information
#LOCALIZATION NOTE (details.notification.softblocked) %1$S is the add-on name
-details.notification.softblocked=%1$S is known to cause security or stability issues.
+details.notification.softblocked=%1$S is known to cause issues.
details.notification.softblocked.link=More Information
#LOCALIZATION NOTE (details.notification.outdated) %1$S is the add-on name
details.notification.outdated=An important update is available for %1$S.
diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm
index a0ca00935..7c8a046e9 100644
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -81,6 +81,13 @@ this.AppConstants = Object.freeze({
false,
#endif
+MOZ_SAFE_BROWSING:
+#ifdef MOZ_SAFE_BROWSING
+ true,
+#else
+ false,
+#endif
+
MOZ_TELEMETRY_REPORTING:
#ifdef MOZ_TELEMETRY_REPORTING
true,
@@ -250,13 +257,6 @@ this.AppConstants = Object.freeze({
false,
#endif
- MOZ_ENABLE_PROFILER_SPS:
-#ifdef MOZ_ENABLE_PROFILER_SPS
- true,
-#else
- false,
-#endif
-
MOZ_ANDROID_ACTIVITY_STREAM:
#ifdef MOZ_ANDROID_ACTIVITY_STREAM
true,
diff --git a/toolkit/modules/Services.jsm b/toolkit/modules/Services.jsm
index 58d87ffb1..1796acd4c 100644
--- a/toolkit/modules/Services.jsm
+++ b/toolkit/modules/Services.jsm
@@ -72,9 +72,6 @@ var initTable = [
["obs", "@mozilla.org/observer-service;1", "nsIObserverService"],
["perms", "@mozilla.org/permissionmanager;1", "nsIPermissionManager"],
["prompt", "@mozilla.org/embedcomp/prompt-service;1", "nsIPromptService"],
-#ifdef MOZ_ENABLE_PROFILER_SPS
- ["profiler", "@mozilla.org/tools/profiler;1", "nsIProfiler"],
-#endif
["scriptloader", "@mozilla.org/moz/jssubscript-loader;1", "mozIJSSubScriptLoader"],
["scriptSecurityManager", "@mozilla.org/scriptsecuritymanager;1", "nsIScriptSecurityManager"],
#ifdef MOZ_TOOLKIT_SEARCH
diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm
index e11d47774..42f3fb809 100644
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -83,7 +83,6 @@ const PREFS_WHITELIST = [
"services.sync.lastSync",
"services.sync.numClients",
"services.sync.engine.",
- "social.enabled",
"storage.vacuum.last.",
"svg.",
"toolkit.startup.recent_crashes",
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
index 854814292..7d3065f53 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -22,52 +22,6 @@ def systrace(value, target):
set_define('MOZ_USE_SYSTRACE', systrace)
-
-option('--enable-jprof', env='MOZ_JPROF',
- help='Enable jprof profiling tool (needs mozilla/tools/jprof)')
-
-@depends('--enable-jprof')
-def jprof(value):
- if value:
- return True
-
-set_config('MOZ_JPROF', jprof)
-set_define('MOZ_JPROF', jprof)
-imply_option('--enable-profiling', jprof)
-
-@depends(target)
-def sps_profiler(target):
- if target.os == 'Android':
- return target.cpu in ('arm', 'x86')
- elif target.kernel == 'Linux':
- return target.cpu in ('x86', 'x86_64')
- return target.os in ('OSX', 'WINNT')
-
-@depends(sps_profiler)
-def sps_profiler_define(value):
- if value:
- return True
-
-set_config('MOZ_ENABLE_PROFILER_SPS', sps_profiler_define)
-set_define('MOZ_ENABLE_PROFILER_SPS', sps_profiler_define)
-
-
-option('--enable-dmd', env='MOZ_DMD',
- help='Enable Dark Matter Detector (heap profiler). '
- 'Also enables jemalloc, replace-malloc and profiling')
-
-@depends('--enable-dmd')
-def dmd(value):
- if value:
- return True
-
-set_config('MOZ_DMD', dmd)
-set_define('MOZ_DMD', dmd)
-add_old_configure_assignment('MOZ_DMD', dmd)
-imply_option('--enable-profiling', dmd)
-imply_option('--enable-jemalloc', dmd)
-imply_option('--enable-replace-malloc', dmd)
-
# JACK cubeb backend
# ==============================================================
option('--enable-jack', env='MOZ_JACK',
diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js
index fc4392231..1e185f879 100644
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -4,10 +4,10 @@
"use strict";
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
-const Cr = Components.results;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
+var Cr = Components.results;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
diff --git a/toolkit/mozapps/extensions/content/newaddon.js b/toolkit/mozapps/extensions/content/newaddon.js
index 2b2a54af5..e45b3c1cc 100644
--- a/toolkit/mozapps/extensions/content/newaddon.js
+++ b/toolkit/mozapps/extensions/content/newaddon.js
@@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/AddonManager.jsm");
diff --git a/toolkit/mozapps/extensions/content/selectAddons.js b/toolkit/mozapps/extensions/content/selectAddons.js
index f80932b3f..01b9030ee 100644
--- a/toolkit/mozapps/extensions/content/selectAddons.js
+++ b/toolkit/mozapps/extensions/content/selectAddons.js
@@ -10,8 +10,8 @@ Components.utils.import("resource://gre/modules/AddonManager.jsm");
Components.utils.import("resource://gre/modules/addons/AddonRepository.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
-const Cc = Components.classes;
-const Ci = Components.interfaces;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
var gView = null;
diff --git a/toolkit/mozapps/extensions/extensions.manifest b/toolkit/mozapps/extensions/extensions.manifest
index 14aca3ff6..7efb74a9d 100644
--- a/toolkit/mozapps/extensions/extensions.manifest
+++ b/toolkit/mozapps/extensions/extensions.manifest
@@ -1,7 +1,3 @@
-component {66354bc9-7ed1-4692-ae1d-8da97d6b205e} nsBlocklistService.js
-contract @mozilla.org/extensions/blocklist;1 {66354bc9-7ed1-4692-ae1d-8da97d6b205e}
-category profile-after-change nsBlocklistService @mozilla.org/extensions/blocklist;1
-category update-timer nsBlocklistService @mozilla.org/extensions/blocklist;1,getService,blocklist-background-update-timer,extensions.blocklist.interval,86400
component {4399533d-08d1-458c-a87a-235f74451cfa} addonManager.js
contract @mozilla.org/addons/integration;1 {4399533d-08d1-458c-a87a-235f74451cfa}
category update-timer addonManager @mozilla.org/addons/integration;1,getService,addon-background-update-timer,extensions.update.interval,86400
diff --git a/toolkit/mozapps/extensions/internal/Content.js b/toolkit/mozapps/extensions/internal/Content.js
index 61a8b0323..9ab3b9ad6 100644
--- a/toolkit/mozapps/extensions/internal/Content.js
+++ b/toolkit/mozapps/extensions/internal/Content.js
@@ -6,7 +6,7 @@
(function() {
-const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
diff --git a/toolkit/mozapps/extensions/internal/GMPProvider.jsm b/toolkit/mozapps/extensions/internal/GMPProvider.jsm
index 52affa9ba..25651f1b8 100644
--- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm
@@ -4,9 +4,9 @@
"use strict";
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
this.EXPORTED_SYMBOLS = [];
@@ -58,6 +58,7 @@ const GMP_PLUGINS = [
optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul",
isEME: true
}];
+XPCOMUtils.defineConstant(this, "GMP_PLUGINS", GMP_PLUGINS);
XPCOMUtils.defineLazyGetter(this, "pluginsBundle",
() => Services.strings.createBundle("chrome://global/locale/plugins.properties"));
diff --git a/toolkit/mozapps/webextensions/internal/ProductAddonChecker.jsm b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
index f98dd2a94..f98dd2a94 100644
--- a/toolkit/mozapps/webextensions/internal/ProductAddonChecker.jsm
+++ b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
index 5b3585cd8..b522bd3ae 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -144,6 +144,7 @@ const FIREFOX_APPCOMPATVERSION = "56.9"
// The value for this is in Makefile.in
#expand const DB_SCHEMA = __MOZ_EXTENSIONS_DB_SCHEMA__;
+XPCOMUtils.defineConstant(this, "DB_SCHEMA", DB_SCHEMA);
#ifdef MOZ_DEVTOOLS
const NOTIFICATION_TOOLBOXPROCESS_LOADED = "ToolboxProcessLoaded";
#endif
diff --git a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
index 6b37ed640..f2420bd1a 100644
--- a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
+++ b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
@@ -4,10 +4,10 @@
"use strict";
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cr = Components.results;
-const Cu = Components.utils;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cr = Components.results;
+var Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
diff --git a/toolkit/mozapps/extensions/internal/moz.build b/toolkit/mozapps/extensions/internal/moz.build
index efcd2af21..337df3104 100644
--- a/toolkit/mozapps/extensions/internal/moz.build
+++ b/toolkit/mozapps/extensions/internal/moz.build
@@ -5,12 +5,12 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES.addons += [
- '../../webextensions/internal/ProductAddonChecker.jsm',
'AddonLogging.jsm',
'AddonRepository_SQLiteMigrator.jsm',
'Content.js',
'GMPProvider.jsm',
'LightweightThemeImageOptimizer.jsm',
+ 'ProductAddonChecker.jsm',
'SpellCheckDictionaryBootstrap.js',
]
diff --git a/toolkit/mozapps/extensions/moz.build b/toolkit/mozapps/extensions/moz.build
index 19f449210..ca04d74a0 100644
--- a/toolkit/mozapps/extensions/moz.build
+++ b/toolkit/mozapps/extensions/moz.build
@@ -25,7 +25,6 @@ EXTRA_COMPONENTS += [
EXTRA_PP_COMPONENTS += [
'extensions.manifest',
- 'nsBlocklistService.js',
]
EXTRA_JS_MODULES += [
diff --git a/toolkit/mozapps/extensions/nsBlocklistService.js b/toolkit/mozapps/extensions/nsBlocklistService.js
deleted file mode 100644
index 487dae8e5..000000000
--- a/toolkit/mozapps/extensions/nsBlocklistService.js
+++ /dev/null
@@ -1,1478 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cr = Components.results;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-try {
- // AddonManager.jsm doesn't allow itself to be imported in the child
- // process. We're used in the child process (for now), so guard against
- // this.
- Components.utils.import("resource://gre/modules/AddonManager.jsm");
-} catch (e) {
-}
-
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
- "resource://gre/modules/FileUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "UpdateChannel",
- "resource://gre/modules/UpdateChannel.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");
-
-const TOOLKIT_ID = "toolkit@mozilla.org"
-const KEY_PROFILEDIR = "ProfD";
-const KEY_APPDIR = "XCurProcD";
-const FILE_BLOCKLIST = "blocklist.xml";
-const PREF_BLOCKLIST_LASTUPDATETIME = "app.update.lastUpdateTime.blocklist-background-update-timer";
-const PREF_BLOCKLIST_URL = "extensions.blocklist.url";
-const PREF_BLOCKLIST_ITEM_URL = "extensions.blocklist.itemURL";
-const PREF_BLOCKLIST_ENABLED = "extensions.blocklist.enabled";
-const PREF_BLOCKLIST_INTERVAL = "extensions.blocklist.interval";
-const PREF_BLOCKLIST_LEVEL = "extensions.blocklist.level";
-const PREF_BLOCKLIST_PINGCOUNTTOTAL = "extensions.blocklist.pingCountTotal";
-const PREF_BLOCKLIST_PINGCOUNTVERSION = "extensions.blocklist.pingCountVersion";
-const PREF_BLOCKLIST_SUPPRESSUI = "extensions.blocklist.suppressUI";
-const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser";
-const PREF_GENERAL_USERAGENT_LOCALE = "general.useragent.locale";
-const PREF_APP_DISTRIBUTION = "distribution.id";
-const PREF_APP_DISTRIBUTION_VERSION = "distribution.version";
-const PREF_EM_LOGGING_ENABLED = "extensions.logging.enabled";
-const XMLURI_BLOCKLIST = "http://www.mozilla.org/2006/addons-blocklist";
-const XMLURI_PARSE_ERROR = "http://www.mozilla.org/newlayout/xml/parsererror.xml"
-const UNKNOWN_XPCOM_ABI = "unknownABI";
-const URI_BLOCKLIST_DIALOG = "chrome://mozapps/content/extensions/blocklist.xul"
-const DEFAULT_SEVERITY = 3;
-const DEFAULT_LEVEL = 2;
-const MAX_BLOCK_LEVEL = 3;
-const SEVERITY_OUTDATED = 0;
-const VULNERABILITYSTATUS_NONE = 0;
-const VULNERABILITYSTATUS_UPDATE_AVAILABLE = 1;
-const VULNERABILITYSTATUS_NO_UPDATE = 2;
-
-const EXTENSION_BLOCK_FILTERS = ["id", "name", "creator", "homepageURL", "updateURL"];
-
-var gLoggingEnabled = null;
-var gBlocklistEnabled = true;
-var gBlocklistLevel = DEFAULT_LEVEL;
-
-XPCOMUtils.defineLazyServiceGetter(this, "gConsole",
- "@mozilla.org/consoleservice;1",
- "nsIConsoleService");
-
-XPCOMUtils.defineLazyServiceGetter(this, "gVersionChecker",
- "@mozilla.org/xpcom/version-comparator;1",
- "nsIVersionComparator");
-
-XPCOMUtils.defineLazyServiceGetter(this, "gCertBlocklistService",
- "@mozilla.org/security/certblocklist;1",
- "nsICertBlocklist");
-
-XPCOMUtils.defineLazyGetter(this, "gPref", function bls_gPref() {
- return Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService).
- QueryInterface(Ci.nsIPrefBranch);
-});
-
-XPCOMUtils.defineLazyGetter(this, "gApp", function bls_gApp() {
- return Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo).
- QueryInterface(Ci.nsIXULRuntime);
-});
-
-XPCOMUtils.defineLazyGetter(this, "gABI", function bls_gABI() {
- let abi = null;
- try {
- abi = gApp.XPCOMABI;
- }
- catch (e) {
- LOG("BlockList Global gABI: XPCOM ABI unknown.");
- }
-#ifdef XP_MACOSX
- // Mac universal build should report a different ABI than either macppc
- // or mactel.
- let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
- getService(Ci.nsIMacUtils);
-
- if (macutils.isUniversalBinary)
- abi += "-u-" + macutils.architecturesInBinary;
-#endif
- return abi;
-});
-
-XPCOMUtils.defineLazyGetter(this, "gOSVersion", function bls_gOSVersion() {
- let osVersion;
- let sysInfo = Cc["@mozilla.org/system-info;1"].
- getService(Ci.nsIPropertyBag2);
- try {
- osVersion = sysInfo.getProperty("name") + " " + sysInfo.getProperty("version");
- }
- catch (e) {
- LOG("BlockList Global gOSVersion: OS Version unknown.");
- }
-
- if (osVersion) {
- try {
- osVersion += " (" + sysInfo.getProperty("secondaryLibrary") + ")";
- }
- catch (e) {
- // Not all platforms have a secondary widget library, so an error is nothing to worry about.
- }
- osVersion = encodeURIComponent(osVersion);
- }
- return osVersion;
-});
-
-// shared code for suppressing bad cert dialogs
-XPCOMUtils.defineLazyGetter(this, "gCertUtils", function bls_gCertUtils() {
- let temp = { };
- Components.utils.import("resource://gre/modules/CertUtils.jsm", temp);
- return temp;
-});
-
-/**
- * Logs a string to the error console.
- * @param string
- * The string to write to the error console..
- */
-function LOG(string) {
- if (gLoggingEnabled) {
- dump("*** " + string + "\n");
- gConsole.logStringMessage(string);
- }
-}
-
-/**
- * Gets a preference value, handling the case where there is no default.
- * @param func
- * The name of the preference function to call, on nsIPrefBranch
- * @param preference
- * The name of the preference
- * @param defaultValue
- * The default value to return in the event the preference has
- * no setting
- * @returns The value of the preference, or undefined if there was no
- * user or default value.
- */
-function getPref(func, preference, defaultValue) {
- try {
- return gPref[func](preference);
- }
- catch (e) {
- }
- return defaultValue;
-}
-
-/**
- * Constructs a URI to a spec.
- * @param spec
- * The spec to construct a URI to
- * @returns The nsIURI constructed.
- */
-function newURI(spec) {
- var ioServ = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService);
- return ioServ.newURI(spec, null, null);
-}
-
-// Restarts the application checking in with observers first
-function restartApp() {
- // Notify all windows that an application quit has been requested.
- var os = Cc["@mozilla.org/observer-service;1"].
- getService(Ci.nsIObserverService);
- var cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].
- createInstance(Ci.nsISupportsPRBool);
- os.notifyObservers(cancelQuit, "quit-application-requested", null);
-
- // Something aborted the quit process.
- if (cancelQuit.data)
- return;
-
- var as = Cc["@mozilla.org/toolkit/app-startup;1"].
- getService(Ci.nsIAppStartup);
- as.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);
-}
-
-/**
- * Checks whether this blocklist element is valid for the current OS and ABI.
- * If the element has an "os" attribute then the current OS must appear in
- * its comma separated list for the element to be valid. Similarly for the
- * xpcomabi attribute.
- */
-function matchesOSABI(blocklistElement) {
- if (blocklistElement.hasAttribute("os")) {
- var choices = blocklistElement.getAttribute("os").split(",");
- if (choices.length > 0 && choices.indexOf(gApp.OS) < 0)
- return false;
- }
-
- if (blocklistElement.hasAttribute("xpcomabi")) {
- choices = blocklistElement.getAttribute("xpcomabi").split(",");
- if (choices.length > 0 && choices.indexOf(gApp.XPCOMABI) < 0)
- return false;
- }
-
- return true;
-}
-
-/**
- * Gets the current value of the locale. It's possible for this preference to
- * be localized, so we have to do a little extra work here. Similar code
- * exists in nsHttpHandler.cpp when building the UA string.
- */
-function getLocale() {
- try {
- // Get the default branch
- var defaultPrefs = gPref.getDefaultBranch(null);
- return defaultPrefs.getComplexValue(PREF_GENERAL_USERAGENT_LOCALE,
- Ci.nsIPrefLocalizedString).data;
- } catch (e) {}
-
- return gPref.getCharPref(PREF_GENERAL_USERAGENT_LOCALE);
-}
-
-/* Get the distribution pref values, from defaults only */
-function getDistributionPrefValue(aPrefName) {
- var prefValue = "default";
-
- var defaults = gPref.getDefaultBranch(null);
- try {
- prefValue = defaults.getCharPref(aPrefName);
- } catch (e) {
- // use default when pref not found
- }
-
- return prefValue;
-}
-
-/**
- * Parse a string representation of a regular expression. Needed because we
- * use the /pattern/flags form (because it's detectable), which is only
- * supported as a literal in JS.
- *
- * @param aStr
- * String representation of regexp
- * @return RegExp instance
- */
-function parseRegExp(aStr) {
- let lastSlash = aStr.lastIndexOf("/");
- let pattern = aStr.slice(1, lastSlash);
- let flags = aStr.slice(lastSlash + 1);
- return new RegExp(pattern, flags);
-}
-
-/**
- * Helper function to test if the blockEntry matches with the plugin.
- *
- * @param blockEntry
- * The plugin blocklist entries to compare against.
- * @param plugin
- * The nsIPluginTag to get the blocklist state for.
- * @returns True if the blockEntry matches the plugin, false otherwise.
- */
-function matchesAllPluginNames(blockEntry, plugin) {
- for (let name in blockEntry.matches) {
- if (!(name in plugin) ||
- typeof(plugin[name]) != "string" ||
- !blockEntry.matches[name].test(plugin[name])) {
- return false;
- }
- }
- return true;
-}
-
-/**
- * Manages the Blocklist. The Blocklist is a representation of the contents of
- * blocklist.xml and allows us to remotely disable / re-enable blocklisted
- * items managed by the Extension Manager with an item's appDisabled property.
- * It also blocklists plugins with data from blocklist.xml.
- */
-
-function Blocklist() {
- Services.obs.addObserver(this, "xpcom-shutdown", false);
- Services.obs.addObserver(this, "sessionstore-windows-restored", false);
- gLoggingEnabled = getPref("getBoolPref", PREF_EM_LOGGING_ENABLED, false);
- gBlocklistEnabled = getPref("getBoolPref", PREF_BLOCKLIST_ENABLED, true);
- gBlocklistLevel = Math.min(getPref("getIntPref", PREF_BLOCKLIST_LEVEL, DEFAULT_LEVEL),
- MAX_BLOCK_LEVEL);
- gPref.addObserver("extensions.blocklist.", this, false);
- gPref.addObserver(PREF_EM_LOGGING_ENABLED, this, false);
- this.wrappedJSObject = this;
-}
-
-Blocklist.prototype = {
- /**
- * Extension ID -> array of Version Ranges
- * Each value in the version range array is a JS Object that has the
- * following properties:
- * "minVersion" The minimum version in a version range (default = 0)
- * "maxVersion" The maximum version in a version range (default = *)
- * "targetApps" Application ID -> array of Version Ranges
- * (default = current application ID)
- * Each value in the version range array is a JS Object that
- * has the following properties:
- * "minVersion" The minimum version in a version range
- * (default = 0)
- * "maxVersion" The maximum version in a version range
- * (default = *)
- */
- _addonEntries: null,
- _pluginEntries: null,
-
- observe: function Blocklist_observe(aSubject, aTopic, aData) {
- switch (aTopic) {
- case "xpcom-shutdown":
- Services.obs.removeObserver(this, "xpcom-shutdown");
- gPref.removeObserver("extensions.blocklist.", this);
- gPref.removeObserver(PREF_EM_LOGGING_ENABLED, this);
- break;
- case "nsPref:changed":
- switch (aData) {
- case PREF_EM_LOGGING_ENABLED:
- gLoggingEnabled = getPref("getBoolPref", PREF_EM_LOGGING_ENABLED, false);
- break;
- case PREF_BLOCKLIST_ENABLED:
- gBlocklistEnabled = getPref("getBoolPref", PREF_BLOCKLIST_ENABLED, true);
- this._loadBlocklist();
- this._blocklistUpdated(null, null);
- break;
- case PREF_BLOCKLIST_LEVEL:
- gBlocklistLevel = Math.min(getPref("getIntPref", PREF_BLOCKLIST_LEVEL, DEFAULT_LEVEL),
- MAX_BLOCK_LEVEL);
- this._blocklistUpdated(null, null);
- break;
- }
- break;
- case "sessionstore-windows-restored":
- Services.obs.removeObserver(this, "sessionstore-windows-restored");
- this._preloadBlocklist();
- break;
- }
- },
-
- /* See nsIBlocklistService */
- isAddonBlocklisted: function Blocklist_isAddonBlocklisted(addon, appVersion, toolkitVersion) {
- return this.getAddonBlocklistState(addon, appVersion, toolkitVersion) ==
- Ci.nsIBlocklistService.STATE_BLOCKED;
- },
-
- /* See nsIBlocklistService */
- getAddonBlocklistState: function Blocklist_getAddonBlocklistState(addon, appVersion, toolkitVersion) {
- if (!this._isBlocklistLoaded())
- this._loadBlocklist();
- return this._getAddonBlocklistState(addon, this._addonEntries,
- appVersion, toolkitVersion);
- },
-
- /**
- * Private version of getAddonBlocklistState that allows the caller to pass in
- * the add-on blocklist entries to compare against.
- *
- * @param id
- * The ID of the item to get the blocklist state for.
- * @param version
- * The version of the item to get the blocklist state for.
- * @param addonEntries
- * The add-on blocklist entries to compare against.
- * @param appVersion
- * The application version to compare to, will use the current
- * version if null.
- * @param toolkitVersion
- * The toolkit version to compare to, will use the current version if
- * null.
- * @returns The blocklist state for the item, one of the STATE constants as
- * defined in nsIBlocklistService.
- */
- _getAddonBlocklistState: function Blocklist_getAddonBlocklistStateCall(addon,
- addonEntries, appVersion, toolkitVersion) {
- if (!gBlocklistEnabled)
- return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
-
- if (!appVersion)
- appVersion = gApp.version;
- if (!toolkitVersion)
- toolkitVersion = gApp.platformVersion;
-
- var blItem = this._findMatchingAddonEntry(addonEntries, addon);
- if (!blItem)
- return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
-
- for (let currentblItem of blItem.versions) {
- if (currentblItem.includesItem(addon.version, appVersion, toolkitVersion))
- return currentblItem.severity >= gBlocklistLevel ? Ci.nsIBlocklistService.STATE_BLOCKED :
- Ci.nsIBlocklistService.STATE_SOFTBLOCKED;
- }
- return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
- },
-
- /**
- * Returns the set of prefs of the add-on stored in the blocklist file
- * (probably to revert them on disabling).
- * @param addon
- * The add-on whose to-be-reset prefs are to be found.
- */
- _getAddonPrefs: function Blocklist_getAddonPrefs(addon) {
- let entry = this._findMatchingAddonEntry(this._addonEntries, addon);
- return entry.prefs.slice(0);
- },
-
- _findMatchingAddonEntry: function Blocklist_findMatchingAddonEntry(aAddonEntries,
- aAddon) {
- if (!aAddon)
- return null;
- // Returns true if the params object passes the constraints set by entry.
- // (For every non-null property in entry, the same key must exist in
- // params and value must be the same)
- function checkEntry(entry, params) {
- for (let [key, value] of entry) {
- if (value === null || value === undefined)
- continue;
- if (params[key]) {
- if (value instanceof RegExp) {
- if (!value.test(params[key])) {
- return false;
- }
- } else if (value !== params[key]) {
- return false;
- }
- } else {
- return false;
- }
- }
- return true;
- }
-
- let params = {};
- for (let filter of EXTENSION_BLOCK_FILTERS) {
- params[filter] = aAddon[filter];
- }
- if (params.creator)
- params.creator = params.creator.name;
- for (let entry of aAddonEntries) {
- if (checkEntry(entry.attributes, params)) {
- return entry;
- }
- }
- return null;
- },
-
- /* See nsIBlocklistService */
- getAddonBlocklistURL: function Blocklist_getAddonBlocklistURL(addon, appVersion, toolkitVersion) {
- if (!gBlocklistEnabled)
- return "";
-
- if (!this._isBlocklistLoaded())
- this._loadBlocklist();
-
- let blItem = this._findMatchingAddonEntry(this._addonEntries, addon);
- if (!blItem || !blItem.blockID)
- return null;
-
- return this._createBlocklistURL(blItem.blockID);
- },
-
- _createBlocklistURL: function Blocklist_createBlocklistURL(id) {
- let url = Services.urlFormatter.formatURLPref(PREF_BLOCKLIST_ITEM_URL);
- url = url.replace(/%blockID%/g, id);
-
- return url;
- },
-
- notify: function Blocklist_notify(aTimer) {
- if (!gBlocklistEnabled)
- return;
-
- try {
- var dsURI = gPref.getCharPref(PREF_BLOCKLIST_URL);
- }
- catch (e) {
- LOG("Blocklist::notify: The " + PREF_BLOCKLIST_URL + " preference" +
- " is missing!");
- return;
- }
-
- var pingCountVersion = getPref("getIntPref", PREF_BLOCKLIST_PINGCOUNTVERSION, 0);
- var pingCountTotal = getPref("getIntPref", PREF_BLOCKLIST_PINGCOUNTTOTAL, 1);
- var daysSinceLastPing = 0;
- if (pingCountVersion == 0) {
- daysSinceLastPing = "new";
- }
- else {
- // Seconds in one day is used because nsIUpdateTimerManager stores the
- // last update time in seconds.
- let secondsInDay = 60 * 60 * 24;
- let lastUpdateTime = getPref("getIntPref", PREF_BLOCKLIST_LASTUPDATETIME, 0);
- if (lastUpdateTime == 0) {
- daysSinceLastPing = "invalid";
- }
- else {
- let now = Math.round(Date.now() / 1000);
- daysSinceLastPing = Math.floor((now - lastUpdateTime) / secondsInDay);
- }
-
- if (daysSinceLastPing == 0 || daysSinceLastPing == "invalid") {
- pingCountVersion = pingCountTotal = "invalid";
- }
- }
-
- if (pingCountVersion < 1)
- pingCountVersion = 1;
- if (pingCountTotal < 1)
- pingCountTotal = 1;
-
- dsURI = dsURI.replace(/%APP_ID%/g, gApp.ID);
- dsURI = dsURI.replace(/%APP_VERSION%/g, gApp.version);
- dsURI = dsURI.replace(/%PRODUCT%/g, gApp.name);
- dsURI = dsURI.replace(/%VERSION%/g, gApp.version);
- dsURI = dsURI.replace(/%BUILD_ID%/g, gApp.appBuildID);
- dsURI = dsURI.replace(/%BUILD_TARGET%/g, gApp.OS + "_" + gABI);
- dsURI = dsURI.replace(/%OS_VERSION%/g, gOSVersion);
- dsURI = dsURI.replace(/%LOCALE%/g, getLocale());
- dsURI = dsURI.replace(/%CHANNEL%/g, UpdateChannel.get());
- dsURI = dsURI.replace(/%PLATFORM_VERSION%/g, gApp.platformVersion);
- dsURI = dsURI.replace(/%DISTRIBUTION%/g,
- getDistributionPrefValue(PREF_APP_DISTRIBUTION));
- dsURI = dsURI.replace(/%DISTRIBUTION_VERSION%/g,
- getDistributionPrefValue(PREF_APP_DISTRIBUTION_VERSION));
- dsURI = dsURI.replace(/%PING_COUNT%/g, pingCountVersion);
- dsURI = dsURI.replace(/%TOTAL_PING_COUNT%/g, pingCountTotal);
- dsURI = dsURI.replace(/%DAYS_SINCE_LAST_PING%/g, daysSinceLastPing);
- dsURI = dsURI.replace(/\+/g, "%2B");
-
- // Under normal operations it will take around 5,883,516 years before the
- // preferences used to store pingCountVersion and pingCountTotal will rollover
- // so this code doesn't bother trying to do the "right thing" here.
- if (pingCountVersion != "invalid") {
- pingCountVersion++;
- if (pingCountVersion > 2147483647) {
- // Rollover to -1 if the value is greater than what is support by an
- // integer preference. The -1 indicates that the counter has been reset.
- pingCountVersion = -1;
- }
- gPref.setIntPref(PREF_BLOCKLIST_PINGCOUNTVERSION, pingCountVersion);
- }
-
- if (pingCountTotal != "invalid") {
- pingCountTotal++;
- if (pingCountTotal > 2147483647) {
- // Rollover to 1 if the value is greater than what is support by an
- // integer preference.
- pingCountTotal = -1;
- }
- gPref.setIntPref(PREF_BLOCKLIST_PINGCOUNTTOTAL, pingCountTotal);
- }
-
- // Verify that the URI is valid
- try {
- var uri = newURI(dsURI);
- }
- catch (e) {
- LOG("Blocklist::notify: There was an error creating the blocklist URI\r\n" +
- "for: " + dsURI + ", error: " + e);
- return;
- }
-
- LOG("Blocklist::notify: Requesting " + uri.spec);
- var request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
- createInstance(Ci.nsIXMLHttpRequest);
- request.open("GET", uri.spec, true);
- request.channel.notificationCallbacks = new gCertUtils.BadCertHandler();
- request.overrideMimeType("text/xml");
- request.setRequestHeader("Cache-Control", "no-cache");
- request.QueryInterface(Components.interfaces.nsIJSXMLHttpRequest);
-
- var self = this;
- request.addEventListener("error", function errorEventListener(event) {
- self.onXMLError(event); }, false);
- request.addEventListener("load", function loadEventListener(event) {
- self.onXMLLoad(event); }, false);
- request.send(null);
-
- // When the blocklist loads we need to compare it to the current copy so
- // make sure we have loaded it.
- if (!this._isBlocklistLoaded())
- this._loadBlocklist();
- },
-
- onXMLLoad: Task.async(function* (aEvent) {
- let request = aEvent.target;
- try {
- gCertUtils.checkCert(request.channel);
- }
- catch (e) {
- LOG("Blocklist::onXMLLoad: " + e);
- return;
- }
- let responseXML = request.responseXML;
- if (!responseXML || responseXML.documentElement.namespaceURI == XMLURI_PARSE_ERROR ||
- (request.status != 200 && request.status != 0)) {
- LOG("Blocklist::onXMLLoad: there was an error during load");
- return;
- }
-
- var oldAddonEntries = this._addonEntries;
- var oldPluginEntries = this._pluginEntries;
- this._addonEntries = [];
- this._pluginEntries = [];
-
- this._loadBlocklistFromString(request.responseText);
- this._blocklistUpdated(oldAddonEntries, oldPluginEntries);
-
- try {
- let path = OS.Path.join(OS.Constants.Path.profileDir, FILE_BLOCKLIST);
- yield OS.File.writeAtomic(path, request.responseText, {tmpPath: path + ".tmp"});
- } catch (e) {
- LOG("Blocklist::onXMLLoad: " + e);
- }
- }),
-
- onXMLError: function Blocklist_onXMLError(aEvent) {
- try {
- var request = aEvent.target;
- // the following may throw (e.g. a local file or timeout)
- var status = request.status;
- }
- catch (e) {
- request = aEvent.target.channel.QueryInterface(Ci.nsIRequest);
- status = request.status;
- }
- var statusText = "nsIXMLHttpRequest channel unavailable";
- // When status is 0 we don't have a valid channel.
- if (status != 0) {
- try {
- statusText = request.statusText;
- } catch (e) {
- }
- }
- LOG("Blocklist:onError: There was an error loading the blocklist file\r\n" +
- statusText);
- },
-
- /**
- * Finds the newest blocklist file from the application and the profile and
- * load it or does nothing if neither exist.
- */
- _loadBlocklist: function Blocklist_loadBlocklist() {
- this._addonEntries = [];
- this._pluginEntries = [];
- var profFile = FileUtils.getFile(KEY_PROFILEDIR, [FILE_BLOCKLIST]);
- if (profFile.exists()) {
- this._loadBlocklistFromFile(profFile);
- return;
- }
- var appFile = FileUtils.getFile(KEY_APPDIR, [FILE_BLOCKLIST]);
- if (appFile.exists()) {
- this._loadBlocklistFromFile(appFile);
- return;
- }
- LOG("Blocklist::_loadBlocklist: no XML File found");
- },
-
- /**
-# The blocklist XML file looks something like this:
-#
-# <blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
-# <emItems>
-# <emItem id="item_1@domain" blockID="i1">
-# <prefs>
-# <pref>accessibility.accesskeycausesactivation</pref>
-# <pref>accessibility.blockautorefresh</pref>
-# </prefs>
-# <versionRange minVersion="1.0" maxVersion="2.0.*">
-# <targetApplication id="{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}">
-# <versionRange minVersion="1.5" maxVersion="1.5.*"/>
-# <versionRange minVersion="1.7" maxVersion="1.7.*"/>
-# </targetApplication>
-# <targetApplication id="toolkit@mozilla.org">
-# <versionRange minVersion="1.9" maxVersion="1.9.*"/>
-# </targetApplication>
-# </versionRange>
-# <versionRange minVersion="3.0" maxVersion="3.0.*">
-# <targetApplication id="{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}">
-# <versionRange minVersion="1.5" maxVersion="1.5.*"/>
-# </targetApplication>
-# <targetApplication id="toolkit@mozilla.org">
-# <versionRange minVersion="1.9" maxVersion="1.9.*"/>
-# </targetApplication>
-# </versionRange>
-# </emItem>
-# <emItem id="item_2@domain" blockID="i2">
-# <versionRange minVersion="3.1" maxVersion="4.*"/>
-# </emItem>
-# <emItem id="item_3@domain">
-# <versionRange>
-# <targetApplication id="{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}">
-# <versionRange minVersion="1.5" maxVersion="1.5.*"/>
-# </targetApplication>
-# </versionRange>
-# </emItem>
-# <emItem id="item_4@domain" blockID="i3">
-# <versionRange>
-# <targetApplication>
-# <versionRange minVersion="1.5" maxVersion="1.5.*"/>
-# </targetApplication>
-# </versionRange>
-# <emItem id="/@badperson\.com$/"/>
-# </emItems>
-# <pluginItems>
-# <pluginItem blockID="i4">
-# <!-- All match tags must match a plugin to blocklist a plugin -->
-# <match name="name" exp="some plugin"/>
-# <match name="description" exp="1[.]2[.]3"/>
-# </pluginItem>
-# </pluginItems>
-# <certItems>
-# <!-- issuerName is the DER issuer name data base64 encoded... -->
-# <certItem issuerName="MA0xCzAJBgNVBAMMAmNh">
-# <!-- ... as is the serial number DER data -->
-# <serialNumber>AkHVNA==</serialNumber>
-# </certItem>
-# </certItems>
-# </blocklist>
- */
-
- _loadBlocklistFromFile: function Blocklist_loadBlocklistFromFile(file) {
- if (!gBlocklistEnabled) {
- LOG("Blocklist::_loadBlocklistFromFile: blocklist is disabled");
- return;
- }
-
- let telemetry = Services.telemetry;
-
- if (this._isBlocklistPreloaded()) {
- telemetry.getHistogramById("BLOCKLIST_SYNC_FILE_LOAD").add(false);
- this._loadBlocklistFromString(this._preloadedBlocklistContent);
- delete this._preloadedBlocklistContent;
- return;
- }
-
- if (!file.exists()) {
- LOG("Blocklist::_loadBlocklistFromFile: XML File does not exist " + file.path);
- return;
- }
-
- telemetry.getHistogramById("BLOCKLIST_SYNC_FILE_LOAD").add(true);
-
- let text = "";
- let fstream = null;
- let cstream = null;
-
- try {
- fstream = Components.classes["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Components.interfaces.nsIFileInputStream);
- cstream = Components.classes["@mozilla.org/intl/converter-input-stream;1"]
- .createInstance(Components.interfaces.nsIConverterInputStream);
-
- fstream.init(file, FileUtils.MODE_RDONLY, FileUtils.PERMS_FILE, 0);
- cstream.init(fstream, "UTF-8", 0, 0);
-
- let str = {};
- let read = 0;
-
- do {
- read = cstream.readString(0xffffffff, str); // read as much as we can and put it in str.value
- text += str.value;
- } while (read != 0);
- } catch (e) {
- LOG("Blocklist::_loadBlocklistFromFile: Failed to load XML file " + e);
- } finally {
- if (cstream)
- cstream.close();
- if (fstream)
- fstream.close();
- }
-
- if (text)
- this._loadBlocklistFromString(text);
- },
-
- _isBlocklistLoaded: function() {
- return this._addonEntries != null && this._pluginEntries != null;
- },
-
- _isBlocklistPreloaded: function() {
- return this._preloadedBlocklistContent != null;
- },
-
- /* Used for testing */
- _clear: function() {
- this._addonEntries = null;
- this._pluginEntries = null;
- this._preloadedBlocklistContent = null;
- },
-
- _preloadBlocklist: Task.async(function*() {
- let profPath = OS.Path.join(OS.Constants.Path.profileDir, FILE_BLOCKLIST);
- try {
- yield this._preloadBlocklistFile(profPath);
- return;
- } catch (e) {
- LOG("Blocklist::_preloadBlocklist: Failed to load XML file " + e)
- }
-
- var appFile = FileUtils.getFile(KEY_APPDIR, [FILE_BLOCKLIST]);
- try{
- yield this._preloadBlocklistFile(appFile.path);
- return;
- } catch (e) {
- LOG("Blocklist::_preloadBlocklist: Failed to load XML file " + e)
- }
-
- LOG("Blocklist::_preloadBlocklist: no XML File found");
- }),
-
- _preloadBlocklistFile: Task.async(function* (path){
- if (this._addonEntries) {
- // The file has been already loaded.
- return;
- }
-
- if (!gBlocklistEnabled) {
- LOG("Blocklist::_preloadBlocklistFile: blocklist is disabled");
- return;
- }
-
- let text = yield OS.File.read(path, { encoding: "utf-8" });
-
- if (!this._addonEntries) {
- // Store the content only if a sync load has not been performed in the meantime.
- this._preloadedBlocklistContent = text;
- }
- }),
-
- _loadBlocklistFromString : function Blocklist_loadBlocklistFromString(text) {
- try {
- var parser = Cc["@mozilla.org/xmlextras/domparser;1"].
- createInstance(Ci.nsIDOMParser);
- var doc = parser.parseFromString(text, "text/xml");
- if (doc.documentElement.namespaceURI != XMLURI_BLOCKLIST) {
- LOG("Blocklist::_loadBlocklistFromFile: aborting due to incorrect " +
- "XML Namespace.\r\nExpected: " + XMLURI_BLOCKLIST + "\r\n" +
- "Received: " + doc.documentElement.namespaceURI);
- return;
- }
-
- var childNodes = doc.documentElement.childNodes;
- for (let element of childNodes) {
- if (!(element instanceof Ci.nsIDOMElement))
- continue;
- switch (element.localName) {
- case "emItems":
- this._addonEntries = this._processItemNodes(element.childNodes, "em",
- this._handleEmItemNode);
- break;
- case "pluginItems":
- this._pluginEntries = this._processItemNodes(element.childNodes, "plugin",
- this._handlePluginItemNode);
- break;
- case "certItems":
- this._processItemNodes(element.childNodes, "cert",
- this._handleCertItemNode.bind(this));
- break;
- default:
- Services.obs.notifyObservers(element,
- "blocklist-data-" + element.localName,
- null);
- }
- }
- gCertBlocklistService.saveEntries();
- }
- catch (e) {
- LOG("Blocklist::_loadBlocklistFromFile: Error constructing blocklist " + e);
- return;
- }
- },
-
- _processItemNodes: function Blocklist_processItemNodes(itemNodes, prefix, handler) {
- var result = [];
- var itemName = prefix + "Item";
- for (var i = 0; i < itemNodes.length; ++i) {
- var blocklistElement = itemNodes.item(i);
- if (!(blocklistElement instanceof Ci.nsIDOMElement) ||
- blocklistElement.localName != itemName)
- continue;
-
- handler(blocklistElement, result);
- }
- return result;
- },
-
- _handleCertItemNode: function Blocklist_handleCertItemNode(blocklistElement,
- result) {
- let issuer = blocklistElement.getAttribute("issuerName");
- for (let snElement of blocklistElement.children) {
- try {
- gCertBlocklistService.revokeCertByIssuerAndSerial(issuer, snElement.textContent);
- } catch (e) {
- // we want to keep trying other elements since missing all items
- // is worse than missing one
- LOG("Blocklist::_handleCertItemNode: Error adding revoked cert " + e);
- }
- }
- },
-
- _handleEmItemNode: function Blocklist_handleEmItemNode(blocklistElement, result) {
- if (!matchesOSABI(blocklistElement))
- return;
-
- let blockEntry = {
- versions: [],
- prefs: [],
- blockID: null,
- attributes: new Map()
- // Atleast one of EXTENSION_BLOCK_FILTERS must get added to attributes
- };
-
- // Any filter starting with '/' is interpreted as a regex. So if an attribute
- // starts with a '/' it must be checked via a regex.
- function regExpCheck(attr) {
- return attr.startsWith("/") ? parseRegExp(attr) : attr;
- }
-
- for (let filter of EXTENSION_BLOCK_FILTERS) {
- let attr = blocklistElement.getAttribute(filter);
- if (attr)
- blockEntry.attributes.set(filter, regExpCheck(attr));
- }
-
- var childNodes = blocklistElement.childNodes;
-
- for (let x = 0; x < childNodes.length; x++) {
- var childElement = childNodes.item(x);
- if (!(childElement instanceof Ci.nsIDOMElement))
- continue;
- if (childElement.localName === "prefs") {
- let prefElements = childElement.childNodes;
- for (let i = 0; i < prefElements.length; i++) {
- let prefElement = prefElements.item(i);
- if (!(prefElement instanceof Ci.nsIDOMElement) ||
- prefElement.localName !== "pref")
- continue;
- blockEntry.prefs.push(prefElement.textContent);
- }
- }
- else if (childElement.localName === "versionRange")
- blockEntry.versions.push(new BlocklistItemData(childElement));
- }
- // if only the extension ID is specified block all versions of the
- // extension for the current application.
- if (blockEntry.versions.length == 0)
- blockEntry.versions.push(new BlocklistItemData(null));
-
- blockEntry.blockID = blocklistElement.getAttribute("blockID");
-
- result.push(blockEntry);
- },
-
- _handlePluginItemNode: function Blocklist_handlePluginItemNode(blocklistElement, result) {
- if (!matchesOSABI(blocklistElement))
- return;
-
- var matchNodes = blocklistElement.childNodes;
- var blockEntry = {
- matches: {},
- versions: [],
- blockID: null,
- infoURL: null,
- };
- var hasMatch = false;
- for (var x = 0; x < matchNodes.length; ++x) {
- var matchElement = matchNodes.item(x);
- if (!(matchElement instanceof Ci.nsIDOMElement))
- continue;
- if (matchElement.localName == "match") {
- var name = matchElement.getAttribute("name");
- var exp = matchElement.getAttribute("exp");
- try {
- blockEntry.matches[name] = new RegExp(exp, "m");
- hasMatch = true;
- } catch (e) {
- // Ignore invalid regular expressions
- }
- }
- if (matchElement.localName == "versionRange") {
- blockEntry.versions.push(new BlocklistItemData(matchElement));
- }
- else if (matchElement.localName == "infoURL") {
- blockEntry.infoURL = matchElement.textContent;
- }
- }
- // Plugin entries require *something* to match to an actual plugin
- if (!hasMatch)
- return;
- // Add a default versionRange if there wasn't one specified
- if (blockEntry.versions.length == 0)
- blockEntry.versions.push(new BlocklistItemData(null));
-
- blockEntry.blockID = blocklistElement.getAttribute("blockID");
-
- result.push(blockEntry);
- },
-
- /* See nsIBlocklistService */
- getPluginBlocklistState: function Blocklist_getPluginBlocklistState(plugin,
- appVersion, toolkitVersion) {
- if (!this._isBlocklistLoaded())
- this._loadBlocklist();
- return this._getPluginBlocklistState(plugin, this._pluginEntries,
- appVersion, toolkitVersion);
- },
-
- /**
- * Private version of getPluginBlocklistState that allows the caller to pass in
- * the plugin blocklist entries.
- *
- * @param plugin
- * The nsIPluginTag to get the blocklist state for.
- * @param pluginEntries
- * The plugin blocklist entries to compare against.
- * @param appVersion
- * The application version to compare to, will use the current
- * version if null.
- * @param toolkitVersion
- * The toolkit version to compare to, will use the current version if
- * null.
- * @returns The blocklist state for the item, one of the STATE constants as
- * defined in nsIBlocklistService.
- */
- _getPluginBlocklistState: function Blocklist_getPluginBlocklistState(plugin,
- pluginEntries, appVersion, toolkitVersion) {
- if (!gBlocklistEnabled)
- return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
-
- if (!appVersion)
- appVersion = gApp.version;
- if (!toolkitVersion)
- toolkitVersion = gApp.platformVersion;
-
- for each (var blockEntry in pluginEntries) {
- var matchFailed = false;
- for (var name in blockEntry.matches) {
- if (!(name in plugin) ||
- typeof(plugin[name]) != "string" ||
- !blockEntry.matches[name].test(plugin[name])) {
- matchFailed = true;
- break;
- }
- }
-
- if (matchFailed)
- continue;
-
- for (let blockEntryVersion of blockEntry.versions) {
- if (blockEntryVersion.includesItem(plugin.version, appVersion,
- toolkitVersion)) {
- if (blockEntryVersion.severity >= gBlocklistLevel)
- return Ci.nsIBlocklistService.STATE_BLOCKED;
- if (blockEntryVersion.severity == SEVERITY_OUTDATED) {
- let vulnerabilityStatus = blockEntryVersion.vulnerabilityStatus;
- if (vulnerabilityStatus == VULNERABILITYSTATUS_UPDATE_AVAILABLE)
- return Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE;
- if (vulnerabilityStatus == VULNERABILITYSTATUS_NO_UPDATE)
- return Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE;
- return Ci.nsIBlocklistService.STATE_OUTDATED;
- }
- return Ci.nsIBlocklistService.STATE_SOFTBLOCKED;
- }
- }
- }
-
- return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
- },
-
- /**
- * Get the matching blocklist entry for the passed plugin, if
- * available.
- * @param plugin The plugin to find the block entry for.
- * @returns The block entry which matches the passed plugin, null
- * otherwise.
- */
- _getPluginBlockEntry: function (plugin) {
- if (!gBlocklistEnabled)
- return null;
-
- if (!this._isBlocklistLoaded())
- this._loadBlocklist();
-
- for each (let blockEntry in this._pluginEntries) {
- if (matchesAllPluginNames(blockEntry, plugin)) {
- return blockEntry;
- }
- }
-
- return null;
- },
-
- /* See nsIBlocklistService */
- getPluginBlocklistURL: function Blocklist_getPluginBlocklistURL(plugin) {
- let blockEntry = this._getPluginBlockEntry(plugin);
- if (!blockEntry || !blockEntry.blockID) {
- return null;
- }
-
- return this._createBlocklistURL(blockEntry.blockID);
- },
-
- /* See nsIBlocklistService */
- getPluginInfoURL: function (plugin) {
- let blockEntry = this._getPluginBlockEntry(plugin);
- if (!blockEntry || !blockEntry.blockID) {
- return null;
- }
-
- return blockEntry.infoURL;
- },
-
- _blocklistUpdated: function Blocklist_blocklistUpdated(oldAddonEntries, oldPluginEntries) {
- var addonList = [];
-
- // A helper function that reverts the prefs passed to default values.
- function resetPrefs(prefs) {
- for (let pref of prefs)
- gPref.clearUserPref(pref);
- }
- var self = this;
- const types = ["extension", "theme", "locale", "dictionary", "service"];
- AddonManager.getAddonsByTypes(types, function blocklistUpdated_getAddonsByTypes(addons) {
-
- for (let addon of addons) {
- let oldState = Ci.nsIBlocklistService.STATE_NOTBLOCKED;
- if (oldAddonEntries)
- oldState = self._getAddonBlocklistState(addon, oldAddonEntries);
- let state = self.getAddonBlocklistState(addon);
-
- LOG("Blocklist state for " + addon.id + " changed from " +
- oldState + " to " + state);
-
- // We don't want to re-warn about add-ons
- if (state == oldState)
- continue;
-
- if (state === Ci.nsIBlocklistService.STATE_BLOCKED) {
- // It's a hard block. We must reset certain preferences.
- let prefs = self._getAddonPrefs(addon);
- resetPrefs(prefs);
- }
-
- // Ensure that softDisabled is false if the add-on is not soft blocked
- if (state != Ci.nsIBlocklistService.STATE_SOFTBLOCKED)
- addon.softDisabled = false;
-
- // Don't warn about add-ons becoming unblocked.
- if (state == Ci.nsIBlocklistService.STATE_NOT_BLOCKED)
- continue;
-
- // If an add-on has dropped from hard to soft blocked just mark it as
- // soft disabled and don't warn about it.
- if (state == Ci.nsIBlocklistService.STATE_SOFTBLOCKED &&
- oldState == Ci.nsIBlocklistService.STATE_BLOCKED) {
- addon.softDisabled = true;
- continue;
- }
-
- // If the add-on is already disabled for some reason then don't warn
- // about it
- if (!addon.isActive)
- continue;
-
- addonList.push({
- name: addon.name,
- version: addon.version,
- icon: addon.iconURL,
- disable: false,
- blocked: state == Ci.nsIBlocklistService.STATE_BLOCKED,
- item: addon,
- url: self.getAddonBlocklistURL(addon),
- });
- }
-
- AddonManagerPrivate.updateAddonAppDisabledStates();
-
- var phs = Cc["@mozilla.org/plugin/host;1"].
- getService(Ci.nsIPluginHost);
- var plugins = phs.getPluginTags();
-
- for (let plugin of plugins) {
- let oldState = -1;
- if (oldPluginEntries)
- oldState = self._getPluginBlocklistState(plugin, oldPluginEntries);
- let state = self.getPluginBlocklistState(plugin);
- LOG("Blocklist state for " + plugin.name + " changed from " +
- oldState + " to " + state);
- // We don't want to re-warn about items
- if (state == oldState)
- continue;
-
- if (oldState == Ci.nsIBlocklistService.STATE_BLOCKED) {
- if (state == Ci.nsIBlocklistService.STATE_SOFTBLOCKED)
- plugin.enabledState = Ci.nsIPluginTag.STATE_DISABLED;
- }
- else if (!plugin.disabled && state != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) {
- if (state == Ci.nsIBlocklistService.STATE_OUTDATED) {
- gPref.setBoolPref(PREF_PLUGINS_NOTIFYUSER, true);
- }
- else if (state != Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE &&
- state != Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE) {
- addonList.push({
- name: plugin.name,
- version: plugin.version,
- icon: "chrome://mozapps/skin/plugins/pluginGeneric.png",
- disable: false,
- blocked: state == Ci.nsIBlocklistService.STATE_BLOCKED,
- item: plugin,
- url: self.getPluginBlocklistURL(plugin),
- });
- }
- }
- }
-
- if (addonList.length == 0) {
- Services.obs.notifyObservers(self, "blocklist-updated", "");
- return;
- }
-
- if ("@mozilla.org/addons/blocklist-prompt;1" in Cc) {
- try {
- let blockedPrompter = Cc["@mozilla.org/addons/blocklist-prompt;1"]
- .getService(Ci.nsIBlocklistPrompt);
- blockedPrompter.prompt(addonList);
- } catch (e) {
- LOG(e);
- }
- Services.obs.notifyObservers(self, "blocklist-updated", "");
- return;
- }
-
- var args = {
- restart: false,
- list: addonList
- };
- // This lets the dialog get the raw js object
- args.wrappedJSObject = args;
-
- /*
- Some tests run without UI, so the async code listens to a message
- that can be sent programatically
- */
- let applyBlocklistChanges = function blocklistUpdated_applyBlocklistChanges() {
- for (let addon of addonList) {
- if (!addon.disable)
- continue;
-
- if (addon.item instanceof Ci.nsIPluginTag)
- addon.item.enabledState = Ci.nsIPluginTag.STATE_DISABLED;
- else {
- // This add-on is softblocked.
- addon.item.softDisabled = true;
- // We must revert certain prefs.
- let prefs = self._getAddonPrefs(addon.item);
- resetPrefs(prefs);
- }
- }
-
- if (args.restart)
- restartApp();
-
- Services.obs.notifyObservers(self, "blocklist-updated", "");
- Services.obs.removeObserver(applyBlocklistChanges, "addon-blocklist-closed");
- }
-
- Services.obs.addObserver(applyBlocklistChanges, "addon-blocklist-closed", false);
-
- if (getPref("getBoolPref", PREF_BLOCKLIST_SUPPRESSUI, false)) {
- applyBlocklistChanges();
- return;
- }
-
- function blocklistUnloadHandler(event) {
- if (event.target.location == URI_BLOCKLIST_DIALOG) {
- applyBlocklistChanges();
- blocklistWindow.removeEventListener("unload", blocklistUnloadHandler);
- }
- }
-
- let blocklistWindow = Services.ww.openWindow(null, URI_BLOCKLIST_DIALOG, "",
- "chrome,centerscreen,dialog,titlebar", args);
- if (blocklistWindow)
- blocklistWindow.addEventListener("unload", blocklistUnloadHandler, false);
- });
- },
-
- classID: Components.ID("{66354bc9-7ed1-4692-ae1d-8da97d6b205e}"),
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
- Ci.nsIBlocklistService,
- Ci.nsITimerCallback]),
-};
-
-/**
- * Helper for constructing a blocklist.
- */
-function BlocklistItemData(versionRangeElement) {
- var versionRange = this.getBlocklistVersionRange(versionRangeElement);
- this.minVersion = versionRange.minVersion;
- this.maxVersion = versionRange.maxVersion;
- if (versionRangeElement && versionRangeElement.hasAttribute("severity"))
- this.severity = versionRangeElement.getAttribute("severity");
- else
- this.severity = DEFAULT_SEVERITY;
- if (versionRangeElement && versionRangeElement.hasAttribute("vulnerabilitystatus")) {
- this.vulnerabilityStatus = versionRangeElement.getAttribute("vulnerabilitystatus");
- } else {
- this.vulnerabilityStatus = VULNERABILITYSTATUS_NONE;
- }
- this.targetApps = { };
- var found = false;
-
- if (versionRangeElement) {
- for (var i = 0; i < versionRangeElement.childNodes.length; ++i) {
- var targetAppElement = versionRangeElement.childNodes.item(i);
- if (!(targetAppElement instanceof Ci.nsIDOMElement) ||
- targetAppElement.localName != "targetApplication")
- continue;
- found = true;
- // default to the current application if id is not provided.
- var appID = targetAppElement.hasAttribute("id") ? targetAppElement.getAttribute("id") : gApp.ID;
- this.targetApps[appID] = this.getBlocklistAppVersions(targetAppElement);
- }
- }
- // Default to all versions of the current application when no targetApplication
- // elements were found
- if (!found)
- this.targetApps[gApp.ID] = this.getBlocklistAppVersions(null);
-}
-
-BlocklistItemData.prototype = {
- /**
- * Tests if a version of an item is included in the version range and target
- * application information represented by this BlocklistItemData using the
- * provided application and toolkit versions.
- * @param version
- * The version of the item being tested.
- * @param appVersion
- * The application version to test with.
- * @param toolkitVersion
- * The toolkit version to test with.
- * @returns True if the version range covers the item version and application
- * or toolkit version.
- */
- includesItem: function BlocklistItemData_includesItem(version, appVersion, toolkitVersion) {
- // Some platforms have no version for plugins, these don't match if there
- // was a min/maxVersion provided
- if (!version && (this.minVersion || this.maxVersion))
- return false;
-
- // Check if the item version matches
- if (!this.matchesRange(version, this.minVersion, this.maxVersion))
- return false;
-
- // Check if the application version matches
- if (this.matchesTargetRange(gApp.ID, appVersion))
- return true;
-
- // Check if the toolkit version matches
- return this.matchesTargetRange(TOOLKIT_ID, toolkitVersion);
- },
-
- /**
- * Checks if a version is higher than or equal to the minVersion (if provided)
- * and lower than or equal to the maxVersion (if provided).
- * @param version
- * The version to test.
- * @param minVersion
- * The minimum version. If null it is assumed that version is always
- * larger.
- * @param maxVersion
- * The maximum version. If null it is assumed that version is always
- * smaller.
- */
- matchesRange: function BlocklistItemData_matchesRange(version, minVersion, maxVersion) {
- if (minVersion && gVersionChecker.compare(version, minVersion) < 0)
- return false;
- if (maxVersion && gVersionChecker.compare(version, maxVersion) > 0)
- return false;
- return true;
- },
-
- /**
- * Tests if there is a matching range for the given target application id and
- * version.
- * @param appID
- * The application ID to test for, may be for an application or toolkit
- * @param appVersion
- * The version of the application to test for.
- * @returns True if this version range covers the application version given.
- */
- matchesTargetRange: function BlocklistItemData_matchesTargetRange(appID, appVersion) {
- var blTargetApp = this.targetApps[appID];
- if (!blTargetApp)
- return false;
-
- for (let app of blTargetApp) {
- if (this.matchesRange(appVersion, app.minVersion, app.maxVersion))
- return true;
- }
-
- return false;
- },
-
- /**
- * Retrieves a version range (e.g. minVersion and maxVersion) for a
- * blocklist item's targetApplication element.
- * @param targetAppElement
- * A targetApplication blocklist element.
- * @returns An array of JS objects with the following properties:
- * "minVersion" The minimum version in a version range (default = null).
- * "maxVersion" The maximum version in a version range (default = null).
- */
- getBlocklistAppVersions: function BlocklistItemData_getBlocklistAppVersions(targetAppElement) {
- var appVersions = [ ];
-
- if (targetAppElement) {
- for (var i = 0; i < targetAppElement.childNodes.length; ++i) {
- var versionRangeElement = targetAppElement.childNodes.item(i);
- if (!(versionRangeElement instanceof Ci.nsIDOMElement) ||
- versionRangeElement.localName != "versionRange")
- continue;
- appVersions.push(this.getBlocklistVersionRange(versionRangeElement));
- }
- }
- // return minVersion = null and maxVersion = null if no specific versionRange
- // elements were found
- if (appVersions.length == 0)
- appVersions.push(this.getBlocklistVersionRange(null));
- return appVersions;
- },
-
- /**
- * Retrieves a version range (e.g. minVersion and maxVersion) for a blocklist
- * versionRange element.
- * @param versionRangeElement
- * The versionRange blocklist element.
- * @returns A JS object with the following properties:
- * "minVersion" The minimum version in a version range (default = null).
- * "maxVersion" The maximum version in a version range (default = null).
- */
- getBlocklistVersionRange: function BlocklistItemData_getBlocklistVersionRange(versionRangeElement) {
- var minVersion = null;
- var maxVersion = null;
- if (!versionRangeElement)
- return { minVersion: minVersion, maxVersion: maxVersion };
-
- if (versionRangeElement.hasAttribute("minVersion"))
- minVersion = versionRangeElement.getAttribute("minVersion");
- if (versionRangeElement.hasAttribute("maxVersion"))
- maxVersion = versionRangeElement.getAttribute("maxVersion");
-
- return { minVersion: minVersion, maxVersion: maxVersion };
- }
-};
-
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([Blocklist]);
diff --git a/toolkit/mozapps/installer/upload-files.mk b/toolkit/mozapps/installer/upload-files.mk
index 9abfd855a..25103ff37 100644
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -349,10 +349,6 @@ ifndef MOZ_PKG_MANIFEST
NO_PKG_FILES += ssltunnel*
endif
-ifdef MOZ_DMD
- NO_PKG_FILES += SmokeDMD
-endif
-
DEFINES += -DDLL_PREFIX=$(DLL_PREFIX) -DDLL_SUFFIX=$(DLL_SUFFIX) -DBIN_SUFFIX=$(BIN_SUFFIX)
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
diff --git a/toolkit/mozapps/webextensions/amIAddonManager.idl b/toolkit/mozapps/webextensions/amIAddonManager.idl
deleted file mode 100644
index 58a58b62d..000000000
--- a/toolkit/mozapps/webextensions/amIAddonManager.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-interface nsIURI;
-
-/**
- * A service to make some AddonManager functionality available to C++ callers.
- * Javascript callers should still use AddonManager.jsm directly.
- */
-[scriptable, function, uuid(7b45d82d-7ad5-48d7-9b05-f32eb9818cd4)]
-interface amIAddonManager : nsISupports
-{
- /**
- * Synchronously map a URI to the corresponding Addon ID.
- *
- * Mappable URIs are limited to in-application resources belonging to the
- * add-on, such as Javascript compartments, XUL windows, XBL bindings, etc.
- * but do not include URIs from meta data, such as the add-on homepage.
- *
- * @param aURI
- * The nsIURI to map
- * @return
- * true if the URI has been mapped successfully to an Addon ID
- */
- boolean mapURIToAddonID(in nsIURI aURI, out AUTF8String aID);
-};
diff --git a/toolkit/mozapps/webextensions/amIAddonPathService.idl b/toolkit/mozapps/webextensions/amIAddonPathService.idl
deleted file mode 100644
index 9c9197a61..000000000
--- a/toolkit/mozapps/webextensions/amIAddonPathService.idl
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-interface nsIURI;
-
-/**
- * This service maps file system paths where add-ons reside to the ID
- * of the add-on. Paths are added by the add-on manager. They can
- * looked up by anyone.
- */
-[scriptable, uuid(fcd9e270-dfb1-11e3-8b68-0800200c9a66)]
-interface amIAddonPathService : nsISupports
-{
- /**
- * Given a path to a file, return the ID of the add-on that the file belongs
- * to. Returns an empty string if there is no add-on there. Note that if an
- * add-on is located at /a/b/c, then looking up the path /a/b/c/d will return
- * that add-on.
- */
- AString findAddonId(in AString path);
-
- /**
- * Call this function to inform the service that the given file system path is
- * associated with the given add-on ID.
- */
- void insertPath(in AString path, in AString addonId);
-
- /**
- * Given a URI to a file, return the ID of the add-on that the file belongs
- * to. Returns an empty string if there is no add-on there.
- */
- AString mapURIToAddonId(in nsIURI aURI);
-};
diff --git a/toolkit/mozapps/webextensions/amIWebInstallListener.idl b/toolkit/mozapps/webextensions/amIWebInstallListener.idl
deleted file mode 100644
index eed108097..000000000
--- a/toolkit/mozapps/webextensions/amIWebInstallListener.idl
+++ /dev/null
@@ -1,134 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-interface nsIDOMElement;
-interface nsIURI;
-interface nsIVariant;
-
-/**
- * amIWebInstallInfo is used by the default implementation of
- * amIWebInstallListener to communicate with the running application and allow
- * it to warn the user about blocked installs and start the installs running.
- */
-[scriptable, uuid(fa0b47a3-f819-47ac-bc66-4bd1d7f67b1d)]
-interface amIWebInstallInfo : nsISupports
-{
- readonly attribute nsIDOMElement browser;
- readonly attribute nsIURI originatingURI;
- readonly attribute nsIVariant installs;
-
- /**
- * Starts all installs.
- */
- void install();
-};
-
-/**
- * The registered amIWebInstallListener is used to notify about new installs
- * triggered by websites. The default implementation displays a confirmation
- * dialog when add-ons are ready to install and uses the observer service to
- * notify when installations are blocked.
- */
-[scriptable, uuid(d9240d4b-6b3a-4cad-b402-de6c93337e0c)]
-interface amIWebInstallListener : nsISupports
-{
- /**
- * Called when installation by websites is currently disabled.
- *
- * @param aBrowser
- * The browser that triggered the installs
- * @param aUri
- * The URI of the site that triggered the installs
- * @param aInstalls
- * The AddonInstalls that were blocked
- * @param aCount
- * The number of AddonInstalls
- */
- void onWebInstallDisabled(in nsIDOMElement aBrowser, in nsIURI aUri,
- [array, size_is(aCount)] in nsIVariant aInstalls,
- [optional] in uint32_t aCount);
-
- /**
- * Called when the website is not allowed to directly prompt the user to
- * install add-ons.
- *
- * @param aBrowser
- * The browser that triggered the installs
- * @param aUri
- * The URI of the site that triggered the installs
- * @param aInstalls
- * The AddonInstalls that were blocked
- * @param aCount
- * The number of AddonInstalls
- * @return true if the caller should start the installs
- */
- boolean onWebInstallBlocked(in nsIDOMElement aBrowser, in nsIURI aUri,
- [array, size_is(aCount)] in nsIVariant aInstalls,
- [optional] in uint32_t aCount);
-
- /**
- * Called when a website wants to ask the user to install add-ons.
- *
- * @param aBrowser
- * The browser that triggered the installs
- * @param aUri
- * The URI of the site that triggered the installs
- * @param aInstalls
- * The AddonInstalls that were requested
- * @param aCount
- * The number of AddonInstalls
- * @return true if the caller should start the installs
- */
- boolean onWebInstallRequested(in nsIDOMElement aBrowser, in nsIURI aUri,
- [array, size_is(aCount)] in nsIVariant aInstalls,
- [optional] in uint32_t aCount);
-};
-
-[scriptable, uuid(a80b89ad-bb1a-4c43-9cb7-3ae656556f78)]
-interface amIWebInstallListener2 : nsISupports
-{
- /**
- * Called when a non-same-origin resource attempted to initiate an install.
- * Installs will have already been cancelled and cannot be restarted.
- *
- * @param aBrowser
- * The browser that triggered the installs
- * @param aUri
- * The URI of the site that triggered the installs
- * @param aInstalls
- * The AddonInstalls that were blocked
- * @param aCount
- * The number of AddonInstalls
- */
- boolean onWebInstallOriginBlocked(in nsIDOMElement aBrowser, in nsIURI aUri,
- [array, size_is(aCount)] in nsIVariant aInstalls,
- [optional] in uint32_t aCount);
-};
-
-/**
- * amIWebInstallPrompt is used, if available, by the default implementation of
- * amIWebInstallInfo to display a confirmation UI to the user before running
- * installs.
- */
-[scriptable, uuid(386906f1-4d18-45bf-bc81-5dcd68e42c3b)]
-interface amIWebInstallPrompt : nsISupports
-{
- /**
- * Get a confirmation that the user wants to start the installs.
- *
- * @param aBrowser
- * The browser that triggered the installs
- * @param aUri
- * The URI of the site that triggered the installs
- * @param aInstalls
- * The AddonInstalls that were requested
- * @param aCount
- * The number of AddonInstalls
- */
- void confirm(in nsIDOMElement aBrowser, in nsIURI aUri,
- [array, size_is(aCount)] in nsIVariant aInstalls,
- [optional] in uint32_t aCount);
-};
diff --git a/toolkit/mozapps/webextensions/amIWebInstaller.idl b/toolkit/mozapps/webextensions/amIWebInstaller.idl
deleted file mode 100644
index 6c5ebca67..000000000
--- a/toolkit/mozapps/webextensions/amIWebInstaller.idl
+++ /dev/null
@@ -1,82 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-interface nsIDOMElement;
-interface nsIVariant;
-interface nsIURI;
-
-/**
- * A callback function used to notify webpages when a requested install has
- * ended.
- *
- * NOTE: This is *not* the same as InstallListener.
- */
-[scriptable, function, uuid(bb22f5c0-3ca1-48f6-873c-54e87987700f)]
-interface amIInstallCallback : nsISupports
-{
- /**
- * Called when an install completes or fails.
- *
- * @param aUrl
- * The url of the add-on being installed
- * @param aStatus
- * 0 if the install was successful or negative if not
- */
- void onInstallEnded(in AString aUrl, in int32_t aStatus);
-};
-
-
-/**
- * This interface is used to allow webpages to start installing add-ons.
- */
-[scriptable, uuid(658d6c09-15e0-4688-bee8-8551030472a9)]
-interface amIWebInstaller : nsISupports
-{
- /**
- * Checks if installation is enabled for a webpage.
- *
- * @param aMimetype
- * The mimetype for the add-on to be installed
- * @param referer
- * The URL of the webpage trying to install an add-on
- * @return true if installation is enabled
- */
- boolean isInstallEnabled(in AString aMimetype, in nsIURI aReferer);
-
- /**
- * Installs an array of add-ons at the request of a webpage
- *
- * @param aMimetype
- * The mimetype for the add-ons
- * @param aBrowser
- * The browser installing the add-ons.
- * @param aReferer
- * The URI for the webpage installing the add-ons
- * @param aUris
- * The URIs of add-ons to be installed
- * @param aHashes
- * The hashes for the add-ons to be installed
- * @param aNames
- * The names for the add-ons to be installed
- * @param aIcons
- * The icons for the add-ons to be installed
- * @param aCallback
- * An optional callback to notify about installation success and
- * failure
- * @param aInstallCount
- * An optional argument including the number of add-ons to install
- * @return true if the installation was successfully started
- */
- boolean installAddonsFromWebpage(in AString aMimetype,
- in nsIDOMElement aBrowser,
- in nsIURI aReferer,
- [array, size_is(aInstallCount)] in wstring aUris,
- [array, size_is(aInstallCount)] in wstring aHashes,
- [array, size_is(aInstallCount)] in wstring aNames,
- [array, size_is(aInstallCount)] in wstring aIcons,
- [optional] in amIInstallCallback aCallback,
- [optional] in uint32_t aInstallCount);
-};
diff --git a/toolkit/mozapps/webextensions/content/OpenH264-license.txt b/toolkit/mozapps/webextensions/content/OpenH264-license.txt
deleted file mode 100644
index ad37989b8..000000000
--- a/toolkit/mozapps/webextensions/content/OpenH264-license.txt
+++ /dev/null
@@ -1,59 +0,0 @@
--------------------------------------------------------
-About The Cisco-Provided Binary of OpenH264 Video Codec
--------------------------------------------------------
-
-Cisco provides this program under the terms of the BSD license.
-
-Additionally, this binary is licensed under Cisco’s AVC/H.264 Patent Portfolio License from MPEG LA, at no cost to you, provided that the requirements and conditions shown below in the AVC/H.264 Patent Portfolio sections are met.
-
-As with all AVC/H.264 codecs, you may also obtain your own patent license from MPEG LA or from the individual patent owners, or proceed at your own risk. Your rights from Cisco under the BSD license are not affected by this choice.
-
-For more information on the OpenH264 binary licensing, please see the OpenH264 FAQ found at http://www.openh264.org/faq.html#binary
-
-A corresponding source code to this binary program is available under the same BSD terms, which can be found at http://www.openh264.org
-
------------
-BSD License
------------
-
-Copyright © 2014 Cisco Systems, Inc.
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS†AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
------------------------------------------
-AVC/H.264 Patent Portfolio License Notice
------------------------------------------
-
-The binary form of this Software is distributed by Cisco under the AVC/H.264 Patent Portfolio License from MPEG LA, and is subject to the following requirements, which may or may not be applicable to your use of this software:
-
-THIS PRODUCT IS LICENSED UNDER THE AVC PATENT PORTFOLIO LICENSE FOR THE PERSONAL USE OF A CONSUMER OR OTHER USES IN WHICH IT DOES NOT RECEIVE REMUNERATION TO (i) ENCODE VIDEO IN COMPLIANCE WITH THE AVC STANDARD (“AVC VIDEOâ€) AND/OR (ii) DECODE AVC VIDEO THAT WAS ENCODED BY A CONSUMER ENGAGED IN A PERSONAL ACTIVITY AND/OR WAS OBTAINED FROM A VIDEO PROVIDER LICENSED TO PROVIDE AVC VIDEO. NO LICENSE IS GRANTED OR SHALL BE IMPLIED FOR ANY OTHER USE. ADDITIONAL INFORMATION MAY BE OBTAINED FROM MPEG LA, L.L.C. SEE HTTP://WWW.MPEGLA.COM
-
-Accordingly, please be advised that content providers and broadcasters using AVC/H.264 in their service may be required to obtain a separate use license from MPEG LA, referred to as "(b) sublicenses" in the SUMMARY OF AVC/H.264 LICENSE TERMS from MPEG LA found at http://www.openh264.org/mpegla
-
----------------------------------------------
-AVC/H.264 Patent Portfolio License Conditions
----------------------------------------------
-
-In addition, the Cisco-provided binary of this Software is licensed under Cisco's license from MPEG LA only if the following conditions are met:
-
-1. The Cisco-provided binary is separately downloaded to an end user’s device, and not integrated into or combined with third party software prior to being downloaded to the end user’s device;
-
-2. The end user must have the ability to control (e.g., to enable, disable, or re-enable) the use of the Cisco-provided binary;
-
-3. Third party software, in the location where end users can control the use of the Cisco-provided binary, must display the following text:
-
- "OpenH264 Video Codec provided by Cisco Systems, Inc."
-
-4. Any third-party software that makes use of the Cisco-provided binary must reproduce all of the above text, as well as this last condition, in the EULA and/or in another location where licensing information is to be presented to the end user.
-
-
-
- v1.0
diff --git a/toolkit/mozapps/webextensions/content/about.xul b/toolkit/mozapps/webextensions/content/about.xul
deleted file mode 100644
index 6effcf37a..000000000
--- a/toolkit/mozapps/webextensions/content/about.xul
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://mozapps/skin/extensions/about.css" type="text/css"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://mozapps/locale/extensions/about.dtd">
-
-<dialog id="genericAbout"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="init();"
- buttons="accept"
- buttoniconaccept="close"
- onaccept="close();">
-
- <script type="application/javascript" src="chrome://mozapps/content/extensions/about.js"/>
- <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
-
- <stringbundleset id="aboutSet">
- <stringbundle id="extensionsStrings" src="chrome://mozapps/locale/extensions/extensions.properties"/>
- </stringbundleset>
-
- <vbox id="clientBox" flex="1">
- <hbox class="basic-info">
- <vbox pack="center">
- <image id="extensionIcon"/>
- </vbox>
- <vbox flex="1">
- <label id="extensionName"/>
- <label id="extensionVersion" crop="end"/>
- </vbox>
- </hbox>
- <description id="extensionDescription" class="boxIndent"/>
-
- <separator id="groove" class="groove"/>
-
- <vbox id="extensionDetailsBox" flex="1">
- <label id="extensionCreatorLabel" class="sectionTitle">&creator.label;</label>
- <hbox id="creatorBox" class="boxIndent">
- <label id="extensionCreator" flex="1" crop="end"/>
- <label id="extensionHomepage" onclick="if (event.button == 0) { loadHomepage(event); }"
- class="text-link" value="&homepage.label;"/>
- </hbox>
-
- <label id="extensionDevelopers" class="sectionTitle">&developers.label;</label>
- <vbox flex="1" id="developersBox" class="boxIndent"/>
- <label id="extensionTranslators" class="sectionTitle">&translators.label;</label>
- <vbox flex="1" id="translatorsBox" class="boxIndent"/>
- <label id="extensionContributors" class="sectionTitle">&contributors.label;</label>
- <vbox flex="1" id="contributorsBox" class="boxIndent"/>
- </vbox>
- </vbox>
-
-</dialog>
diff --git a/toolkit/mozapps/webextensions/content/blocklist.css b/toolkit/mozapps/webextensions/content/blocklist.css
deleted file mode 100644
index cb48005a2..000000000
--- a/toolkit/mozapps/webextensions/content/blocklist.css
+++ /dev/null
@@ -1,11 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-.hardBlockedAddon {
- -moz-binding: url("chrome://mozapps/content/extensions/blocklist.xml#hardblockedaddon");
-}
-
-.softBlockedAddon {
- -moz-binding: url("chrome://mozapps/content/extensions/blocklist.xml#softblockedaddon");
-}
diff --git a/toolkit/mozapps/webextensions/content/blocklist.xml b/toolkit/mozapps/webextensions/content/blocklist.xml
deleted file mode 100644
index 74474392f..000000000
--- a/toolkit/mozapps/webextensions/content/blocklist.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE bindings [
- <!ENTITY % blocklistDTD SYSTEM "chrome://mozapps/locale/extensions/blocklist.dtd" >
- %blocklistDTD;
-]>
-
-<bindings id="blocklistBindings"
- xmlns="http://www.mozilla.org/xbl"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:xbl="http://www.mozilla.org/xbl">
-
- <binding id="hardblockedaddon">
- <content align="start">
- <xul:image xbl:inherits="src=icon"/>
- <xul:vbox flex="1">
- <xul:hbox class="addon-name-version">
- <xul:label class="addonName" crop="end" xbl:inherits="value=name"/>
- <xul:label class="addonVersion" xbl:inherits="value=version"/>
- </xul:hbox>
- <xul:hbox>
- <xul:spacer flex="1"/>
- <xul:label class="blockedLabel" value="&blocklist.blocked.label;"/>
- </xul:hbox>
- </xul:vbox>
- </content>
- </binding>
-
- <binding id="softblockedaddon">
- <content align="start">
- <xul:image xbl:inherits="src=icon"/>
- <xul:vbox flex="1">
- <xul:hbox class="addon-name-version">
- <xul:label class="addonName" crop="end" xbl:inherits="value=name"/>
- <xul:label class="addonVersion" xbl:inherits="value=version"/>
- </xul:hbox>
- <xul:hbox>
- <xul:spacer flex="1"/>
- <xul:checkbox class="disableCheckbox" checked="true" label="&blocklist.checkbox.label;"/>
- </xul:hbox>
- </xul:vbox>
- </content>
- <implementation>
- <field name="_checkbox">
- document.getAnonymousElementByAttribute(this, "class", "disableCheckbox")
- </field>
- <property name="checked" readonly="true">
- <getter>
- return this._checkbox.checked;
- </getter>
- </property>
- </implementation>
- </binding>
-</bindings>
diff --git a/toolkit/mozapps/webextensions/content/blocklist.xul b/toolkit/mozapps/webextensions/content/blocklist.xul
deleted file mode 100644
index 240d9e4e1..000000000
--- a/toolkit/mozapps/webextensions/content/blocklist.xul
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://global/skin/"?>
-<?xml-stylesheet href="chrome://mozapps/skin/extensions/blocklist.css"?>
-<?xml-stylesheet href="chrome://mozapps/content/extensions/blocklist.css"?>
-
-<!DOCTYPE dialog [
-<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
-%brandDTD;
-<!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/blocklist.dtd">
-%extensionsDTD;
-]>
-
-<dialog windowtype="Addons:Blocklist" title="&blocklist.title;" align="stretch"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="init();" ondialogaccept="return finish(true)"
- ondialogcancel="return finish(false)"
- buttons="accept,cancel" style="&blocklist.style;"
- buttonlabelaccept="&blocklist.accept.label;"
- buttonaccesskeyaccept="&blocklist.accept.accesskey;">
-
- <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
- <script type="application/javascript" src="chrome://mozapps/content/extensions/blocklist.js"/>
-
- <hbox align="stretch" flex="1">
- <vbox pack="start">
- <image class="error-icon"/>
- </vbox>
- <vbox flex="1">
- <label>&blocklist.summary;</label>
- <separator class="thin"/>
- <richlistbox id="addonList" flex="1"/>
- <separator class="thin"/>
- <description id="bothMessage" hidden="true" class="bold">&blocklist.softandhard;</description>
- <description id="hardBlockMessage" hidden="true" class="bold">&blocklist.hardblocked;</description>
- <description id="softBlockMessage" hidden="true" class="bold">&blocklist.softblocked;</description>
- <hbox pack="start">
- <label id="moreInfo" class="text-link" value="&blocklist.moreinfo;"/>
- </hbox>
- </vbox>
- </hbox>
-</dialog>
diff --git a/toolkit/mozapps/webextensions/content/eula.xul b/toolkit/mozapps/webextensions/content/eula.xul
deleted file mode 100644
index 10e657951..000000000
--- a/toolkit/mozapps/webextensions/content/eula.xul
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://mozapps/skin/extensions/eula.css" type="text/css"?>
-
-<!DOCTYPE window [
-<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
-%brandDTD;
-<!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/extensions.dtd">
-%extensionsDTD;
-]>
-
-<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="&eula.title;" width="&eula.width;" height="&eula.height;"
- buttons="accept,cancel" buttonlabelaccept="&eula.accept;"
- ondialogaccept="window.arguments[0].accepted = true"
- onload="Startup();">
-
- <script type="application/javascript" src="chrome://mozapps/content/extensions/eula.js"/>
-
- <stringbundleset id="extensionsSet">
- <stringbundle id="extensionsStrings" src="chrome://mozapps/locale/extensions/extensions.properties"/>
- </stringbundleset>
-
- <hbox id="heading-container">
- <image id="icon"/>
- <label id="heading" flex="1"/>
- </hbox>
-
- <textbox id="eula" multiline="true" readonly="true" flex="1"/>
-</dialog>
diff --git a/toolkit/mozapps/webextensions/content/gmpPrefs.xul b/toolkit/mozapps/webextensions/content/gmpPrefs.xul
deleted file mode 100644
index ea7ee92fa..000000000
--- a/toolkit/mozapps/webextensions/content/gmpPrefs.xul
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this file,
-- You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- This is intentionally empty and a dummy to let the GMPProvider
- have a preferences button in the list view. -->
diff --git a/toolkit/mozapps/webextensions/content/list.xul b/toolkit/mozapps/webextensions/content/list.xul
deleted file mode 100644
index 65efeb6a2..000000000
--- a/toolkit/mozapps/webextensions/content/list.xul
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://global/skin/"?>
-
-<dialog id="addonList" windowtype="Addons:List"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onunload="shutdown();"
- buttons="accept,cancel" onload="init();">
-
- <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
- <script type="application/javascript"
- src="chrome://mozapps/content/extensions/list.js"/>
-
- <stringbundle id="extensionsBundle"
- src="chrome://mozapps/locale/extensions/extensions.properties"/>
- <stringbundle id="brandBundle"
- src="chrome://branding/locale/brand.properties"/>
-
- <hbox align="start">
- <vbox>
- <image id="infoIcon"/>
- </vbox>
- <vbox class="spaced" style="min-width: 20em; max-width: 40em">
- <label id="message1" class="spaced" hidden="true"/>
- <separator class="thin"/>
- <tree id="addonsTree" rows="6" hidecolumnpicker="true" hidden="true" class="spaced">
- <treecols style="max-width: 25em;">
- <treecol flex="1" id="nameColumn" hideheader="true"/>
- </treecols>
- <treechildren id="addonsChildren"/>
- </tree>
- <label id="message2" class="spaced" hidden="true"/>
- <label class="bold spaced" id="message3" hidden="true"/>
- <hbox id="moreInfoBox" hidden="true">
- <label id="moreInfo" class="text-link spaced"/>
- <spacer flex="1"/>
- </hbox>
- </vbox>
- </hbox>
-</dialog>
diff --git a/toolkit/mozapps/webextensions/content/pluginPrefs.xul b/toolkit/mozapps/webextensions/content/pluginPrefs.xul
deleted file mode 100644
index c3fdbfa5b..000000000
--- a/toolkit/mozapps/webextensions/content/pluginPrefs.xul
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this file,
- - You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE window SYSTEM "chrome://pluginproblem/locale/pluginproblem.dtd">
-
-<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <setting type="control" title="&plugin.file;">
- <label class="text-list" id="pluginLibraries"/>
- </setting>
- <setting type="control" title="&plugin.mimeTypes;">
- <label class="text-list" id="pluginMimeTypes"/>
- </setting>
- <setting type="bool" pref="dom.ipc.plugins.flash.disable-protected-mode"
- inverted="true" title="&plugin.flashProtectedMode.label;"
- id="pluginEnableProtectedMode"
- learnmore="https://support.mozilla.org/kb/flash-protected-mode-settings" />
-</vbox>
diff --git a/toolkit/mozapps/webextensions/content/updateinfo.xsl b/toolkit/mozapps/webextensions/content/updateinfo.xsl
deleted file mode 100644
index 5fcccd6d7..000000000
--- a/toolkit/mozapps/webextensions/content/updateinfo.xsl
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <!-- Any elements not otherwise specified will be stripped but the contents
- will be displayed. All attributes are stripped from copied elements. -->
-
- <!-- Block these elements and their contents -->
- <xsl:template match="xhtml:head|xhtml:script|xhtml:style">
- </xsl:template>
-
- <!-- Allowable styling elements -->
- <xsl:template match="xhtml:b|xhtml:i|xhtml:em|xhtml:strong|xhtml:u|xhtml:q|xhtml:sub|xhtml:sup|xhtml:code">
- <xsl:copy><xsl:apply-templates/></xsl:copy>
- </xsl:template>
-
- <!-- Allowable block formatting elements -->
- <xsl:template match="xhtml:h1|xhtml:h2|xhtml:h3|xhtml:p|xhtml:div|xhtml:blockquote|xhtml:pre">
- <xsl:copy><xsl:apply-templates/></xsl:copy>
- </xsl:template>
-
- <!-- Allowable list formatting elements -->
- <xsl:template match="xhtml:ul|xhtml:ol|xhtml:li|xhtml:dl|xhtml:dt|xhtml:dd">
- <xsl:copy><xsl:apply-templates/></xsl:copy>
- </xsl:template>
-
- <!-- These elements are copied and their contents dropped -->
- <xsl:template match="xhtml:br|xhtml:hr">
- <xsl:copy/>
- </xsl:template>
-
- <!-- The root document -->
- <xsl:template match="/">
- <xhtml:body><xsl:apply-templates/></xhtml:body>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/toolkit/mozapps/webextensions/content/xpinstallConfirm.css b/toolkit/mozapps/webextensions/content/xpinstallConfirm.css
deleted file mode 100644
index 583facfec..000000000
--- a/toolkit/mozapps/webextensions/content/xpinstallConfirm.css
+++ /dev/null
@@ -1,8 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-installitem {
- -moz-binding: url("chrome://mozapps/content/xpinstall/xpinstallItem.xml#installitem");
- display: -moz-box;
-}
diff --git a/toolkit/mozapps/webextensions/content/xpinstallConfirm.xul b/toolkit/mozapps/webextensions/content/xpinstallConfirm.xul
deleted file mode 100644
index f1c29eb73..000000000
--- a/toolkit/mozapps/webextensions/content/xpinstallConfirm.xul
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://mozapps/content/xpinstall/xpinstallConfirm.css" type="text/css"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://mozapps/skin/xpinstall/xpinstallConfirm.css" type="text/css"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://mozapps/locale/xpinstall/xpinstallConfirm.dtd">
-
-<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- id="xpinstallConfirm" title="&dialog.title;" style="&dialog.style;"
- windowtype="Addons:Install"
- onload="XPInstallConfirm.init()"
- ondialogaccept="return XPInstallConfirm.onOK();"
- ondialogcancel="return XPInstallConfirm.onCancel();">
-
- <script src="chrome://mozapps/content/xpinstall/xpinstallConfirm.js" type="application/javascript"/>
-
- <stringbundle id="xpinstallConfirmStrings"
- src="chrome://mozapps/locale/xpinstall/xpinstallConfirm.properties"/>
-
- <vbox flex="1" id="dialogContentBox">
- <hbox id="xpinstallheader" align="start">
- <image class="alert-icon"/>
- <vbox flex="1">
- <description class="warning">&warningPrimary.label;</description>
- <description>&warningSecondary.label;</description>
- </vbox>
- </hbox>
- <label id="itemWarningIntro"/>
- <vbox id="itemList" class="listbox" flex="1" style="overflow: auto;"/>
- </vbox>
-
-</dialog>
diff --git a/toolkit/mozapps/webextensions/content/xpinstallItem.xml b/toolkit/mozapps/webextensions/content/xpinstallItem.xml
deleted file mode 100644
index 5146af84f..000000000
--- a/toolkit/mozapps/webextensions/content/xpinstallItem.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
-<!DOCTYPE bindings SYSTEM "chrome://mozapps/locale/xpinstall/xpinstallConfirm.dtd">
-
-<bindings id="xpinstallItemBindings"
- xmlns="http://www.mozilla.org/xbl"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:xbl="http://www.mozilla.org/xbl">
-
- <binding id="installitem">
- <resources>
- <stylesheet src="chrome://mozapps/skin/xpinstall/xpinstallConfirm.css"/>
- </resources>
- <content>
- <xul:hbox flex="1">
- <xul:vbox align="center" pack="center" class="xpinstallIconContainer">
- <xul:image class="xpinstallItemIcon" xbl:inherits="src=icon"/>
- </xul:vbox>
- <xul:vbox flex="1" pack="center">
- <xul:hbox class="xpinstallItemNameRow" align="center">
- <xul:label class="xpinstallItemName" xbl:inherits="value=name" crop="right"/>
- <xul:label class="xpinstallItemSigned" xbl:inherits="value=cert,signed"/>
- </xul:hbox>
- <xul:hbox class="xpinstallItemDetailsRow" align="center">
- <xul:textbox class="xpinstallItemURL" xbl:inherits="value=url" flex="1" readonly="true" crop="right"/>
- </xul:hbox>
- </xul:vbox>
- </xul:hbox>
- </content>
- <implementation>
- <property name="name" onset="this.setAttribute('name', val); return val;"
- onget="return this.getAttribute('name');"/>
- <property name="cert" onset="this.setAttribute('cert', val); return val;"
- onget="return this.getAttribute('cert');"/>
- <property name="signed" onset="this.setAttribute('signed', val); return val;"
- onget="return this.getAttribute('signed');"/>
- <property name="url" onset="this.setAttribute('url', val); return val;"
- onget="return this.getAttribute('url');"/>
- <property name="icon" onset="this.setAttribute('icon', val); return val;"
- onget="return this.getAttribute('icon');"/>
- <property name="type" onset="this.setAttribute('type', val); return val;"
- onget="return this.getAttribute('type');"/>
- </implementation>
- </binding>
-
-</bindings>
-
diff --git a/toolkit/mozapps/webextensions/extensions.manifest b/toolkit/mozapps/webextensions/extensions.manifest
index 7ce20c3ec..2129012ab 100644
--- a/toolkit/mozapps/webextensions/extensions.manifest
+++ b/toolkit/mozapps/webextensions/extensions.manifest
@@ -1,10 +1,3 @@
-component {66354bc9-7ed1-4692-ae1d-8da97d6b205e} nsBlocklistService.js process=main
-contract @mozilla.org/extensions/blocklist;1 {66354bc9-7ed1-4692-ae1d-8da97d6b205e} process=main
-category profile-after-change nsBlocklistService @mozilla.org/extensions/blocklist;1 process=main
-component {e0a106ed-6ad4-47a4-b6af-2f1c8aa4712d} nsBlocklistServiceContent.js process=content
-contract @mozilla.org/extensions/blocklist;1 {e0a106ed-6ad4-47a4-b6af-2f1c8aa4712d} process=content
-
-category update-timer nsBlocklistService @mozilla.org/extensions/blocklist;1,getService,blocklist-background-update-timer,extensions.blocklist.interval,86400
component {4399533d-08d1-458c-a87a-235f74451cfa} addonManager.js
contract @mozilla.org/addons/integration;1 {4399533d-08d1-458c-a87a-235f74451cfa}
#ifndef MOZ_WIDGET_ANDROID
diff --git a/toolkit/mozapps/webextensions/internal/AddonUpdateChecker.jsm b/toolkit/mozapps/webextensions/internal/AddonUpdateChecker.jsm
index bdd3a81e7..391c69a06 100644
--- a/toolkit/mozapps/webextensions/internal/AddonUpdateChecker.jsm
+++ b/toolkit/mozapps/webextensions/internal/AddonUpdateChecker.jsm
@@ -26,6 +26,12 @@ const XMLURI_PARSE_ERROR = "http://www.mozilla.org/newlayout/xml/parsererror.
const PREF_UPDATE_REQUIREBUILTINCERTS = "extensions.update.requireBuiltInCerts";
+#ifdef MOZ_PHOENIX
+const PREF_EM_MIN_COMPAT_APP_VERSION = "extensions.minCompatibleAppVersion";
+const FIREFOX_ID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
+const FIREFOX_APPCOMPATVERSION = "56.9"
+#endif
+
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -446,6 +452,7 @@ function parseRDFManifest(aId, aUpdateKey, aRequest, aManifestData) {
* @throws if the update manifest is invalid in any way
*/
function parseJSONManifest(aId, aUpdateKey, aRequest, aManifestData) {
+#ifdef MOZ_PHOENIX
if (aUpdateKey)
throw Components.Exception("Update keys are not supported for JSON update manifests");
@@ -515,10 +522,10 @@ function parseJSONManifest(aId, aUpdateKey, aRequest, aManifestData) {
let app = getProperty(applications, "gecko", "object");
let appEntry = {
- id: TOOLKIT_ID,
+ id: FIREFOX_ID,
minVersion: getProperty(app, "strict_min_version", "string",
- AddonManagerPrivate.webExtensionsMinPlatformVersion),
- maxVersion: "*",
+ Services.prefs.getCharPref(PREF_EM_MIN_COMPAT_APP_VERSION)),
+ maxVersion: FIREFOX_APPCOMPATVERSION,
};
let result = {
@@ -539,7 +546,6 @@ function parseJSONManifest(aId, aUpdateKey, aRequest, aManifestData) {
}
appEntry.maxVersion = getProperty(app, "strict_max_version", "string");
- result.strictCompatibility = appEntry.maxVersion != "*";
} else if ("advisory_max_version" in app) {
appEntry.maxVersion = getProperty(app, "advisory_max_version", "string");
}
@@ -551,6 +557,9 @@ function parseJSONManifest(aId, aUpdateKey, aRequest, aManifestData) {
results.push(result);
}
return results;
+#else
+ throw Components.Exception("This application does not support JSON update manifests");
+#endif
}
/**
diff --git a/toolkit/mozapps/webextensions/internal/SpellCheckDictionaryBootstrap.js b/toolkit/mozapps/webextensions/internal/SpellCheckDictionaryBootstrap.js
deleted file mode 100644
index f4f557fc2..000000000
--- a/toolkit/mozapps/webextensions/internal/SpellCheckDictionaryBootstrap.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var hunspell, dir;
-
-function startup(data) {
- hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
- .getService(Components.interfaces.mozISpellCheckingEngine);
- dir = data.installPath.clone();
- dir.append("dictionaries");
- hunspell.addDirectory(dir);
-}
-
-function shutdown() {
- hunspell.removeDirectory(dir);
-}
diff --git a/toolkit/mozapps/webextensions/internal/moz.build b/toolkit/mozapps/webextensions/internal/moz.build
index 28c34f8c9..e3b54ed3b 100644
--- a/toolkit/mozapps/webextensions/internal/moz.build
+++ b/toolkit/mozapps/webextensions/internal/moz.build
@@ -5,17 +5,16 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES.addons += [
+ '../../extensions/internal/ProductAddonChecker.jsm',
+ '../../extensions/internal/SpellCheckDictionaryBootstrap.js',
'AddonLogging.jsm',
'AddonRepository.jsm',
'AddonRepository_SQLiteMigrator.jsm',
- 'AddonUpdateChecker.jsm',
'APIExtensionBootstrap.js',
'Content.js',
'E10SAddonsRollout.jsm',
'GMPProvider.jsm',
'LightweightThemeImageOptimizer.jsm',
- 'ProductAddonChecker.jsm',
- 'SpellCheckDictionaryBootstrap.js',
'WebExtensionBootstrap.js',
'XPIProvider.jsm',
'XPIProviderUtils.js',
@@ -33,4 +32,5 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
EXTRA_PP_JS_MODULES.addons += [
'AddonConstants.jsm',
+ 'AddonUpdateChecker.jsm',
]
diff --git a/toolkit/mozapps/webextensions/jar.mn b/toolkit/mozapps/webextensions/jar.mn
index 77cbf32eb..6da7dc893 100644
--- a/toolkit/mozapps/webextensions/jar.mn
+++ b/toolkit/mozapps/webextensions/jar.mn
@@ -9,27 +9,27 @@ toolkit.jar:
content/mozapps/extensions/extensions.css (content/extensions.css)
* content/mozapps/extensions/extensions.js (content/extensions.js)
* content/mozapps/extensions/extensions.xml (content/extensions.xml)
- content/mozapps/extensions/updateinfo.xsl (content/updateinfo.xsl)
- content/mozapps/extensions/about.xul (content/about.xul)
+ content/mozapps/extensions/updateinfo.xsl (../extensions/content/updateinfo.xsl)
+ content/mozapps/extensions/about.xul (../extensions/content/about.xul)
content/mozapps/extensions/about.js (content/about.js)
- content/mozapps/extensions/list.xul (content/list.xul)
+ content/mozapps/extensions/list.xul (../extensions/content/list.xul)
content/mozapps/extensions/list.js (content/list.js)
- content/mozapps/extensions/blocklist.xul (content/blocklist.xul)
+ content/mozapps/extensions/blocklist.xul (../extensions/content/blocklist.xul)
content/mozapps/extensions/blocklist.js (content/blocklist.js)
- content/mozapps/extensions/blocklist.css (content/blocklist.css)
- content/mozapps/extensions/blocklist.xml (content/blocklist.xml)
+ content/mozapps/extensions/blocklist.css (../extensions/content/blocklist.css)
+ content/mozapps/extensions/blocklist.xml (../extensions/content/blocklist.xml)
* content/mozapps/extensions/update.xul (content/update.xul)
content/mozapps/extensions/update.js (content/update.js)
- content/mozapps/extensions/eula.xul (content/eula.xul)
+ content/mozapps/extensions/eula.xul (../extensions/content/eula.xul)
content/mozapps/extensions/eula.js (content/eula.js)
content/mozapps/extensions/newaddon.xul (content/newaddon.xul)
content/mozapps/extensions/newaddon.js (content/newaddon.js)
- content/mozapps/extensions/pluginPrefs.xul (content/pluginPrefs.xul)
- content/mozapps/extensions/gmpPrefs.xul (content/gmpPrefs.xul)
- content/mozapps/extensions/OpenH264-license.txt (content/OpenH264-license.txt)
+ content/mozapps/extensions/pluginPrefs.xul (../extensions/content/pluginPrefs.xul)
+ content/mozapps/extensions/gmpPrefs.xul (../extensions/content/gmpPrefs.xul)
+ content/mozapps/extensions/OpenH264-license.txt (../extensions/content/OpenH264-license.txt)
#endif
content/mozapps/extensions/setting.xml (content/setting.xml)
- content/mozapps/xpinstall/xpinstallConfirm.xul (content/xpinstallConfirm.xul)
+ content/mozapps/xpinstall/xpinstallConfirm.xul (../extensions/content/xpinstallConfirm.xul)
content/mozapps/xpinstall/xpinstallConfirm.js (content/xpinstallConfirm.js)
- content/mozapps/xpinstall/xpinstallConfirm.css (content/xpinstallConfirm.css)
- content/mozapps/xpinstall/xpinstallItem.xml (content/xpinstallItem.xml)
+ content/mozapps/xpinstall/xpinstallConfirm.css (../extensions/content/xpinstallConfirm.css)
+ content/mozapps/xpinstall/xpinstallItem.xml (../extensions/content/xpinstallItem.xml)
diff --git a/toolkit/mozapps/webextensions/moz.build b/toolkit/mozapps/webextensions/moz.build
index b92915ae8..d039ac68c 100644
--- a/toolkit/mozapps/webextensions/moz.build
+++ b/toolkit/mozapps/webextensions/moz.build
@@ -10,10 +10,10 @@ DIRS += ['internal']
TEST_DIRS += ['test']
XPIDL_SOURCES += [
- 'amIAddonManager.idl',
- 'amIAddonPathService.idl',
- 'amIWebInstaller.idl',
- 'amIWebInstallListener.idl',
+ '../extensions/amIAddonManager.idl',
+ '../extensions/amIAddonPathService.idl',
+ '../extensions/amIWebInstaller.idl',
+ '../extensions/amIWebInstallListener.idl',
]
XPIDL_MODULE = 'extensions'
@@ -24,8 +24,6 @@ EXTRA_COMPONENTS += [
'amInstallTrigger.js',
'amWebAPI.js',
'amWebInstallListener.js',
- 'nsBlocklistService.js',
- 'nsBlocklistServiceContent.js',
]
EXTRA_PP_COMPONENTS += [
diff --git a/toolkit/themes/linux/global/icons/loading_16.png b/toolkit/themes/linux/global/icons/loading_16.png
new file mode 100644
index 000000000..7108ea341
--- /dev/null
+++ b/toolkit/themes/linux/global/icons/loading_16.png
Binary files differ
diff --git a/toolkit/themes/linux/global/icons/notloading_16.png b/toolkit/themes/linux/global/icons/notloading_16.png
new file mode 100644
index 000000000..04dab30ed
--- /dev/null
+++ b/toolkit/themes/linux/global/icons/notloading_16.png
Binary files differ
diff --git a/toolkit/themes/linux/global/jar.mn b/toolkit/themes/linux/global/jar.mn
index 0efc8c5cf..6a053dec6 100644
--- a/toolkit/themes/linux/global/jar.mn
+++ b/toolkit/themes/linux/global/jar.mn
@@ -45,6 +45,8 @@ toolkit.jar:
skin/classic/global/icons/blacklist_large.png (icons/blacklist_large.png)
skin/classic/global/icons/close.svg (icons/close.svg)
skin/classic/global/icons/find.png (icons/find.png)
+ skin/classic/global/icons/loading_16.png (icons/loading_16.png)
+ skin/classic/global/icons/notloading_16.png (icons/notloading_16.png)
skin/classic/global/icons/resizer.png (icons/resizer.png)
skin/classic/global/icons/sslWarning.png (icons/sslWarning.png)
diff --git a/toolkit/themes/osx/global/icons/loading_16.png b/toolkit/themes/osx/global/icons/loading_16.png
new file mode 100644
index 000000000..1b2df8093
--- /dev/null
+++ b/toolkit/themes/osx/global/icons/loading_16.png
Binary files differ
diff --git a/toolkit/themes/osx/global/icons/notloading_16.png b/toolkit/themes/osx/global/icons/notloading_16.png
new file mode 100644
index 000000000..ece0ee18a
--- /dev/null
+++ b/toolkit/themes/osx/global/icons/notloading_16.png
Binary files differ
diff --git a/toolkit/themes/osx/global/jar.mn b/toolkit/themes/osx/global/jar.mn
index 9407ccee5..2b7d19641 100644
--- a/toolkit/themes/osx/global/jar.mn
+++ b/toolkit/themes/osx/global/jar.mn
@@ -101,8 +101,10 @@ toolkit.jar:
skin/classic/global/icons/information-32.png (icons/information-32.png)
skin/classic/global/icons/information-64.png (icons/information-64.png)
skin/classic/global/icons/information-large.png (icons/information-large.png)
+ skin/classic/global/icons/loading_16.png (icons/loading_16.png)
skin/classic/global/icons/menulist-dropmarker.png (icons/menulist-dropmarker.png)
skin/classic/global/icons/notfound.png (icons/notfound.png)
+ skin/classic/global/icons/notloading_16.png (icons/notloading_16.png)
skin/classic/global/icons/panebutton-active.png (icons/panebutton-active.png)
skin/classic/global/icons/panebutton-inactive.png (icons/panebutton-inactive.png)
skin/classic/global/icons/panel-dropmarker.png (icons/panel-dropmarker.png)
diff --git a/toolkit/themes/shared/aboutReader.css b/toolkit/themes/shared/aboutReader.css
index 49436de84..4dbf11f6d 100644
--- a/toolkit/themes/shared/aboutReader.css
+++ b/toolkit/themes/shared/aboutReader.css
@@ -2,23 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* Avoid adding ID selector rules in this style sheet, since they could
+ * inadvertently match elements in the article content. */
+
body {
padding: 64px 51px;
}
-@media print {
- #container {
- max-width: 100% !important;
- font-size: 14px !important;
- font-family: Georgia, "Times New Roman", serif !important;
- }
-
- body {
- padding-top: 0px;
- padding-bottom: 0px;
- }
-}
-
body.loaded {
transition: color 0.4s, background-color 0.4s;
}
@@ -56,80 +46,80 @@ body.serif .remove-button {
font-family: Georgia, "Times New Roman", serif;
}
-#container {
+.container {
max-width: 30em;
margin: 0 auto;
}
-#container.font-size1 {
+.container.font-size1 {
font-size: 12px;
}
-#container.font-size2 {
+.container.font-size2 {
font-size: 14px;
}
-#container.font-size3 {
+.container.font-size3 {
font-size: 16px;
}
-#container.font-size4 {
+.container.font-size4 {
font-size: 18px;
}
-#container.font-size5 {
+.container.font-size5 {
font-size: 20px;
}
-#container.font-size6 {
+.container.font-size6 {
font-size: 22px;
}
-#container.font-size7 {
+.container.font-size7 {
font-size: 24px;
}
-#container.font-size8 {
+.container.font-size8 {
font-size: 26px;
}
-#container.font-size9 {
+.container.font-size9 {
font-size: 28px;
}
-#container.content-width1 {
+.container.content-width1 {
max-width: 20em;
}
-#container.content-width2 {
+.container.content-width2 {
max-width: 25em;
}
-#container.content-width3 {
+.container.content-width3 {
max-width: 30em;
}
-#container.content-width4 {
+.container.content-width4 {
max-width: 35em;
}
-#container.content-width5 {
+.container.content-width5 {
max-width: 40em;
}
-#container.content-width6 {
+.container.content-width6 {
max-width: 45em;
}
-#container.content-width7 {
+.container.content-width7 {
max-width: 50em;
}
-#container.content-width8 {
+.container.content-width8 {
max-width: 55em;
}
-#container.content-width9 {
+.container.content-width9 {
max-width: 60em;
}
@@ -176,3 +166,575 @@ body:not(.loaded) .toolbar:-moz-locale-dir(ltr) {
body:not(.loaded) .toolbar:-moz-locale-dir(rtl) {
transform: translateX(100%);
}
+
+.light-button {
+ color: #333333;
+ background-color: #ffffff;
+}
+
+.dark-button {
+ color: #eeeeee;
+ background-color: #333333;
+}
+
+.sepia-button {
+ color: #5b4636;
+ background-color: #f4ecd8;
+}
+
+.sans-serif-button {
+ font-family: Helvetica, Arial, sans-serif;
+}
+
+.serif-button {
+ font-family: Georgia, "Times New Roman", serif;
+}
+
+/* Loading/error message */
+
+.reader-message {
+ margin-top: 40px;
+ display: none;
+ text-align: center;
+ width: 100%;
+ font-size: 0.9em;
+}
+
+/* Header */
+
+.header {
+ text-align: start;
+ display: none;
+}
+
+.domain {
+ font-size: 0.9em;
+ line-height: 1.48em;
+ padding-bottom: 4px;
+ font-family: Helvetica, Arial, sans-serif;
+ text-decoration: none;
+ border-bottom: 1px solid;
+ color: #0095dd;
+}
+
+.header > h1 {
+ font-size: 1.6em;
+ line-height: 1.25em;
+ width: 100%;
+ margin: 30px 0;
+ padding: 0;
+}
+
+.header > .credits {
+ font-size: 0.9em;
+ line-height: 1.48em;
+ margin: 0 0 10px 0;
+ padding: 0;
+ font-style: italic;
+}
+
+.header > .meta-data {
+ font-size: 0.65em;
+ margin: 0 0 15px 0;
+}
+
+/*======= Controls toolbar =======*/
+
+.toolbar {
+ font-family: Helvetica, Arial, sans-serif;
+ position: fixed;
+ height: 100%;
+ top: 0;
+ left: 0;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ background-color: #fbfbfb;
+ -moz-user-select: none;
+ border-right: 1px solid #b5b5b5;
+ z-index: 1;
+}
+
+.button {
+ display: block;
+ background-size: 24px 24px;
+ background-repeat: no-repeat;
+ color: #333;
+ background-color: #fbfbfb;
+ height: 40px;
+ padding: 0;
+}
+
+.toolbar .button {
+ width: 40px;
+ background-position: center;
+ margin-right: -1px;
+ border-top: 0;
+ border-left: 0;
+ border-right: 1px solid #b5b5b5;
+ border-bottom: 1px solid #c1c1c1;
+}
+
+.button[hidden] {
+ display: none;
+}
+
+.dropdown {
+ text-align: center;
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+.dropdown li {
+ margin: 0;
+ padding: 0;
+}
+
+/*======= Popup =======*/
+
+.dropdown-popup {
+ min-width: 300px;
+ text-align: start;
+ position: absolute;
+ left: 48px; /* offset to account for toolbar width */
+ z-index: 1000;
+ background-color: #fbfbfb;
+ visibility: hidden;
+ border-radius: 4px;
+ border: 1px solid #b5b5b5;
+ border-bottom-width: 0;
+ box-shadow: 0 1px 3px #c1c1c1;
+}
+
+.keep-open .dropdown-popup {
+ z-index: initial;
+}
+
+.dropdown-popup > hr {
+ display: none;
+}
+
+.open > .dropdown-popup {
+ visibility: visible;
+}
+
+.dropdown-arrow {
+ position: absolute;
+ top: 30px; /* offset arrow from top of popup */
+ left: -16px;
+ width: 16px;
+ height: 24px;
+ background-image: url("chrome://global/skin/reader/RM-Type-Controls-Arrow.svg");
+ display: block;
+}
+
+/*======= Font style popup =======*/
+
+.font-type-buttons,
+.font-size-buttons,
+.color-scheme-buttons,
+.content-width-buttons,
+.line-height-buttons {
+ display: flex;
+ flex-direction: row;
+}
+
+.font-type-buttons > button:first-child {
+ border-top-left-radius: 3px;
+}
+.font-type-buttons > button:last-child {
+ border-top-right-radius: 3px;
+}
+.color-scheme-buttons > button:first-child {
+ border-bottom-left-radius: 3px;
+}
+.color-scheme-buttons > button:last-child {
+ border-bottom-right-radius: 3px;
+}
+
+.font-type-buttons > button,
+.font-size-buttons > button,
+.color-scheme-buttons > button,
+.content-width-buttons > button,
+.line-height-buttons > button {
+ text-align: center;
+ border: 0;
+}
+
+.font-type-buttons > button,
+.font-size-buttons > button,
+.content-width-buttons > button,
+.line-height-buttons > button {
+ width: 50%;
+ background-color: transparent;
+ border-left: 1px solid #B5B5B5;
+ border-bottom: 1px solid #B5B5B5;
+}
+
+.color-scheme-buttons > button {
+ width: 33.33%;
+ font-size: 14px;
+}
+
+.color-scheme-buttons > .dark-button {
+ margin-top: -1px;
+ height: 61px;
+}
+
+.font-type-buttons > button:first-child,
+.font-size-buttons > button:first-child,
+.content-width-buttons > button:first-child,
+.line-height-buttons > button:first-child {
+ border-left: 0;
+}
+
+.font-type-buttons > button {
+ display: inline-block;
+ font-size: 62px;
+ height: 100px;
+}
+
+.font-size-buttons > button,
+.color-scheme-buttons > button,
+.content-width-buttons > button,
+.line-height-buttons > button {
+ height: 60px;
+}
+
+.font-type-buttons > button:active:hover,
+.font-type-buttons > button.selected,
+.color-scheme-buttons > button:active:hover,
+.color-scheme-buttons > button.selected {
+ box-shadow: inset 0 -3px 0 0 #fc6420;
+}
+
+.font-type-buttons > button:active:hover,
+.font-type-buttons > button.selected {
+ border-bottom: 1px solid #FC6420;
+}
+
+/* Make the serif button content the same size as the sans-serif button content. */
+.font-type-buttons > button > .description {
+ color: #666;
+ font-size: 12px;
+ margin-top: -5px;
+}
+
+/* Font sizes are different per-platform, so we need custom CSS to line them up. */
+%ifdef XP_MACOSX
+.font-type-buttons > .sans-serif-button > .name {
+ margin-top: 10px;
+}
+
+.font-type-buttons > .sans-serif-button > .description {
+ margin-top: -4px;
+}
+
+.font-type-buttons > .serif-button > .name {
+ font-size: 63px;
+}
+%elifdef XP_WIN
+.font-type-buttons > .sans-serif-button > .name {
+ margin-top: 2px;
+}
+
+.font-type-buttons > .sans-serif-button > .description {
+ margin-top: -4px;
+}
+
+.font-type-buttons > .serif-button > .name {
+ font-size: 63px;
+}
+%else
+.font-type-buttons > .sans-serif-button > .name {
+ margin-top: 5px;
+}
+
+.font-type-buttons > .sans-serif-button > .description {
+ margin-top: -8px;
+}
+
+.font-type-buttons > .serif-button > .name {
+ font-size: 70px;
+}
+%endif
+
+.button:hover,
+.font-size-buttons > button:hover,
+.font-type-buttons > button:hover,
+.content-width-buttons > button:hover,
+.line-height-buttons > button:hover {
+ background-color: #ebebeb;
+}
+
+.dropdown.open,
+.button:active,
+.font-size-buttons > button:active,
+.font-size-buttons > button.selected,
+.content-width-buttons > button:active,
+.content-width-buttons > button.selected,
+.line-height-buttons > button:active,
+.line-height-buttons > button.selected {
+ background-color: #dadada;
+}
+
+/* Only used on Android */
+.font-size-sample {
+ display: none;
+}
+
+.minus-button,
+.plus-button,
+.content-width-minus-button,
+.content-width-plus-button,
+.line-height-minus-button,
+.line-height-plus-button {
+ background-color: transparent;
+ border: 0;
+ background-size: 18px 18px;
+ background-repeat: no-repeat;
+ background-position: center;
+}
+
+/*======= Toolbar icons =======*/
+
+.close-button {
+ background-image: url("chrome://global/skin/reader/RM-Close-24x24.svg#close");
+ height: 68px;
+ background-position: center 8px;
+}
+
+.close-button:hover {
+ background-image: url("chrome://global/skin/reader/RM-Close-24x24.svg#close-hover");
+ background-color: #d94141;
+ border-bottom: 1px solid #d94141;
+ border-right: 1px solid #d94141;
+}
+
+.close-button:hover:active {
+ background-image: url("chrome://global/skin/reader/RM-Close-24x24.svg#close-hover");
+ background-color: #AE2325;
+ border-bottom: 1px solid #AE2325;
+ border-right: 1px solid #AE2325;
+}
+
+.style-button {
+ background-image: url("chrome://global/skin/reader/RM-Type-Controls-24x24.svg");
+}
+
+.minus-button {
+ background-image: url("chrome://global/skin/reader/RM-Minus-24x24.svg");
+}
+
+.plus-button {
+ background-image: url("chrome://global/skin/reader/RM-Plus-24x24.svg");
+}
+
+.content-width-minus-button {
+ background-size: 42px 16px;
+ background-image: url("chrome://global/skin/reader/RM-Content-Width-Minus-42x16.svg");
+}
+
+.content-width-plus-button {
+ background-size: 44px 16px;
+ background-image: url("chrome://global/skin/reader/RM-Content-Width-Plus-44x16.svg");
+}
+
+.line-height-minus-button {
+ background-size: 34px 14px;
+ background-image: url("chrome://global/skin/reader/RM-Line-Height-Minus-38x14.svg");
+}
+
+.line-height-plus-button {
+ background-size: 34px 24px;
+ background-image: url("chrome://global/skin/reader/RM-Line-Height-Plus-38x24.svg");
+}
+
+@media print {
+ .toolbar {
+ display: none !important;
+ }
+}
+
+/*======= Article content =======*/
+
+/* Note that any class names from the original article that we want to match on
+ * must be added to CLASSES_TO_PRESERVE in ReaderMode.jsm, so that
+ * Readability.js doesn't strip them out */
+
+.moz-reader-content {
+ display: none;
+ font-size: 1em;
+ line-height: 1.6em;
+}
+
+.moz-reader-content.line-height1 {
+ line-height: 1em;
+}
+
+.moz-reader-content.line-height2 {
+ line-height: 1.2em;
+}
+
+.moz-reader-content.line-height3 {
+ line-height: 1.4em;
+}
+
+.moz-reader-content.line-height4 {
+ line-height: 1.6em;
+}
+
+.moz-reader-content.line-height5 {
+ line-height: 1.8em;
+}
+
+.moz-reader-content.line-height6 {
+ line-height: 2.0em;
+}
+
+.moz-reader-content.line-height7 {
+ line-height: 2.2em;
+}
+
+.moz-reader-content.line-height8 {
+ line-height: 2.4em;
+}
+
+.moz-reader-content.line-height9 {
+ line-height: 2.6em;
+}
+
+@media print {
+ .moz-reader-content p,
+ .moz-reader-content code,
+ .moz-reader-content pre,
+ .moz-reader-content blockquote,
+ .moz-reader-content ul,
+ .moz-reader-content ol,
+ .moz-reader-content li,
+ .moz-reader-content figure,
+ .moz-reader-content .wp-caption {
+ margin: 0 0 10px 0 !important;
+ padding: 0 !important;
+ }
+}
+
+.moz-reader-content h1,
+.moz-reader-content h2,
+.moz-reader-content h3 {
+ font-weight: bold;
+}
+
+.moz-reader-content h1 {
+ font-size: 1.6em;
+ line-height: 1.25em;
+}
+
+.moz-reader-content h2 {
+ font-size: 1.2em;
+ line-height: 1.51em;
+}
+
+.moz-reader-content h3 {
+ font-size: 1em;
+ line-height: 1.66em;
+}
+
+.moz-reader-content a:link {
+ text-decoration: underline;
+ font-weight: normal;
+}
+
+.moz-reader-content a:link,
+.moz-reader-content a:link:hover,
+.moz-reader-content a:link:active {
+ color: #0095dd;
+}
+
+.moz-reader-content a:visited {
+ color: #c2e;
+}
+
+.moz-reader-content * {
+ max-width: 100%;
+ height: auto;
+}
+
+.moz-reader-content p,
+.moz-reader-content p,
+.moz-reader-content code,
+.moz-reader-content pre,
+.moz-reader-content blockquote,
+.moz-reader-content ul,
+.moz-reader-content ol,
+.moz-reader-content li,
+.moz-reader-content figure,
+.moz-reader-content .wp-caption {
+ margin: -10px -10px 20px -10px;
+ padding: 10px;
+ border-radius: 5px;
+}
+
+.moz-reader-content li {
+ margin-bottom: 0;
+}
+
+.moz-reader-content li > ul,
+.moz-reader-content li > ol {
+ margin-bottom: -10px;
+}
+
+.moz-reader-content p > img:only-child,
+.moz-reader-content p > a:only-child > img:only-child,
+.moz-reader-content .wp-caption img,
+.moz-reader-content figure img {
+ display: block;
+}
+
+.moz-reader-content img[moz-reader-center] {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.moz-reader-content .caption,
+.moz-reader-content .wp-caption-text
+.moz-reader-content figcaption {
+ font-size: 0.9em;
+ line-height: 1.48em;
+ font-style: italic;
+}
+
+.moz-reader-content code,
+.moz-reader-content pre {
+ white-space: pre-wrap;
+}
+
+.moz-reader-content blockquote {
+ padding: 0;
+ padding-inline-start: 16px;
+}
+
+.moz-reader-content ul,
+.moz-reader-content ol {
+ padding: 0;
+}
+
+.moz-reader-content ul {
+ padding-inline-start: 30px;
+ list-style: disc;
+}
+
+.moz-reader-content ol {
+ padding-inline-start: 30px;
+ list-style: decimal;
+}
+
+/* Hide elements with common "hidden" class names */
+.moz-reader-content .visually-hidden,
+.moz-reader-content .visuallyhidden,
+.moz-reader-content .hidden,
+.moz-reader-content .invisible,
+.moz-reader-content .sr-only {
+ display: none;
+}
diff --git a/toolkit/themes/shared/aboutReaderContent.css b/toolkit/themes/shared/aboutReaderContent.css
deleted file mode 100644
index 633391d37..000000000
--- a/toolkit/themes/shared/aboutReaderContent.css
+++ /dev/null
@@ -1,177 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#moz-reader-content {
- display: none;
- font-size: 1em;
- line-height: 1.6em;
-}
-
-#moz-reader-content.line-height1 {
- line-height: 1em;
-}
-
-#moz-reader-content.line-height2 {
- line-height: 1.2em;
-}
-
-#moz-reader-content.line-height3 {
- line-height: 1.4em;
-}
-
-#moz-reader-content.line-height4 {
- line-height: 1.6em;
-}
-
-#moz-reader-content.line-height5 {
- line-height: 1.8em;
-}
-
-#moz-reader-content.line-height6 {
- line-height: 2.0em;
-}
-
-#moz-reader-content.line-height7 {
- line-height: 2.2em;
-}
-
-#moz-reader-content.line-height8 {
- line-height: 2.4em;
-}
-
-#moz-reader-content.line-height9 {
- line-height: 2.6em;
-}
-
-@media print {
- p,
- code,
- pre,
- blockquote,
- ul,
- ol,
- li,
- figure,
- .wp-caption {
- margin: 0 0 10px 0 !important;
- }
-}
-
-h1,
-h2,
-h3 {
- font-weight: bold;
-}
-
-h1 {
- font-size: 1.6em;
- line-height: 1.25em;
-}
-
-h2 {
- font-size: 1.2em;
- line-height: 1.51em;
-}
-
-h3 {
- font-size: 1em;
- line-height: 1.66em;
-}
-
-a:link {
- text-decoration: underline;
- font-weight: normal;
-}
-
-a:link,
-a:link:hover,
-a:link:active {
- color: #0095dd;
-}
-
-a:visited {
- color: #c2e;
-}
-
-* {
- max-width: 100%;
- height: auto;
-}
-
-p,
-code,
-pre,
-blockquote,
-ul,
-ol,
-li,
-figure,
-.wp-caption {
- margin: -10px -10px 20px -10px;
- padding: 10px;
- border-radius: 5px;
-}
-
-li {
- margin-bottom: 0;
-}
-
-li > ul,
-li > ol {
- margin-bottom: -10px;
-}
-
-p > img:only-child,
-p > a:only-child > img:only-child,
-.wp-caption img,
-figure img {
- display: block;
-}
-
-img[moz-reader-center] {
- margin-left: auto;
- margin-right: auto;
-}
-
-.caption,
-.wp-caption-text,
-figcaption {
- font-size: 0.9em;
- line-height: 1.48em;
- font-style: italic;
-}
-
-code,
-pre {
- white-space: pre-wrap;
-}
-
-blockquote {
- padding: 0;
- padding-inline-start: 16px;
-}
-
-ul,
-ol {
- padding: 0;
-}
-
-ul {
- padding-inline-start: 30px;
- list-style: disc;
-}
-
-ol {
- padding-inline-start: 30px;
- list-style: decimal;
-}
-
-/* Hide elements with common "hidden" class names */
-.visually-hidden,
-.visuallyhidden,
-.hidden,
-.invisible,
-.sr-only {
- display: none;
-}
diff --git a/toolkit/themes/shared/aboutReaderControls.css b/toolkit/themes/shared/aboutReaderControls.css
deleted file mode 100644
index afd65f458..000000000
--- a/toolkit/themes/shared/aboutReaderControls.css
+++ /dev/null
@@ -1,388 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-.light-button {
- color: #333333;
- background-color: #ffffff;
-}
-
-.dark-button {
- color: #eeeeee;
- background-color: #333333;
-}
-
-.sepia-button {
- color: #5b4636;
- background-color: #f4ecd8;
-}
-
-.sans-serif-button {
- font-family: Helvetica, Arial, sans-serif;
-}
-
-.serif-button {
- font-family: Georgia, "Times New Roman", serif;
-}
-
-/* Loading/error message */
-
-#reader-message {
- margin-top: 40px;
- display: none;
- text-align: center;
- width: 100%;
- font-size: 0.9em;
-}
-
-/* Header */
-
-.header {
- text-align: start;
- display: none;
-}
-
-.domain {
- font-size: 0.9em;
- line-height: 1.48em;
- padding-bottom: 4px;
- font-family: Helvetica, Arial, sans-serif;
- text-decoration: none;
- border-bottom: 1px solid;
- color: #0095dd;
-}
-
-.header > h1 {
- font-size: 1.6em;
- line-height: 1.25em;
- width: 100%;
- margin: 30px 0;
- padding: 0;
-}
-
-.header > .credits {
- font-size: 0.9em;
- line-height: 1.48em;
- margin: 0 0 30px 0;
- padding: 0;
- font-style: italic;
-}
-
-/*======= Controls toolbar =======*/
-
-.toolbar {
- font-family: Helvetica, Arial, sans-serif;
- position: fixed;
- height: 100%;
- top: 0;
- left: 0;
- margin: 0;
- padding: 0;
- list-style: none;
- background-color: #fbfbfb;
- -moz-user-select: none;
- border-right: 1px solid #b5b5b5;
- z-index: 1;
-}
-
-.button {
- display: block;
- background-size: 24px 24px;
- background-repeat: no-repeat;
- color: #333;
- background-color: #fbfbfb;
- height: 40px;
- padding: 0;
-}
-
-.toolbar .button {
- width: 40px;
- background-position: center;
- margin-right: -1px;
- border-top: 0;
- border-left: 0;
- border-right: 1px solid #b5b5b5;
- border-bottom: 1px solid #c1c1c1;
-}
-
-.button[hidden] {
- display: none;
-}
-
-.dropdown {
- text-align: center;
- list-style: none;
- margin: 0;
- padding: 0;
-}
-
-.dropdown li {
- margin: 0;
- padding: 0;
-}
-
-/*======= Popup =======*/
-
-.dropdown-popup {
- min-width: 300px;
- text-align: start;
- position: absolute;
- left: 48px; /* offset to account for toolbar width */
- z-index: 1000;
- background-color: #fbfbfb;
- visibility: hidden;
- border-radius: 4px;
- border: 1px solid #b5b5b5;
- border-bottom-width: 0;
- box-shadow: 0 1px 12px #666;
-}
-
-.keep-open .dropdown-popup {
- z-index: initial;
-}
-
-.dropdown-popup > hr {
- display: none;
-}
-
-.open > .dropdown-popup {
- visibility: visible;
-}
-
-.dropdown-arrow {
- position: absolute;
- top: 30px; /* offset arrow from top of popup */
- left: -16px;
- width: 24px;
- height: 24px;
- background-image: url("chrome://global/skin/reader/RM-Type-Controls-Arrow.svg");
- display: block;
-}
-
-/*======= Font style popup =======*/
-
-#font-type-buttons,
-#font-size-buttons,
-#color-scheme-buttons,
-#content-width-buttons,
-#line-height-buttons {
- display: flex;
- flex-direction: row;
-}
-
-#font-type-buttons > button:first-child {
- border-top-left-radius: 3px;
-}
-#font-type-buttons > button:last-child {
- border-top-right-radius: 3px;
-}
-#color-scheme-buttons > button:first-child {
- border-bottom-left-radius: 3px;
-}
-#color-scheme-buttons > button:last-child {
- border-bottom-right-radius: 3px;
-}
-
-#font-type-buttons > button,
-#font-size-buttons > button,
-#color-scheme-buttons > button,
-#content-width-buttons > button,
-#line-height-buttons > button {
- text-align: center;
- border: 0;
-}
-
-#font-type-buttons > button,
-#font-size-buttons > button,
-#content-width-buttons > button,
-#line-height-buttons > button {
- width: 50%;
- background-color: transparent;
- border-left: 1px solid #B5B5B5;
- border-bottom: 1px solid #B5B5B5;
-}
-
-#color-scheme-buttons > button {
- width: 33.33%;
- font-size: 14px;
-}
-
-#color-scheme-buttons > .dark-button {
- margin-top: -1px;
- height: 61px;
-}
-
-#font-type-buttons > button:first-child,
-#font-size-buttons > button:first-child,
-#content-width-buttons > button:first-child,
-#line-height-buttons > button:first-child {
- border-left: 0;
-}
-
-#font-type-buttons > button {
- display: inline-block;
- font-size: 62px;
- height: 100px;
-}
-
-#font-size-buttons > button,
-#color-scheme-buttons > button,
-#content-width-buttons > button,
-#line-height-buttons > button {
- height: 60px;
-}
-
-#font-type-buttons > button:active:hover,
-#font-type-buttons > button.selected,
-#color-scheme-buttons > button:active:hover,
-#color-scheme-buttons > button.selected {
- box-shadow: inset 0 -3px 0 0 #fc6420;
-}
-
-#font-type-buttons > button:active:hover,
-#font-type-buttons > button.selected {
- border-bottom: 1px solid #FC6420;
-}
-
-/* Make the serif button content the same size as the sans-serif button content. */
-#font-type-buttons > button > .description {
- color: #666;
- font-size: 12px;
- margin-top: -5px;
-}
-
-/* Font sizes are different per-platform, so we need custom CSS to line them up. */
-%ifdef XP_MACOSX
-#font-type-buttons > .sans-serif-button > .name {
- margin-top: 10px;
-}
-
-#font-type-buttons > .sans-serif-button > .description {
- margin-top: -4px;
-}
-
-#font-type-buttons > .serif-button > .name {
- font-size: 63px;
-}
-%elifdef XP_WIN
-#font-type-buttons > .sans-serif-button > .name {
- margin-top: 2px;
-}
-
-#font-type-buttons > .sans-serif-button > .description {
- margin-top: -4px;
-}
-
-#font-type-buttons > .serif-button > .name {
- font-size: 63px;
-}
-%else
-#font-type-buttons > .sans-serif-button > .name {
- margin-top: 5px;
-}
-
-#font-type-buttons > .sans-serif-button > .description {
- margin-top: -8px;
-}
-
-#font-type-buttons > .serif-button > .name {
- font-size: 70px;
-}
-%endif
-
-.button:hover,
-#font-size-buttons > button:hover,
-#font-type-buttons > button:hover,
-#content-width-buttons > button:hover,
-#line-height-buttons > button:hover {
- background-color: #ebebeb;
-}
-
-.dropdown.open,
-.button:active,
-#font-size-buttons > button:active,
-#font-size-buttons > button.selected,
-#content-width-buttons > button:active,
-#content-width-buttons > button.selected,
-#line-height-buttons > button:active,
-#line-height-buttons > button.selected {
- background-color: #dadada;
-}
-
-/* Only used on Android */
-#font-size-sample {
- display: none;
-}
-
-.minus-button,
-.plus-button,
-.content-width-minus-button,
-.content-width-plus-button,
-.line-height-minus-button,
-.line-height-plus-button {
- background-color: transparent;
- border: 0;
- background-size: 18px 18px;
- background-repeat: no-repeat;
- background-position: center;
-}
-
-/*======= Toolbar icons =======*/
-
-.close-button {
- background-image: url("chrome://global/skin/reader/RM-Close-24x24.svg#close");
- height: 68px;
- background-position: center 8px;
-}
-
-.close-button:hover {
- background-image: url("chrome://global/skin/reader/RM-Close-24x24.svg#close-hover");
- background-color: #d94141;
- border-bottom: 1px solid #d94141;
- border-right: 1px solid #d94141;
-}
-
-.close-button:hover:active {
- background-image: url("chrome://global/skin/reader/RM-Close-24x24.svg#close-hover");
- background-color: #AE2325;
- border-bottom: 1px solid #AE2325;
- border-right: 1px solid #AE2325;
-}
-
-.style-button {
- background-image: url("chrome://global/skin/reader/RM-Type-Controls-24x24.svg");
-}
-
-.minus-button {
- background-image: url("chrome://global/skin/reader/RM-Minus-24x24.svg");
-}
-
-.plus-button {
- background-image: url("chrome://global/skin/reader/RM-Plus-24x24.svg");
-}
-
-.content-width-minus-button {
- background-size: 42px 16px;
- background-image: url("chrome://global/skin/reader/RM-Content-Width-Minus-42x16.svg");
-}
-
-.content-width-plus-button {
- background-size: 44px 16px;
- background-image: url("chrome://global/skin/reader/RM-Content-Width-Plus-44x16.svg");
-}
-
-.line-height-minus-button {
- background-size: 34px 14px;
- background-image: url("chrome://global/skin/reader/RM-Line-Height-Minus-38x14.svg");
-}
-
-.line-height-plus-button {
- background-size: 34px 24px;
- background-image: url("chrome://global/skin/reader/RM-Line-Height-Plus-38x24.svg");
-}
-
-@media print {
- .toolbar {
- display: none !important;
- }
-}
diff --git a/toolkit/themes/shared/extensions/alerticon-error.svg b/toolkit/themes/shared/extensions/alerticon-error.svg
new file mode 100644
index 000000000..cb883e16e
--- /dev/null
+++ b/toolkit/themes/shared/extensions/alerticon-error.svg
@@ -0,0 +1,6 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 18 18">
+ <path fill="#e62117" d="M10.124,1.324l7.705,14.127c0.234,0.421,0.228,0.843-0.019,1.264c-0.114,0.193-0.271,0.347-0.467,0.461c-0.198,0.114-0.41,0.171-0.638,0.171H1.294c-0.228,0-0.44-0.057-0.636-0.171c-0.198-0.114-0.353-0.268-0.467-0.461c-0.247-0.421-0.254-0.843-0.02-1.264L7.876,1.324C7.99,1.117,8.147,0.953,8.348,0.833C8.548,0.712,8.766,0.652,9,0.652c0.234,0,0.451,0.06,0.652,0.181C9.853,0.953,10.009,1.117,10.124,1.324z M10.264,10.695l0.181-4.605c0-0.08-0.034-0.143-0.1-0.191c-0.087-0.073-0.168-0.11-0.241-0.11H7.896c-0.073,0-0.154,0.037-0.241,0.11c-0.067,0.048-0.1,0.118-0.1,0.211l0.17,4.586c0,0.067,0.034,0.122,0.1,0.165c0.067,0.044,0.147,0.065,0.241,0.065h1.856c0.094,0,0.172-0.021,0.236-0.065C10.222,10.818,10.258,10.762,10.264,10.695z M10.284,14.448v-1.907c0-0.094-0.031-0.172-0.095-0.236c-0.064-0.064-0.139-0.095-0.225-0.095H8.036c-0.087,0-0.162,0.031-0.225,0.095c-0.064,0.064-0.095,0.142-0.095,0.236v1.907c0,0.094,0.031,0.173,0.095,0.236c0.064,0.064,0.138,0.095,0.225,0.095h1.927c0.086,0,0.162-0.031,0.225-0.095C10.252,14.621,10.284,14.542,10.284,14.448z"/>
+</svg>
diff --git a/toolkit/themes/shared/extensions/alerticon-info-negative.svg b/toolkit/themes/shared/extensions/alerticon-info-negative.svg
new file mode 100644
index 000000000..733f8571a
--- /dev/null
+++ b/toolkit/themes/shared/extensions/alerticon-info-negative.svg
@@ -0,0 +1,6 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 18 18">
+ <path fill="#828282" d="M10.124,1.324l7.705,14.127c0.234,0.421,0.228,0.843-0.019,1.264c-0.114,0.193-0.271,0.347-0.467,0.461c-0.198,0.114-0.41,0.171-0.638,0.171H1.294c-0.228,0-0.44-0.057-0.636-0.171c-0.198-0.114-0.353-0.268-0.467-0.461c-0.247-0.421-0.254-0.843-0.02-1.264L7.876,1.324C7.99,1.117,8.147,0.953,8.348,0.833C8.548,0.712,8.766,0.652,9,0.652c0.234,0,0.451,0.06,0.652,0.181C9.853,0.953,10.009,1.117,10.124,1.324z M10.264,10.695l0.181-4.605c0-0.08-0.034-0.143-0.1-0.191c-0.087-0.073-0.168-0.11-0.241-0.11H7.896c-0.073,0-0.154,0.037-0.241,0.11c-0.067,0.048-0.1,0.118-0.1,0.211l0.17,4.586c0,0.067,0.034,0.122,0.1,0.165c0.067,0.044,0.147,0.065,0.241,0.065h1.856c0.094,0,0.172-0.021,0.236-0.065C10.222,10.818,10.258,10.762,10.264,10.695z M10.284,14.448v-1.907c0-0.094-0.031-0.172-0.095-0.236c-0.064-0.064-0.139-0.095-0.225-0.095H8.036c-0.087,0-0.162,0.031-0.225,0.095c-0.064,0.064-0.095,0.142-0.095,0.236v1.907c0,0.094,0.031,0.173,0.095,0.236c0.064,0.064,0.138,0.095,0.225,0.095h1.927c0.086,0,0.162-0.031,0.225-0.095C10.252,14.621,10.284,14.542,10.284,14.448z"/>
+</svg>
diff --git a/toolkit/themes/shared/extensions/alerticon-info-positive.svg b/toolkit/themes/shared/extensions/alerticon-info-positive.svg
new file mode 100644
index 000000000..031190bce
--- /dev/null
+++ b/toolkit/themes/shared/extensions/alerticon-info-positive.svg
@@ -0,0 +1,6 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 18 18">
+ <path fill="#62c44e" d="M18,4.796c0,0.31-0.109,0.573-0.325,0.79l-8.408,8.406l-1.579,1.58c-0.217,0.217-0.48,0.325-0.789,0.325c-0.31,0-0.573-0.108-0.79-0.325l-1.579-1.58L0.325,9.79C0.108,9.573,0,9.31,0,9s0.108-0.573,0.325-0.79l1.58-1.579c0.216-0.217,0.479-0.325,0.789-0.325s0.573,0.108,0.79,0.325l3.414,3.426l7.617-7.63c0.217-0.216,0.48-0.325,0.79-0.325c0.309,0,0.572,0.109,0.789,0.325l1.58,1.58C17.891,4.224,18,4.487,18,4.796z"/>
+</svg>
diff --git a/toolkit/themes/shared/extensions/alerticon-warning.svg b/toolkit/themes/shared/extensions/alerticon-warning.svg
new file mode 100644
index 000000000..2b403220e
--- /dev/null
+++ b/toolkit/themes/shared/extensions/alerticon-warning.svg
@@ -0,0 +1,6 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 18 18">
+ <path fill="#f0cd2f" d="M10.124,1.324l7.705,14.127c0.234,0.421,0.228,0.843-0.019,1.264c-0.114,0.193-0.271,0.347-0.467,0.461c-0.198,0.114-0.41,0.171-0.638,0.171H1.294c-0.228,0-0.44-0.057-0.636-0.171c-0.198-0.114-0.353-0.268-0.467-0.461c-0.247-0.421-0.254-0.843-0.02-1.264L7.876,1.324C7.99,1.117,8.147,0.953,8.348,0.833C8.548,0.712,8.766,0.652,9,0.652c0.234,0,0.451,0.06,0.652,0.181C9.853,0.953,10.009,1.117,10.124,1.324z M10.264,10.695l0.181-4.605c0-0.08-0.034-0.143-0.1-0.191c-0.087-0.073-0.168-0.11-0.241-0.11H7.896c-0.073,0-0.154,0.037-0.241,0.11c-0.067,0.048-0.1,0.118-0.1,0.211l0.17,4.586c0,0.067,0.034,0.122,0.1,0.165c0.067,0.044,0.147,0.065,0.241,0.065h1.856c0.094,0,0.172-0.021,0.236-0.065C10.222,10.818,10.258,10.762,10.264,10.695z M10.284,14.448v-1.907c0-0.094-0.031-0.172-0.095-0.236c-0.064-0.064-0.139-0.095-0.225-0.095H8.036c-0.087,0-0.162,0.031-0.225,0.095c-0.064,0.064-0.095,0.142-0.095,0.236v1.907c0,0.094,0.031,0.173,0.095,0.236c0.064,0.064,0.138,0.095,0.225,0.095h1.927c0.086,0,0.162-0.031,0.225-0.095C10.252,14.621,10.284,14.542,10.284,14.448z"/>
+</svg>
diff --git a/toolkit/themes/shared/extensions/extensionGeneric.svg b/toolkit/themes/shared/extensions/extensionGeneric.svg
new file mode 100644
index 000000000..28c2f7ba3
--- /dev/null
+++ b/toolkit/themes/shared/extensions/extensionGeneric.svg
@@ -0,0 +1,12 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 64 64">
+ <defs>
+ <linearGradient id="gradient-linear-puzzle-piece" x1="0%" y1="0%" x2="0%" y2="100%">
+ <stop offset="0%" stop-color="#66cc52" stop-opacity="1"/>
+ <stop offset="100%" stop-color="#60bf4c" stop-opacity="1"/>
+ </linearGradient>
+ </defs>
+ <path fill="url('#gradient-linear-puzzle-piece')" d="M42,62c2.2,0,4-1.8,4-4l0-14.2c0,0,0.4-3.7,2.8-3.7c2.4,0,2.2,3.9,6.7,3.9c2.3,0,6.2-1.2,6.2-8.2 c0-7-3.9-7.9-6.2-7.9c-4.5,0-4.3,3.7-6.7,3.7c-2.4,0-2.8-3.8-2.8-3.8V22c0-2.2-1.8-4-4-4H31.5c0,0-3.4-0.6-3.4-3 c0-2.4,3.8-2.6,3.8-7.1c0-2.3-1.3-5.9-8.3-5.9s-8,3.6-8,5.9c0,4.5,3.4,4.7,3.4,7.1c0,2.4-3.4,3-3.4,3H6c-2.2,0-4,1.8-4,4l0,7.8 c0,0-0.4,6,4.4,6c3.1,0,3.2-4.1,7.3-4.1c2,0,4,1.9,4,6c0,4.2-2,6.3-4,6.3c-4,0-4.2-4.1-7.3-4.1c-4.8,0-4.4,5.8-4.4,5.8L2,58 c0,2.2,1.8,4,4,4H19c0,0,6.3,0.4,6.3-4.4c0-3.1-4-3.6-4-7.7c0-2,2.2-4.5,6.4-4.5c4.2,0,6.6,2.5,6.6,4.5c0,4-3.9,4.6-3.9,7.7 c0,4.9,6.3,4.4,6.3,4.4H42z"/>
+</svg>
diff --git a/toolkit/themes/shared/extensions/utilities.svg b/toolkit/themes/shared/extensions/utilities.svg
index fd911001b..8bf24458c 100644
--- a/toolkit/themes/shared/extensions/utilities.svg
+++ b/toolkit/themes/shared/extensions/utilities.svg
@@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- x="0"
- y="0"
- width="16"
- height="16"
- viewBox="0 0 16 16">
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<style>
use:not(:target) {
display: none;
@@ -16,10 +13,18 @@
use[id$="-native"] {
fill: GrayText;
}
+ use[id$="-grayscale"] {
+ fill: #4d4d4d;
+ }
+ use[id$="-inverted"] {
+ fill: #ddd;
+ }
</style>
- <defs style="display: none;">
+ <defs>
<path id="utilities-shape" d="m11.5,13.9l-.6-1.5c.3-.2 .5-.4 .8-.6 .2-.2 .4-.5 .6-.7l1.5,.6c.3,.1 .6,0 .7-.3l.4-1c.1-.3 0-.6-.3-.7l-1.5-.6c.1-.6 .1-1.3 0-2l1.5-.6c.3-.1 .4-.4 .3-.7l-.4-1c-.1-.3-.4-.4-.7-.3l-1.5,.6c-.2-.3-.4-.5-.6-.8-.2-.1-.5-.3-.7-.5l.6-1.5c.1-.3 0-.6-.3-.7l-.9-.4c-.3-.1-.6,0-.7,.3l-.6,1.5c-.6-.1-1.3-.1-2,0l-.6-1.5c-.1-.3-.4-.4-.7-.3l-1,.4c-.2,.1-.3,.4-.2,.6l.6,1.5c-.3,.3-.5,.5-.8,.7-.2,.3-.4,.5-.6,.8l-1.5-.7c-.3-.1-.6,0-.7,.3l-.4,.9c-.1,.3 0,.6 .3,.7l1.5,.7c-.1,.6-.1,1.3 0,1.9l-1.5,.6c-.3,.1-.4,.4-.3,.7l.4,1c.1,.3 .4,.4 .7,.3l1.5-.6c.2,.3 .4,.5 .6,.8 .2,.2 .5,.4 .7,.6l-.6,1.5c-.1,.3 0,.6 .3,.7l1,.4c.3,.1 .6,0 .7-.3l.6-1.5c.6,.1 1.3,.1 2,0l.6,1.5c.1,.3 .4,.4 .7,.3l1-.4c.1-.1 .3-.4 .1-.7zm-5.1-4.2c-.9-.9-.9-2.4 0-3.3 .9-.9 2.4-.9 3.3,0 .9,.9 .9,2.4 0,3.3-.9,.9-2.4,.9-3.3,0z"/>
</defs>
<use id="utilities" xlink:href="#utilities-shape"/>
<use id="utilities-native" xlink:href="#utilities-shape"/>
+ <use id="utilities-grayscale" xlink:href="#utilities-shape"/>
+ <use id="utilities-inverted" xlink:href="#utilities-shape"/>
</svg>
diff --git a/toolkit/themes/shared/jar.inc.mn b/toolkit/themes/shared/jar.inc.mn
index bdfca2a05..675353409 100644
--- a/toolkit/themes/shared/jar.inc.mn
+++ b/toolkit/themes/shared/jar.inc.mn
@@ -15,9 +15,7 @@ toolkit.jar:
skin/classic/global/aboutCache.css (../../shared/aboutCache.css)
skin/classic/global/aboutCacheEntry.css (../../shared/aboutCacheEntry.css)
skin/classic/global/aboutMemory.css (../../shared/aboutMemory.css)
- skin/classic/global/aboutReader.css (../../shared/aboutReader.css)
- skin/classic/global/aboutReaderContent.css (../../shared/aboutReaderContent.css)
-* skin/classic/global/aboutReaderControls.css (../../shared/aboutReaderControls.css)
+* skin/classic/global/aboutReader.css (../../shared/aboutReader.css)
skin/classic/global/aboutSupport.css (../../shared/aboutSupport.css)
skin/classic/global/appPicker.css (../../shared/appPicker.css)
skin/classic/global/config.css (../../shared/config.css)
@@ -34,7 +32,6 @@ toolkit.jar:
skin/classic/global/icons/blocked.svg (../../shared/incontent-icons/blocked.svg)
skin/classic/global/alerts/alert-common.css (../../shared/alert-common.css)
skin/classic/global/narrate.css (../../shared/narrate.css)
- skin/classic/global/narrateControls.css (../../shared/narrateControls.css)
skin/classic/global/narrate/arrow.svg (../../shared/narrate/arrow.svg)
skin/classic/global/narrate/back.svg (../../shared/narrate/back.svg)
skin/classic/global/narrate/fast.svg (../../shared/narrate/fast.svg)
diff --git a/toolkit/themes/shared/narrate.css b/toolkit/themes/shared/narrate.css
index 8a44e78e2..836b5d686 100644
--- a/toolkit/themes/shared/narrate.css
+++ b/toolkit/themes/shared/narrate.css
@@ -1,3 +1,6 @@
+/* Avoid adding ID selector rules in this style sheet, since they could
+ * inadvertently match elements in the article content. */
+
.narrating {
position: relative;
z-index: 1;
@@ -22,7 +25,7 @@ body.dark .narrating {
z-index: -1;
border-bottom-style: solid;
border-bottom-width: 7px;
- transition: left 0.1s ease;
+ transition: left 0.1s ease, width 0.1s ease;
}
.narrating > .narrate-word-highlight {
@@ -44,3 +47,193 @@ body.sepia .narrate-word-highlight {
body.dark .narrate-word-highlight {
border-bottom-color: #6f6f6f;
}
+
+.narrate-dropdown {
+ --border-color: #e5e5e5;
+}
+
+.narrate-toggle > svg {
+ display: block;
+ margin: 0 8px;
+}
+
+.narrate-dropdown > .dropdown-popup button {
+ background-color: transparent;
+}
+
+.narrate-dropdown > .dropdown-popup button:hover:not(:disabled) {
+ background-color: #eaeaea;
+}
+
+.narrate-row {
+ display: flex;
+ align-items: center;
+ min-height: 40px;
+ box-sizing: border-box;
+}
+
+.narrate-row:not(:first-child) {
+ border-top: 1px solid var(--border-color);
+}
+
+/* Control buttons */
+
+.narrate-control > button {
+ background-size: 24px 24px;
+ background-repeat: no-repeat;
+ background-position: center center;
+ height: 64px;
+ width: 100px;
+ border: none;
+ color: #666;
+ box-sizing: border-box;
+}
+
+.narrate-control > button:not(:first-child) {
+ border-left: 1px solid var(--border-color);
+}
+
+.narrate-skip-previous {
+ border-top-left-radius: 3px;
+ background-image: url("chrome://global/skin/narrate/back.svg#enabled");
+ -moz-context-properties: fill;
+ fill: rgb(128 128 128);
+}
+
+.narrate-skip-next {
+ border-top-right-radius: 3px;
+ background-image: url("chrome://global/skin/narrate/forward.svg#enabled");
+ -moz-context-properties: fill;
+ fill: rgb(128 128 128);
+}
+
+.narrate-skip-previous:disabled {
+ background-image: url("chrome://global/skin/narrate/back.svg#disabled");
+}
+
+.narrate-skip-next:disabled {
+ background-image: url("chrome://global/skin/narrate/forward.svg#disabled");
+}
+
+.narrate-start-stop {
+ background-image: url("chrome://global/skin/narrate/start.svg");
+}
+
+.narrate-dropdown.speaking .narrate-start-stop {
+ background-image: url("chrome://global/skin/narrate/stop.svg");
+}
+
+/* Rate control */
+
+.narrate-rate::before, .narrate-rate::after {
+ content: '';
+ width: 48px;
+ height: 40px;
+ background-position: center;
+ background-repeat: no-repeat;
+ background-size: 24px auto;
+}
+
+.narrate-rate::before {
+ background-image: url("chrome://global/skin/narrate/slow.svg");
+}
+
+.narrate-rate::after {
+ background-image: url("chrome://global/skin/narrate/fast.svg");
+}
+
+.narrate-rate-input {
+ margin: 0 1px;
+ flex-grow: 1;
+}
+
+.narrate-rate-input::-moz-range-track {
+ background-color: #979797;
+ height: 2px;
+}
+
+.narrate-rate-input::-moz-range-progress {
+ background-color: #2EA3FF;
+ height: 2px;
+}
+
+.narrate-rate-input::-moz-range-thumb {
+ background-color: #808080;
+ height: 16px;
+ width: 16px;
+ border-radius: 8px;
+ border-width: 0;
+}
+
+.narrate-rate-input:active::-moz-range-thumb {
+ background-color: #2EA3FF;
+}
+
+/* Voice selection */
+
+.voiceselect {
+ width: 100%;
+}
+
+.voiceselect > button.select-toggle,
+.voiceselect > .options > button.option {
+ -moz-appearance: none;
+ border: none;
+ width: 100%;
+ min-height: 40px;
+}
+
+.voiceselect.open > button.select-toggle {
+ border-bottom: 1px solid var(--border-color);
+}
+
+.voiceselect > button.select-toggle::after {
+ content: '';
+ background-image: url("chrome://global/skin/narrate/arrow.svg");
+ background-position: center;
+ background-repeat: no-repeat;
+ background-size: 12px 12px;
+ display: inline-block;
+ width: 1.5em;
+ height: 1em;
+ vertical-align: middle;
+}
+
+.voiceselect > .options > button.option:not(:first-child) {
+ border-top: 1px solid var(--border-color);
+}
+
+.voiceselect > .options > button.option {
+ box-sizing: border-box;
+}
+
+.voiceselect > .options:not(.hovering) > button.option:focus {
+ background-color: #eaeaea;
+}
+
+.voiceselect > .options:not(.hovering) > button.option:hover:not(:focus) {
+ background-color: transparent;
+}
+
+.voiceselect > .options > button.option::-moz-focus-inner {
+ outline: none;
+ border: 0;
+}
+
+.voiceselect > .options {
+ display: none;
+ overflow-y: auto;
+}
+
+.voiceselect.open > .options {
+ display: block;
+}
+
+.current-voice {
+ color: #7f7f7f;
+}
+
+.voiceselect:not(.open) > button,
+.voiceselect .option:last-child {
+ border-radius: 0 0 3px 3px;
+}
diff --git a/toolkit/themes/shared/narrateControls.css b/toolkit/themes/shared/narrateControls.css
deleted file mode 100644
index 91d02d85a..000000000
--- a/toolkit/themes/shared/narrateControls.css
+++ /dev/null
@@ -1,185 +0,0 @@
-:scope {
- --border-color: #e5e5e5;
-}
-
-#narrate-toggle > svg {
- display: block;
- margin: 0 8px;
-}
-
-.dropdown-popup button {
- background-color: transparent;
-}
-
-.dropdown-popup button:hover:not(:disabled) {
- background-color: #eaeaea;
-}
-
-.narrate-row {
- display: flex;
- align-items: center;
- min-height: 40px;
- box-sizing: border-box;
-}
-
-.narrate-row:not(:first-child) {
- border-top: 1px solid var(--border-color);
-}
-
-/* Control buttons */
-
-#narrate-control > button {
- background-size: 24px 24px;
- background-repeat: no-repeat;
- background-position: center center;
- height: 64px;
- width: 100px;
- border: none;
- color: #666;
- box-sizing: border-box;
-}
-
-#narrate-control > button:not(:first-child) {
- border-left: 1px solid var(--border-color);
-}
-
-#narrate-skip-previous {
- border-top-left-radius: 3px;
- background-image: url("chrome://global/skin/narrate/back.svg#enabled");
-}
-
-#narrate-skip-next {
- border-top-right-radius: 3px;
- background-image: url("chrome://global/skin/narrate/forward.svg#enabled");
-}
-
-#narrate-skip-previous:disabled {
- background-image: url("chrome://global/skin/narrate/back.svg#disabled");
-}
-
-#narrate-skip-next:disabled {
- background-image: url("chrome://global/skin/narrate/forward.svg#disabled");
-}
-
-#narrate-start-stop {
- background-image: url("chrome://global/skin/narrate/start.svg");
-}
-
-#narrate-dropdown.speaking #narrate-start-stop {
- background-image: url("chrome://global/skin/narrate/stop.svg");
-}
-
-/* Rate control */
-
-#narrate-rate::before, #narrate-rate::after {
- content: '';
- width: 48px;
- height: 40px;
- background-position: center;
- background-repeat: no-repeat;
- background-size: 24px auto;
-}
-
-#narrate-rate::before {
- background-image: url("chrome://global/skin/narrate/slow.svg");
-}
-
-#narrate-rate::after {
- background-image: url("chrome://global/skin/narrate/fast.svg");
-}
-
-#narrate-rate-input {
- margin: 0 1px;
- flex-grow: 1;
-}
-
-#narrate-rate-input::-moz-range-track {
- background-color: #979797;
- height: 2px;
-}
-
-#narrate-rate-input::-moz-range-progress {
- background-color: #2EA3FF;
- height: 2px;
-}
-
-#narrate-rate-input::-moz-range-thumb {
- background-color: #808080;
- height: 16px;
- width: 16px;
- border-radius: 8px;
- border-width: 0;
-}
-
-#narrate-rate-input:active::-moz-range-thumb {
- background-color: #2EA3FF;
-}
-
-/* Voice selection */
-
-.voiceselect {
- width: 100%;
-}
-
-.voiceselect > button.select-toggle,
-.voiceselect > .options > button.option {
- -moz-appearance: none;
- border: none;
- width: 100%;
- min-height: 40px;
-}
-
-.voiceselect.open > button.select-toggle {
- border-bottom: 1px solid var(--border-color);
-}
-
-.voiceselect > button.select-toggle::after {
- content: '';
- background-image: url("chrome://global/skin/narrate/arrow.svg");
- background-position: center;
- background-repeat: no-repeat;
- background-size: 12px 12px;
- display: inline-block;
- width: 1.5em;
- height: 1em;
- vertical-align: middle;
-}
-
-.voiceselect > .options > button.option:not(:first-child) {
- border-top: 1px solid var(--border-color);
-}
-
-.voiceselect > .options > button.option {
- box-sizing: border-box;
-}
-
-.voiceselect > .options:not(.hovering) > button.option:focus {
- background-color: #eaeaea;
-}
-
-.voiceselect > .options:not(.hovering) > button.option:hover:not(:focus) {
- background-color: transparent;
-}
-
-.voiceselect > .options > button.option::-moz-focus-inner {
- outline: none;
- border: 0;
-}
-
-.voiceselect > .options {
- display: none;
- overflow-y: auto;
-}
-
-.voiceselect.open > .options {
- display: block;
-}
-
-.current-voice {
- color: #7f7f7f;
-}
-
-.voiceselect:not(.open) > button,
-.option:last-child {
- border-radius: 0 0 3px 3px;
-}
diff --git a/toolkit/themes/shared/non-mac.jar.inc.mn b/toolkit/themes/shared/non-mac.jar.inc.mn
index 637537d9d..23f9da519 100644
--- a/toolkit/themes/shared/non-mac.jar.inc.mn
+++ b/toolkit/themes/shared/non-mac.jar.inc.mn
@@ -142,7 +142,7 @@
% override chrome://mozapps/skin/extensions/category-extensions.svg chrome://mozapps/skin/extensions/extensionGeneric.svg
% override chrome://mozapps/skin/extensions/category-languages.png chrome://mozapps/skin/extensions/localeGeneric.png
% override chrome://mozapps/skin/extensions/category-themes.png chrome://mozapps/skin/extensions/themeGeneric.png
-% override chrome://mozapps/skin/plugins/notifyPluginCrashed.png chrome://mozapps/skin/plugins/pluginGeneric-16.png
% override chrome://mozapps/skin/plugins/notifyPluginGeneric.png chrome://mozapps/skin/plugins/pluginGeneric-16.png
% override chrome://mozapps/skin/xpinstall/xpinstallItemGeneric.png chrome://mozapps/skin/extensions/extensionGeneric.png
#endif
+% override chrome://mozapps/skin/plugins/notifyPluginCrashed.png chrome://mozapps/skin/plugins/pluginGeneric-16.png
diff --git a/toolkit/themes/shared/reader/RM-Content-Width-Minus-42x16.svg b/toolkit/themes/shared/reader/RM-Content-Width-Minus-42x16.svg
index 48bbb9e89..482a392fb 100644
--- a/toolkit/themes/shared/reader/RM-Content-Width-Minus-42x16.svg
+++ b/toolkit/themes/shared/reader/RM-Content-Width-Minus-42x16.svg
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
+<svg xmlns="http://www.w3.org/2000/svg"
width="42"
height="16"
viewBox="0 0 42 16"
diff --git a/toolkit/themes/shared/reader/RM-Content-Width-Plus-44x16.svg b/toolkit/themes/shared/reader/RM-Content-Width-Plus-44x16.svg
index bcdcbe8ad..da02e608f 100644
--- a/toolkit/themes/shared/reader/RM-Content-Width-Plus-44x16.svg
+++ b/toolkit/themes/shared/reader/RM-Content-Width-Plus-44x16.svg
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
+<svg xmlns="http://www.w3.org/2000/svg"
width="44"
height="16"
viewBox="0 0 44 16"
diff --git a/toolkit/themes/shared/reader/RM-Line-Height-Minus-38x14.svg b/toolkit/themes/shared/reader/RM-Line-Height-Minus-38x14.svg
index 05d52828a..59517c246 100644
--- a/toolkit/themes/shared/reader/RM-Line-Height-Minus-38x14.svg
+++ b/toolkit/themes/shared/reader/RM-Line-Height-Minus-38x14.svg
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
+<svg xmlns="http://www.w3.org/2000/svg"
width="38"
height="14"
viewBox="0 0 38 14"
diff --git a/toolkit/themes/shared/reader/RM-Line-Height-Plus-38x24.svg b/toolkit/themes/shared/reader/RM-Line-Height-Plus-38x24.svg
index 0a5ee0dcc..ba50c5a52 100644
--- a/toolkit/themes/shared/reader/RM-Line-Height-Plus-38x24.svg
+++ b/toolkit/themes/shared/reader/RM-Line-Height-Plus-38x24.svg
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
+<svg xmlns="http://www.w3.org/2000/svg"
width="38"
height="24"
viewBox="0 0 38 24"
diff --git a/toolkit/themes/shared/reader/RM-Type-Controls-Arrow.svg b/toolkit/themes/shared/reader/RM-Type-Controls-Arrow.svg
index 837392ff3..9c663119f 100644
--- a/toolkit/themes/shared/reader/RM-Type-Controls-Arrow.svg
+++ b/toolkit/themes/shared/reader/RM-Type-Controls-Arrow.svg
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
- <polygon opacity="0.15" points="16.583,0.015 16.569,0 4.583,12 16.569,24 16.583,23.985"/>
- <polygon fill="#fbfbfb" points="16.575,1.021 16.561,1.008 5.583,12 16.577,23.008 16.591,22.994 "/>
-</svg>
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 24">
+ <polygon points="16.58 0.01 16.57 0 4.58 12 16.57 24 16.58 23.98 16.58 0.01" fill="#b5b5b5"/>
+ <polyline points="16.63 1.51 6.08 12.01 16.63 22.5" fill="#fbfbfb"/>
+</svg>
diff --git a/toolkit/themes/windows/global/icons/loading_16.png b/toolkit/themes/windows/global/icons/loading_16.png
new file mode 100644
index 000000000..0315d470b
--- /dev/null
+++ b/toolkit/themes/windows/global/icons/loading_16.png
Binary files differ
diff --git a/toolkit/themes/windows/global/icons/notloading_16.png b/toolkit/themes/windows/global/icons/notloading_16.png
new file mode 100644
index 000000000..f8366ded5
--- /dev/null
+++ b/toolkit/themes/windows/global/icons/notloading_16.png
Binary files differ
diff --git a/toolkit/themes/windows/global/jar.mn b/toolkit/themes/windows/global/jar.mn
index 8c5d5de5a..75f4cc650 100644
--- a/toolkit/themes/windows/global/jar.mn
+++ b/toolkit/themes/windows/global/jar.mn
@@ -50,6 +50,8 @@ toolkit.jar:
skin/classic/global/icons/close-inverted-win7.png (icons/close-inverted-win7.png)
skin/classic/global/icons/close-inverted-win7@2x.png (icons/close-inverted-win7@2x.png)
skin/classic/global/icons/find.png (icons/find.png)
+ skin/classic/global/icons/loading_16.png (icons/loading_16.png)
+ skin/classic/global/icons/notloading_16.png (icons/notloading_16.png)
skin/classic/global/icons/resizer.png (icons/resizer.png)
skin/classic/global/icons/sslWarning.png (icons/sslWarning.png)
* skin/classic/global/in-content/common.css (in-content/common.css)
diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild
index 98c109c1b..b4aebbef0 100644
--- a/toolkit/toolkit.mozbuild
+++ b/toolkit/toolkit.mozbuild
@@ -103,10 +103,6 @@ else:
# toolkit
-# This must precede xpfe.
-if CONFIG['MOZ_JPROF']:
- DIRS += ['/tools/jprof']
-
DIRS += [
'/tools/power',
'/tools/profiler',
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index 2050b9671..e43aea926 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -182,10 +182,6 @@
#include "mozilla/Logging.h"
#endif
-#ifdef MOZ_JPROF
-#include "jprof.h"
-#endif
-
#include "base/command_line.h"
#include "GTestRunner.h"
@@ -1513,11 +1509,6 @@ static nsresult LaunchChild(nsINativeAppSupport* aNative,
// Restart this process by exec'ing it into the current process
// if supported by the platform. Otherwise, use NSPR.
-#ifdef MOZ_JPROF
- // make sure JPROF doesn't think we're E10s
- unsetenv("JPROF_SLAVE");
-#endif
-
if (aBlankCommandLine) {
gRestartArgc = 1;
gRestartArgv[gRestartArgc] = nullptr;
@@ -3393,11 +3384,6 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
XRE_InstallX11ErrorHandler();
#endif
- // Call the code to install our handler
-#ifdef MOZ_JPROF
- setupProfilingStuff();
-#endif
-
rv = NS_CreateNativeAppSupport(getter_AddRefs(mNativeApp));
if (NS_FAILED(rv))
return 1;
diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp
index f62dbdd6d..1498b0d17 100644
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -82,10 +82,6 @@
using mozilla::_ipdltest::IPDLUnitTestProcessChild;
#endif // ifdef MOZ_IPDL_TESTS
-#ifdef MOZ_JPROF
-#include "jprof.h"
-#endif
-
using namespace mozilla;
using mozilla::ipc::BrowserProcessSubThread;
@@ -250,11 +246,6 @@ XRE_InitChildProcess(int aArgc,
NS_ENSURE_ARG_POINTER(aArgv[0]);
MOZ_ASSERT(aChildData);
-#ifdef MOZ_JPROF
- // Call the code to install our handler
- setupProfilingStuff();
-#endif
-
#if !defined(MOZ_WIDGET_ANDROID)
// On non-Fennec Gecko, the GMPLoader code resides in plugin-container,
// and we must forward it through to the GMP code here.
diff --git a/tools/jprof/README.html b/tools/jprof/README.html
deleted file mode 100644
index 2ae88dec4..000000000
--- a/tools/jprof/README.html
+++ /dev/null
@@ -1,330 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<html>
-<head><title>The Jprof Profiler</title></head>
-
-<body bgcolor="#FFFFFF" text="#000000"
- link="#0000EE" vlink="#551A8B" alink="#FF0000">
-<center>
-<h1>The Jprof Profiler</h1>
-<font size="-1">
-<a href="mailto:jim_nance%yahoo.com">jim_nance@yahoo.com</a><p>
-Recent (4/2011) updates Randell Jesup (see bugzilla for contact info)
-</font>
-<hr>
-
-<a href="#introduction">Introduction</a> | <a href="#operation">Operation</a> |
-<a href="#setup">Setup</a> | <a href="#usage">Usage</a> |
-<a href="#interpretation">Interpretation</a>
-
-</center>
-<hr>
-
-<h3><a name="introduction">Introduction</a></h3>
-
-Jprof is a profiling tool. I am writing it because I need to find out
-where mozilla is spending its time, and there do not seem to be any
-profilers for Linux that can handle threads and/or shared libraries.
-This code is based heavily on Kipp Hickman's leaky.
-
-<h3><a name="operation">Operation</a></h3>
-
-Jprof operates by installing a timer which periodically interrupts mozilla.
-When this timer goes off, the jprof code inside mozilla walks the function call
-stack to determine which code was executing and saves the results into the
-<code>jprof-log</code> and <code>jprof-map</code> files. By collecting a large
-number of these call stacks, it is possible to deduce where mozilla is spending
-its time.
-
-<h3><a name="setup">Setup</a></h3>
-
-<p>Configure your mozilla with jprof support by adding
-<code>--enable-jprof</code> to your configure options (eg adding
-<code>ac_add_options --enable-jprof</code> to your <code>.mozconfig</code>) and
-making sure that you do <strong>not</strong> have the
-<code>--enable-strip</code> configure option set -- jprof needs symbols to
-operate. On many architectures with GCC, you'll need to add
-<code>--enable-optimize="-O3 -fno-omit-frame-pointer"</code> or the
-equivalent to ensure frame pointer generation in the compiler you're using.</p>
-
-<p>Finally, build mozilla with your new configuration. Now you can run jprof.</p>
-
-<h3><a name="usage">Usage</a></h3>
-<pre> jprof [-v] [-t] [-e exclude] [-i include] [-s stackdepth] [--last] [--all] [--start n [--end m]] [--output-dir dir] prog log [log2 ...]</pre>
-Options:
-<ul>
- <li><b>-s depth</b> : Limit depth looked at from captured stack
- frames</li>
- <li><b>-v</b> : Output some information about the symbols, memory map, etc.</li>
- <li><b>-t or --threads</b> : Group output according to thread. May require external
- LD_PRELOAD library to help force sampling of spawned threads; jprof
- may capture the main thread only. See <a
- href="http://sam.zoy.org/writings/programming/gprof.html">gprof-helper</a>;
- it may need adaption for jprof.</li>
- <li><b>--only-thread id</b> : Only output data for thread 'id'</li>
- <li><b>-e exclusion</b> : Allows excluding specific stack frames</li>
- <li><b>-i inclusion</b> : Allows including specific stack frames</li>
- <li><b>--last</b> : Only process data from the last 'section' of sampling
- (starting at the last PROF)</li>
- <li><b>--start N</b> : Start processing data at 'section' N </li>
- <li><b>--end N</b> : Stop processing data at 'section' N </li>
- <li><b>--output-dir dir</b> : Store generated .html files in the given directory </li>
-</ul>
-The behavior of jprof is determined by the value of the JPROF_FLAGS environment
-variable. This environment variable can be composed of several substrings
-which have the following meanings:
-<ul>
- <li> <b>JP_START</b> : Install the signal handler, and start sending the
- timer signals.
-
- <li> <b>JP_DEFER</b> : Install the signal handler, but don't start sending
- the timer signals. The user must start the signals by sending the first
- one (with <code>kill -PROF</code>, or with <code>kill -ALRM</code> if
- JP_REALTIME is used, or with <code>kill -POLL</code> (also known as <code>kill -IO</code>) if JP_RTC_HZ is used).
-
- <li> <b>JP_FIRST=x</b> : Wait x seconds before starting the timer
-
- <li> <b>JP_PERIOD=y</b> : Set timer to interrupt every y seconds. Only
- values of y greater than or equal to 0.001 are supported. Default is
- 0.050 (50ms).
-
- <li> <b>JP_REALTIME</b> : Do the profiling in intervals of real time rather
- than intervals of time used by the mozilla process (and the kernel
- when doing work for mozilla). This could probably lead to weird
- results (you'll see whatever runs when mozilla is waiting for events),
- but is needed to see time spent in the X server.
-
- <li> <b>JP_RTC_HZ=freq</b> : This option, only available on Linux if the
- kernel is built with RTC support, makes jprof use the RTC timer instead of
- using its own timer. This option, like JP_REALTIME, uses intervals of real
- time. This option overrides JP_PERIOD. <code>freq</code> is the frequency
- at which the timer should fire, measured in Hz. It must be a power of 2.
- The maximal frequency allowed by the kernel can be changed by writing to
- <code>/proc/sys/dev/rtc/max-user-freq</code>; the maximum value it can be
- set to is 8192. Note that <code>/dev/rtc</code> will need to be readable
- by the Firefox process; making that file world-readable is a simple way to
- accomplish that.
-
- <li> <b>JP_CIRCULAR=size</b> : This tells jprof to store samples in a
- circular buffer of the given size, which then will be saved (appended)
- to disk when SIGUSR1 is received or JProfStopProfiling is done. If the
- buffer overflows, the oldest entries will be evicted until there's
- space for the new entry.<p>
-
- SIGUSR2 will cause the circular buffer to be cleared.
-
- <li> <b>JP_FILENAME=basefilename</b> : This is the filename used for
- saving the log files to; the default is "jprof-log". If Electrolysis
- is used, each process after the first will have the process ID
- added ("jprof-log-3212");
-
-</ul>
-
-<h4>Starting and stopping jprof from JavaScript</h4>
-<p>
-A build with jprof enabled adds four functions to the Window object:<p>
-<code>JProfStartProfiling()</code> and <code>JProfStopProfiling()</code>: When used with JP_DEFER, these
-allow one to start and stop the timer just around whatever critical section is
-being profiled.</p><p>
-<code>JProfClearCircular()</code> and <code>JProfSaveCircular()</code>:
-These clear the circular buffer and save the buffer (without stopping), respectively.</p>
-
-<h4>Examples of JPROF_FLAGS usage</h4>
-<ul>
-
- <li>To make the timer start firing 3 seconds after the program is started and
- fire every 25 milliseconds of program time use:
- <pre>
- setenv JPROF_FLAGS "JP_START JP_FIRST=3 JP_PERIOD=0.025" </pre>
-
- <li>To make the timer start on your signal and fire every 1 millisecond of
- program time use:
- <pre>
- setenv JPROF_FLAGS "JP_DEFER JP_PERIOD=0.001" </pre>
-
- <li>To make the timer start on your signal and fire every 10 milliseconds of
- wall-clock time use:
- <pre>
- setenv JPROF_FLAGS "JP_DEFER JP_PERIOD=0.010 JP_REALTIME" </pre>
-
- <li>To make the timer start on your signal and fire at 8192 Hz in wall-clock
- time use:
- <pre>
- setenv JPROF_FLAGS "JP_DEFER JP_RTC_HZ=8192" </pre>
-
- <li>To make the timer start on JProfStartProfiling() and run continously
- with a 1ms sample rate until told to stop, then save the last 1MB of
- data:
- <pre>
- setenv JPROF_FLAGS "JP_DEFER JP_CIRCULAR=1048576 JP_PERIOD=0.001" </pre>
-
-</ul>
-
-<h4>Pausing profiles</h4>
-
-<P>jprof can be paused at any time by sending a SIGUSR1 to mozilla (<code>kill
--USR1</code>). This will cause the timer signals to stop and jprof-map to be
-written, but it will not close jprof-log. Combining SIGUSR1 with the JP_DEFER
-option allows profiling of one sequence of actions by starting the timer right
-before starting the actions and stopping the timer right afterward.
-
-<P>After a SIGUSR1, sending another timer signal (SIGPROF, SIGALRM, or SIGPOLL (aka SIGIO),
-depending on the mode) can be used to continue writing data to the same
-output.
-
-<P>SIGUSR2 will cause the circular buffer to be cleared, if it's in use.
-This is useful right before running a test when you're using a large,
-continuous circular buffer, or programmatically at the start of an action
-which might take too long (JProfClearCircular()).
-
-<h4>Looking at the results</h4>
-
-Now that we have <code>jprof-log</code> and <code>jprof-map</code> files, we
-can use the jprof executable is used to turn them into readable output. To do
-this jprof needs the name of the mozilla binary and the log file. It deduces
-the name of the map file:
-
-<pre>
- ./jprof /home/user/mozilla/objdir/dist/bin/firefox ./jprof-log > tmp.html
-</pre>
-
-This will generate the file <code>tmp.html</code> which you should view in a
-web browser.
-
-<pre>
- ./jprof --output-dir=/tmp /home/user/mozilla/objdir/dist/bin/firefox ./jprof-log*
-</pre>
-
-This will generate a set of files in /tmp for each process.
-
-
-<h3><a name="interpretation">Interpretation</a></h3>
-
-
-The Jprof output is split into a flat portion and a hierarchical portion.
-There are links to each section at the top of the page. It is typically
-easier to analyze the profile by starting with the flat output and following
-the links contained in the flat output up to the hierarchical output.
-
-<h4><a name="flat">Flat output</a></h3>
-
-The flat portion of the profile indicates which functions were executing
-when the timer was going off. It is displayed as a list of functions names
-on the right and the number of times that function was interrupted on the
-left. The list is sorted by decreasing interrupt count. For example:
-
-<blockquote> <pre>
-Total hit count: 151603
-Count %Total Function Name
-
-<a href="#23081">8806 5.8 __libc_poll</a>
-<a href="#40008">2254 1.5 __i686.get_pc_thunk.bx</a>
-<a href="#21390">2053 1.4 _int_malloc</a>
-<a href="#49013">1777 1.2 nsStyleContext::GetStyleData(nsStyleStructID)</a>
-<a href="#21380">1600 1.1 __libc_malloc</a>
-<a href="#603">1552 1.0 nsCOMPtr_base::~nsCOMPtr_base()</a>
-</pre> </blockquote>
-
-This shows that of the 151603 times the timer fired, 1777 (1.2% of the total) were inside nsStyleContext::GetStyleData() and 1552 (1.0% of the total) were in the nsCOMPtr_base destructor.
-
-<p>
-In general, the functions with the highest count are the functions which
-are taking the most time.
-
-<P>
-The function names are linked to the entry for that function in the
-hierarchical profile, which is described in the next section.
-
-<h4><a name="hier">Hierarchical output</a></h4>
-
-The hierarchical output is divided up into sections, with each section
-corresponding to one function. A typical section looks something like
-this:
-
-<blockquote><pre>
- index Count Hits Function Name
- <A href="#72871"> 545 (46.4%) nsBlockFrame::ReflowInlineFrames(nsBlockReflowState&, nsLineList_iterator, int*)</A>
- <A href="#72873"> 100 (8.5%) nsBlockFrame::ReflowDirtyLines(nsBlockReflowState&)</A>
- 72870 4 (0.3%) <a name=72870> 645 (54.9%)</a> <b>nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState&, nsLineLayout&, nsLineList_iterator, nsFlowAreaRect&, int&, nsFloatManager::SavedState*, int*, LineReflowStatus*, int)</b>
- <A href="#72821"> 545 (46.4%) nsBlockFrame::ReflowInlineFrame(nsBlockReflowState&, nsLineLayout&, nsLineList_iterator, nsIFrame*, LineReflowStatus*)</A>
- <A href="#72853"> 83 (7.1%) nsBlockFrame::PlaceLine(nsBlockReflowState&, nsLineLayout&, nsLineList_iterator, nsFloatManager::SavedState*, nsRect&, int&, int*)</A>
- <A href="#74150"> 9 (0.8%) nsLineLayout::BeginLineReflow(int, int, int, int, int, int)</A>
- <A href="#74897"> 1 (0.1%) nsTextFrame::GetType() const</A>
- <A href="#74131"> 1 (0.1%) nsLineLayout::RelativePositionFrames(nsOverflowAreas&)</A>
- <A href="#58320"> 1 (0.1%) __i686.get_pc_thunk.bx</A>
- <A href="#53077"> 1 (0.1%) PL_ArenaAllocate</A>
-</pre></blockquote>
-
-The information this block tells us is:
-
-<ul>
-<li>There were 4 profiler hits <em>in</em> <code>nsBlockFrame::DoReflowInlineFrames</code>
-<li>There were 645 profiler hits <em>in or under</em> <code>nsBlockFrame::DoReflowInlineFrames</code>. Of these:
-<ul>
- <li>545 were in or under <code>nsBlockFrame::ReflowInlineFrame</code>
- <li>83 were in or under <code>nsBlockFrame::PlaceLine</code>
- <li>9 were in or under <code>nsLineLayout::BeginLineReflow</code>
- <li>1 was in or under <code>nsTextFrame::GetType</code>
- <li>1 was in or under <code>nsLineLayout::RelativePositionFrames</code>
- <li>1 was in or under <code>__i686.get_pc_thunk.bx</code>
- <li>1 was in or under <code>PL_ArenaAllocate</code>
-</ul>
-<li>Of these 645 calls into <code>nsBlockFrame::DoReflowInlineFrames</code>:
-<ul>
- <li>545 came from <code>nsBlockFrame::ReflowInlineFrames</code>
- <li>100 came from <code>nsBlockFrame::ReflowDirtyLines</code>
-</ul>
-</ul>
-
-
-The rest of this section explains how to read this information off from the jprof output.
-
-<p>This block corresponds to the function <code>nsBlockFrame::DoReflowInlineFrames</code>, which is
-therefore bolded and not a link. The name of this function is preceded by
-five numbers which have the following meaning. The number on the left (72870)
-is the index number, and is not important. The next number (4) and the
-percentage following (0.3%) are the number
-of times this function was interrupted by the timer and the percentage of
-the total hits that is. The last number pair ("645 (54.9%)")
-are the number of times this function was in the call stack when the timer went
-off. That is, the timer went off while we were in code that was ultimately
-called from <code>nsBlockFrame::DoReflowInlineFrames</code>.
-<p>For our example we can see that our function was in the call stack for
-645 interrupt ticks, but we were only the function that was running when
-the interrupt arrived 4 times.
-<P>
-The functions listed above the line for <code>nsBlockFrame::DoReflowInlineFrames</code> are its
-callers. The numbers to the left of these function names are the numbers of
-times these functions were in the call stack as callers of
-<code>nsBlockFrame::DoReflowInlineFrames</code>. In our example, we were called 545 times by
-<code>nsBlockFrame::ReflowInlineFrames</code> and 100 times by
-<code>nsBlockFrame::ReflowDirtyLines</code>.
-<P>
-The functions listed below the line for <code>nsBlockFrame::DoReflowInlineFrames</code> are its
-callees. The numbers to the left of the function names are the numbers of
-times these functions were in the callstack as callees of
-<code>nsBlockFrame::DoReflowInlineFrames</code> and the corresponding percentages. In our example, of the 645 profiler hits under <code>nsBlockFrame::DoReflowInlineFrames</code> 545 were under <code>nsBlockFrame::ReflowInlineFrame</code>, 83 were under <code>nsBlockFrame::PlaceLine</code>, and so forth.<p>
-
-<b>NOTE:</b> If there are loops of execution or recursion, the numbers will
-not add up and percentages can exceed 100%. If a function directly calls
-itself "(self)" will be appended to the line, but indirect recursion will
-not be marked.
-
-<h3>Bugs</h3>
-The current build of Jprof has only been tested under Ubuntu 8.04 LTS, but
-should work under any fairly modern linux distribution using GCC/GLIBC.
-Please update this document with any known compatibilities/incompatibilities.
-<p>
-If you get an error:<p><code>Inconsistency detected by ld.so: dl-open.c: 260: dl_open_worker: Assertion `_dl_debug_initialize (0, args->nsid)->r_state == RT_CONSISTENT' failed!
-</code><p>that means you've hit a timing hole in the version of glibc you're
-running. See <a
-href="http://sources.redhat.com/bugzilla/show_bug.cgi?id=4578">Redhat bug 4578</a>.
-<!-- <h3>Update</h3>
-<ul>
-</ul>
--->
-
-</body>
-</html>
diff --git a/tools/jprof/bfd.cpp b/tools/jprof/bfd.cpp
deleted file mode 100644
index 2e013d0ae..000000000
--- a/tools/jprof/bfd.cpp
+++ /dev/null
@@ -1,231 +0,0 @@
-// vim:ts=8:sw=2:et:
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "leaky.h"
-
-#ifdef USE_BFD
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <libgen.h>
-#include <bfd.h>
-#include <cxxabi.h>
-
-static bfd *try_debug_file(const char *filename, unsigned long crc32)
-{
- int fd = open(filename, O_RDONLY);
- if (fd < 0)
- return nullptr;
-
- unsigned char buf[4*1024];
- unsigned long crc = 0;
-
- while (1) {
- ssize_t count = read(fd, buf, sizeof(buf));
- if (count <= 0)
- break;
-
- crc = bfd_calc_gnu_debuglink_crc32(crc, buf, count);
- }
-
- close(fd);
-
- if (crc != crc32)
- return nullptr;
-
- bfd *object = bfd_openr(filename, nullptr);
- if (!bfd_check_format(object, bfd_object)) {
- bfd_close(object);
- return nullptr;
- }
-
- return object;
-}
-
-static bfd *find_debug_file(bfd *lib, const char *aFileName)
-{
- // check for a separate debug file with symbols
- asection *sect = bfd_get_section_by_name(lib, ".gnu_debuglink");
-
- if (!sect)
- return nullptr;
-
- bfd_size_type debuglinkSize = bfd_section_size (objfile->obfd, sect);
-
- char *debuglink = new char[debuglinkSize];
- bfd_get_section_contents(lib, sect, debuglink, 0, debuglinkSize);
-
- // crc checksum is aligned to 4 bytes, and after the NUL.
- int crc_offset = (int(strlen(debuglink)) & ~3) + 4;
- unsigned long crc32 = bfd_get_32(lib, debuglink + crc_offset);
-
- // directory component
- char *dirbuf = strdup(aFileName);
- const char *dir = dirname(dirbuf);
-
- static const char debug_subdir[] = ".debug";
- // This is gdb's default global debugging info directory, but gdb can
- // be instructed to use a different directory.
- static const char global_debug_dir[] = "/usr/lib/debug";
-
- char *filename =
- new char[strlen(global_debug_dir) + strlen(dir) + crc_offset + 3];
-
- // /path/debuglink
- sprintf(filename, "%s/%s", dir, debuglink);
- bfd *debugFile = try_debug_file(filename, crc32);
- if (!debugFile) {
-
- // /path/.debug/debuglink
- sprintf(filename, "%s/%s/%s", dir, debug_subdir, debuglink);
- debugFile = try_debug_file(filename, crc32);
- if (!debugFile) {
-
- // /usr/lib/debug/path/debuglink
- sprintf(filename, "%s/%s/%s", global_debug_dir, dir, debuglink);
- debugFile = try_debug_file(filename, crc32);
- }
- }
-
- delete[] filename;
- free(dirbuf);
- delete[] debuglink;
-
- return debugFile;
-}
-
-
-// Use an indirect array to avoid copying tons of objects
-Symbol ** leaky::ExtendSymbols(int num)
-{
- long n = numExternalSymbols + num;
-
- externalSymbols = (Symbol**)
- realloc(externalSymbols,
- (size_t) (sizeof(externalSymbols[0]) * n));
- Symbol *new_array = new Symbol[n];
- for (int i = 0; i < num; i++) {
- externalSymbols[i + numExternalSymbols] = &new_array[i];
- }
- lastSymbol = externalSymbols + n;
- Symbol **sp = externalSymbols + numExternalSymbols;
- numExternalSymbols = n;
- return sp;
-}
-
-#define NEXT_SYMBOL do { sp++; \
- if (sp >= lastSymbol) { \
- sp = ExtendSymbols(16384); \
- } \
- } while (0)
-
-void leaky::ReadSymbols(const char *aFileName, u_long aBaseAddress)
-{
- int initialSymbols = usefulSymbols;
- if (nullptr == externalSymbols) {
- externalSymbols = (Symbol**) calloc(sizeof(Symbol*),10000);
- Symbol *new_array = new Symbol[10000];
- for (int i = 0; i < 10000; i++) {
- externalSymbols[i] = &new_array[i];
- }
- numExternalSymbols = 10000;
- }
- Symbol** sp = externalSymbols + usefulSymbols;
- lastSymbol = externalSymbols + numExternalSymbols;
-
- // Create a dummy symbol for the library so, if it doesn't have any
- // symbols, we show it by library.
- (*sp)->Init(aFileName, aBaseAddress);
- NEXT_SYMBOL;
-
- bfd_boolean kDynamic = (bfd_boolean) false;
-
- static int firstTime = 1;
- if (firstTime) {
- firstTime = 0;
- bfd_init ();
- }
-
- bfd* lib = bfd_openr(aFileName, nullptr);
- if (nullptr == lib) {
- return;
- }
- if (!bfd_check_format(lib, bfd_object)) {
- bfd_close(lib);
- return;
- }
-
- bfd *symbolFile = find_debug_file(lib, aFileName);
-
- // read mini symbols
- PTR minisyms;
- unsigned int size;
- long symcount = 0;
-
- if (symbolFile) {
- symcount = bfd_read_minisymbols(symbolFile, kDynamic, &minisyms, &size);
- if (symcount == 0) {
- bfd_close(symbolFile);
- } else {
- bfd_close(lib);
- }
- }
- if (symcount == 0) {
- symcount = bfd_read_minisymbols(lib, kDynamic, &minisyms, &size);
- if (symcount == 0) {
- // symtab is empty; try dynamic symbols
- kDynamic = (bfd_boolean) true;
- symcount = bfd_read_minisymbols(lib, kDynamic, &minisyms, &size);
- }
- symbolFile = lib;
- }
-
- asymbol* store;
- store = bfd_make_empty_symbol(symbolFile);
-
- // Scan symbols
- size_t demangle_buffer_size = 128;
- char *demangle_buffer = (char*) malloc(demangle_buffer_size);
- bfd_byte* from = (bfd_byte *) minisyms;
- bfd_byte* fromend = from + symcount * size;
- for (; from < fromend; from += size) {
- asymbol *sym;
- sym = bfd_minisymbol_to_symbol(symbolFile, kDynamic, (const PTR) from, store);
-
- symbol_info syminfo;
- bfd_get_symbol_info (symbolFile, sym, &syminfo);
-
-// if ((syminfo.type == 'T') || (syminfo.type == 't')) {
- const char* nm = bfd_asymbol_name(sym);
- if (nm && nm[0]) {
- char* dnm = nullptr;
- if (strncmp("__thunk", nm, 7)) {
- dnm =
- abi::__cxa_demangle(nm, demangle_buffer, &demangle_buffer_size, 0);
- if (dnm) {
- demangle_buffer = dnm;
- }
- }
- (*sp)->Init(dnm ? dnm : nm, syminfo.value + aBaseAddress);
- NEXT_SYMBOL;
- }
-// }
- }
-
- free(demangle_buffer);
- demangle_buffer = nullptr;
-
- bfd_close(symbolFile);
-
- int interesting = sp - externalSymbols;
- if (!quiet) {
- printf("%s provided %d symbols\n", aFileName,
- interesting - initialSymbols);
- }
- usefulSymbols = interesting;
-}
-
-#endif /* USE_BFD */
diff --git a/tools/jprof/coff.cpp b/tools/jprof/coff.cpp
deleted file mode 100644
index 78aa26733..000000000
--- a/tools/jprof/coff.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "leaky.h"
-
-#ifdef USE_COFF
-
-#define LANGUAGE_C
-#include <sym.h>
-#include <cmplrs/stsupport.h>
-#include <symconst.h>
-#include <filehdr.h>
-#include <ldfcn.h>
-#include <string.h>
-#include <stdlib.h>
-
-#ifdef IRIX4
-extern "C" {
- extern char *demangle(char const* in);
-};
-#else
-#include <dem.h>
-#endif
-
-static char *Demangle(char *rawName)
-{
-#ifdef IRIX4
- return strdup(demangle(rawName));
-#else
- char namebuf[4000];
- demangle(rawName, namebuf);
- return strdup(namebuf);
-#endif
-}
-
-void leaky::readSymbols(const char *fileName)
-{
- LDFILE *ldptr;
-
- ldptr = ldopen(fileName, nullptr);
- if (!ldptr) {
- fprintf(stderr, "%s: unable to open \"%s\"\n", applicationName,
- fileName);
- exit(-1);
- }
- if (PSYMTAB(ldptr) == 0) {
- fprintf(stderr, "%s: \"%s\": has no symbol table\n", applicationName,
- fileName);
- exit(-1);
- }
-
- long isymMax = SYMHEADER(ldptr).isymMax;
- long iextMax = SYMHEADER(ldptr).iextMax;
- long iMax = isymMax + iextMax;
-
- long alloced = 10000;
- Symbol* syms = (Symbol*) malloc(sizeof(Symbol) * 10000);
- Symbol* sp = syms;
- Symbol* last = syms + alloced;
- SYMR symr;
-
- for (long isym = 0; isym < iMax; isym++) {
- if (ldtbread(ldptr, isym, &symr) != SUCCESS) {
- fprintf(stderr, "%s: can't read symbol #%d\n", applicationName,
- isym);
- exit(-1);
- }
- if (isym < isymMax) {
- if ((symr.st == stStaticProc)
- || ((symr.st == stProc) &&
- ((symr.sc == scText) || (symr.sc == scAbs)))
- || ((symr.st == stBlock) &&
- (symr.sc == scText))) {
- // Text symbol. Set name field to point to the symbol name
- sp->name = Demangle(ldgetname(ldptr, &symr));
- sp->address = symr.value;
- sp++;
- if (sp >= last) {
- long n = alloced + 10000;
- syms = (Symbol*)
- realloc(syms, (size_t) (sizeof(Symbol) * n));
- last = syms + n;
- sp = syms + alloced;
- alloced = n;
- }
- }
- }
- }
-
- int interesting = sp - syms;
- if (!quiet) {
- printf("Total of %d symbols\n", interesting);
- }
- usefulSymbols = interesting;
- externalSymbols = syms;
-}
-
-#endif /* USE_COFF */
diff --git a/tools/jprof/elf.cpp b/tools/jprof/elf.cpp
deleted file mode 100644
index 1de1d2dcc..000000000
--- a/tools/jprof/elf.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "leaky.h"
-
-#ifdef USE_ELF
-
-#include "leaky.h"
-#include <stdio.h>
-#include <malloc.h>
-#include <libelf/libelf.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-
-void leaky::readSymbols(const char *fileName)
-{
- int fd = ::open(fileName, O_RDONLY);
- if (fd < 0) {
- fprintf(stderr, "%s: unable to open \"%s\"\n", applicationName,
- fileName);
- exit(-1);
- }
-
- elf_version(EV_CURRENT);
- Elf *elf = elf_begin(fd, ELF_C_READ, 0);
- if (!elf) {
- fprintf(stderr, "%s: \"%s\": has no symbol table\n", applicationName,
- fileName);
- exit(-1);
- }
-
- long alloced = 10000;
- Symbol* syms = (Symbol*) malloc(sizeof(Symbol) * 10000);
- Symbol* sp = syms;
- Symbol* last = syms + alloced;
-
- // Get each of the relevant sections and add them to the list of
- // symbols.
- Elf32_Ehdr *ehdr = elf32_getehdr(elf);
- if (!ehdr) {
- fprintf(stderr, "%s: elf library lossage\n", applicationName);
- exit(-1);
- }
-#if 0
- Elf32_Half ndx = ehdr->e_shstrndx;
-#endif
-
- Elf_Scn *scn = 0;
- int strtabndx = -1;
- for (int i = 1; (scn = elf_nextscn(elf, scn)) != 0; i++) {
- Elf32_Shdr *shdr = elf32_getshdr(scn);
-#if 0
- char *name = elf_strptr(elf, ndx, (size_t) shdr->sh_name);
- printf("Section %s (%d 0x%x)\n", name ? name : "(null)",
- shdr->sh_type, shdr->sh_type);
-#endif
- if (shdr->sh_type == SHT_STRTAB) {
- /* We assume here that string tables preceed symbol tables... */
- strtabndx = i;
- continue;
- }
-#if 0
- if (shdr->sh_type == SHT_DYNAMIC) {
- /* Dynamic */
- Elf_Data *data = elf_getdata(scn, 0);
- if (!data || !data->d_size) {
- printf("No data...");
- continue;
- }
-
- Elf32_Dyn *dyn = (Elf32_Dyn*) data->d_buf;
- Elf32_Dyn *lastdyn =
- (Elf32_Dyn*) ((char*) data->d_buf + data->d_size);
- for (; dyn < lastdyn; dyn++) {
- printf("tag=%d value=0x%x\n", dyn->d_tag, dyn->d_un.d_val);
- }
- } else
-#endif
- if ((shdr->sh_type == SHT_SYMTAB) ||
- (shdr->sh_type == SHT_DYNSYM)) {
- /* Symbol table */
- Elf_Data *data = elf_getdata(scn, 0);
- if (!data || !data->d_size) {
- printf("No data...");
- continue;
- }
-
- /* In theory we now have the symbols... */
- Elf32_Sym *esym = (Elf32_Sym*) data->d_buf;
- Elf32_Sym *lastsym =
- (Elf32_Sym*) ((char*) data->d_buf + data->d_size);
- for (; esym < lastsym; esym++) {
-#if 0
- char *nm = elf_strptr(elf, strtabndx, (size_t)esym->st_name);
- printf("%20s 0x%08x %02x %02x\n",
- nm, esym->st_value, ELF32_ST_BIND(esym->st_info),
- ELF32_ST_TYPE(esym->st_info));
-#endif
- if ((esym->st_value == 0) ||
- (ELF32_ST_BIND(esym->st_info) == STB_WEAK) ||
- (ELF32_ST_BIND(esym->st_info) == STB_NUM) ||
- (ELF32_ST_TYPE(esym->st_info) != STT_FUNC)) {
- continue;
- }
-#if 1
- char *nm = elf_strptr(elf, strtabndx, (size_t)esym->st_name);
-#endif
- sp->name = nm ? strdup(nm) : "(no name)";
- sp->address = esym->st_value;
- sp++;
- if (sp >= last) {
- long n = alloced + 10000;
- syms = (Symbol*)
- realloc(syms, (size_t) (sizeof(Symbol) * n));
- last = syms + n;
- sp = syms + alloced;
- alloced = n;
- }
- }
- }
- }
-
- int interesting = sp - syms;
- if (!quiet) {
- printf("Total of %d symbols\n", interesting);
- }
- usefulSymbols = interesting;
- externalSymbols = syms;
-}
-
-#endif /* USE_ELF */
diff --git a/tools/jprof/intcnt.cpp b/tools/jprof/intcnt.cpp
deleted file mode 100644
index d0f7e1f33..000000000
--- a/tools/jprof/intcnt.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "intcnt.h"
-
-IntCount::IntCount() : numInts(0), iPair(nullptr) { }
-IntCount::~IntCount() { delete [] iPair;}
-int IntCount::getSize() {return numInts;}
-int IntCount::getCount(int pos) {return iPair[pos].cnt;}
-int IntCount::getIndex(int pos) {return iPair[pos].idx;}
-
-void IntCount::clear()
-{
- delete[] iPair;
- iPair = new IntPair[0];
- numInts = 0;
-}
-
-int IntCount::countAdd(int index, int increment)
-{
- if(numInts) {
- // Do a binary search to find the element
- int divPoint = 0;
-
- if(index>iPair[numInts-1].idx) {
- divPoint = numInts;
- } else if(index<iPair[0].idx) {
- divPoint = 0;
- } else {
- int low=0, high=numInts-1;
- int mid = (low+high)/2;
- while(1) {
- mid = (low+high)/2;
-
- if(index<iPair[mid].idx) {
- high = mid;
- } else if(index>iPair[mid].idx) {
- if(mid<numInts-1 && index<iPair[mid+1].idx) {
- divPoint = mid+1;
- break;
- } else {
- low = mid+1;
- }
- } else if(index==iPair[mid].idx) {
- return iPair[mid].cnt += increment;
- }
- }
- }
-
- int i;
- IntPair *tpair = new IntPair[numInts+1];
- for(i=0; i<divPoint; i++) {
- tpair[i] = iPair[i];
- }
- for(i=divPoint; i<numInts; i++) {
- tpair[i+1] = iPair[i];
- }
- ++numInts;
- delete [] iPair;
- iPair = tpair;
- iPair[divPoint].idx = index;
- iPair[divPoint].cnt = increment;
- return increment;
- } else {
- iPair = new IntPair[1];
- numInts = 1;
- iPair[0].idx = index;
- return iPair[0].cnt = increment;
- }
-}
diff --git a/tools/jprof/intcnt.h b/tools/jprof/intcnt.h
deleted file mode 100644
index 3c009eac2..000000000
--- a/tools/jprof/intcnt.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef INTCNT_H
-#define INTCNT_H
-
-class IntCount
-{
-public:
- IntCount();
- ~IntCount();
- void clear();
- int countAdd(int index, int increment=1);
- int countGet(int index);
- int getSize();
- int getCount(int pos);
- int getIndex(int pos);
-
- IntCount(const IntCount&old)
- {
- numInts = old.numInts;
- if (numInts > 0) {
- iPair = new IntPair[numInts];
- for (int i = 0; i < numInts; i++) {
- iPair[i] = old.iPair[i];
- }
- } else {
- iPair = nullptr;
- }
- }
-private:
-
- int numInts;
- struct IntPair{int idx; int cnt;} *iPair;
-};
-
-#endif
diff --git a/tools/jprof/jprofsig b/tools/jprof/jprofsig
deleted file mode 100755
index 02226fc4b..000000000
--- a/tools/jprof/jprofsig
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#
-# Find Mozilla PID and send it a signal, to be used
-# with the jprof tool.
-#
-
-jpsignal_usage() {
- echo "Usage: jprofsig [start|stop]"
- exit 1
-}
-
-if [ $# != 1 ]; then
- echo "Wrong number of arguments."
- jpsignal_usage
-fi
-
-jpsignal_arg="$1"
-
-# Find & print mozilla PID
-tmpmoz=`ps aux | grep mozilla-bin | head -1 | awk '{ print $2 }'`
-echo "Mozilla PID = $tmpmoz"
-
-# See how we were called.
-case "$jpsignal_arg" in
- start)
- if [ "$JP_REALTIME" = 1 ]; then
- kill -ALRM $tmpmoz
- else
- # Normal, non-realtime mode.
- kill -PROF $tmpmoz
- fi
- ;;
- stop)
- kill -USR1 $tmpmoz
- ;;
- *)
- jpsignal_usage
- exit 1
-esac
-
-exit 0
diff --git a/tools/jprof/leaky.cpp b/tools/jprof/leaky.cpp
deleted file mode 100644
index d8e5322f5..000000000
--- a/tools/jprof/leaky.cpp
+++ /dev/null
@@ -1,863 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "leaky.h"
-#include "intcnt.h"
-
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#ifndef NTO
-#include <getopt.h>
-#endif
-#include <assert.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef NTO
-#include <mem.h>
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-static const u_int DefaultBuckets = 10007; // arbitrary, but prime
-static const u_int MaxBuckets = 1000003; // arbitrary, but prime
-
-//----------------------------------------------------------------------
-
-int main(int argc, char** argv)
-{
- leaky* l = new leaky;
-
- l->initialize(argc, argv);
- l->outputfd = stdout;
-
- for (int i = 0; i < l->numLogFiles; i++) {
- if (l->output_dir || l->numLogFiles > 1) {
- char name[2048]; // XXX fix
- if (l->output_dir)
- snprintf(name,sizeof(name),"%s/%s.html",l->output_dir,argv[l->logFileIndex + i]);
- else
- snprintf(name,sizeof(name),"%s.html",argv[l->logFileIndex + i]);
-
- fprintf(stderr,"opening %s\n",name);
- l->outputfd = fopen(name,"w");
- // if an error we won't process the file
- }
- if (l->outputfd) { // paranoia
- l->open(argv[l->logFileIndex + i]);
-
- if (l->outputfd != stderr) {
- fclose(l->outputfd);
- l->outputfd = nullptr;
- }
- }
- }
-
- return 0;
-}
-
-char *
-htmlify(const char *in)
-{
- const char *p = in;
- char *out, *q;
- int n = 0;
- size_t newlen;
-
- // Count the number of '<' and '>' in the input.
- while ((p = strpbrk(p, "<>")))
- {
- ++n;
- ++p;
- }
-
- // Knowing the number of '<' and '>', we can calculate the space
- // needed for the output string.
- newlen = strlen(in) + n * 3 + 1;
- out = new char[newlen];
-
- // Copy the input to the output, with substitutions.
- p = in;
- q = out;
- do
- {
- if (*p == '<')
- {
- strcpy(q, "&lt;");
- q += 4;
- }
- else if (*p == '>')
- {
- strcpy(q, "&gt;");
- q += 4;
- }
- else
- {
- *q++ = *p;
- }
- p++;
- } while (*p);
- *q = '\0';
-
- return out;
-}
-
-leaky::leaky()
-{
- applicationName = nullptr;
- progFile = nullptr;
-
- quiet = true;
- showAddress = false;
- showThreads = false;
- stackDepth = 100000;
- onlyThread = 0;
- cleo = false;
-
- mappedLogFile = -1;
- firstLogEntry = lastLogEntry = 0;
-
- sfd = -1;
- externalSymbols = 0;
- usefulSymbols = 0;
- numExternalSymbols = 0;
- lowestSymbolAddr = 0;
- highestSymbolAddr = 0;
-
- loadMap = nullptr;
-
- collect_last = false;
- collect_start = -1;
- collect_end = -1;
-}
-
-leaky::~leaky()
-{
-}
-
-void leaky::usageError()
-{
- fprintf(stderr, "Usage: %s [-v] [-t] [-e exclude] [-i include] [-s stackdepth] [--last] [--all] [--start n [--end m]] [--cleo] [--output-dir dir] prog log [log2 ...]\n", (char*) applicationName);
- fprintf(stderr,
- "\t-v: verbose\n"
- "\t-t | --threads: split threads\n"
- "\t--only-thread n: only profile thread N\n"
- "\t-i include-id: stack must include specified id\n"
- "\t-e exclude-id: stack must NOT include specified id\n"
- "\t-s stackdepth: Limit depth looked at from captured stack frames\n"
- "\t--last: only profile the last capture section\n"
- "\t--start n [--end m]: profile n to m (or end) capture sections\n"
- "\t--cleo: format output for 'cleopatra' display\n"
- "\t--output-dir dir: write output files to dir\n"
- "\tIf there's one log, output goes to stdout unless --output-dir is set\n"
- "\tIf there are more than one log, output files will be named with .html added\n"
- );
- exit(-1);
-}
-
-static struct option longopts[] = {
- { "threads", 0, nullptr, 't' },
- { "only-thread", 1, nullptr, 'T' },
- { "last", 0, nullptr, 'l' },
- { "start", 1, nullptr, 'x' },
- { "end", 1, nullptr, 'n' },
- { "cleo",0, nullptr, 'c' },
- { "output-dir", 1, nullptr, 'd' },
- { nullptr, 0, nullptr, 0 },
-};
-
-void leaky::initialize(int argc, char** argv)
-{
- applicationName = argv[0];
- applicationName = strrchr(applicationName, '/');
- if (!applicationName) {
- applicationName = argv[0];
- } else {
- applicationName++;
- }
-
- int arg;
- int errflg = 0;
- int longindex = 0;
-
- onlyThread = 0;
- output_dir = nullptr;
- cleo = false;
-
- // XXX tons of cruft here left over from tracemalloc
- // XXX The -- options shouldn't need short versions, or they should be documented
- while (((arg = getopt_long(argc, argv, "adEe:gh:i:r:Rs:tT:qvx:ln:",longopts,&longindex)) != -1)) {
- switch (arg) {
- case '?':
- default:
- fprintf(stderr,"error: unknown option %c\n",optopt);
- errflg++;
- break;
- case 'a':
- break;
- case 'A': // not implemented
- showAddress = true;
- break;
- case 'c':
- cleo = true;
- break;
- case 'd':
- output_dir = optarg; // reference to an argv pointer
- break;
- case 'R':
- break;
- case 'e':
- exclusions.add(optarg);
- break;
- case 'g':
- break;
- case 'r': // not implemented
- roots.add(optarg);
- if (!includes.IsEmpty()) {
- errflg++;
- }
- break;
- case 'i':
- includes.add(optarg);
- if (!roots.IsEmpty()) {
- errflg++;
- }
- break;
- case 'h':
- break;
- case 's':
- stackDepth = atoi(optarg);
- if (stackDepth < 2) {
- stackDepth = 2;
- }
- break;
- case 'x':
- // --start
- collect_start = atoi(optarg);
- break;
- case 'n':
- // --end
- collect_end = atoi(optarg);
- break;
- case 'l':
- // --last
- collect_last = true;
- break;
- case 'q':
- break;
- case 'v':
- quiet = !quiet;
- break;
- case 't':
- showThreads = true;
- break;
- case 'T':
- showThreads = true;
- onlyThread = atoi(optarg);
- break;
- }
- }
- if (errflg || ((argc - optind) < 2)) {
- usageError();
- }
- progFile = argv[optind++];
- logFileIndex = optind;
- numLogFiles = argc - optind;
- if (!quiet)
- fprintf(stderr,"numlogfiles = %d\n",numLogFiles);
-}
-
-static void* mapFile(int fd, u_int flags, off_t* sz)
-{
- struct stat sb;
- if (fstat(fd, &sb) < 0) {
- perror("fstat");
- exit(-1);
- }
- void* base = mmap(0, (int)sb.st_size, flags, MAP_PRIVATE, fd, 0);
- if (!base) {
- perror("mmap");
- exit(-1);
- }
- *sz = sb.st_size;
- return base;
-}
-
-void leaky::LoadMap()
-{
- malloc_map_entry mme;
- char name[1000];
-
- if (!loadMap) {
- // all files use the same map
- int fd = ::open(M_MAPFILE, O_RDONLY);
- if (fd < 0) {
- perror("open: " M_MAPFILE);
- exit(-1);
- }
- for (;;) {
- int nb = read(fd, &mme, sizeof(mme));
- if (nb != sizeof(mme)) break;
- nb = read(fd, name, mme.nameLen);
- if (nb != (int)mme.nameLen) break;
- name[mme.nameLen] = 0;
- if (!quiet) {
- fprintf(stderr,"%s @ %lx\n", name, mme.address);
- }
-
- LoadMapEntry* lme = new LoadMapEntry;
- lme->address = mme.address;
- lme->name = strdup(name);
- lme->next = loadMap;
- loadMap = lme;
- }
- close(fd);
- }
-}
-
-void leaky::open(char *logFile)
-{
- int threadArray[100]; // should auto-expand
- int last_thread = -1;
- int numThreads = 0;
- int section = -1;
- bool collecting = false;
-
- LoadMap();
-
- setupSymbols(progFile);
-
- // open up the log file
- if (mappedLogFile)
- ::close(mappedLogFile);
-
- mappedLogFile = ::open(logFile, O_RDONLY);
- if (mappedLogFile < 0) {
- perror("open");
- exit(-1);
- }
- off_t size;
- firstLogEntry = (malloc_log_entry*) mapFile(mappedLogFile, PROT_READ, &size);
- lastLogEntry = (malloc_log_entry*)((char*)firstLogEntry + size);
-
- if (!collect_last || collect_start < 0) {
- collecting = true;
- }
-
- // First, restrict it to the capture sections specified (all, last, start/end)
- // This loop walks through all the call stacks we recorded
- for (malloc_log_entry* lep=firstLogEntry;
- lep < lastLogEntry;
- lep = reinterpret_cast<malloc_log_entry*>(&lep->pcs[lep->numpcs])) {
-
- if (lep->flags & JP_FIRST_AFTER_PAUSE) {
- section++;
- if (collect_last) {
- firstLogEntry = lep;
- numThreads = 0;
- collecting = true;
- }
- if (collect_start == section) {
- collecting = true;
- firstLogEntry = lep;
- }
- if (collect_end == section) {
- collecting = false;
- lastLogEntry = lep;
- }
- if (!quiet)
- fprintf(stderr,"New section %d: first=%p, last=%p, collecting=%d\n",
- section,(void*)firstLogEntry,(void*)lastLogEntry,collecting);
- }
-
- // Capture thread info at the same time
-
- // Find all the threads captured
-
- // pthread/linux docs say the signal can be delivered to any thread in
- // the process. In practice, it appears in Linux that it's always
- // delivered to the thread that called setitimer(), and each thread can
- // have a separate itimer. There's a support library for gprof that
- // overlays pthread_create() to set timers in any threads you spawn.
- if (showThreads && collecting) {
- if (lep->thread != last_thread)
- {
- int i;
- for (i=0; i<numThreads; i++)
- {
- if (lep->thread == threadArray[i])
- break;
- }
- if (i == numThreads &&
- i < (int) (sizeof(threadArray)/sizeof(threadArray[0])))
- {
- threadArray[i] = lep->thread;
- numThreads++;
- if (!quiet)
- fprintf(stderr,"new thread %d\n",lep->thread);
- }
- }
- }
- }
- if (!quiet)
- fprintf(stderr,"Done collecting: sections %d: first=%p, last=%p, numThreads=%d\n",
- section,(void*)firstLogEntry,(void*)lastLogEntry,numThreads);
-
- if (!cleo) {
- fprintf(outputfd,"<html><head><title>Jprof Profile Report</title></head><body>\n");
- fprintf(outputfd,"<h1><center>Jprof Profile Report</center></h1>\n");
- }
-
- if (showThreads)
- {
- fprintf(stderr,"Num threads %d\n",numThreads);
-
- if (!cleo) {
- fprintf(outputfd,"<hr>Threads:<p><pre>\n");
- for (int i=0; i<numThreads; i++)
- {
- fprintf(outputfd," <a href=\"#thread_%d\">%d</a> ",
- threadArray[i],threadArray[i]);
- if ((i+1)%10 == 0)
- fprintf(outputfd,"<br>\n");
- }
- fprintf(outputfd,"</pre>");
- }
-
- for (int i=0; i<numThreads; i++)
- {
- if (!onlyThread || onlyThread == threadArray[i])
- analyze(threadArray[i]);
- }
- }
- else
- {
- analyze(0);
- }
-
- if (!cleo)
- fprintf(outputfd,"</pre></body></html>\n");
-}
-
-//----------------------------------------------------------------------
-
-
-static int symbolOrder(void const* a, void const* b)
-{
- Symbol const** ap = (Symbol const **)a;
- Symbol const** bp = (Symbol const **)b;
- return (*ap)->address == (*bp)->address ? 0 :
- ((*ap)->address > (*bp)->address ? 1 : -1);
-}
-
-void leaky::ReadSharedLibrarySymbols()
-{
- LoadMapEntry* lme = loadMap;
- while (nullptr != lme) {
- ReadSymbols(lme->name, lme->address);
- lme = lme->next;
- }
-}
-
-void leaky::setupSymbols(const char *fileName)
-{
- if (usefulSymbols == 0) {
- // only read once!
-
- // Read in symbols from the program
- ReadSymbols(fileName, 0);
-
- // Read in symbols from the .so's
- ReadSharedLibrarySymbols();
-
- if (!quiet) {
- fprintf(stderr,"A total of %d symbols were loaded\n", usefulSymbols);
- }
-
- // Now sort them
- qsort(externalSymbols, usefulSymbols, sizeof(Symbol *), symbolOrder);
- lowestSymbolAddr = externalSymbols[0]->address;
- highestSymbolAddr = externalSymbols[usefulSymbols-1]->address;
- }
-}
-
-// Binary search the table, looking for a symbol that covers this
-// address.
-int leaky::findSymbolIndex(u_long addr)
-{
- u_int base = 0;
- u_int limit = usefulSymbols - 1;
- Symbol** end = &externalSymbols[limit];
- while (base <= limit) {
- u_int midPoint = (base + limit)>>1;
- Symbol** sp = &externalSymbols[midPoint];
- if (addr < (*sp)->address) {
- if (midPoint == 0) {
- return -1;
- }
- limit = midPoint - 1;
- } else {
- if (sp+1 < end) {
- if (addr < (*(sp+1))->address) {
- return midPoint;
- }
- } else {
- return midPoint;
- }
- base = midPoint + 1;
- }
- }
- return -1;
-}
-
-Symbol* leaky::findSymbol(u_long addr)
-{
- int idx = findSymbolIndex(addr);
-
- if(idx<0) {
- return nullptr;
- } else {
- return externalSymbols[idx];
- }
-}
-
-//----------------------------------------------------------------------
-
-bool leaky::excluded(malloc_log_entry* lep)
-{
- if (exclusions.IsEmpty()) {
- return false;
- }
-
- char** pcp = &lep->pcs[0];
- u_int n = lep->numpcs;
- for (u_int i = 0; i < n; i++, pcp++) {
- Symbol* sp = findSymbol((u_long) *pcp);
- if (sp && exclusions.contains(sp->name)) {
- return true;
- }
- }
- return false;
-}
-
-bool leaky::included(malloc_log_entry* lep)
-{
- if (includes.IsEmpty()) {
- return true;
- }
-
- char** pcp = &lep->pcs[0];
- u_int n = lep->numpcs;
- for (u_int i = 0; i < n; i++, pcp++) {
- Symbol* sp = findSymbol((u_long) *pcp);
- if (sp && includes.contains(sp->name)) {
- return true;
- }
- }
- return false;
-}
-
-//----------------------------------------------------------------------
-
-void leaky::displayStackTrace(FILE* out, malloc_log_entry* lep)
-{
- char** pcp = &lep->pcs[0];
- u_int n = (lep->numpcs < stackDepth) ? lep->numpcs : stackDepth;
- for (u_int i = 0; i < n; i++, pcp++) {
- u_long addr = (u_long) *pcp;
- Symbol* sp = findSymbol(addr);
- if (sp) {
- fputs(sp->name, out);
- if (showAddress) {
- fprintf(out, "[%p]", (char*)addr);
- }
- }
- else {
- fprintf(out, "<%p>", (char*)addr);
- }
- fputc(' ', out);
- }
- fputc('\n', out);
-}
-
-void leaky::dumpEntryToLog(malloc_log_entry* lep)
-{
- printf("%ld\t", lep->delTime);
- printf(" --> ");
- displayStackTrace(outputfd, lep);
-}
-
-void leaky::generateReportHTML(FILE *fp, int *countArray, int count, int thread)
-{
- fprintf(fp,"<center>");
- if (showThreads)
- {
- fprintf(fp,"<hr><A NAME=thread_%d><b>Thread: %d</b></A><p>",
- thread,thread);
- }
- fprintf(fp,"<A href=#flat_%d>flat</A><b> | </b><A href=#hier_%d>hierarchical</A>",
- thread,thread);
- fprintf(fp,"</center><P><P><P>\n");
-
- int totalTimerHits = count;
- int *rankingTable = new int[usefulSymbols];
-
- for(int cnt=usefulSymbols; --cnt>=0; rankingTable[cnt]=cnt);
-
- // Drat. I would use ::qsort() but I would need a global variable and my
- // intro-pascal professor threatened to flunk anyone who used globals.
- // She damaged me for life :-) (That was 1986. See how much influence
- // she had. I don't remember her name but I always feel guilty about globals)
-
- // Shell Sort. 581130733 is the max 31 bit value of h = 3h+1
- int mx, i, h;
- for(mx=usefulSymbols/9, h=581130733; h>0; h/=3) {
- if(h<mx) {
- for(i = h-1; i<usefulSymbols; i++) {
- int j, tmp=rankingTable[i], val = countArray[tmp];
- for(j = i; (j>=h) && (countArray[rankingTable[j-h]]<val); j-=h) {
- rankingTable[j] = rankingTable[j-h];
- }
- rankingTable[j] = tmp;
- }
- }
- }
-
- // Ok, We are sorted now. Let's go through the table until we get to
- // functions that were never called. Right now we don't do much inside
- // this loop. Later we can get callers and callees into it like gprof
- // does
- fprintf(fp,
- "<h2><A NAME=hier_%d></A><center><a href=\"http://dxr.mozilla.org/mozilla-central/source/tools/jprof/README.html#hier\">Hierarchical Profile</a></center></h2><hr>\n",
- thread);
- fprintf(fp, "<pre>\n");
- fprintf(fp, "%6s %6s %4s %s\n",
- "index", "Count", "Hits", "Function Name");
-
- for(i=0; i<usefulSymbols && countArray[rankingTable[i]]>0; i++) {
- Symbol **sp=&externalSymbols[rankingTable[i]];
-
- (*sp)->cntP.printReport(fp, this, rankingTable[i], totalTimerHits);
-
- char *symname = htmlify((*sp)->name);
- fprintf(fp, "%6d %6d (%3.1f%%)%s <a name=%d>%8d (%3.1f%%)</a>%s <b>%s</b>\n",
- rankingTable[i],
- (*sp)->timerHit, ((*sp)->timerHit*1000/totalTimerHits)/10.0,
- ((*sp)->timerHit*1000/totalTimerHits)/10.0 >= 10.0 ? "" : " ",
- rankingTable[i], countArray[rankingTable[i]],
- (countArray[rankingTable[i]]*1000/totalTimerHits)/10.0,
- (countArray[rankingTable[i]]*1000/totalTimerHits)/10.0 >= 10.0 ? "" : " ",
- symname);
- delete [] symname;
-
- (*sp)->cntC.printReport(fp, this, rankingTable[i], totalTimerHits);
-
- fprintf(fp, "<hr>\n");
- }
- fprintf(fp,"</pre>\n");
-
- // OK, Now we want to print the flat profile. To do this we resort on
- // the hit count.
-
- // Cut-N-Paste Shell sort from above. The Ranking Table has already been
- // populated, so we do not have to reinitialize it.
- for(mx=usefulSymbols/9, h=581130733; h>0; h/=3) {
- if(h<mx) {
- for(i = h-1; i<usefulSymbols; i++) {
- int j, tmp=rankingTable[i], val = externalSymbols[tmp]->timerHit;
- for(j = i;
- (j>=h) && (externalSymbols[rankingTable[j-h]]->timerHit<val); j-=h) {
- rankingTable[j] = rankingTable[j-h];
- }
- rankingTable[j] = tmp;
- }
- }
- }
-
- // Pre-count up total counter hits, to get a percentage.
- // I wanted the total before walking the list, if this
- // double-pass over externalSymbols gets slow we can
- // do single-pass and print this out after the loop finishes.
- totalTimerHits = 0;
- for(i=0;
- i<usefulSymbols && externalSymbols[rankingTable[i]]->timerHit>0; i++) {
- Symbol **sp=&externalSymbols[rankingTable[i]];
- totalTimerHits += (*sp)->timerHit;
- }
- if (totalTimerHits == 0)
- totalTimerHits = 1;
-
- if (totalTimerHits != count)
- fprintf(stderr,"Hit count mismatch: count=%d; totalTimerHits=%d",
- count,totalTimerHits);
-
- fprintf(fp,"<h2><A NAME=flat_%d></A><center><a href=\"http://dxr.mozilla.org/mozilla-central/source/tools/jprof/README.html#flat\">Flat Profile</a></center></h2><br>\n",
- thread);
- fprintf(fp, "<pre>\n");
-
- fprintf(fp, "Total hit count: %d\n", totalTimerHits);
- fprintf(fp, "Count %%Total Function Name\n");
- // Now loop for as long as we have timer hits
- for(i=0;
- i<usefulSymbols && externalSymbols[rankingTable[i]]->timerHit>0; i++) {
-
- Symbol **sp=&externalSymbols[rankingTable[i]];
-
- char *symname = htmlify((*sp)->name);
- fprintf(fp, "<a href=\"#%d\">%3d %-2.1f %s</a>\n",
- rankingTable[i], (*sp)->timerHit,
- ((float)(*sp)->timerHit/(float)totalTimerHits)*100.0, symname);
- delete [] symname;
- }
-}
-
-void leaky::analyze(int thread)
-{
- int *countArray = new int[usefulSymbols];
- int *flagArray = new int[usefulSymbols];
-
- //Zero our function call counter
- memset(countArray, 0, sizeof(countArray[0])*usefulSymbols);
-
- // reset hit counts
- for(int i=0; i<usefulSymbols; i++) {
- externalSymbols[i]->timerHit = 0;
- externalSymbols[i]->regClear();
- }
-
- // The flag array is used to prevent counting symbols multiple times
- // if functions are called recursively. In order to keep from having
- // to zero it on each pass through the loop, we mark it with the value
- // of stacks on each trip through the loop. This means we can determine
- // if we have seen this symbol for this stack trace w/o having to reset
- // from the prior stacktrace.
- memset(flagArray, -1, sizeof(flagArray[0])*usefulSymbols);
-
- if (cleo)
- fprintf(outputfd,"m-Start\n");
-
- // This loop walks through all the call stacks we recorded
- // --last, --start and --end can restrict it, as can excludes/includes
- stacks = 0;
- for(malloc_log_entry* lep=firstLogEntry;
- lep < lastLogEntry;
- lep = reinterpret_cast<malloc_log_entry*>(&lep->pcs[lep->numpcs])) {
-
- if ((thread != 0 && lep->thread != thread) ||
- excluded(lep) || !included(lep))
- {
- continue;
- }
-
- ++stacks; // How many stack frames did we collect
-
- u_int n = (lep->numpcs < stackDepth) ? lep->numpcs : stackDepth;
- char** pcp = &lep->pcs[n-1];
- int idx=-1, parrentIdx=-1; // Init idx incase n==0
- if (cleo) {
- // This loop walks through every symbol in the call stack. By walking it
- // backwards we know who called the function when we get there.
- char type = 's';
- for (int i=n-1; i>=0; --i, --pcp) {
- idx = findSymbolIndex(reinterpret_cast<u_long>(*pcp));
-
- if(idx>=0) {
- // Skip over bogus __restore_rt frames that realtime profiling
- // can introduce.
- if (i > 0 && !strcmp(externalSymbols[idx]->name, "__restore_rt")) {
- --pcp;
- --i;
- idx = findSymbolIndex(reinterpret_cast<u_long>(*pcp));
- if (idx < 0) {
- continue;
- }
- }
- Symbol **sp=&externalSymbols[idx];
- char *symname = htmlify((*sp)->name);
- fprintf(outputfd,"%c-%s\n",type,symname);
- delete [] symname;
- }
- // else can't find symbol - ignore
- type = 'c';
- }
- } else {
- // This loop walks through every symbol in the call stack. By walking it
- // backwards we know who called the function when we get there.
- for (int i=n-1; i>=0; --i, --pcp) {
- idx = findSymbolIndex(reinterpret_cast<u_long>(*pcp));
-
- if(idx>=0) {
- // Skip over bogus __restore_rt frames that realtime profiling
- // can introduce.
- if (i > 0 && !strcmp(externalSymbols[idx]->name, "__restore_rt")) {
- --pcp;
- --i;
- idx = findSymbolIndex(reinterpret_cast<u_long>(*pcp));
- if (idx < 0) {
- continue;
- }
- }
-
- // If we have not seen this symbol before count it and mark it as seen
- if(flagArray[idx]!=stacks && ((flagArray[idx]=stacks) || true)) {
- ++countArray[idx];
- }
-
- // We know who we are and we know who our parrent is. Count this
- if(parrentIdx>=0) {
- externalSymbols[parrentIdx]->regChild(idx);
- externalSymbols[idx]->regParrent(parrentIdx);
- }
- // inside if() so an unknown in the middle of a stack won't break
- // the link!
- parrentIdx=idx;
- }
- }
-
- // idx should be the function that we were in when we received the signal.
- if(idx>=0) {
- ++externalSymbols[idx]->timerHit;
- }
-
- }
- }
- if (!cleo)
- generateReportHTML(outputfd, countArray, stacks, thread);
-}
-
-void FunctionCount::printReport(FILE *fp, leaky *lk, int parent, int total)
-{
- const char *fmt = " <A href=\"#%d\">%8d (%3.1f%%)%s %s</A>%s\n";
-
- int nmax, tmax=((~0U)>>1);
-
- do {
- nmax=0;
- for(int j=getSize(); --j>=0;) {
- int cnt = getCount(j);
- if(cnt==tmax) {
- int idx = getIndex(j);
- char *symname = htmlify(lk->indexToName(idx));
- fprintf(fp, fmt, idx, getCount(j),
- getCount(j)*100.0/total,
- getCount(j)*100.0/total >= 10.0 ? "" : " ",
- symname,
- parent == idx ? " (self)" : "");
- delete [] symname;
- } else if(cnt<tmax && cnt>nmax) {
- nmax=cnt;
- }
- }
- } while((tmax=nmax)>0);
-}
diff --git a/tools/jprof/leaky.h b/tools/jprof/leaky.h
deleted file mode 100644
index 5dafe30b9..000000000
--- a/tools/jprof/leaky.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef __leaky_h_
-#define __leaky_h_
-
-#include "config.h"
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include "libmalloc.h"
-#include "strset.h"
-#include "intcnt.h"
-
-typedef unsigned int u_int;
-
-struct Symbol;
-struct leaky;
-
-class FunctionCount : public IntCount
-{
-public:
- void printReport(FILE *fp, leaky *lk, int parent, int total);
-};
-
-struct Symbol {
- char* name;
- u_long address;
- int timerHit;
- FunctionCount cntP, cntC;
-
- int regChild(int id) {return cntC.countAdd(id, 1);}
- int regParrent(int id) {return cntP.countAdd(id, 1);}
- void regClear() {cntC.clear(); cntP.clear();}
-
- Symbol() : timerHit(0) {}
- void Init(const char* aName, u_long aAddress) {
- name = aName ? strdup(aName) : (char *)"";
- address = aAddress;
- }
-};
-
-struct LoadMapEntry {
- char* name; // name of .so
- u_long address; // base address where it was mapped in
- LoadMapEntry* next;
-};
-
-struct leaky {
- leaky();
- ~leaky();
-
- void initialize(int argc, char** argv);
- void open(char *arg);
-
- char* applicationName;
- int logFileIndex;
- int numLogFiles;
- char* progFile;
- FILE* outputfd;
-
- bool quiet;
- bool showAddress;
- bool showThreads;
- bool cleo;
- u_int stackDepth;
- int onlyThread;
- char* output_dir;
-
- int mappedLogFile;
- malloc_log_entry* firstLogEntry;
- malloc_log_entry* lastLogEntry;
-
- int stacks;
-
- int sfd;
- Symbol** externalSymbols;
- Symbol** lastSymbol;
- int usefulSymbols;
- int numExternalSymbols;
- StrSet exclusions;
- u_long lowestSymbolAddr;
- u_long highestSymbolAddr;
-
- LoadMapEntry* loadMap;
-
- bool collect_last;
- int collect_start;
- int collect_end;
-
- StrSet roots;
- StrSet includes;
-
- void usageError();
-
- void LoadMap();
-
- void analyze(int thread);
-
- void dumpEntryToLog(malloc_log_entry* lep);
-
- void insertAddress(u_long address, malloc_log_entry* lep);
- void removeAddress(u_long address, malloc_log_entry* lep);
-
- void displayStackTrace(FILE* out, malloc_log_entry* lep);
-
- Symbol ** ExtendSymbols(int num);
- void ReadSymbols(const char* fileName, u_long aBaseAddress);
- void ReadSharedLibrarySymbols();
- void setupSymbols(const char* fileName);
- Symbol* findSymbol(u_long address);
- bool excluded(malloc_log_entry* lep);
- bool included(malloc_log_entry* lep);
- const char* indexToName(int idx) {return externalSymbols[idx]->name;}
-
- private:
- void generateReportHTML(FILE *fp, int *countArray, int count, int thread);
- int findSymbolIndex(u_long address);
-};
-
-#endif /* __leaky_h_ */
diff --git a/tools/jprof/moz.build b/tools/jprof/moz.build
deleted file mode 100644
index 680161e81..000000000
--- a/tools/jprof/moz.build
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DIRS += ['stub']
-
-Program('jprof')
-
-SOURCES += [
- 'bfd.cpp',
- 'coff.cpp',
- 'elf.cpp',
- 'intcnt.cpp',
- 'leaky.cpp',
- 'strset.cpp',
-]
-
-LOCAL_INCLUDES += [
- 'stub',
-]
-
-OS_LIBS += [
- 'dl',
- 'bfd',
- 'iberty',
-]
diff --git a/tools/jprof/split-profile.py b/tools/jprof/split-profile.py
deleted file mode 100755
index 89454d3eb..000000000
--- a/tools/jprof/split-profile.py
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/python
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# This program splits up a jprof profile into multiple files based on a
-# list of functions in a text file. First, a complete profile is
-# generated. Then, for each line in the text file, a profile is
-# generated containing only stacks that go through that line, and also
-# excluding all stacks in earlier lines in the text file. This means
-# that the text file, from start to end, is splitting out pieces of the
-# profile in their own file. Finally, a final profile containing the
-# remainder is produced.
-
-# The program takes four arguments:
-# (1) The path to jprof.
-# (2) The path to the text file describing the splits. The output
-# will be placed in the same directory as this file.
-# (3) The program that was profiled.
-# (4) The jprof-log file generated by the profile, to be split up.
-# (Really, all arguments from (3) and later are passed through to
-# jprof, so additional arguments could be provided if you want to pass
-# additional arguments to jprof.)
-
-# In slightly more detail:
-#
-# This script uses jprof's includes (-i) and excludes (-e) options to
-# split profiles into segments. It takes as input a single text file,
-# and from that text file creates a series of jprof profiles in the
-# directory the text file is in.
-#
-# The input file format looks like the following:
-#
-# poll g_main_poll
-# GetRuleCascade CSSRuleProcessor::GetRuleCascade(nsPresContext *, nsIAtom *)
-# RuleProcessorData RuleProcessorData::RuleProcessorData(nsPresContext *, nsIContent *, nsRuleWalker *, nsCompatibility *)
-#
-# From this input file, the script will construct a profile called
-# jprof-0.html that contains the whole profile, a profile called
-# jprof-1-poll.html that includes only stacks with g_main_poll, a
-# profile called jprof-2-GetRuleCascade.html that includes only stacks
-# that have GetRuleCascade and do not have g_main_poll, a profile called
-# jprof-3-RuleProcessorData.html that includes only stacks that have the
-# RuleProcessorData constructor and do not have GetRuleCascade or
-# g_main_poll, and a profile called jprof-4.html that includes only
-# stacks that do not have any of the three functions in them.
-#
-# This means that all of the segments of the profile, except
-# jprof-0.html, are mutually exclusive. Thus clever ordering of the
-# functions in the input file can lead to a logical splitting of the
-# profile into segments.
-
-import sys
-import subprocess
-import os.path
-
-if len(sys.argv) < 5:
- sys.stderr.write("Expected arguments: <jprof> <split-file> <program> <jprof-log>\n")
- sys.exit(1)
-
-jprof = sys.argv[1]
-splitfile = sys.argv[2]
-passthrough = sys.argv[3:]
-
-for f in [jprof, splitfile]:
- if not os.path.isfile(f):
- sys.stderr.write("could not find file: {0}\n".format(f))
- sys.exit(1)
-
-def read_splits(splitfile):
- """
- Read splitfile (each line of which contains a name, a space, and
- then a function name to split on), and return a list of pairs
- representing exactly that. (Note that the name cannot contain
- spaces, but the function name can, and often does.)
- """
- def line_to_split(line):
- line = line.strip("\r\n")
- idx = line.index(" ")
- return (line[0:idx], line[idx+1:])
-
- io = open(splitfile, "r")
- result = [line_to_split(line) for line in io]
- io.close()
- return result
-
-splits = read_splits(splitfile)
-
-def generate_profile(options, destfile):
- """
- Run jprof to generate one split of the profile.
- """
- args = [jprof] + options + passthrough
- print "Generating {0}".format(destfile)
- destio = open(destfile, "w")
- # jprof expects the "jprof-map" file to be in its current working directory
- cwd = None
- for option in passthrough:
- if option.find("jprof-log"):
- cwd = os.path.dirname(option)
- if cwd is None:
- raise StandardError("no jprof-log option given")
- process = subprocess.Popen(args, stdout=destio, cwd=cwd)
- process.wait()
- destio.close()
- if process.returncode != 0:
- os.remove(destfile)
- sys.stderr.write("Error {0} from command:\n {1}\n".format(process.returncode, " ".join(args)))
- sys.exit(process.returncode)
-
-def output_filename(number, splitname):
- """
- Return the filename (absolute path) we should use to output the
- profile segment with the given number and splitname. Splitname
- should be None for the complete profile and the remainder.
- """
- def pad_count(i):
- result = str(i)
- # 0-pad to the same length
- result = "0" * (len(str(len(splits) + 1)) - len(result)) + result
- return result
-
- name = pad_count(number)
- if splitname is not None:
- name += "-" + splitname
-
- return os.path.join(os.path.dirname(splitfile),
- "jprof-{0}.html".format(name))
-
-# generate the complete profile
-generate_profile([], output_filename(0, None))
-
-# generate the listed splits
-count = 1
-excludes = []
-for (splitname, splitfunction) in splits:
- generate_profile(excludes + ["-i" + splitfunction],
- output_filename(count, splitname))
- excludes += ["-e" + splitfunction]
- count = count + 1
-
-# generate the remainder after the splits
-generate_profile(excludes, output_filename(count, None))
diff --git a/tools/jprof/strset.cpp b/tools/jprof/strset.cpp
deleted file mode 100644
index 623ad3f90..000000000
--- a/tools/jprof/strset.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "strset.h"
-#include <malloc.h>
-#include <string.h>
-
-StrSet::StrSet()
-{
- strings = 0;
- numstrings = 0;
-}
-
-void StrSet::add(const char* s)
-{
- if (strings) {
- strings = (char**) realloc(strings, (numstrings + 1) * sizeof(char*));
- } else {
- strings = (char**) malloc(sizeof(char*));
- }
- strings[numstrings] = strdup(s);
- numstrings++;
-}
-
-int StrSet::contains(const char* s)
-{
- char** sp = strings;
- int i = numstrings;
-
- while (--i >= 0) {
- char *ss = *sp++;
- if (ss[0] == s[0]) {
- if (strcmp(ss, s) == 0) {
- return 1;
- }
- }
- }
- return 0;
-}
diff --git a/tools/jprof/strset.h b/tools/jprof/strset.h
deleted file mode 100644
index 681ed22a2..000000000
--- a/tools/jprof/strset.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef __strset_h_
-#define __strset_h_
-
-struct StrSet {
- StrSet();
-
- void add(const char* string);
- int contains(const char* string);
- bool IsEmpty() const { return 0 == numstrings; }
-
- char** strings;
- int numstrings;
-};
-
-#endif /* __strset_h_ */
diff --git a/tools/jprof/stub/Makefile.in b/tools/jprof/stub/Makefile.in
deleted file mode 100644
index 8e6b6b8f8..000000000
--- a/tools/jprof/stub/Makefile.in
+++ /dev/null
@@ -1,8 +0,0 @@
-#! gmake
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# override optimization
-MOZ_OPTIMIZE_FLAGS = -fno-omit-frame-pointer
diff --git a/tools/jprof/stub/config.h b/tools/jprof/stub/config.h
deleted file mode 100644
index d43ffcaa6..000000000
--- a/tools/jprof/stub/config.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef config_h___
-#define config_h___
-
-#define MAX_STACK_CRAWL 500
-#define M_LOGFILE "jprof-log"
-#define M_MAPFILE "jprof-map"
-
-#if defined(linux) || defined(NTO)
-#define USE_BFD
-#undef NEED_WRAPPERS
-
-#endif /* linux */
-
-#endif /* config_h___ */
diff --git a/tools/jprof/stub/jprof.h b/tools/jprof/stub/jprof.h
deleted file mode 100644
index 5ee99279c..000000000
--- a/tools/jprof/stub/jprof.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jprof_h___
-#define jprof_h___
-#include "nscore.h"
-
-#ifdef _IMPL_JPPROF_API
-#define JPROF_API(type) NS_EXPORT_(type)
-#else
-#define JPROF_API(type) NS_IMPORT_(type)
-#endif
-
-JPROF_API(void) setupProfilingStuff(void);
-
-#endif /* jprof_h___ */
diff --git a/tools/jprof/stub/libmalloc.cpp b/tools/jprof/stub/libmalloc.cpp
deleted file mode 100644
index 2da2a37b3..000000000
--- a/tools/jprof/stub/libmalloc.cpp
+++ /dev/null
@@ -1,790 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-// vim:cindent:sw=4:et:ts=8:
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// The linux glibc hides part of sigaction if _POSIX_SOURCE is defined
-#if defined(linux)
-#undef _POSIX_SOURCE
-#undef _SVID_SOURCE
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#endif
-
-#include <errno.h>
-#if defined(linux)
-#include <linux/rtc.h>
-#include <pthread.h>
-#endif
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/syscall.h>
-#include <ucontext.h>
-#include <execinfo.h>
-
-#include "libmalloc.h"
-#include "jprof.h"
-#include <string.h>
-#include <errno.h>
-#include <dlfcn.h>
-
-// Must define before including jprof.h
-void *moz_xmalloc(size_t size)
-{
- return malloc(size);
-}
-
-void moz_xfree(void *mem)
-{
- free(mem);
-}
-
-#ifdef NTO
-#include <sys/link.h>
-extern r_debug _r_debug;
-#else
-#include <link.h>
-#endif
-
-#define USE_GLIBC_BACKTRACE 1
-// To debug, use #define JPROF_STATIC
-#define JPROF_STATIC static
-
-static int gLogFD = -1;
-static pthread_t main_thread;
-
-static bool gIsSlave = false;
-static int gFilenamePID;
-
-static void startSignalCounter(unsigned long millisec);
-static int enableRTCSignals(bool enable);
-
-
-//----------------------------------------------------------------------
-// replace use of atexit()
-
-static void DumpAddressMap();
-
-struct JprofShutdown {
- JprofShutdown() {}
- ~JprofShutdown() {
- DumpAddressMap();
- }
-};
-
-static void RegisterJprofShutdown() {
- // This instanciates the dummy class above, and will trigger the class
- // destructor when libxul is unloaded. This is equivalent to atexit(),
- // but gracefully handles dlclose().
- static JprofShutdown t;
-}
-
-#if defined(i386) || defined(_i386) || defined(__x86_64__)
-JPROF_STATIC void CrawlStack(malloc_log_entry* me,
- void* stack_top, void* top_instr_ptr)
-{
-#if USE_GLIBC_BACKTRACE
- // This probably works on more than x86! But we need a way to get the
- // top instruction pointer, which is kindof arch-specific
- void *array[500];
- int cnt, i;
- u_long numpcs = 0;
-
- // This is from glibc. A more generic version might use
- // libunwind and/or CaptureStackBackTrace() on Windows
- cnt = backtrace(&array[0],sizeof(array)/sizeof(array[0]));
-
- // StackHook->JprofLog->CrawlStack
- // Then we have sigaction, which replaced top_instr_ptr
- array[3] = top_instr_ptr;
- for (i = 3; i < cnt; i++)
- {
- me->pcs[numpcs++] = (char *) array[i];
- }
- me->numpcs = numpcs;
-
-#else
- // original code - this breaks on many platforms
- void **bp;
-#if defined(__i386)
- __asm__( "movl %%ebp, %0" : "=g"(bp));
-#elif defined(__x86_64__)
- __asm__( "movq %%rbp, %0" : "=g"(bp));
-#else
- // It would be nice if this worked uniformly, but at least on i386 and
- // x86_64, it stopped working with gcc 4.1, because it points to the
- // end of the saved registers instead of the start.
- bp = __builtin_frame_address(0);
-#endif
- u_long numpcs = 0;
- bool tracing = false;
-
- me->pcs[numpcs++] = (char*) top_instr_ptr;
-
- while (numpcs < MAX_STACK_CRAWL) {
- void** nextbp = (void**) *bp++;
- void* pc = *bp;
- if (nextbp < bp) {
- break;
- }
- if (tracing) {
- // Skip the signal handling.
- me->pcs[numpcs++] = (char*) pc;
- }
- else if (pc == top_instr_ptr) {
- tracing = true;
- }
- bp = nextbp;
- }
- me->numpcs = numpcs;
-#endif
-}
-#endif
-
-//----------------------------------------------------------------------
-
-static int rtcHz;
-static int rtcFD = -1;
-static bool circular = false;
-
-#if defined(linux) || defined(NTO)
-static void DumpAddressMap()
-{
- // Turn off the timer so we don't get interrupts during shutdown
-#if defined(linux)
- if (rtcHz) {
- enableRTCSignals(false);
- } else
-#endif
- {
- startSignalCounter(0);
- }
-
- char filename[2048];
- if (gIsSlave)
- snprintf(filename, sizeof(filename), "%s-%d", M_MAPFILE, gFilenamePID);
- else
- snprintf(filename, sizeof(filename), "%s", M_MAPFILE);
-
- int mfd = open(filename, O_CREAT|O_WRONLY|O_TRUNC, 0666);
- if (mfd >= 0) {
- malloc_map_entry mme;
- link_map* map = _r_debug.r_map;
- while (nullptr != map) {
- if (map->l_name && *map->l_name) {
- mme.nameLen = strlen(map->l_name);
- mme.address = map->l_addr;
- write(mfd, &mme, sizeof(mme));
- write(mfd, map->l_name, mme.nameLen);
-#if 0
- write(1, map->l_name, mme.nameLen);
- write(1, "\n", 1);
-#endif
- }
- map = map->l_next;
- }
- close(mfd);
- }
-}
-#endif
-
-static bool was_paused = true;
-
-JPROF_STATIC void JprofBufferDump();
-JPROF_STATIC void JprofBufferClear();
-
-static void ClearProfilingHook(int signum)
-{
- if (circular) {
- JprofBufferClear();
- puts("Jprof: cleared circular buffer.");
- }
-}
-
-static void EndProfilingHook(int signum)
-{
- if (circular)
- JprofBufferDump();
-
- DumpAddressMap();
- was_paused = true;
- puts("Jprof: profiling paused.");
-}
-
-
-
-//----------------------------------------------------------------------
-// proper usage would be a template, including the function to find the
-// size of an entry, or include a size header explicitly to each entry.
-#if defined(linux)
-#define DUMB_LOCK() pthread_mutex_lock(&mutex);
-#define DUMB_UNLOCK() pthread_mutex_unlock(&mutex);
-#else
-#define DUMB_LOCK() FIXME()
-#define DUMB_UNLOCK() FIXME()
-#endif
-
-
-class DumbCircularBuffer
-{
-public:
- DumbCircularBuffer(size_t init_buffer_size) {
- used = 0;
- buffer_size = init_buffer_size;
- buffer = (unsigned char *) malloc(buffer_size);
- head = tail = buffer;
-
-#if defined(linux)
- pthread_mutexattr_t mAttr;
- pthread_mutexattr_settype(&mAttr, PTHREAD_MUTEX_RECURSIVE_NP);
- pthread_mutex_init(&mutex, &mAttr);
- pthread_mutexattr_destroy(&mAttr);
-#endif
- }
- ~DumbCircularBuffer() {
- free(buffer);
-#if defined(linux)
- pthread_mutex_destroy (&mutex);
-#endif
- }
-
- void clear() {
- DUMB_LOCK();
- head = tail;
- used = 0;
- DUMB_UNLOCK();
- }
-
- bool empty() {
- return head == tail;
- }
-
- size_t space_available() {
- size_t result;
- DUMB_LOCK();
- if (tail > head)
- result = buffer_size - (tail-head) - 1;
- else
- result = head-tail - 1;
- DUMB_UNLOCK();
- return result;
- }
-
- void drop(size_t size) {
- // assumes correctness!
- DUMB_LOCK();
- head += size;
- if (head >= &buffer[buffer_size])
- head -= buffer_size;
- used--;
- DUMB_UNLOCK();
- }
-
- bool insert(void *data, size_t size) {
- // can fail if not enough space in the entire buffer
- DUMB_LOCK();
- if (space_available() < size)
- return false;
-
- size_t max_without_wrap = &buffer[buffer_size] - tail;
- size_t initial = size > max_without_wrap ? max_without_wrap : size;
-#if DEBUG_CIRCULAR
- fprintf(stderr,"insert(%d): max_without_wrap %d, size %d, initial %d\n",used,max_without_wrap,size,initial);
-#endif
- memcpy(tail,data,initial);
- tail += initial;
- data = ((char *)data)+initial;
- size -= initial;
- if (size != 0) {
-#if DEBUG_CIRCULAR
- fprintf(stderr,"wrapping by %d bytes\n",size);
-#endif
- memcpy(buffer,data,size);
- tail = &(((unsigned char *)buffer)[size]);
- }
-
- used++;
- DUMB_UNLOCK();
-
- return true;
- }
-
- // for external access to the buffer (saving)
- void lock() {
- DUMB_LOCK();
- }
-
- void unlock() {
- DUMB_UNLOCK();
- }
-
- // XXX These really shouldn't be public...
- unsigned char *head;
- unsigned char *tail;
- unsigned int used;
- unsigned char *buffer;
- size_t buffer_size;
-
-private:
- pthread_mutex_t mutex;
-};
-
-class DumbCircularBuffer *JprofBuffer;
-
-JPROF_STATIC void
-JprofBufferInit(size_t size)
-{
- JprofBuffer = new DumbCircularBuffer(size);
-}
-
-JPROF_STATIC void
-JprofBufferClear()
-{
- fprintf(stderr,"Told to clear JPROF circular buffer\n");
- JprofBuffer->clear();
-}
-
-JPROF_STATIC size_t
-JprofEntrySizeof(malloc_log_entry *me)
-{
- return offsetof(malloc_log_entry, pcs) + me->numpcs*sizeof(char*);
-}
-
-JPROF_STATIC void
-JprofBufferAppend(malloc_log_entry *me)
-{
- size_t size = JprofEntrySizeof(me);
-
- do {
- while (JprofBuffer->space_available() < size &&
- JprofBuffer->used > 0) {
-#if DEBUG_CIRCULAR
- fprintf(stderr,"dropping entry: %d in use, %d free, need %d, size_to_free = %d\n",
- JprofBuffer->used,JprofBuffer->space_available(),size,JprofEntrySizeof((malloc_log_entry *) JprofBuffer->head));
-#endif
- JprofBuffer->drop(JprofEntrySizeof((malloc_log_entry *) JprofBuffer->head));
- }
- if (JprofBuffer->space_available() < size)
- return;
-
- } while (!JprofBuffer->insert(me,size));
-}
-
-JPROF_STATIC void
-JprofBufferDump()
-{
- JprofBuffer->lock();
-#if DEBUG_CIRCULAR
- fprintf(stderr,"dumping JP_CIRCULAR buffer, %d of %d bytes\n",
- JprofBuffer->tail > JprofBuffer->head ?
- JprofBuffer->tail - JprofBuffer->head :
- JprofBuffer->buffer_size + JprofBuffer->tail - JprofBuffer->head,
- JprofBuffer->buffer_size);
-#endif
- if (JprofBuffer->tail >= JprofBuffer->head) {
- write(gLogFD, JprofBuffer->head, JprofBuffer->tail - JprofBuffer->head);
- } else {
- write(gLogFD, JprofBuffer->head, &(JprofBuffer->buffer[JprofBuffer->buffer_size]) - JprofBuffer->head);
- write(gLogFD, JprofBuffer->buffer, JprofBuffer->tail - JprofBuffer->buffer);
- }
- JprofBuffer->clear();
- JprofBuffer->unlock();
-}
-
-//----------------------------------------------------------------------
-
-JPROF_STATIC void
-JprofLog(u_long aTime, void* stack_top, void* top_instr_ptr)
-{
- // Static is simply to make debugging tolerable
- static malloc_log_entry me;
-
- me.delTime = aTime;
- me.thread = syscall(SYS_gettid); //gettid();
- if (was_paused) {
- me.flags = JP_FIRST_AFTER_PAUSE;
- was_paused = 0;
- } else {
- me.flags = 0;
- }
-
- CrawlStack(&me, stack_top, top_instr_ptr);
-
-#ifndef NTO
- if (circular) {
- JprofBufferAppend(&me);
- } else {
- write(gLogFD, &me, JprofEntrySizeof(&me));
- }
-#else
- printf("Neutrino is missing the pcs member of malloc_log_entry!! \n");
-#endif
-}
-
-static int realTime;
-
-/* Lets interrupt at 10 Hz. This is so my log files don't get too large.
- * This can be changed to a faster value latter. This timer is not
- * programmed to reset, even though it is capable of doing so. This is
- * to keep from getting interrupts from inside of the handler.
-*/
-static void startSignalCounter(unsigned long millisec)
-{
- struct itimerval tvalue;
-
- tvalue.it_interval.tv_sec = 0;
- tvalue.it_interval.tv_usec = 0;
- tvalue.it_value.tv_sec = millisec/1000;
- tvalue.it_value.tv_usec = (millisec%1000)*1000;
-
- if (realTime) {
- setitimer(ITIMER_REAL, &tvalue, nullptr);
- } else {
- setitimer(ITIMER_PROF, &tvalue, nullptr);
- }
-}
-
-static long timerMilliSec = 50;
-
-#if defined(linux)
-static int setupRTCSignals(int hz, struct sigaction *sap)
-{
- /* global */ rtcFD = open("/dev/rtc", O_RDONLY);
- if (rtcFD < 0) {
- perror("JPROF_RTC setup: open(\"/dev/rtc\", O_RDONLY)");
- return 0;
- }
-
- if (sigaction(SIGIO, sap, nullptr) == -1) {
- perror("JPROF_RTC setup: sigaction(SIGIO)");
- return 0;
- }
-
- if (ioctl(rtcFD, RTC_IRQP_SET, hz) == -1) {
- perror("JPROF_RTC setup: ioctl(/dev/rtc, RTC_IRQP_SET, $JPROF_RTC_HZ)");
- return 0;
- }
-
- if (ioctl(rtcFD, RTC_PIE_ON, 0) == -1) {
- perror("JPROF_RTC setup: ioctl(/dev/rtc, RTC_PIE_ON)");
- return 0;
- }
-
- if (fcntl(rtcFD, F_SETSIG, 0) == -1) {
- perror("JPROF_RTC setup: fcntl(/dev/rtc, F_SETSIG, 0)");
- return 0;
- }
-
- if (fcntl(rtcFD, F_SETOWN, getpid()) == -1) {
- perror("JPROF_RTC setup: fcntl(/dev/rtc, F_SETOWN, getpid())");
- return 0;
- }
-
- return 1;
-}
-
-static int enableRTCSignals(bool enable)
-{
- static bool enabled = false;
- if (enabled == enable) {
- return 0;
- }
- enabled = enable;
-
- int flags = fcntl(rtcFD, F_GETFL);
- if (flags < 0) {
- perror("JPROF_RTC setup: fcntl(/dev/rtc, F_GETFL)");
- return 0;
- }
-
- if (enable) {
- flags |= FASYNC;
- } else {
- flags &= ~FASYNC;
- }
-
- if (fcntl(rtcFD, F_SETFL, flags) == -1) {
- if (enable) {
- perror("JPROF_RTC setup: fcntl(/dev/rtc, F_SETFL, flags | FASYNC)");
- } else {
- perror("JPROF_RTC setup: fcntl(/dev/rtc, F_SETFL, flags & ~FASYNC)");
- }
- return 0;
- }
-
- return 1;
-}
-#endif
-
-JPROF_STATIC void StackHook(
-int signum,
-siginfo_t *info,
-void *ucontext)
-{
- static struct timeval tFirst;
- static int first=1;
- size_t millisec = 0;
-
-#if defined(linux)
- if (rtcHz && pthread_self() != main_thread) {
- // Only collect stack data on the main thread, for now.
- return;
- }
-#endif
-
- if(first && !(first=0)) {
- puts("Jprof: received first signal");
-#if defined(linux)
- if (rtcHz) {
- enableRTCSignals(true);
- } else
-#endif
- {
- gettimeofday(&tFirst, 0);
- millisec = 0;
- }
- } else {
-#if defined(linux)
- if (rtcHz) {
- enableRTCSignals(true);
- } else
-#endif
- {
- struct timeval tNow;
- gettimeofday(&tNow, 0);
- double usec = 1e6*(tNow.tv_sec - tFirst.tv_sec);
- usec += (tNow.tv_usec - tFirst.tv_usec);
- millisec = static_cast<size_t>(usec*1e-3);
- }
- }
-
- gregset_t &gregs = ((ucontext_t*)ucontext)->uc_mcontext.gregs;
-#ifdef __x86_64__
- JprofLog(millisec, (void*)gregs[REG_RSP], (void*)gregs[REG_RIP]);
-#else
- JprofLog(millisec, (void*)gregs[REG_ESP], (void*)gregs[REG_EIP]);
-#endif
-
- if (!rtcHz)
- startSignalCounter(timerMilliSec);
-}
-
-NS_EXPORT_(void) setupProfilingStuff(void)
-{
- static int gFirstTime = 1;
- char filename[2048]; // XXX fix
-
- if(gFirstTime && !(gFirstTime=0)) {
- int startTimer = 1;
- int doNotStart = 1;
- int firstDelay = 0;
- int append = O_TRUNC;
- char *tst = getenv("JPROF_FLAGS");
-
- /* Options from JPROF_FLAGS environment variable:
- * JP_DEFER -> Wait for a SIGPROF (or SIGALRM, if JP_REALTIME
- * is set) from userland before starting
- * to generate them internally
- * JP_START -> Install the signal handler
- * JP_PERIOD -> Time between profiler ticks
- * JP_FIRST -> Extra delay before starting
- * JP_REALTIME -> Take stack traces in intervals of real time
- * rather than time used by the process (and the
- * system for the process). This is useful for
- * finding time spent by the X server.
- * JP_APPEND -> Append to jprof-log rather than overwriting it.
- * This is somewhat risky since it depends on the
- * address map staying constant across multiple runs.
- * JP_FILENAME -> base filename to use when saving logs. Note that
- * this does not affect the mapfile.
- * JP_CIRCULAR -> use a circular buffer of size N, write/clear on SIGUSR1
- *
- * JPROF_SLAVE is set if this is not the first process.
- */
-
- circular = false;
-
- if(tst) {
- if(strstr(tst, "JP_DEFER"))
- {
- doNotStart = 0;
- startTimer = 0;
- }
- if(strstr(tst, "JP_START")) doNotStart = 0;
- if(strstr(tst, "JP_REALTIME")) realTime = 1;
- if(strstr(tst, "JP_APPEND")) append = O_APPEND;
-
- char *delay = strstr(tst,"JP_PERIOD=");
- if(delay) {
- double tmp = strtod(delay+strlen("JP_PERIOD="), nullptr);
- if (tmp>=1e-3) {
- timerMilliSec = static_cast<unsigned long>(1000 * tmp);
- } else {
- fprintf(stderr,
- "JP_PERIOD of %g less than 0.001 (1ms), using 1ms\n",
- tmp);
- timerMilliSec = 1;
- }
- }
-
- char *circular_op = strstr(tst,"JP_CIRCULAR=");
- if(circular_op) {
- size_t size = atol(circular_op+strlen("JP_CIRCULAR="));
- if (size < 1000) {
- fprintf(stderr,
- "JP_CIRCULAR of %lu less than 1000, using 10000\n",
- (unsigned long) size);
- size = 10000;
- }
- JprofBufferInit(size);
- fprintf(stderr,"JP_CIRCULAR buffer of %lu bytes\n", (unsigned long) size);
- circular = true;
- }
-
- char *first = strstr(tst, "JP_FIRST=");
- if(first) {
- firstDelay = atol(first+strlen("JP_FIRST="));
- }
-
- char *rtc = strstr(tst, "JP_RTC_HZ=");
- if (rtc) {
-#if defined(linux)
- rtcHz = atol(rtc+strlen("JP_RTC_HZ="));
- timerMilliSec = 0; /* This makes JP_FIRST work right. */
- realTime = 1; /* It's the _R_TC and all. ;) */
-
-#define IS_POWER_OF_TWO(x) (((x) & ((x) - 1)) == 0)
-
- if (!IS_POWER_OF_TWO(rtcHz) || rtcHz < 2) {
- fprintf(stderr, "JP_RTC_HZ must be power of two and >= 2, "
- "but %d was provided; using default of 2048\n",
- rtcHz);
- rtcHz = 2048;
- }
-#else
- fputs("JP_RTC_HZ found, but RTC profiling only supported on "
- "Linux!\n", stderr);
-
-#endif
- }
- const char *f = strstr(tst,"JP_FILENAME=");
- if (f)
- f = f + strlen("JP_FILENAME=");
- else
- f = M_LOGFILE;
-
- char *is_slave = getenv("JPROF_SLAVE");
- if (!is_slave)
- setenv("JPROF_SLAVE","", 0);
- gIsSlave = !!is_slave;
-
- gFilenamePID = syscall(SYS_gettid); //gettid();
- if (is_slave)
- snprintf(filename,sizeof(filename),"%s-%d",f,gFilenamePID);
- else
- snprintf(filename,sizeof(filename),"%s",f);
-
- // XXX FIX! inherit current capture state!
- }
-
- if(!doNotStart) {
-
- if(gLogFD<0) {
- gLogFD = open(filename, O_CREAT | O_WRONLY | append, 0666);
- if(gLogFD<0) {
- fprintf(stderr, "Unable to create " M_LOGFILE);
- perror(":");
- } else {
- struct sigaction action;
- sigset_t mset;
-
- // Dump out the address map when we terminate
- RegisterJprofShutdown();
-
- main_thread = pthread_self();
- //fprintf(stderr,"jprof: main_thread = %u\n",
- // (unsigned int)main_thread);
-
- // FIX! probably should block these against each other
- // Very unlikely.
- sigemptyset(&mset);
- action.sa_handler = nullptr;
- action.sa_sigaction = StackHook;
- action.sa_mask = mset;
- action.sa_flags = SA_RESTART | SA_SIGINFO;
-#if defined(linux)
- if (rtcHz) {
- if (!setupRTCSignals(rtcHz, &action)) {
- fputs("jprof: Error initializing RTC, NOT "
- "profiling\n", stderr);
- return;
- }
- }
-
- if (!rtcHz || firstDelay != 0)
-#endif
- {
- if (realTime) {
- sigaction(SIGALRM, &action, nullptr);
- }
- }
- // enable PROF in all cases to simplify JP_DEFER/pause/restart
- sigaction(SIGPROF, &action, nullptr);
-
- // make it so a SIGUSR1 will stop the profiling
- // Note: It currently does not close the logfile.
- // This could be configurable (so that it could
- // later be reopened).
-
- struct sigaction stop_action;
- stop_action.sa_handler = EndProfilingHook;
- stop_action.sa_mask = mset;
- stop_action.sa_flags = SA_RESTART;
- sigaction(SIGUSR1, &stop_action, nullptr);
-
- // make it so a SIGUSR2 will clear the circular buffer
-
- stop_action.sa_handler = ClearProfilingHook;
- stop_action.sa_mask = mset;
- stop_action.sa_flags = SA_RESTART;
- sigaction(SIGUSR2, &stop_action, nullptr);
-
- printf("Jprof: Initialized signal handler and set "
- "timer for %lu %s, %d s "
- "initial delay\n",
- rtcHz ? rtcHz : timerMilliSec,
- rtcHz ? "Hz" : "ms",
- firstDelay);
-
- if(startTimer) {
-#if defined(linux)
- /* If we have an initial delay we can just use
- startSignalCounter to set up a timer to fire the
- first stackHook after that delay. When that happens
- we'll go and switch to RTC profiling. */
- if (rtcHz && firstDelay == 0) {
- puts("Jprof: enabled RTC signals");
- enableRTCSignals(true);
- } else
-#endif
- {
- puts("Jprof: started timer");
- startSignalCounter(firstDelay*1000 + timerMilliSec);
- }
- }
- }
- }
- }
- } else {
- printf("setupProfilingStuff() called multiple times\n");
- }
-}
diff --git a/tools/jprof/stub/libmalloc.h b/tools/jprof/stub/libmalloc.h
deleted file mode 100644
index 8b29bf889..000000000
--- a/tools/jprof/stub/libmalloc.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef libmalloc_h___
-#define libmalloc_h___
-
-#include <sys/types.h>
-#include <malloc.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "config.h"
-
-typedef unsigned long u_long;
-
-// For me->flags
-#define JP_FIRST_AFTER_PAUSE 1
-
-// Format of a jprof log entry. This is what's written out to the
-// "jprof-log" file.
-// It's called malloc_log_entry because the history of jprof is that
-// it's a modified version of tracemalloc.
-struct malloc_log_entry {
- u_long delTime;
- u_long numpcs;
- unsigned int flags;
- int thread;
- char* pcs[MAX_STACK_CRAWL];
-};
-
-// Format of a malloc map entry; after this struct is nameLen+1 bytes of
-// name data.
-struct malloc_map_entry {
- u_long nameLen;
- u_long address; // base address
-};
-
-#ifdef __cplusplus
-} /* end of extern "C" */
-#endif
-
-#endif /* libmalloc_h___ */
diff --git a/tools/lint/eslint/modules.json b/tools/lint/eslint/modules.json
index 34ebfc6c1..5fb645762 100644
--- a/tools/lint/eslint/modules.json
+++ b/tools/lint/eslint/modules.json
@@ -200,7 +200,6 @@
"SharedPromptUtils.jsm": ["PromptUtils", "EnableDelayHelper"],
"ShutdownLeaksCollector.jsm": ["ContentCollector"],
"SignInToWebsite.jsm": ["SignInToWebsiteController"],
- "Social.jsm": ["Social", "OpenGraphBuilder", "DynamicResizeWatcher", "sizeSocialPanelToContent"],
"SpecialPowersObserver.jsm": ["SpecialPowersObserver", "SpecialPowersObserverFactory"],
"stack.js": ["findCallerFrame"],
"StateMachineHelper.jsm": ["State", "CommandType"],
diff --git a/tools/memory-profiler/GCHeapProfilerImpl.cpp b/tools/memory-profiler/GCHeapProfilerImpl.cpp
deleted file mode 100644
index 528a05501..000000000
--- a/tools/memory-profiler/GCHeapProfilerImpl.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "GCHeapProfilerImpl.h"
-
-#include "UncensoredAllocator.h"
-
-namespace mozilla {
-
-GCHeapProfilerImpl::GCHeapProfilerImpl()
-{
- mLock = PR_NewLock();
- mMarking = false;
-}
-
-GCHeapProfilerImpl::~GCHeapProfilerImpl()
-{
- if (mLock) {
- PR_DestroyLock(mLock);
- }
-}
-
-nsTArray<nsCString>
-GCHeapProfilerImpl::GetNames() const
-{
- return mTraceTable.GetNames();
-}
-
-nsTArray<TrieNode>
-GCHeapProfilerImpl::GetTraces() const
-{
- return mTraceTable.GetTraces();
-}
-
-const nsTArray<AllocEvent>&
-GCHeapProfilerImpl::GetEvents() const
-{
- return mAllocEvents;
-}
-
-void
-GCHeapProfilerImpl::reset()
-{
- mTraceTable.Reset();
- mAllocEvents.Clear();
- mNurseryEntries.Clear();
- mTenuredEntriesFG.Clear();
- mTenuredEntriesBG.Clear();
-}
-
-void
-GCHeapProfilerImpl::sampleTenured(void* addr, uint32_t size)
-{
- SampleInternal(addr, size, mTenuredEntriesFG);
-}
-
-void
-GCHeapProfilerImpl::sampleNursery(void* addr, uint32_t size)
-{
- SampleInternal(addr, size, mNurseryEntries);
-}
-
-void
-GCHeapProfilerImpl::markTenuredStart()
-{
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(mLock);
- if (!mMarking) {
- mMarking = true;
- mTenuredEntriesFG.SwapElements(mTenuredEntriesBG);
- MOZ_ASSERT(mTenuredEntriesFG.Count() == 0);
- }
-}
-
-void
-GCHeapProfilerImpl::markTenured(void* addr)
-{
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(mLock);
- if (mMarking) {
- AllocEntry entry;
- if (mTenuredEntriesBG.Get(addr, &entry)) {
- entry.mMarked = true;
- mTenuredEntriesBG.Put(addr, entry);
- }
- }
-}
-
-void
-GCHeapProfilerImpl::sweepTenured()
-{
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(mLock);
- if (mMarking) {
- mMarking = false;
- for (auto iter = mTenuredEntriesBG.Iter(); !iter.Done(); iter.Next()) {
- if (iter.Data().mMarked) {
- iter.Data().mMarked = false;
- mTenuredEntriesFG.Put(iter.Key(), iter.Data());
- } else {
- AllocEvent& oldEvent = mAllocEvents[iter.Data().mEventIdx];
- AllocEvent newEvent(oldEvent.mTraceIdx, -oldEvent.mSize, TimeStamp::Now());
- mAllocEvents.AppendElement(newEvent);
- }
- }
- mTenuredEntriesBG.Clear();
- }
-}
-
-void
-GCHeapProfilerImpl::sweepNursery()
-{
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(mLock);
- for (auto iter = mNurseryEntries.Iter(); !iter.Done(); iter.Next()) {
- AllocEvent& oldEvent = mAllocEvents[iter.Data().mEventIdx];
- AllocEvent newEvent(oldEvent.mTraceIdx, -oldEvent.mSize, TimeStamp::Now());
- mAllocEvents.AppendElement(newEvent);
- }
- mNurseryEntries.Clear();
-}
-
-void
-GCHeapProfilerImpl::moveNurseryToTenured(void* addrOld, void* addrNew)
-{
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(mLock);
- AllocEntry entryOld;
- if (!mNurseryEntries.Get(addrOld, &entryOld)) {
- return;
- }
-
- // Because the tenured heap is sampled, the address might already be there.
- // If not, the address is inserted with the old event.
- AllocEntry tenuredEntryOld;
- if (!mTenuredEntriesFG.Get(addrNew, &tenuredEntryOld)) {
- mTenuredEntriesFG.Put(addrNew, AllocEntry(entryOld.mEventIdx));
- } else {
- // If it is already inserted, the insertion above will fail and the
- // iterator of the already-inserted element is returned.
- // We choose to ignore the the new event by setting its size zero and point
- // the newly allocated address to the old event.
- // An event of size zero will be skipped when reporting.
- mAllocEvents[entryOld.mEventIdx].mSize = 0;
- tenuredEntryOld.mEventIdx = entryOld.mEventIdx;
- mTenuredEntriesFG.Put(addrNew, tenuredEntryOld);
- }
- mNurseryEntries.Remove(addrOld);
-}
-
-void
-GCHeapProfilerImpl::SampleInternal(void* aAddr, uint32_t aSize, AllocMap& aTable)
-{
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(mLock);
- size_t nSamples = AddBytesSampled(aSize);
- if (nSamples > 0) {
- nsTArray<nsCString> trace = GetStacktrace();
- AllocEvent ai(mTraceTable.Insert(trace), nSamples * mSampleSize, TimeStamp::Now());
- aTable.Put(aAddr, AllocEntry(mAllocEvents.Length()));
- mAllocEvents.AppendElement(ai);
- }
-}
-
-} // namespace mozilla
diff --git a/tools/memory-profiler/GCHeapProfilerImpl.h b/tools/memory-profiler/GCHeapProfilerImpl.h
deleted file mode 100644
index e84e97017..000000000
--- a/tools/memory-profiler/GCHeapProfilerImpl.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef memory_profiler_GCHeapProfilerImpl_h
-#define memory_profiler_GCHeapProfilerImpl_h
-
-#include "CompactTraceTable.h"
-#include "MemoryProfiler.h"
-
-#include "jsfriendapi.h"
-
-namespace mozilla {
-
-class GCHeapProfilerImpl final : public GCHeapProfiler
- , public ProfilerImpl
-{
-public:
- GCHeapProfilerImpl();
- ~GCHeapProfilerImpl() override;
-
- nsTArray<nsCString> GetNames() const override;
- nsTArray<TrieNode> GetTraces() const override;
- const nsTArray<AllocEvent>& GetEvents() const override;
-
- void reset() override;
- void sampleTenured(void* addr, uint32_t size) override;
- void sampleNursery(void* addr, uint32_t size) override;
- void markTenuredStart() override;
- void markTenured(void* addr) override;
- void sweepTenured() override;
- void sweepNursery() override;
- void moveNurseryToTenured(void* addrOld, void* addrNew) override;
-
-private:
- void SampleInternal(void* addr, uint32_t size, AllocMap& table);
-
- PRLock* mLock;
- bool mMarking;
-
- AllocMap mNurseryEntries;
- AllocMap mTenuredEntriesFG;
- AllocMap mTenuredEntriesBG;
-
- nsTArray<AllocEvent> mAllocEvents;
- CompactTraceTable mTraceTable;
-};
-
-} // namespace mozilla
-
-#endif // memory_profiler_GCHeapProfilerImpl_h
diff --git a/tools/memory-profiler/MemoryProfiler.cpp b/tools/memory-profiler/MemoryProfiler.cpp
deleted file mode 100644
index c2b8cbd1d..000000000
--- a/tools/memory-profiler/MemoryProfiler.cpp
+++ /dev/null
@@ -1,324 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "MemoryProfiler.h"
-
-#include <cmath>
-#include <cstdlib>
-
-#include "mozilla/ClearOnShutdown.h"
-#include "mozilla/Move.h"
-#include "mozilla/TimeStamp.h"
-#include "mozilla/UniquePtr.h"
-
-#include "GCHeapProfilerImpl.h"
-#include "GeckoProfiler.h"
-#include "NativeProfilerImpl.h"
-#include "UncensoredAllocator.h"
-#include "js/TypeDecls.h"
-#include "jsfriendapi.h"
-#include "nsIDOMClassInfo.h"
-#include "nsIGlobalObject.h"
-#include "prtime.h"
-#include "xpcprivate.h"
-
-namespace mozilla {
-
-#define MEMORY_PROFILER_SAMPLE_SIZE 65536
-#define BACKTRACE_BUFFER_SIZE 16384
-
-ProfilerImpl::ProfilerImpl()
- : mSampleSize(MEMORY_PROFILER_SAMPLE_SIZE)
-{
- mLog1minusP = std::log(1.0 - 1.0 / mSampleSize);
- mRemainingBytes = std::floor(std::log(1.0 - DRandom()) / mLog1minusP);
-}
-
-nsTArray<nsCString>
-ProfilerImpl::GetStacktrace()
-{
- nsTArray<nsCString> trace;
- auto output = MakeUnique<char[]>(BACKTRACE_BUFFER_SIZE);
-
- profiler_get_backtrace_noalloc(output.get(), BACKTRACE_BUFFER_SIZE);
- for (const char* p = output.get(); *p; p += strlen(p) + 1) {
- trace.AppendElement()->Assign(p);
- }
-
- return trace;
-}
-
-// Generate a random number in [0, 1).
-double
-ProfilerImpl::DRandom()
-{
- return double(((uint64_t(std::rand()) & ((1 << 26) - 1)) << 27) +
- (uint64_t(std::rand()) & ((1 << 27) - 1)))
- / (uint64_t(1) << 53);
-}
-
-size_t
-ProfilerImpl::AddBytesSampled(uint32_t aBytes)
-{
- size_t nSamples = 0;
- while (mRemainingBytes <= aBytes) {
- mRemainingBytes += std::floor(std::log(1.0 - DRandom()) / mLog1minusP);
- nSamples++;
- }
- mRemainingBytes -= aBytes;
- return nSamples;
-}
-
-NS_IMPL_ISUPPORTS(MemoryProfiler, nsIMemoryProfiler)
-
-PRLock* MemoryProfiler::sLock;
-uint32_t MemoryProfiler::sProfileContextCount;
-StaticAutoPtr<NativeProfilerImpl> MemoryProfiler::sNativeProfiler;
-StaticAutoPtr<JSContextProfilerMap> MemoryProfiler::sJSContextProfilerMap;
-TimeStamp MemoryProfiler::sStartTime;
-
-void
-MemoryProfiler::InitOnce()
-{
- MOZ_ASSERT(NS_IsMainThread());
-
- static bool initialized = false;
-
- if (!initialized) {
- MallocHook::Initialize();
- sLock = PR_NewLock();
- sProfileContextCount = 0;
- sJSContextProfilerMap = new JSContextProfilerMap();
- ClearOnShutdown(&sJSContextProfilerMap);
- ClearOnShutdown(&sNativeProfiler);
- std::srand(PR_Now());
- bool ignored;
- sStartTime = TimeStamp::ProcessCreation(ignored);
- initialized = true;
- }
-}
-
-NS_IMETHODIMP
-MemoryProfiler::StartProfiler()
-{
- InitOnce();
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(sLock);
- JSContext* context = XPCJSContext::Get()->Context();
- ProfilerForJSContext profiler;
- if (!sJSContextProfilerMap->Get(context, &profiler) ||
- !profiler.mEnabled) {
- if (sProfileContextCount == 0) {
- js::EnableContextProfilingStack(context, true);
- if (!sNativeProfiler) {
- sNativeProfiler = new NativeProfilerImpl();
- }
- MemProfiler::SetNativeProfiler(sNativeProfiler);
- }
- GCHeapProfilerImpl* gp = new GCHeapProfilerImpl();
- profiler.mEnabled = true;
- profiler.mProfiler = gp;
- sJSContextProfilerMap->Put(context, profiler);
- MemProfiler::GetMemProfiler(context)->start(gp);
- if (sProfileContextCount == 0) {
- MallocHook::Enable(sNativeProfiler);
- }
- sProfileContextCount++;
- }
- return NS_OK;
-}
-
-NS_IMETHODIMP
-MemoryProfiler::StopProfiler()
-{
- InitOnce();
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(sLock);
- JSContext* context = XPCJSContext::Get()->Context();
- ProfilerForJSContext profiler;
- if (sJSContextProfilerMap->Get(context, &profiler) &&
- profiler.mEnabled) {
- MemProfiler::GetMemProfiler(context)->stop();
- if (--sProfileContextCount == 0) {
- MallocHook::Disable();
- MemProfiler::SetNativeProfiler(nullptr);
- js::EnableContextProfilingStack(context, false);
- }
- profiler.mEnabled = false;
- sJSContextProfilerMap->Put(context, profiler);
- }
- return NS_OK;
-}
-
-NS_IMETHODIMP
-MemoryProfiler::ResetProfiler()
-{
- InitOnce();
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(sLock);
- JSContext* context = XPCJSContext::Get()->Context();
- ProfilerForJSContext profiler;
- if (!sJSContextProfilerMap->Get(context, &profiler) ||
- !profiler.mEnabled) {
- delete profiler.mProfiler;
- profiler.mProfiler = nullptr;
- sJSContextProfilerMap->Put(context, profiler);
- }
- if (sProfileContextCount == 0) {
- sNativeProfiler = nullptr;
- }
- return NS_OK;
-}
-
-struct MergedTraces
-{
- nsTArray<nsCString> mNames;
- nsTArray<TrieNode> mTraces;
- nsTArray<AllocEvent> mEvents;
-};
-
-// Merge events and corresponding traces and names.
-static MergedTraces
-MergeResults(const nsTArray<nsCString>& names0,
- const nsTArray<TrieNode>& traces0,
- const nsTArray<AllocEvent>& events0,
- const nsTArray<nsCString>& names1,
- const nsTArray<TrieNode>& traces1,
- const nsTArray<AllocEvent>& events1)
-{
- NodeIndexMap<nsCStringHashKey, nsCString> names;
- NodeIndexMap<nsGenericHashKey<TrieNode>, TrieNode> traces;
- nsTArray<AllocEvent> events;
-
- nsTArray<size_t> names1Tonames0(names1.Length());
- nsTArray<size_t> traces1Totraces0(traces1.Length());
-
- // Merge names.
- for (auto& i: names0) {
- names.Insert(i);
- }
- for (auto& i: names1) {
- names1Tonames0.AppendElement(names.Insert(i));
- }
-
- // Merge traces. Note that traces1[i].parentIdx < i for all i > 0.
- for (auto& i: traces0) {
- traces.Insert(i);
- }
- traces1Totraces0.AppendElement(0);
- for (size_t i = 1; i < traces1.Length(); i++) {
- TrieNode node = traces1[i];
- node.parentIdx = traces1Totraces0[node.parentIdx];
- node.nameIdx = names1Tonames0[node.nameIdx];
- traces1Totraces0.AppendElement(traces.Insert(node));
- }
-
- // Merge the events according to timestamps.
- auto p0 = events0.begin();
- auto p1 = events1.begin();
-
- while (p0 != events0.end() && p1 != events1.end()) {
- if (p0->mTimestamp < p1->mTimestamp) {
- events.AppendElement(*p0++);
- } else {
- events.AppendElement(*p1++);
- events.LastElement().mTraceIdx =
- traces1Totraces0[events.LastElement().mTraceIdx];
- }
- }
-
- while (p0 != events0.end()) {
- events.AppendElement(*p0++);
- }
-
- while (p1 != events1.end()) {
- events.AppendElement(*p1++);
- events.LastElement().mTraceIdx =
- traces1Totraces0[events.LastElement().mTraceIdx];
- }
-
- return MergedTraces{names.Serialize(), traces.Serialize(), Move(events)};
-}
-
-NS_IMETHODIMP
-MemoryProfiler::GetResults(JSContext* cx, JS::MutableHandle<JS::Value> aResult)
-{
- InitOnce();
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(sLock);
- JSContext* context = XPCJSContext::Get()->Context();
- // Getting results when the profiler is running is not allowed.
- if (sProfileContextCount > 0) {
- return NS_OK;
- }
- // Return immediately when native profiler does not exist.
- if (!sNativeProfiler) {
- return NS_OK;
- }
- // Return immediately when there's no result in current context.
- ProfilerForJSContext profiler;
- if (!sJSContextProfilerMap->Get(context, &profiler) ||
- !profiler.mProfiler) {
- return NS_OK;
- }
- GCHeapProfilerImpl* gp = profiler.mProfiler;
-
- auto results = MergeResults(gp->GetNames(), gp->GetTraces(), gp->GetEvents(),
- sNativeProfiler->GetNames(),
- sNativeProfiler->GetTraces(),
- sNativeProfiler->GetEvents());
- const nsTArray<nsCString>& names = results.mNames;
- const nsTArray<TrieNode>& traces = results.mTraces;
- const nsTArray<AllocEvent>& events = results.mEvents;
-
- JS::RootedObject jsnames(cx, JS_NewArrayObject(cx, names.Length()));
- JS::RootedObject jstraces(cx, JS_NewArrayObject(cx, traces.Length()));
- JS::RootedObject jsevents(cx, JS_NewArrayObject(cx, events.Length()));
-
- for (size_t i = 0; i < names.Length(); i++) {
- JS::RootedString name(cx, JS_NewStringCopyZ(cx, names[i].get()));
- JS_SetElement(cx, jsnames, i, name);
- }
-
- for (size_t i = 0; i < traces.Length(); i++) {
- JS::RootedObject tn(cx, JS_NewPlainObject(cx));
- JS::RootedValue nameIdx(cx, JS_NumberValue(traces[i].nameIdx));
- JS::RootedValue parentIdx(cx, JS_NumberValue(traces[i].parentIdx));
- JS_SetProperty(cx, tn, "nameIdx", nameIdx);
- JS_SetProperty(cx, tn, "parentIdx", parentIdx);
- JS_SetElement(cx, jstraces, i, tn);
- }
-
- int i = 0;
- for (auto ent: events) {
- if (ent.mSize == 0) {
- continue;
- }
- MOZ_ASSERT(!sStartTime.IsNull());
- double time = (ent.mTimestamp - sStartTime).ToMilliseconds();
- JS::RootedObject tn(cx, JS_NewPlainObject(cx));
- JS::RootedValue size(cx, JS_NumberValue(ent.mSize));
- JS::RootedValue traceIdx(cx, JS_NumberValue(ent.mTraceIdx));
- JS::RootedValue timestamp(cx, JS_NumberValue(time));
- JS_SetProperty(cx, tn, "size", size);
- JS_SetProperty(cx, tn, "traceIdx", traceIdx);
- JS_SetProperty(cx, tn, "timestamp", timestamp);
- JS_SetElement(cx, jsevents, i++, tn);
- }
- JS_SetArrayLength(cx, jsevents, i);
-
- JS::RootedObject result(cx, JS_NewPlainObject(cx));
- JS::RootedValue objnames(cx, ObjectOrNullValue(jsnames));
- JS_SetProperty(cx, result, "names", objnames);
- JS::RootedValue objtraces(cx, ObjectOrNullValue(jstraces));
- JS_SetProperty(cx, result, "traces", objtraces);
- JS::RootedValue objevents(cx, ObjectOrNullValue(jsevents));
- JS_SetProperty(cx, result, "events", objevents);
- aResult.setObject(*result);
- return NS_OK;
-}
-
-} // namespace mozilla
diff --git a/tools/memory-profiler/MemoryProfiler.h b/tools/memory-profiler/MemoryProfiler.h
deleted file mode 100644
index 85a378fb2..000000000
--- a/tools/memory-profiler/MemoryProfiler.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef tools_profiler_MemoryProfiler_h
-#define tools_profiler_MemoryProfiler_h
-
-#include "nsIMemoryProfiler.h"
-
-#include "mozilla/StaticPtr.h"
-#include "mozilla/TimeStamp.h"
-
-#include "CompactTraceTable.h"
-#include "nsTArray.h"
-#include "prlock.h"
-
-#define MEMORY_PROFILER_CID \
- { 0xf976eaa2, 0xcc1f, 0x47ee, \
- { 0x81, 0x29, 0xb8, 0x26, 0x2a, 0x3d, 0xb6, 0xb2 } }
-
-#define MEMORY_PROFILER_CONTRACT_ID "@mozilla.org/tools/memory-profiler;1"
-
-struct PRLock;
-
-namespace mozilla {
-
-class NativeProfilerImpl;
-class GCHeapProfilerImpl;
-
-struct ProfilerForJSContext
-{
- ProfilerForJSContext()
- : mProfiler(nullptr)
- , mEnabled(false)
- {}
- GCHeapProfilerImpl* mProfiler;
- bool mEnabled;
-};
-using JSContextProfilerMap =
- nsDataHashtable<nsClearingPtrHashKey<JSContext>, ProfilerForJSContext>;
-
-class MemoryProfiler final : public nsIMemoryProfiler
-{
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIMEMORYPROFILER
-
-private:
- static void InitOnce();
- ~MemoryProfiler() {}
-
- // The accesses to other static member are guarded by sLock and
- // sProfileContextCount.
- static PRLock* sLock;
- static uint32_t sProfileContextCount;
-
- static StaticAutoPtr<NativeProfilerImpl> sNativeProfiler;
- static StaticAutoPtr<JSContextProfilerMap> sJSContextProfilerMap;
- static TimeStamp sStartTime;
-};
-
-// Allocation events to be reported.
-struct AllocEvent {
- TimeStamp mTimestamp;
- // index to a stacktrace singleton.
- uint32_t mTraceIdx;
- // Allocation size
- int32_t mSize;
-
- AllocEvent(uint32_t aTraceIdx, int32_t aSize, TimeStamp aTimestamp)
- : mTimestamp(aTimestamp)
- , mTraceIdx(aTraceIdx)
- , mSize(aSize)
- {}
-};
-
-// Index to allocation events but also a mark bit to be GC-able.
-struct AllocEntry {
- uint32_t mEventIdx : 31;
- bool mMarked : 1;
-
- // Default constructor for uninitialized stack value required by
- // getter methods.
- AllocEntry()
- : mEventIdx(0)
- , mMarked(false)
- {}
- explicit AllocEntry(int aEventIdx)
- : mEventIdx(aEventIdx)
- , mMarked(false)
- {}
-};
-
-using AllocMap = nsDataHashtable<nsClearingVoidPtrHashKey, AllocEntry>;
-
-class ProfilerImpl
-{
-public:
- static nsTArray<nsCString> GetStacktrace();
- static double DRandom();
-
- ProfilerImpl();
- virtual nsTArray<nsCString> GetNames() const = 0;
- virtual nsTArray<TrieNode> GetTraces() const = 0;
- virtual const nsTArray<AllocEvent>& GetEvents() const = 0;
-
-protected:
- /**
- * The sampler generates a random variable which conforms to a geometric
- * distribution of probability p = 1 / mSampleSize to calculate the
- * next-to-be-sampled byte directly; It avoids rolling a dice on each byte.
- *
- * Let Bn denote a Bernoulli process with first success on n-th trial, the
- * cumulative distribution function of Bn is Cn = 1 - (1 - p) ^ n.
- * Let U denote a uniformly distributed random variable in [0, 1).
- * A geometric random variable can be generated by Cn's reverse function:
- * G = floor(log(1 - U) / log(1 - p)).
- *
- * @param aSize the number of bytes seen
- * @return the number of events sampled
- */
- size_t AddBytesSampled(uint32_t aBytes);
-
- uint32_t mSampleSize;
-
-private:
- uint32_t mRemainingBytes;
- double mLog1minusP;
-};
-
-/*
- * This class is used to make sure the profile data is only accessed
- * on one thread at a time. Don't use mozilla::Mutex because we don't
- * want to allocate memory.
- */
-class AutoMPLock
-{
-public:
- explicit AutoMPLock(PRLock* aLock)
- {
- MOZ_ASSERT(aLock);
- mLock = aLock;
- PR_Lock(mLock);
- }
-
- ~AutoMPLock()
- {
- PR_Unlock(mLock);
- }
-
-private:
- PRLock* mLock;
-};
-
-} // namespace mozilla
-
-#endif
diff --git a/tools/memory-profiler/NativeProfilerImpl.cpp b/tools/memory-profiler/NativeProfilerImpl.cpp
deleted file mode 100644
index 48c684c72..000000000
--- a/tools/memory-profiler/NativeProfilerImpl.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "NativeProfilerImpl.h"
-
-#include "UncensoredAllocator.h"
-
-namespace mozilla {
-
-NativeProfilerImpl::NativeProfilerImpl()
-{
- mLock = PR_NewLock();
-}
-
-NativeProfilerImpl::~NativeProfilerImpl()
-{
- if (mLock) {
- PR_DestroyLock(mLock);
- }
-}
-
-nsTArray<nsCString>
-NativeProfilerImpl::GetNames() const
-{
- return mTraceTable.GetNames();
-}
-
-nsTArray<TrieNode>
-NativeProfilerImpl::GetTraces() const
-{
- return mTraceTable.GetTraces();
-}
-
-const nsTArray<AllocEvent>&
-NativeProfilerImpl::GetEvents() const
-{
- return mAllocEvents;
-}
-
-void
-NativeProfilerImpl::reset()
-{
- mTraceTable.Reset();
- mAllocEvents.Clear();
- mNativeEntries.Clear();
-}
-
-void
-NativeProfilerImpl::sampleNative(void* addr, uint32_t size)
-{
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(mLock);
- size_t nSamples = AddBytesSampled(size);
- if (nSamples > 0) {
- nsTArray<nsCString> trace = GetStacktrace();
- AllocEvent ai(mTraceTable.Insert(trace), nSamples * mSampleSize, TimeStamp::Now());
- mNativeEntries.Put(addr, AllocEntry(mAllocEvents.Length()));
- mAllocEvents.AppendElement(ai);
- }
-}
-
-void
-NativeProfilerImpl::removeNative(void* addr)
-{
- AutoUseUncensoredAllocator ua;
- AutoMPLock lock(mLock);
-
- AllocEntry entry;
- if (!mNativeEntries.Get(addr, &entry)) {
- return;
- }
-
- AllocEvent& oldEvent = mAllocEvents[entry.mEventIdx];
- AllocEvent newEvent(oldEvent.mTraceIdx, -oldEvent.mSize, TimeStamp::Now());
- mAllocEvents.AppendElement(newEvent);
- mNativeEntries.Remove(addr);
-}
-
-} // namespace mozilla
diff --git a/tools/memory-profiler/NativeProfilerImpl.h b/tools/memory-profiler/NativeProfilerImpl.h
deleted file mode 100644
index 95cc2ec13..000000000
--- a/tools/memory-profiler/NativeProfilerImpl.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef memory_profiler_NativeProfilerImpl_h
-#define memory_profiler_NativeProfilerImpl_h
-
-#include "CompactTraceTable.h"
-#include "MemoryProfiler.h"
-
-#include "jsfriendapi.h"
-
-struct PRLock;
-
-namespace mozilla {
-
-class NativeProfilerImpl final : public NativeProfiler
- , public ProfilerImpl
-{
-public:
- NativeProfilerImpl();
- ~NativeProfilerImpl() override;
-
- nsTArray<nsCString> GetNames() const override;
- nsTArray<TrieNode> GetTraces() const override;
- const nsTArray<AllocEvent>& GetEvents() const override;
-
- void reset() override;
- void sampleNative(void* addr, uint32_t size) override;
- void removeNative(void* addr) override;
-
-private:
- PRLock* mLock;
- AllocMap mNativeEntries;
- nsTArray<AllocEvent> mAllocEvents;
- CompactTraceTable mTraceTable;
-};
-
-} // namespace mozilla
-
-#endif // memory_profiler_NativeProfilerImpl_h
diff --git a/tools/memory-profiler/UncensoredAllocator.cpp b/tools/memory-profiler/UncensoredAllocator.cpp
deleted file mode 100644
index 92caeb633..000000000
--- a/tools/memory-profiler/UncensoredAllocator.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "UncensoredAllocator.h"
-
-#include "mozilla/Assertions.h"
-#include "mozilla/Unused.h"
-
-#include "MainThreadUtils.h"
-#include "jsfriendapi.h"
-#include "nsDebug.h"
-#include "prlock.h"
-#ifdef MOZ_REPLACE_MALLOC
-#include "replace_malloc_bridge.h"
-#endif
-
-namespace mozilla {
-
-#ifdef MOZ_REPLACE_MALLOC
-MOZ_THREAD_LOCAL(bool) MallocHook::mEnabledTLS;
-NativeProfiler* MallocHook::mNativeProfiler;
-malloc_hook_table_t MallocHook::mMallocHook;
-#endif
-
-AutoUseUncensoredAllocator::AutoUseUncensoredAllocator()
-{
-#ifdef MOZ_REPLACE_MALLOC
- MallocHook::mEnabledTLS.set(false);
-#endif
-}
-
-AutoUseUncensoredAllocator::~AutoUseUncensoredAllocator()
-{
-#ifdef MOZ_REPLACE_MALLOC
- MallocHook::mEnabledTLS.set(true);
-#endif
-}
-
-bool
-MallocHook::Enabled()
-{
-#ifdef MOZ_REPLACE_MALLOC
- return mEnabledTLS.get() && mNativeProfiler;
-#else
- return false;
-#endif
-}
-
-void*
-MallocHook::SampleNative(void* aAddr, size_t aSize)
-{
-#ifdef MOZ_REPLACE_MALLOC
- if (MallocHook::Enabled()) {
- mNativeProfiler->sampleNative(aAddr, aSize);
- }
-#endif
- return aAddr;
-}
-
-void
-MallocHook::RemoveNative(void* aAddr)
-{
-#ifdef MOZ_REPLACE_MALLOC
- if (MallocHook::Enabled()) {
- mNativeProfiler->removeNative(aAddr);
- }
-#endif
-}
-
-void
-MallocHook::Initialize()
-{
-#ifdef MOZ_REPLACE_MALLOC
- MOZ_ASSERT(NS_IsMainThread());
- mMallocHook.free_hook = RemoveNative;
- mMallocHook.malloc_hook = SampleNative;
- ReplaceMallocBridge* bridge = ReplaceMallocBridge::Get(3);
- if (bridge) {
- mozilla::Unused << bridge->RegisterHook("memory-profiler", nullptr, nullptr);
- }
-
- bool success = mEnabledTLS.init();
- if (NS_WARN_IF(!success)) {
- return;
- }
-#endif
-}
-
-void
-MallocHook::Enable(NativeProfiler* aNativeProfiler)
-{
-#ifdef MOZ_REPLACE_MALLOC
- MOZ_ASSERT(NS_IsMainThread());
- ReplaceMallocBridge* bridge = ReplaceMallocBridge::Get(3);
- if (bridge) {
- const malloc_table_t* alloc_funcs =
- bridge->RegisterHook("memory-profiler", nullptr, &mMallocHook);
- if (alloc_funcs) {
- mNativeProfiler = aNativeProfiler;
- }
- }
-#endif
-}
-
-void
-MallocHook::Disable()
-{
-#ifdef MOZ_REPLACE_MALLOC
- MOZ_ASSERT(NS_IsMainThread());
- ReplaceMallocBridge* bridge = ReplaceMallocBridge::Get(3);
- if (bridge) {
- bridge->RegisterHook("memory-profiler", nullptr, nullptr);
- mNativeProfiler = nullptr;
- }
-#endif
-}
-
-} // namespace mozilla
diff --git a/tools/memory-profiler/UncensoredAllocator.h b/tools/memory-profiler/UncensoredAllocator.h
deleted file mode 100644
index b9074c738..000000000
--- a/tools/memory-profiler/UncensoredAllocator.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef memory_profiler_UncensoredAllocator_h
-#define memory_profiler_UncensoredAllocator_h
-
-#include "mozilla/Attributes.h"
-#include "mozilla/ThreadLocal.h"
-
-#ifdef MOZ_REPLACE_MALLOC
-#include "replace_malloc_bridge.h"
-#endif
-
-class NativeProfiler;
-
-namespace mozilla {
-
-class MallocHook final
-{
-public:
- static void Initialize();
- static void Enable(NativeProfiler* aNativeProfiler);
- static void Disable();
- static bool Enabled();
-private:
- static void* SampleNative(void* aAddr, size_t aSize);
- static void RemoveNative(void* aAddr);
-#ifdef MOZ_REPLACE_MALLOC
- static MOZ_THREAD_LOCAL(bool) mEnabledTLS;
- static NativeProfiler* mNativeProfiler;
- static malloc_hook_table_t mMallocHook;
-#endif
- friend class AutoUseUncensoredAllocator;
-};
-
-class MOZ_RAII AutoUseUncensoredAllocator final
-{
-public:
- AutoUseUncensoredAllocator();
- ~AutoUseUncensoredAllocator();
-};
-
-} // namespace mozilla
-
-#endif // memory_profiler_UncensoredAllocator_h
diff --git a/tools/memory-profiler/moz.build b/tools/memory-profiler/moz.build
index be2fe7432..cd37ffdb2 100644
--- a/tools/memory-profiler/moz.build
+++ b/tools/memory-profiler/moz.build
@@ -4,26 +4,5 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
- XPIDL_MODULE = 'memory_profiler'
- XPIDL_SOURCES += [
- 'nsIMemoryProfiler.idl',
- ]
-
- UNIFIED_SOURCES += [
- 'GCHeapProfilerImpl.cpp',
- 'MemoryProfiler.cpp',
- 'NativeProfilerImpl.cpp',
- 'nsMemoryProfilerFactory.cpp',
- 'UncensoredAllocator.cpp',
- ]
-
- LOCAL_INCLUDES += [
- '/js/xpconnect/src',
- '/xpcom/base',
- ]
-
- FINAL_LIBRARY = 'xul'
-
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']
diff --git a/tools/memory-profiler/nsIMemoryProfiler.idl b/tools/memory-profiler/nsIMemoryProfiler.idl
deleted file mode 100644
index 4ca386f9d..000000000
--- a/tools/memory-profiler/nsIMemoryProfiler.idl
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-/**
- * The memory profiler samples allocation events. An allocation event
- * includes a type (what and at where is going to be allocated), a
- * size, a timestamp and the corresponding stack trace. Free events
- * are also tracked. For managed languages, namely languages relying
- * on garbage collection, a free event is generated when an object is
- * reclaimed by the garbage collector. These sampled events can be
- * used to approximate the full history of allocations afterwards.
- * That means we can get various memory profiles of a program in
- * different perspectives by post-processing the history in different
- * ways. The profiler is designed at the very beginning to support not
- * only JavaScript but also native codes. Naturally, not only
- * JavaScript objects but also native allocations are tracked.
- *
- * The result returned is the sampled allocation event traces in a
- * compact format. The events is sorted according to the timestamp
- * when the event happened. Each event has a trace index pointing to
- * the traces table. Each trace entry has a name index pointing to the
- * names table and a parent index pointing to the parent trace in the
- * traces table. By following the trace index one could rebuild the
- * complete backtrace of an allocation event.
- *
- * [ Events ]
- * +-------+-------+ +-------+
- * | Size | Size | | Size |
- * |-------|-------| |-------|
- * | Time | Time |......| Time |
- * |-------|-------| |-------|
- * +-- Trace | Trace | | Trace |
- * | +-------+-------+ +-------+
- * |
- * | [ Traces ]
- * +->--------+--------+ +--------+ +--------+
- * -| Name | Name | | Name | | Name |
- * / |--------|--------|...|--------|...|--------|
- * | | Parent | Parent | | Parent | | Parent |
- * | +---|----+----^--++ +--^--|--+ +---^----+
- * | | | | | | |
- * | +---------+ +-------+ +----------+
- * | [ Names ]
- * | +-----------------+-----------------+
- * +-> Function name | Function name |
- * | & line numbers | & line numbers |......
- * +-----------------+-----------------+
- *
- */
-[scriptable, uuid(1e10e7a9-bc05-4878-a687-36c9ea4428b1)]
-interface nsIMemoryProfiler : nsISupports
-{
- void startProfiler();
- void stopProfiler();
- void resetProfiler();
-
- /**
- * Get results in an object which contains three tables:
- * {
- * names, // an array of function names and positions
- * traces, // an array of {nameIdx, parentIdx}
- * events, // an array of {size, timestamp, traceIdx}
- * }
- * Should only be called after stopProfiler.
- */
- [implicit_jscontext]
- jsval getResults();
-};
diff --git a/tools/memory-profiler/nsMemoryProfilerFactory.cpp b/tools/memory-profiler/nsMemoryProfilerFactory.cpp
deleted file mode 100644
index b962a6604..000000000
--- a/tools/memory-profiler/nsMemoryProfilerFactory.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/ModuleUtils.h"
-#include "nsCOMPtr.h"
-#include "MemoryProfiler.h"
-
-using mozilla::MemoryProfiler;
-
-NS_GENERIC_FACTORY_CONSTRUCTOR(MemoryProfiler)
-
-NS_DEFINE_NAMED_CID(MEMORY_PROFILER_CID);
-
-static const mozilla::Module::CIDEntry kMemoryProfilerCIDs[] = {
- { &kMEMORY_PROFILER_CID, false, nullptr, MemoryProfilerConstructor },
- { nullptr }
-};
-
-static const mozilla::Module::ContractIDEntry kMemoryProfilerContracts[] = {
- { MEMORY_PROFILER_CONTRACT_ID, &kMEMORY_PROFILER_CID },
- { nullptr }
-};
-
-static const mozilla::Module kMemoryProfilerModule = {
- mozilla::Module::kVersion,
- kMemoryProfilerCIDs,
- kMemoryProfilerContracts
-};
-
-NSMODULE_DEFN(nsMemoryProfilerModule) = &kMemoryProfilerModule;
diff --git a/tools/profiler/core/EHABIStackWalk.cpp b/tools/profiler/core/EHABIStackWalk.cpp
deleted file mode 100644
index 76068cdea..000000000
--- a/tools/profiler/core/EHABIStackWalk.cpp
+++ /dev/null
@@ -1,678 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/*
- * This is an implementation of stack unwinding according to a subset
- * of the ARM Exception Handling ABI, as described in:
- * http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf
- *
- * This handles only the ARM-defined "personality routines" (chapter
- * 9), and don't track the value of FP registers, because profiling
- * needs only chain of PC/SP values.
- *
- * Because the exception handling info may not be accurate for all
- * possible places where an async signal could occur (e.g., in a
- * prologue or epilogue), this bounds-checks all stack accesses.
- *
- * This file uses "struct" for structures in the exception tables and
- * "class" otherwise. We should avoid violating the C++11
- * standard-layout rules in the former.
- */
-
-#include "EHABIStackWalk.h"
-
-#include "shared-libraries.h"
-#include "platform.h"
-
-#include "mozilla/Atomics.h"
-#include "mozilla/Attributes.h"
-#include "mozilla/DebugOnly.h"
-#include "mozilla/EndianUtils.h"
-
-#include <algorithm>
-#include <elf.h>
-#include <stdint.h>
-#include <vector>
-#include <string>
-
-#ifndef PT_ARM_EXIDX
-#define PT_ARM_EXIDX 0x70000001
-#endif
-
-// Bug 1082817: ICS B2G has a buggy linker that doesn't always ensure
-// that the EXIDX is sorted by address, as the spec requires. So in
-// that case we build and sort an array of pointers into the index,
-// and binary-search that; otherwise, we search the index in place
-// (avoiding the time and space overhead of the indirection).
-#if defined(ANDROID_VERSION) && ANDROID_VERSION < 16
-#define HAVE_UNSORTED_EXIDX
-#endif
-
-namespace mozilla {
-
-struct PRel31 {
- uint32_t mBits;
- bool topBit() const { return mBits & 0x80000000; }
- uint32_t value() const { return mBits & 0x7fffffff; }
- int32_t offset() const { return (static_cast<int32_t>(mBits) << 1) >> 1; }
- const void *compute() const {
- return reinterpret_cast<const char *>(this) + offset();
- }
-private:
- PRel31(const PRel31 &copied) = delete;
- PRel31() = delete;
-};
-
-struct EHEntry {
- PRel31 startPC;
- PRel31 exidx;
-private:
- EHEntry(const EHEntry &copied) = delete;
- EHEntry() = delete;
-};
-
-class EHState {
- // Note that any core register can be used as a "frame pointer" to
- // influence the unwinding process, so this must track all of them.
- uint32_t mRegs[16];
-public:
- bool unwind(const EHEntry *aEntry, const void *stackBase);
- uint32_t &operator[](int i) { return mRegs[i]; }
- const uint32_t &operator[](int i) const { return mRegs[i]; }
- EHState(const mcontext_t &);
-};
-
-enum {
- R_SP = 13,
- R_LR = 14,
- R_PC = 15
-};
-
-#ifdef HAVE_UNSORTED_EXIDX
-class EHEntryHandle {
- const EHEntry *mValue;
-public:
- EHEntryHandle(const EHEntry *aEntry) : mValue(aEntry) { }
- const EHEntry *value() const { return mValue; }
-};
-
-bool operator<(const EHEntryHandle &lhs, const EHEntryHandle &rhs) {
- return lhs.value()->startPC.compute() < rhs.value()->startPC.compute();
-}
-#endif
-
-class EHTable {
- uint32_t mStartPC;
- uint32_t mEndPC;
- uint32_t mLoadOffset;
-#ifdef HAVE_UNSORTED_EXIDX
- // In principle we should be able to binary-search the index section in
- // place, but the ICS toolchain's linker is noncompliant and produces
- // indices that aren't entirely sorted (e.g., libc). So we have this:
- std::vector<EHEntryHandle> mEntries;
- typedef std::vector<EHEntryHandle>::const_iterator EntryIterator;
- EntryIterator entriesBegin() const { return mEntries.begin(); }
- EntryIterator entriesEnd() const { return mEntries.end(); }
- static const EHEntry* entryGet(EntryIterator aEntry) {
- return aEntry->value();
- }
-#else
- typedef const EHEntry *EntryIterator;
- EntryIterator mEntriesBegin, mEntriesEnd;
- EntryIterator entriesBegin() const { return mEntriesBegin; }
- EntryIterator entriesEnd() const { return mEntriesEnd; }
- static const EHEntry* entryGet(EntryIterator aEntry) { return aEntry; }
-#endif
- std::string mName;
-public:
- EHTable(const void *aELF, size_t aSize, const std::string &aName);
- const EHEntry *lookup(uint32_t aPC) const;
- bool isValid() const { return entriesEnd() != entriesBegin(); }
- const std::string &name() const { return mName; }
- uint32_t startPC() const { return mStartPC; }
- uint32_t endPC() const { return mEndPC; }
- uint32_t loadOffset() const { return mLoadOffset; }
-};
-
-class EHAddrSpace {
- std::vector<uint32_t> mStarts;
- std::vector<EHTable> mTables;
- static mozilla::Atomic<const EHAddrSpace*> sCurrent;
-public:
- explicit EHAddrSpace(const std::vector<EHTable>& aTables);
- const EHTable *lookup(uint32_t aPC) const;
- static void Update();
- static const EHAddrSpace *Get();
-};
-
-
-void EHABIStackWalkInit()
-{
- EHAddrSpace::Update();
-}
-
-size_t EHABIStackWalk(const mcontext_t &aContext, void *stackBase,
- void **aSPs, void **aPCs, const size_t aNumFrames)
-{
- const EHAddrSpace *space = EHAddrSpace::Get();
- EHState state(aContext);
- size_t count = 0;
-
- while (count < aNumFrames) {
- uint32_t pc = state[R_PC], sp = state[R_SP];
- aPCs[count] = reinterpret_cast<void *>(pc);
- aSPs[count] = reinterpret_cast<void *>(sp);
- count++;
-
- if (!space)
- break;
- // TODO: cache these lookups. Binary-searching libxul is
- // expensive (possibly more expensive than doing the actual
- // unwind), and even a small cache should help.
- const EHTable *table = space->lookup(pc);
- if (!table)
- break;
- const EHEntry *entry = table->lookup(pc);
- if (!entry)
- break;
- if (!state.unwind(entry, stackBase))
- break;
- }
-
- return count;
-}
-
-
-class EHInterp {
-public:
- // Note that stackLimit is exclusive and stackBase is inclusive
- // (i.e, stackLimit < SP <= stackBase), following the convention
- // set by the AAPCS spec.
- EHInterp(EHState &aState, const EHEntry *aEntry,
- uint32_t aStackLimit, uint32_t aStackBase)
- : mState(aState),
- mStackLimit(aStackLimit),
- mStackBase(aStackBase),
- mNextWord(0),
- mWordsLeft(0),
- mFailed(false)
- {
- const PRel31 &exidx = aEntry->exidx;
- uint32_t firstWord;
-
- if (exidx.mBits == 1) { // EXIDX_CANTUNWIND
- mFailed = true;
- return;
- }
- if (exidx.topBit()) {
- firstWord = exidx.mBits;
- } else {
- mNextWord = reinterpret_cast<const uint32_t *>(exidx.compute());
- firstWord = *mNextWord++;
- }
-
- switch (firstWord >> 24) {
- case 0x80: // short
- mWord = firstWord << 8;
- mBytesLeft = 3;
- break;
- case 0x81: case 0x82: // long; catch descriptor size ignored
- mWord = firstWord << 16;
- mBytesLeft = 2;
- mWordsLeft = (firstWord >> 16) & 0xff;
- break;
- default:
- // unknown personality
- mFailed = true;
- }
- }
-
- bool unwind();
-
-private:
- // TODO: GCC has been observed not CSEing repeated reads of
- // mState[R_SP] with writes to mFailed between them, suggesting that
- // it hasn't determined that they can't alias and is thus missing
- // optimization opportunities. So, we may want to flatten EHState
- // into this class; this may also make the code simpler.
- EHState &mState;
- uint32_t mStackLimit;
- uint32_t mStackBase;
- const uint32_t *mNextWord;
- uint32_t mWord;
- uint8_t mWordsLeft;
- uint8_t mBytesLeft;
- bool mFailed;
-
- enum {
- I_ADDSP = 0x00, // 0sxxxxxx (subtract if s)
- M_ADDSP = 0x80,
- I_POPMASK = 0x80, // 1000iiii iiiiiiii (if any i set)
- M_POPMASK = 0xf0,
- I_MOVSP = 0x90, // 1001nnnn
- M_MOVSP = 0xf0,
- I_POPN = 0xa0, // 1010lnnn
- M_POPN = 0xf0,
- I_FINISH = 0xb0, // 10110000
- I_POPLO = 0xb1, // 10110001 0000iiii (if any i set)
- I_ADDSPBIG = 0xb2, // 10110010 uleb128
- I_POPFDX = 0xb3, // 10110011 sssscccc
- I_POPFDX8 = 0xb8, // 10111nnn
- M_POPFDX8 = 0xf8,
- // "Intel Wireless MMX" extensions omitted.
- I_POPFDD = 0xc8, // 1100100h sssscccc
- M_POPFDD = 0xfe,
- I_POPFDD8 = 0xd0, // 11010nnn
- M_POPFDD8 = 0xf8
- };
-
- uint8_t next() {
- if (mBytesLeft == 0) {
- if (mWordsLeft == 0) {
- return I_FINISH;
- }
- mWordsLeft--;
- mWord = *mNextWord++;
- mBytesLeft = 4;
- }
- mBytesLeft--;
- mWord = (mWord << 8) | (mWord >> 24); // rotate
- return mWord;
- }
-
- uint32_t &vSP() { return mState[R_SP]; }
- uint32_t *ptrSP() { return reinterpret_cast<uint32_t *>(vSP()); }
-
- void checkStackBase() { if (vSP() > mStackBase) mFailed = true; }
- void checkStackLimit() { if (vSP() <= mStackLimit) mFailed = true; }
- void checkStackAlign() { if ((vSP() & 3) != 0) mFailed = true; }
- void checkStack() {
- checkStackBase();
- checkStackLimit();
- checkStackAlign();
- }
-
- void popRange(uint8_t first, uint8_t last, uint16_t mask) {
- bool hasSP = false;
- uint32_t tmpSP;
- if (mask == 0)
- mFailed = true;
- for (uint8_t r = first; r <= last; ++r) {
- if (mask & 1) {
- if (r == R_SP) {
- hasSP = true;
- tmpSP = *ptrSP();
- } else
- mState[r] = *ptrSP();
- vSP() += 4;
- checkStackBase();
- if (mFailed)
- return;
- }
- mask >>= 1;
- }
- if (hasSP) {
- vSP() = tmpSP;
- checkStack();
- }
- }
-};
-
-
-bool EHState::unwind(const EHEntry *aEntry, const void *stackBasePtr) {
- // The unwinding program cannot set SP to less than the initial value.
- uint32_t stackLimit = mRegs[R_SP] - 4;
- uint32_t stackBase = reinterpret_cast<uint32_t>(stackBasePtr);
- EHInterp interp(*this, aEntry, stackLimit, stackBase);
- return interp.unwind();
-}
-
-bool EHInterp::unwind() {
- mState[R_PC] = 0;
- checkStack();
- while (!mFailed) {
- uint8_t insn = next();
-#if DEBUG_EHABI_UNWIND
- LOGF("unwind insn = %02x", (unsigned)insn);
-#endif
- // Try to put the common cases first.
-
- // 00xxxxxx: vsp = vsp + (xxxxxx << 2) + 4
- // 01xxxxxx: vsp = vsp - (xxxxxx << 2) - 4
- if ((insn & M_ADDSP) == I_ADDSP) {
- uint32_t offset = ((insn & 0x3f) << 2) + 4;
- if (insn & 0x40) {
- vSP() -= offset;
- checkStackLimit();
- } else {
- vSP() += offset;
- checkStackBase();
- }
- continue;
- }
-
- // 10100nnn: Pop r4-r[4+nnn]
- // 10101nnn: Pop r4-r[4+nnn], r14
- if ((insn & M_POPN) == I_POPN) {
- uint8_t n = (insn & 0x07) + 1;
- bool lr = insn & 0x08;
- uint32_t *ptr = ptrSP();
- vSP() += (n + (lr ? 1 : 0)) * 4;
- checkStackBase();
- for (uint8_t r = 4; r < 4 + n; ++r)
- mState[r] = *ptr++;
- if (lr)
- mState[R_LR] = *ptr++;
- continue;
- }
-
- // 1011000: Finish
- if (insn == I_FINISH) {
- if (mState[R_PC] == 0) {
- mState[R_PC] = mState[R_LR];
- // Non-standard change (bug 916106): Prevent the caller from
- // re-using LR. Since the caller is by definition not a leaf
- // routine, it will have to restore LR from somewhere to
- // return to its own caller, so we can safely zero it here.
- // This makes a difference only if an error in unwinding
- // (e.g., caused by starting from within a prologue/epilogue)
- // causes us to load a pointer to a leaf routine as LR; if we
- // don't do something, we'll go into an infinite loop of
- // "returning" to that same function.
- mState[R_LR] = 0;
- }
- return true;
- }
-
- // 1001nnnn: Set vsp = r[nnnn]
- if ((insn & M_MOVSP) == I_MOVSP) {
- vSP() = mState[insn & 0x0f];
- checkStack();
- continue;
- }
-
- // 11001000 sssscccc: Pop VFP regs D[16+ssss]-D[16+ssss+cccc] (as FLDMFDD)
- // 11001001 sssscccc: Pop VFP regs D[ssss]-D[ssss+cccc] (as FLDMFDD)
- if ((insn & M_POPFDD) == I_POPFDD) {
- uint8_t n = (next() & 0x0f) + 1;
- // Note: if the 16+ssss+cccc > 31, the encoding is reserved.
- // As the space is currently unused, we don't try to check.
- vSP() += 8 * n;
- checkStackBase();
- continue;
- }
-
- // 11010nnn: Pop VFP regs D[8]-D[8+nnn] (as FLDMFDD)
- if ((insn & M_POPFDD8) == I_POPFDD8) {
- uint8_t n = (insn & 0x07) + 1;
- vSP() += 8 * n;
- checkStackBase();
- continue;
- }
-
- // 10110010 uleb128: vsp = vsp + 0x204 + (uleb128 << 2)
- if (insn == I_ADDSPBIG) {
- uint32_t acc = 0;
- uint8_t shift = 0;
- uint8_t byte;
- do {
- if (shift >= 32)
- return false;
- byte = next();
- acc |= (byte & 0x7f) << shift;
- shift += 7;
- } while (byte & 0x80);
- uint32_t offset = 0x204 + (acc << 2);
- // The calculations above could have overflowed.
- // But the one we care about is this:
- if (vSP() + offset < vSP())
- mFailed = true;
- vSP() += offset;
- // ...so that this is the only other check needed:
- checkStackBase();
- continue;
- }
-
- // 1000iiii iiiiiiii (i not all 0): Pop under masks {r15-r12}, {r11-r4}
- if ((insn & M_POPMASK) == I_POPMASK) {
- popRange(4, 15, ((insn & 0x0f) << 8) | next());
- continue;
- }
-
- // 1011001 0000iiii (i not all 0): Pop under mask {r3-r0}
- if (insn == I_POPLO) {
- popRange(0, 3, next() & 0x0f);
- continue;
- }
-
- // 10110011 sssscccc: Pop VFP regs D[ssss]-D[ssss+cccc] (as FLDMFDX)
- if (insn == I_POPFDX) {
- uint8_t n = (next() & 0x0f) + 1;
- vSP() += 8 * n + 4;
- checkStackBase();
- continue;
- }
-
- // 10111nnn: Pop VFP regs D[8]-D[8+nnn] (as FLDMFDX)
- if ((insn & M_POPFDX8) == I_POPFDX8) {
- uint8_t n = (insn & 0x07) + 1;
- vSP() += 8 * n + 4;
- checkStackBase();
- continue;
- }
-
- // unhandled instruction
-#ifdef DEBUG_EHABI_UNWIND
- LOGF("Unhandled EHABI instruction 0x%02x", insn);
-#endif
- mFailed = true;
- }
- return false;
-}
-
-
-bool operator<(const EHTable &lhs, const EHTable &rhs) {
- return lhs.startPC() < rhs.startPC();
-}
-
-// Async signal unsafe.
-EHAddrSpace::EHAddrSpace(const std::vector<EHTable>& aTables)
- : mTables(aTables)
-{
- std::sort(mTables.begin(), mTables.end());
- DebugOnly<uint32_t> lastEnd = 0;
- for (std::vector<EHTable>::iterator i = mTables.begin();
- i != mTables.end(); ++i) {
- MOZ_ASSERT(i->startPC() >= lastEnd);
- mStarts.push_back(i->startPC());
- lastEnd = i->endPC();
- }
-}
-
-const EHTable *EHAddrSpace::lookup(uint32_t aPC) const {
- ptrdiff_t i = (std::upper_bound(mStarts.begin(), mStarts.end(), aPC)
- - mStarts.begin()) - 1;
-
- if (i < 0 || aPC >= mTables[i].endPC())
- return 0;
- return &mTables[i];
-}
-
-
-const EHEntry *EHTable::lookup(uint32_t aPC) const {
- MOZ_ASSERT(aPC >= mStartPC);
- if (aPC >= mEndPC)
- return nullptr;
-
- EntryIterator begin = entriesBegin();
- EntryIterator end = entriesEnd();
- MOZ_ASSERT(begin < end);
- if (aPC < reinterpret_cast<uint32_t>(entryGet(begin)->startPC.compute()))
- return nullptr;
-
- while (end - begin > 1) {
-#ifdef EHABI_UNWIND_MORE_ASSERTS
- if (entryGet(end - 1)->startPC.compute()
- < entryGet(begin)->startPC.compute()) {
- MOZ_CRASH("unsorted exidx");
- }
-#endif
- EntryIterator mid = begin + (end - begin) / 2;
- if (aPC < reinterpret_cast<uint32_t>(entryGet(mid)->startPC.compute()))
- end = mid;
- else
- begin = mid;
- }
- return entryGet(begin);
-}
-
-
-#if MOZ_LITTLE_ENDIAN
-static const unsigned char hostEndian = ELFDATA2LSB;
-#elif MOZ_BIG_ENDIAN
-static const unsigned char hostEndian = ELFDATA2MSB;
-#else
-#error "No endian?"
-#endif
-
-// Async signal unsafe: std::vector::reserve, std::string copy ctor.
-EHTable::EHTable(const void *aELF, size_t aSize, const std::string &aName)
- : mStartPC(~0), // largest uint32_t
- mEndPC(0),
-#ifndef HAVE_UNSORTED_EXIDX
- mEntriesBegin(nullptr),
- mEntriesEnd(nullptr),
-#endif
- mName(aName)
-{
- const uint32_t base = reinterpret_cast<uint32_t>(aELF);
-
- if (aSize < sizeof(Elf32_Ehdr))
- return;
-
- const Elf32_Ehdr &file = *(reinterpret_cast<Elf32_Ehdr *>(base));
- if (memcmp(&file.e_ident[EI_MAG0], ELFMAG, SELFMAG) != 0 ||
- file.e_ident[EI_CLASS] != ELFCLASS32 ||
- file.e_ident[EI_DATA] != hostEndian ||
- file.e_ident[EI_VERSION] != EV_CURRENT ||
- file.e_ident[EI_OSABI] != ELFOSABI_SYSV ||
-#ifdef EI_ABIVERSION
- file.e_ident[EI_ABIVERSION] != 0 ||
-#endif
- file.e_machine != EM_ARM ||
- file.e_version != EV_CURRENT)
- // e_flags?
- return;
-
- MOZ_ASSERT(file.e_phoff + file.e_phnum * file.e_phentsize <= aSize);
- const Elf32_Phdr *exidxHdr = 0, *zeroHdr = 0;
- for (unsigned i = 0; i < file.e_phnum; ++i) {
- const Elf32_Phdr &phdr =
- *(reinterpret_cast<Elf32_Phdr *>(base + file.e_phoff
- + i * file.e_phentsize));
- if (phdr.p_type == PT_ARM_EXIDX) {
- exidxHdr = &phdr;
- } else if (phdr.p_type == PT_LOAD) {
- if (phdr.p_offset == 0) {
- zeroHdr = &phdr;
- }
- if (phdr.p_flags & PF_X) {
- mStartPC = std::min(mStartPC, phdr.p_vaddr);
- mEndPC = std::max(mEndPC, phdr.p_vaddr + phdr.p_memsz);
- }
- }
- }
- if (!exidxHdr)
- return;
- if (!zeroHdr)
- return;
- mLoadOffset = base - zeroHdr->p_vaddr;
- mStartPC += mLoadOffset;
- mEndPC += mLoadOffset;
-
- // Create a sorted index of the index to work around linker bugs.
- const EHEntry *startTable =
- reinterpret_cast<const EHEntry *>(mLoadOffset + exidxHdr->p_vaddr);
- const EHEntry *endTable =
- reinterpret_cast<const EHEntry *>(mLoadOffset + exidxHdr->p_vaddr
- + exidxHdr->p_memsz);
-#ifdef HAVE_UNSORTED_EXIDX
- mEntries.reserve(endTable - startTable);
- for (const EHEntry *i = startTable; i < endTable; ++i)
- mEntries.push_back(i);
- std::sort(mEntries.begin(), mEntries.end());
-#else
- mEntriesBegin = startTable;
- mEntriesEnd = endTable;
-#endif
-}
-
-
-mozilla::Atomic<const EHAddrSpace*> EHAddrSpace::sCurrent(nullptr);
-
-// Async signal safe; can fail if Update() hasn't returned yet.
-const EHAddrSpace *EHAddrSpace::Get() {
- return sCurrent;
-}
-
-// Collect unwinding information from loaded objects. Calls after the
-// first have no effect. Async signal unsafe.
-void EHAddrSpace::Update() {
- const EHAddrSpace *space = sCurrent;
- if (space)
- return;
-
- SharedLibraryInfo info = SharedLibraryInfo::GetInfoForSelf();
- std::vector<EHTable> tables;
-
- for (size_t i = 0; i < info.GetSize(); ++i) {
- const SharedLibrary &lib = info.GetEntry(i);
- if (lib.GetOffset() != 0)
- // TODO: if it has a name, and we haven't seen a mapping of
- // offset 0 for that file, try opening it and reading the
- // headers instead. The only thing I've seen so far that's
- // linked so as to need that treatment is the dynamic linker
- // itself.
- continue;
- EHTable tab(reinterpret_cast<const void *>(lib.GetStart()),
- lib.GetEnd() - lib.GetStart(), lib.GetName());
- if (tab.isValid())
- tables.push_back(tab);
- }
- space = new EHAddrSpace(tables);
-
- if (!sCurrent.compareExchange(nullptr, space)) {
- delete space;
- space = sCurrent;
- }
-}
-
-
-EHState::EHState(const mcontext_t &context) {
-#ifdef linux
- mRegs[0] = context.arm_r0;
- mRegs[1] = context.arm_r1;
- mRegs[2] = context.arm_r2;
- mRegs[3] = context.arm_r3;
- mRegs[4] = context.arm_r4;
- mRegs[5] = context.arm_r5;
- mRegs[6] = context.arm_r6;
- mRegs[7] = context.arm_r7;
- mRegs[8] = context.arm_r8;
- mRegs[9] = context.arm_r9;
- mRegs[10] = context.arm_r10;
- mRegs[11] = context.arm_fp;
- mRegs[12] = context.arm_ip;
- mRegs[13] = context.arm_sp;
- mRegs[14] = context.arm_lr;
- mRegs[15] = context.arm_pc;
-#else
-# error "Unhandled OS for ARM EHABI unwinding"
-#endif
-}
-
-} // namespace mozilla
-
diff --git a/tools/profiler/core/EHABIStackWalk.h b/tools/profiler/core/EHABIStackWalk.h
deleted file mode 100644
index 5529d9511..000000000
--- a/tools/profiler/core/EHABIStackWalk.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/*
- * This is an implementation of stack unwinding according to a subset
- * of the ARM Exception Handling ABI; see the comment at the top of
- * the .cpp file for details.
- */
-
-#ifndef mozilla_EHABIStackWalk_h__
-#define mozilla_EHABIStackWalk_h__
-
-#include <stddef.h>
-#include <ucontext.h>
-
-namespace mozilla {
-
-void EHABIStackWalkInit();
-
-size_t EHABIStackWalk(const mcontext_t &aContext, void *stackBase,
- void **aSPs, void **aPCs, size_t aNumFrames);
-
-}
-
-#endif
diff --git a/tools/profiler/core/GeckoSampler.cpp b/tools/profiler/core/GeckoSampler.cpp
deleted file mode 100644
index 4283542f6..000000000
--- a/tools/profiler/core/GeckoSampler.cpp
+++ /dev/null
@@ -1,1306 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <algorithm>
-#include <string>
-#include <stdio.h>
-#include <fstream>
-#include <sstream>
-#include "GeckoProfiler.h"
-#ifndef SPS_STANDALONE
-#include "SaveProfileTask.h"
-#include "nsThreadUtils.h"
-#include "prenv.h"
-#include "prtime.h"
-#include "nsXULAppAPI.h"
-#endif
-#include "ProfileEntry.h"
-#include "SyncProfile.h"
-#include "platform.h"
-#include "shared-libraries.h"
-#include "mozilla/StackWalk.h"
-#include "GeckoSampler.h"
-
-// JSON
-#include "ProfileJSONWriter.h"
-
-#ifndef SPS_STANDALONE
-// Meta
-#include "nsXPCOM.h"
-#include "nsXPCOMCID.h"
-#include "nsIHttpProtocolHandler.h"
-#include "nsServiceManagerUtils.h"
-#include "nsIXULRuntime.h"
-#include "nsIXULAppInfo.h"
-#include "nsDirectoryServiceUtils.h"
-#include "nsDirectoryServiceDefs.h"
-#include "nsIObserverService.h"
-#include "mozilla/Services.h"
-#include "PlatformMacros.h"
-#include "nsTArray.h"
-
-#include "mozilla/ProfileGatherer.h"
-#endif
-
-#if defined(SPS_OS_android)
- #include "FennecJNIWrappers.h"
-#endif
-
-#ifndef SPS_STANDALONE
-// JS
-#include "jsfriendapi.h"
-#include "js/ProfilingFrameIterator.h"
-#endif
-
-#if defined(MOZ_PROFILING) && (defined(XP_MACOSX) || defined(XP_WIN))
- #define USE_NS_STACKWALK
-#endif
-
-#if defined(XP_WIN)
-typedef CONTEXT tickcontext_t;
-#elif defined(LINUX)
-#include <ucontext.h>
-typedef ucontext_t tickcontext_t;
-#endif
-
-#if defined(LINUX) || defined(XP_MACOSX)
-#include <sys/types.h>
-pid_t gettid();
-#endif
-
-#if defined(__arm__) && defined(ANDROID)
- // Should also work on ARM Linux, but not tested there yet.
- #define USE_EHABI_STACKWALK
-#endif
-#ifdef USE_EHABI_STACKWALK
- #include "EHABIStackWalk.h"
-#endif
-
-#ifndef SPS_STANDALONE
-#if defined(SPS_PLAT_amd64_linux) || defined(SPS_PLAT_x86_linux)
-# define USE_LUL_STACKWALK
-# include "lul/LulMain.h"
-# include "lul/platform-linux-lul.h"
-#endif
-#endif
-
-using std::string;
-using namespace mozilla;
-
-#ifndef MAXPATHLEN
- #ifdef PATH_MAX
- #define MAXPATHLEN PATH_MAX
- #elif defined(MAX_PATH)
- #define MAXPATHLEN MAX_PATH
- #elif defined(_MAX_PATH)
- #define MAXPATHLEN _MAX_PATH
- #elif defined(CCHMAXPATH)
- #define MAXPATHLEN CCHMAXPATH
- #else
- #define MAXPATHLEN 1024
- #endif
-#endif
-
-#ifdef MOZ_VALGRIND
-# include <valgrind/memcheck.h>
-#else
-# define VALGRIND_MAKE_MEM_DEFINED(_addr,_len) ((void)0)
-#endif
-
-
-///////////////////////////////////////////////////////////////////////
-// BEGIN SaveProfileTask et al
-
-static void
-AddSharedLibraryInfoToStream(std::ostream& aStream, const SharedLibrary& aLib)
-{
- aStream << "{";
- aStream << "\"start\":" << aLib.GetStart();
- aStream << ",\"end\":" << aLib.GetEnd();
- aStream << ",\"offset\":" << aLib.GetOffset();
- aStream << ",\"name\":\"" << aLib.GetName() << "\"";
- const std::string &breakpadId = aLib.GetBreakpadId();
- aStream << ",\"breakpadId\":\"" << breakpadId << "\"";
-#ifdef XP_WIN
- // FIXME: remove this XP_WIN code when the profiler plugin has switched to
- // using breakpadId.
- std::string pdbSignature = breakpadId.substr(0, 32);
- std::string pdbAgeStr = breakpadId.substr(32, breakpadId.size() - 1);
-
- std::stringstream stream;
- stream << pdbAgeStr;
-
- unsigned pdbAge;
- stream << std::hex;
- stream >> pdbAge;
-
-#ifdef DEBUG
- std::ostringstream oStream;
- oStream << pdbSignature << std::hex << std::uppercase << pdbAge;
- MOZ_ASSERT(breakpadId == oStream.str());
-#endif
-
- aStream << ",\"pdbSignature\":\"" << pdbSignature << "\"";
- aStream << ",\"pdbAge\":" << pdbAge;
- aStream << ",\"pdbName\":\"" << aLib.GetName() << "\"";
-#endif
- aStream << "}";
-}
-
-std::string
-GetSharedLibraryInfoStringInternal()
-{
- SharedLibraryInfo info = SharedLibraryInfo::GetInfoForSelf();
- if (info.GetSize() == 0)
- return "[]";
-
- std::ostringstream os;
- os << "[";
- AddSharedLibraryInfoToStream(os, info.GetEntry(0));
-
- for (size_t i = 1; i < info.GetSize(); i++) {
- os << ",";
- AddSharedLibraryInfoToStream(os, info.GetEntry(i));
- }
-
- os << "]";
- return os.str();
-}
-
-static bool
-hasFeature(const char** aFeatures, uint32_t aFeatureCount, const char* aFeature) {
- for(size_t i = 0; i < aFeatureCount; i++) {
- if (strcmp(aFeatures[i], aFeature) == 0)
- return true;
- }
- return false;
-}
-
-GeckoSampler::GeckoSampler(double aInterval, int aEntrySize,
- const char** aFeatures, uint32_t aFeatureCount,
- const char** aThreadNameFilters, uint32_t aFilterCount)
- : Sampler(aInterval, true, aEntrySize)
- , mPrimaryThreadProfile(nullptr)
- , mBuffer(new ProfileBuffer(aEntrySize))
- , mSaveRequested(false)
-#if defined(XP_WIN)
- , mIntelPowerGadget(nullptr)
-#endif
-{
- mUseStackWalk = hasFeature(aFeatures, aFeatureCount, "stackwalk");
-
- mProfileJS = hasFeature(aFeatures, aFeatureCount, "js");
- mProfileGPU = hasFeature(aFeatures, aFeatureCount, "gpu");
- mProfilePower = hasFeature(aFeatures, aFeatureCount, "power");
- // Users sometimes ask to filter by a list of threads but forget to request
- // profiling non main threads. Let's make it implificit if we have a filter
- mProfileThreads = hasFeature(aFeatures, aFeatureCount, "threads") || aFilterCount > 0;
- mAddLeafAddresses = hasFeature(aFeatures, aFeatureCount, "leaf");
- mPrivacyMode = hasFeature(aFeatures, aFeatureCount, "privacy");
- mAddMainThreadIO = hasFeature(aFeatures, aFeatureCount, "mainthreadio");
- mProfileMemory = hasFeature(aFeatures, aFeatureCount, "memory");
- mTaskTracer = hasFeature(aFeatures, aFeatureCount, "tasktracer");
- mLayersDump = hasFeature(aFeatures, aFeatureCount, "layersdump");
- mDisplayListDump = hasFeature(aFeatures, aFeatureCount, "displaylistdump");
- mProfileRestyle = hasFeature(aFeatures, aFeatureCount, "restyle");
-
-#if defined(XP_WIN)
- if (mProfilePower) {
- mIntelPowerGadget = new IntelPowerGadget();
- mProfilePower = mIntelPowerGadget->Init();
- }
-#endif
-
-#if defined(SPS_OS_android)
- mProfileJava = mozilla::jni::IsFennec() &&
- hasFeature(aFeatures, aFeatureCount, "java");
-#else
- mProfileJava = false;
-#endif
-
- // Deep copy aThreadNameFilters
- MOZ_ALWAYS_TRUE(mThreadNameFilters.resize(aFilterCount));
- for (uint32_t i = 0; i < aFilterCount; ++i) {
- mThreadNameFilters[i] = aThreadNameFilters[i];
- }
-
- // Deep copy aFeatures
- MOZ_ALWAYS_TRUE(mFeatures.resize(aFeatureCount));
- for (uint32_t i = 0; i < aFeatureCount; ++i) {
- mFeatures[i] = aFeatures[i];
- }
-
- bool ignore;
- sStartTime = mozilla::TimeStamp::ProcessCreation(ignore);
-
- {
- ::MutexAutoLock lock(*sRegisteredThreadsMutex);
-
- // Create ThreadProfile for each registered thread
- for (uint32_t i = 0; i < sRegisteredThreads->size(); i++) {
- ThreadInfo* info = sRegisteredThreads->at(i);
-
- RegisterThread(info);
- }
-
- SetActiveSampler(this);
- }
-
-#ifdef MOZ_TASK_TRACER
- if (mTaskTracer) {
- mozilla::tasktracer::StartLogging();
- }
-#endif
-
- mGatherer = new mozilla::ProfileGatherer(this);
-}
-
-GeckoSampler::~GeckoSampler()
-{
- if (IsActive())
- Stop();
-
- SetActiveSampler(nullptr);
-
- // Destroy ThreadProfile for all threads
- {
- ::MutexAutoLock lock(*sRegisteredThreadsMutex);
-
- for (uint32_t i = 0; i < sRegisteredThreads->size(); i++) {
- ThreadInfo* info = sRegisteredThreads->at(i);
- ThreadProfile* profile = info->Profile();
- if (profile) {
- delete profile;
- info->SetProfile(nullptr);
- }
- // We've stopped profiling. We no longer need to retain
- // information for an old thread.
- if (info->IsPendingDelete()) {
- delete info;
- sRegisteredThreads->erase(sRegisteredThreads->begin() + i);
- i--;
- }
- }
- }
-#if defined(XP_WIN)
- delete mIntelPowerGadget;
-#endif
-
- // Cancel any in-flight async profile gatherering
- // requests
- mGatherer->Cancel();
-}
-
-void GeckoSampler::HandleSaveRequest()
-{
- if (!mSaveRequested)
- return;
- mSaveRequested = false;
-
-#ifndef SPS_STANDALONE
- // TODO: Use use the ipc/chromium Tasks here to support processes
- // without XPCOM.
- nsCOMPtr<nsIRunnable> runnable = new SaveProfileTask();
- NS_DispatchToMainThread(runnable);
-#endif
-}
-
-void GeckoSampler::DeleteExpiredMarkers()
-{
- mBuffer->deleteExpiredStoredMarkers();
-}
-
-void GeckoSampler::StreamTaskTracer(SpliceableJSONWriter& aWriter)
-{
-#ifdef MOZ_TASK_TRACER
- aWriter.StartArrayProperty("data");
- UniquePtr<nsTArray<nsCString>> data = mozilla::tasktracer::GetLoggedData(sStartTime);
- for (uint32_t i = 0; i < data->Length(); ++i) {
- aWriter.StringElement((data->ElementAt(i)).get());
- }
- aWriter.EndArray();
-
- aWriter.StartArrayProperty("threads");
- ::MutexAutoLock lock(*sRegisteredThreadsMutex);
- for (size_t i = 0; i < sRegisteredThreads->size(); i++) {
- // Thread meta data
- ThreadInfo* info = sRegisteredThreads->at(i);
- aWriter.StartObjectElement();
- if (XRE_GetProcessType() == GeckoProcessType_Plugin) {
- // TODO Add the proper plugin name
- aWriter.StringProperty("name", "Plugin");
- } else {
- aWriter.StringProperty("name", info->Name());
- }
- aWriter.IntProperty("tid", static_cast<int>(info->ThreadId()));
- aWriter.EndObject();
- }
- aWriter.EndArray();
-
- aWriter.DoubleProperty("start", static_cast<double>(mozilla::tasktracer::GetStartTime()));
-#endif
-}
-
-
-void GeckoSampler::StreamMetaJSCustomObject(SpliceableJSONWriter& aWriter)
-{
- aWriter.IntProperty("version", 3);
- aWriter.DoubleProperty("interval", interval());
- aWriter.IntProperty("stackwalk", mUseStackWalk);
-
-#ifndef SPS_STANDALONE
- mozilla::TimeDuration delta = mozilla::TimeStamp::Now() - sStartTime;
- aWriter.DoubleProperty("startTime", static_cast<double>(PR_Now()/1000.0 - delta.ToMilliseconds()));
-
- aWriter.IntProperty("processType", XRE_GetProcessType());
-
- nsresult res;
- nsCOMPtr<nsIHttpProtocolHandler> http = do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &res);
- if (!NS_FAILED(res)) {
- nsAutoCString string;
-
- res = http->GetPlatform(string);
- if (!NS_FAILED(res))
- aWriter.StringProperty("platform", string.Data());
-
- res = http->GetOscpu(string);
- if (!NS_FAILED(res))
- aWriter.StringProperty("oscpu", string.Data());
-
- res = http->GetMisc(string);
- if (!NS_FAILED(res))
- aWriter.StringProperty("misc", string.Data());
- }
-
- nsCOMPtr<nsIXULRuntime> runtime = do_GetService("@mozilla.org/xre/runtime;1");
- if (runtime) {
- nsAutoCString string;
-
- res = runtime->GetXPCOMABI(string);
- if (!NS_FAILED(res))
- aWriter.StringProperty("abi", string.Data());
-
- res = runtime->GetWidgetToolkit(string);
- if (!NS_FAILED(res))
- aWriter.StringProperty("toolkit", string.Data());
- }
-
- nsCOMPtr<nsIXULAppInfo> appInfo = do_GetService("@mozilla.org/xre/app-info;1");
- if (appInfo) {
- nsAutoCString string;
-
- res = appInfo->GetName(string);
- if (!NS_FAILED(res))
- aWriter.StringProperty("product", string.Data());
- }
-#endif
-}
-
-void GeckoSampler::ToStreamAsJSON(std::ostream& stream, double aSinceTime)
-{
- SpliceableJSONWriter b(mozilla::MakeUnique<OStreamJSONWriteFunc>(stream));
- StreamJSON(b, aSinceTime);
-}
-
-#ifndef SPS_STANDALONE
-JSObject* GeckoSampler::ToJSObject(JSContext *aCx, double aSinceTime)
-{
- JS::RootedValue val(aCx);
- {
- UniquePtr<char[]> buf = ToJSON(aSinceTime);
- NS_ConvertUTF8toUTF16 js_string(nsDependentCString(buf.get()));
- MOZ_ALWAYS_TRUE(JS_ParseJSON(aCx, static_cast<const char16_t*>(js_string.get()),
- js_string.Length(), &val));
- }
- return &val.toObject();
-}
-
-void GeckoSampler::GetGatherer(nsISupports** aRetVal)
-{
- if (!aRetVal || NS_WARN_IF(!mGatherer)) {
- return;
- }
- NS_ADDREF(*aRetVal = mGatherer);
-}
-#endif
-
-UniquePtr<char[]> GeckoSampler::ToJSON(double aSinceTime)
-{
- SpliceableChunkedJSONWriter b;
- StreamJSON(b, aSinceTime);
- return b.WriteFunc()->CopyData();
-}
-
-void GeckoSampler::ToJSObjectAsync(double aSinceTime,
- mozilla::dom::Promise* aPromise)
-{
- if (NS_WARN_IF(!mGatherer)) {
- return;
- }
-
- mGatherer->Start(aSinceTime, aPromise);
-}
-
-struct SubprocessClosure {
- explicit SubprocessClosure(SpliceableJSONWriter* aWriter)
- : mWriter(aWriter)
- {}
-
- SpliceableJSONWriter* mWriter;
-};
-
-void SubProcessCallback(const char* aProfile, void* aClosure)
-{
- // Called by the observer to get their profile data included
- // as a sub profile
- SubprocessClosure* closure = (SubprocessClosure*)aClosure;
-
- // Add the string profile into the profile
- closure->mWriter->StringElement(aProfile);
-}
-
-
-#if defined(SPS_OS_android)
-static
-void BuildJavaThreadJSObject(SpliceableJSONWriter& aWriter)
-{
- aWriter.StringProperty("name", "Java Main Thread");
-
- aWriter.StartArrayProperty("samples");
-
- // for each sample
- for (int sampleId = 0; true; sampleId++) {
- bool firstRun = true;
- // for each frame
- for (int frameId = 0; true; frameId++) {
- jni::String::LocalRef frameName =
- java::GeckoJavaSampler::GetFrameName(0, sampleId, frameId);
- // when we run out of frames, we stop looping
- if (!frameName) {
- // if we found at least one frame, we have objects to close
- if (!firstRun) {
- aWriter.EndArray();
- aWriter.EndObject();
- }
- break;
- }
- // the first time around, open the sample object and frames array
- if (firstRun) {
- firstRun = false;
-
- double sampleTime =
- java::GeckoJavaSampler::GetSampleTime(0, sampleId);
-
- aWriter.StartObjectElement();
- aWriter.DoubleProperty("time", sampleTime);
-
- aWriter.StartArrayProperty("frames");
- }
- // add a frame to the sample
- aWriter.StartObjectElement();
- aWriter.StringProperty("location",
- frameName->ToCString().BeginReading());
- aWriter.EndObject();
- }
- // if we found no frames for this sample, we are done
- if (firstRun) {
- break;
- }
- }
-
- aWriter.EndArray();
-}
-#endif
-
-void GeckoSampler::StreamJSON(SpliceableJSONWriter& aWriter, double aSinceTime)
-{
- aWriter.Start(SpliceableJSONWriter::SingleLineStyle);
- {
- // Put shared library info
- aWriter.StringProperty("libs", GetSharedLibraryInfoStringInternal().c_str());
-
- // Put meta data
- aWriter.StartObjectProperty("meta");
- StreamMetaJSCustomObject(aWriter);
- aWriter.EndObject();
-
- // Data of TaskTracer doesn't belong in the circular buffer.
- if (TaskTracer()) {
- aWriter.StartObjectProperty("tasktracer");
- StreamTaskTracer(aWriter);
- aWriter.EndObject();
- }
-
- // Lists the samples for each ThreadProfile
- aWriter.StartArrayProperty("threads");
- {
- SetPaused(true);
-
- {
- ::MutexAutoLock lock(*sRegisteredThreadsMutex);
-
- for (size_t i = 0; i < sRegisteredThreads->size(); i++) {
- // Thread not being profiled, skip it
- if (!sRegisteredThreads->at(i)->Profile())
- continue;
-
- // Note that we intentionally include ThreadProfile which
- // have been marked for pending delete.
-
- ::MutexAutoLock lock(sRegisteredThreads->at(i)->Profile()->GetMutex());
-
- sRegisteredThreads->at(i)->Profile()->StreamJSON(aWriter, aSinceTime);
- }
- }
-
-#ifndef SPS_STANDALONE
- if (Sampler::CanNotifyObservers()) {
- // Send a event asking any subprocesses (plugins) to
- // give us their information
- SubprocessClosure closure(&aWriter);
- nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
- if (os) {
- RefPtr<ProfileSaveEvent> pse = new ProfileSaveEvent(SubProcessCallback, &closure);
- os->NotifyObservers(pse, "profiler-subprocess", nullptr);
- }
- }
-
- #if defined(SPS_OS_android)
- if (ProfileJava()) {
- java::GeckoJavaSampler::Pause();
-
- aWriter.Start();
- {
- BuildJavaThreadJSObject(aWriter);
- }
- aWriter.End();
-
- java::GeckoJavaSampler::Unpause();
- }
- #endif
-#endif
-
- SetPaused(false);
- }
- aWriter.EndArray();
- }
- aWriter.End();
-}
-
-void GeckoSampler::FlushOnJSShutdown(JSContext* aContext)
-{
-#ifndef SPS_STANDALONE
- SetPaused(true);
-
- {
- ::MutexAutoLock lock(*sRegisteredThreadsMutex);
-
- for (size_t i = 0; i < sRegisteredThreads->size(); i++) {
- // Thread not being profiled, skip it.
- if (!sRegisteredThreads->at(i)->Profile() ||
- sRegisteredThreads->at(i)->IsPendingDelete()) {
- continue;
- }
-
- // Thread not profiling the context that's going away, skip it.
- if (sRegisteredThreads->at(i)->Profile()->GetPseudoStack()->mContext != aContext) {
- continue;
- }
-
- ::MutexAutoLock lock(sRegisteredThreads->at(i)->Profile()->GetMutex());
- sRegisteredThreads->at(i)->Profile()->FlushSamplesAndMarkers();
- }
- }
-
- SetPaused(false);
-#endif
-}
-
-void PseudoStack::flushSamplerOnJSShutdown()
-{
-#ifndef SPS_STANDALONE
- MOZ_ASSERT(mContext);
- GeckoSampler* t = tlsTicker.get();
- if (t) {
- t->FlushOnJSShutdown(mContext);
- }
-#endif
-}
-
-// END SaveProfileTask et al
-////////////////////////////////////////////////////////////////////////
-
-static
-void addDynamicTag(ThreadProfile &aProfile, char aTagName, const char *aStr)
-{
- aProfile.addTag(ProfileEntry(aTagName, ""));
- // Add one to store the null termination
- size_t strLen = strlen(aStr) + 1;
- for (size_t j = 0; j < strLen;) {
- // Store as many characters in the void* as the platform allows
- char text[sizeof(void*)];
- size_t len = sizeof(void*)/sizeof(char);
- if (j+len >= strLen) {
- len = strLen - j;
- }
- memcpy(text, &aStr[j], len);
- j += sizeof(void*)/sizeof(char);
- // Cast to *((void**) to pass the text data to a void*
- aProfile.addTag(ProfileEntry('d', *((void**)(&text[0]))));
- }
-}
-
-static
-void addPseudoEntry(volatile StackEntry &entry, ThreadProfile &aProfile,
- PseudoStack *stack, void *lastpc)
-{
- // Pseudo-frames with the BEGIN_PSEUDO_JS flag are just annotations
- // and should not be recorded in the profile.
- if (entry.hasFlag(StackEntry::BEGIN_PSEUDO_JS))
- return;
-
- int lineno = -1;
-
- // First entry has tagName 's' (start)
- // Check for magic pointer bit 1 to indicate copy
- const char* sampleLabel = entry.label();
- if (entry.isCopyLabel()) {
- // Store the string using 1 or more 'd' (dynamic) tags
- // that will happen to the preceding tag
-
- addDynamicTag(aProfile, 'c', sampleLabel);
-#ifndef SPS_STANDALONE
- if (entry.isJs()) {
- JSScript* script = entry.script();
- if (script) {
- if (!entry.pc()) {
- // The JIT only allows the top-most entry to have a nullptr pc
- MOZ_ASSERT(&entry == &stack->mStack[stack->stackSize() - 1]);
- // If stack-walking was disabled, then that's just unfortunate
- if (lastpc) {
- jsbytecode *jspc = js::ProfilingGetPC(stack->mContext, script,
- lastpc);
- if (jspc) {
- lineno = JS_PCToLineNumber(script, jspc);
- }
- }
- } else {
- lineno = JS_PCToLineNumber(script, entry.pc());
- }
- }
- } else {
- lineno = entry.line();
- }
-#endif
- } else {
- aProfile.addTag(ProfileEntry('c', sampleLabel));
-
- // XXX: Bug 1010578. Don't assume a CPP entry and try to get the
- // line for js entries as well.
- if (entry.isCpp()) {
- lineno = entry.line();
- }
- }
-
- if (lineno != -1) {
- aProfile.addTag(ProfileEntry('n', lineno));
- }
-
- uint32_t category = entry.category();
- MOZ_ASSERT(!(category & StackEntry::IS_CPP_ENTRY));
- MOZ_ASSERT(!(category & StackEntry::FRAME_LABEL_COPY));
-
- if (category) {
- aProfile.addTag(ProfileEntry('y', (int)category));
- }
-}
-
-struct NativeStack
-{
- void** pc_array;
- void** sp_array;
- size_t size;
- size_t count;
-};
-
-mozilla::Atomic<bool> WALKING_JS_STACK(false);
-
-struct AutoWalkJSStack {
- bool walkAllowed;
-
- AutoWalkJSStack() : walkAllowed(false) {
- walkAllowed = WALKING_JS_STACK.compareExchange(false, true);
- }
-
- ~AutoWalkJSStack() {
- if (walkAllowed)
- WALKING_JS_STACK = false;
- }
-};
-
-static
-void mergeStacksIntoProfile(ThreadProfile& aProfile, TickSample* aSample, NativeStack& aNativeStack)
-{
- PseudoStack* pseudoStack = aProfile.GetPseudoStack();
- volatile StackEntry *pseudoFrames = pseudoStack->mStack;
- uint32_t pseudoCount = pseudoStack->stackSize();
-
- // Make a copy of the JS stack into a JSFrame array. This is necessary since,
- // like the native stack, the JS stack is iterated youngest-to-oldest and we
- // need to iterate oldest-to-youngest when adding entries to aProfile.
-
- // Synchronous sampling reports an invalid buffer generation to
- // ProfilingFrameIterator to avoid incorrectly resetting the generation of
- // sampled JIT entries inside the JS engine. See note below concerning 'J'
- // entries.
- uint32_t startBufferGen;
- if (aSample->isSamplingCurrentThread) {
- startBufferGen = UINT32_MAX;
- } else {
- startBufferGen = aProfile.bufferGeneration();
- }
- uint32_t jsCount = 0;
-#ifndef SPS_STANDALONE
- JS::ProfilingFrameIterator::Frame jsFrames[1000];
- // Only walk jit stack if profiling frame iterator is turned on.
- if (pseudoStack->mContext && JS::IsProfilingEnabledForContext(pseudoStack->mContext)) {
- AutoWalkJSStack autoWalkJSStack;
- const uint32_t maxFrames = mozilla::ArrayLength(jsFrames);
-
- if (aSample && autoWalkJSStack.walkAllowed) {
- JS::ProfilingFrameIterator::RegisterState registerState;
- registerState.pc = aSample->pc;
- registerState.sp = aSample->sp;
-#ifdef ENABLE_ARM_LR_SAVING
- registerState.lr = aSample->lr;
-#endif
-
- JS::ProfilingFrameIterator jsIter(pseudoStack->mContext,
- registerState,
- startBufferGen);
- for (; jsCount < maxFrames && !jsIter.done(); ++jsIter) {
- // See note below regarding 'J' entries.
- if (aSample->isSamplingCurrentThread || jsIter.isWasm()) {
- uint32_t extracted = jsIter.extractStack(jsFrames, jsCount, maxFrames);
- jsCount += extracted;
- if (jsCount == maxFrames)
- break;
- } else {
- mozilla::Maybe<JS::ProfilingFrameIterator::Frame> frame =
- jsIter.getPhysicalFrameWithoutLabel();
- if (frame.isSome())
- jsFrames[jsCount++] = mozilla::Move(frame.ref());
- }
- }
- }
- }
-#endif
-
- // Start the sample with a root entry.
- aProfile.addTag(ProfileEntry('s', "(root)"));
-
- // While the pseudo-stack array is ordered oldest-to-youngest, the JS and
- // native arrays are ordered youngest-to-oldest. We must add frames to
- // aProfile oldest-to-youngest. Thus, iterate over the pseudo-stack forwards
- // and JS and native arrays backwards. Note: this means the terminating
- // condition jsIndex and nativeIndex is being < 0.
- uint32_t pseudoIndex = 0;
- int32_t jsIndex = jsCount - 1;
- int32_t nativeIndex = aNativeStack.count - 1;
-
- uint8_t *lastPseudoCppStackAddr = nullptr;
-
- // Iterate as long as there is at least one frame remaining.
- while (pseudoIndex != pseudoCount || jsIndex >= 0 || nativeIndex >= 0) {
- // There are 1 to 3 frames available. Find and add the oldest.
-
- uint8_t *pseudoStackAddr = nullptr;
- uint8_t *jsStackAddr = nullptr;
- uint8_t *nativeStackAddr = nullptr;
-
- if (pseudoIndex != pseudoCount) {
- volatile StackEntry &pseudoFrame = pseudoFrames[pseudoIndex];
-
- if (pseudoFrame.isCpp())
- lastPseudoCppStackAddr = (uint8_t *) pseudoFrame.stackAddress();
-
-#ifndef SPS_STANDALONE
- // Skip any pseudo-stack JS frames which are marked isOSR
- // Pseudostack frames are marked isOSR when the JS interpreter
- // enters a jit frame on a loop edge (via on-stack-replacement,
- // or OSR). To avoid both the pseudoframe and jit frame being
- // recorded (and showing up twice), the interpreter marks the
- // interpreter pseudostack entry with the OSR flag to ensure that
- // it doesn't get counted.
- if (pseudoFrame.isJs() && pseudoFrame.isOSR()) {
- pseudoIndex++;
- continue;
- }
-#endif
-
- MOZ_ASSERT(lastPseudoCppStackAddr);
- pseudoStackAddr = lastPseudoCppStackAddr;
- }
-
-#ifndef SPS_STANDALONE
- if (jsIndex >= 0)
- jsStackAddr = (uint8_t *) jsFrames[jsIndex].stackAddress;
-#endif
-
- if (nativeIndex >= 0)
- nativeStackAddr = (uint8_t *) aNativeStack.sp_array[nativeIndex];
-
- // If there's a native stack entry which has the same SP as a
- // pseudo stack entry, pretend we didn't see the native stack
- // entry. Ditto for a native stack entry which has the same SP as
- // a JS stack entry. In effect this means pseudo or JS entries
- // trump conflicting native entries.
- if (nativeStackAddr && (pseudoStackAddr == nativeStackAddr || jsStackAddr == nativeStackAddr)) {
- nativeStackAddr = nullptr;
- nativeIndex--;
- MOZ_ASSERT(pseudoStackAddr || jsStackAddr);
- }
-
- // Sanity checks.
- MOZ_ASSERT_IF(pseudoStackAddr, pseudoStackAddr != jsStackAddr &&
- pseudoStackAddr != nativeStackAddr);
- MOZ_ASSERT_IF(jsStackAddr, jsStackAddr != pseudoStackAddr &&
- jsStackAddr != nativeStackAddr);
- MOZ_ASSERT_IF(nativeStackAddr, nativeStackAddr != pseudoStackAddr &&
- nativeStackAddr != jsStackAddr);
-
- // Check to see if pseudoStack frame is top-most.
- if (pseudoStackAddr > jsStackAddr && pseudoStackAddr > nativeStackAddr) {
- MOZ_ASSERT(pseudoIndex < pseudoCount);
- volatile StackEntry &pseudoFrame = pseudoFrames[pseudoIndex];
- addPseudoEntry(pseudoFrame, aProfile, pseudoStack, nullptr);
- pseudoIndex++;
- continue;
- }
-
-#ifndef SPS_STANDALONE
- // Check to see if JS jit stack frame is top-most
- if (jsStackAddr > nativeStackAddr) {
- MOZ_ASSERT(jsIndex >= 0);
- const JS::ProfilingFrameIterator::Frame& jsFrame = jsFrames[jsIndex];
-
- // Stringifying non-wasm JIT frames is delayed until streaming
- // time. To re-lookup the entry in the JitcodeGlobalTable, we need to
- // store the JIT code address ('J') in the circular buffer.
- //
- // Note that we cannot do this when we are sychronously sampling the
- // current thread; that is, when called from profiler_get_backtrace. The
- // captured backtrace is usually externally stored for an indeterminate
- // amount of time, such as in nsRefreshDriver. Problematically, the
- // stored backtrace may be alive across a GC during which the profiler
- // itself is disabled. In that case, the JS engine is free to discard
- // its JIT code. This means that if we inserted such 'J' entries into
- // the buffer, nsRefreshDriver would now be holding on to a backtrace
- // with stale JIT code return addresses.
- if (aSample->isSamplingCurrentThread ||
- jsFrame.kind == JS::ProfilingFrameIterator::Frame_Wasm) {
- addDynamicTag(aProfile, 'c', jsFrame.label.get());
- } else {
- MOZ_ASSERT(jsFrame.kind == JS::ProfilingFrameIterator::Frame_Ion ||
- jsFrame.kind == JS::ProfilingFrameIterator::Frame_Baseline);
- aProfile.addTag(ProfileEntry('J', jsFrames[jsIndex].returnAddress));
- }
-
- jsIndex--;
- continue;
- }
-#endif
-
- // If we reach here, there must be a native stack entry and it must be the
- // greatest entry.
- if (nativeStackAddr) {
- MOZ_ASSERT(nativeIndex >= 0);
- aProfile
- .addTag(ProfileEntry('l', (void*)aNativeStack.pc_array[nativeIndex]));
- }
- if (nativeIndex >= 0) {
- nativeIndex--;
- }
- }
-
-#ifndef SPS_STANDALONE
- // Update the JS context with the current profile sample buffer generation.
- //
- // Do not do this for synchronous sampling, which create their own
- // ProfileBuffers.
- if (!aSample->isSamplingCurrentThread && pseudoStack->mContext) {
- MOZ_ASSERT(aProfile.bufferGeneration() >= startBufferGen);
- uint32_t lapCount = aProfile.bufferGeneration() - startBufferGen;
- JS::UpdateJSContextProfilerSampleBufferGen(pseudoStack->mContext,
- aProfile.bufferGeneration(),
- lapCount);
- }
-#endif
-}
-
-#ifdef USE_NS_STACKWALK
-static
-void StackWalkCallback(uint32_t aFrameNumber, void* aPC, void* aSP,
- void* aClosure)
-{
- NativeStack* nativeStack = static_cast<NativeStack*>(aClosure);
- MOZ_ASSERT(nativeStack->count < nativeStack->size);
- nativeStack->sp_array[nativeStack->count] = aSP;
- nativeStack->pc_array[nativeStack->count] = aPC;
- nativeStack->count++;
-}
-
-void GeckoSampler::doNativeBacktrace(ThreadProfile &aProfile, TickSample* aSample)
-{
- void* pc_array[1000];
- void* sp_array[1000];
- NativeStack nativeStack = {
- pc_array,
- sp_array,
- mozilla::ArrayLength(pc_array),
- 0
- };
-
- // Start with the current function. We use 0 as the frame number here because
- // the FramePointerStackWalk() and MozStackWalk() calls below will use 1..N.
- // This is a bit weird but it doesn't matter because StackWalkCallback()
- // doesn't use the frame number argument.
- StackWalkCallback(/* frameNumber */ 0, aSample->pc, aSample->sp, &nativeStack);
-
- uint32_t maxFrames = uint32_t(nativeStack.size - nativeStack.count);
- // win X64 doesn't support disabling frame pointers emission so we need
- // to fallback to using StackWalk64 which is slower.
-#if defined(XP_MACOSX) || (defined(XP_WIN) && !defined(V8_HOST_ARCH_X64))
- void *stackEnd = aSample->threadProfile->GetStackTop();
- bool rv = true;
- if (aSample->fp >= aSample->sp && aSample->fp <= stackEnd)
- rv = FramePointerStackWalk(StackWalkCallback, /* skipFrames */ 0,
- maxFrames, &nativeStack,
- reinterpret_cast<void**>(aSample->fp), stackEnd);
-#else
- void *platformData = nullptr;
-
- uintptr_t thread = GetThreadHandle(aSample->threadProfile->GetPlatformData());
- MOZ_ASSERT(thread);
- bool rv = MozStackWalk(StackWalkCallback, /* skipFrames */ 0, maxFrames,
- &nativeStack, thread, platformData);
-#endif
- if (rv)
- mergeStacksIntoProfile(aProfile, aSample, nativeStack);
-}
-#endif
-
-
-#ifdef USE_EHABI_STACKWALK
-void GeckoSampler::doNativeBacktrace(ThreadProfile &aProfile, TickSample* aSample)
-{
- void *pc_array[1000];
- void *sp_array[1000];
- NativeStack nativeStack = {
- pc_array,
- sp_array,
- mozilla::ArrayLength(pc_array),
- 0
- };
-
- const mcontext_t *mcontext = &reinterpret_cast<ucontext_t *>(aSample->context)->uc_mcontext;
- mcontext_t savedContext;
- PseudoStack *pseudoStack = aProfile.GetPseudoStack();
-
- nativeStack.count = 0;
- // The pseudostack contains an "EnterJIT" frame whenever we enter
- // JIT code with profiling enabled; the stack pointer value points
- // the saved registers. We use this to unwind resume unwinding
- // after encounting JIT code.
- for (uint32_t i = pseudoStack->stackSize(); i > 0; --i) {
- // The pseudostack grows towards higher indices, so we iterate
- // backwards (from callee to caller).
- volatile StackEntry &entry = pseudoStack->mStack[i - 1];
- if (!entry.isJs() && strcmp(entry.label(), "EnterJIT") == 0) {
- // Found JIT entry frame. Unwind up to that point (i.e., force
- // the stack walk to stop before the block of saved registers;
- // note that it yields nondecreasing stack pointers), then restore
- // the saved state.
- uint32_t *vSP = reinterpret_cast<uint32_t*>(entry.stackAddress());
-
- nativeStack.count += EHABIStackWalk(*mcontext,
- /* stackBase = */ vSP,
- sp_array + nativeStack.count,
- pc_array + nativeStack.count,
- nativeStack.size - nativeStack.count);
-
- memset(&savedContext, 0, sizeof(savedContext));
- // See also: struct EnterJITStack in js/src/jit/arm/Trampoline-arm.cpp
- savedContext.arm_r4 = *vSP++;
- savedContext.arm_r5 = *vSP++;
- savedContext.arm_r6 = *vSP++;
- savedContext.arm_r7 = *vSP++;
- savedContext.arm_r8 = *vSP++;
- savedContext.arm_r9 = *vSP++;
- savedContext.arm_r10 = *vSP++;
- savedContext.arm_fp = *vSP++;
- savedContext.arm_lr = *vSP++;
- savedContext.arm_sp = reinterpret_cast<uint32_t>(vSP);
- savedContext.arm_pc = savedContext.arm_lr;
- mcontext = &savedContext;
- }
- }
-
- // Now unwind whatever's left (starting from either the last EnterJIT
- // frame or, if no EnterJIT was found, the original registers).
- nativeStack.count += EHABIStackWalk(*mcontext,
- aProfile.GetStackTop(),
- sp_array + nativeStack.count,
- pc_array + nativeStack.count,
- nativeStack.size - nativeStack.count);
-
- mergeStacksIntoProfile(aProfile, aSample, nativeStack);
-}
-#endif
-
-
-#ifdef USE_LUL_STACKWALK
-void GeckoSampler::doNativeBacktrace(ThreadProfile &aProfile, TickSample* aSample)
-{
- const mcontext_t* mc
- = &reinterpret_cast<ucontext_t *>(aSample->context)->uc_mcontext;
-
- lul::UnwindRegs startRegs;
- memset(&startRegs, 0, sizeof(startRegs));
-
-# if defined(SPS_PLAT_amd64_linux)
- startRegs.xip = lul::TaggedUWord(mc->gregs[REG_RIP]);
- startRegs.xsp = lul::TaggedUWord(mc->gregs[REG_RSP]);
- startRegs.xbp = lul::TaggedUWord(mc->gregs[REG_RBP]);
-# elif defined(SPS_PLAT_arm_android)
- startRegs.r15 = lul::TaggedUWord(mc->arm_pc);
- startRegs.r14 = lul::TaggedUWord(mc->arm_lr);
- startRegs.r13 = lul::TaggedUWord(mc->arm_sp);
- startRegs.r12 = lul::TaggedUWord(mc->arm_ip);
- startRegs.r11 = lul::TaggedUWord(mc->arm_fp);
- startRegs.r7 = lul::TaggedUWord(mc->arm_r7);
-# elif defined(SPS_PLAT_x86_linux) || defined(SPS_PLAT_x86_android)
- startRegs.xip = lul::TaggedUWord(mc->gregs[REG_EIP]);
- startRegs.xsp = lul::TaggedUWord(mc->gregs[REG_ESP]);
- startRegs.xbp = lul::TaggedUWord(mc->gregs[REG_EBP]);
-# else
-# error "Unknown plat"
-# endif
-
- /* Copy up to N_STACK_BYTES from rsp-REDZONE upwards, but not
- going past the stack's registered top point. Do some basic
- sanity checks too. This assumes that the TaggedUWord holding
- the stack pointer value is valid, but it should be, since it
- was constructed that way in the code just above. */
-
- lul::StackImage stackImg;
-
- {
-# if defined(SPS_PLAT_amd64_linux)
- uintptr_t rEDZONE_SIZE = 128;
- uintptr_t start = startRegs.xsp.Value() - rEDZONE_SIZE;
-# elif defined(SPS_PLAT_arm_android)
- uintptr_t rEDZONE_SIZE = 0;
- uintptr_t start = startRegs.r13.Value() - rEDZONE_SIZE;
-# elif defined(SPS_PLAT_x86_linux) || defined(SPS_PLAT_x86_android)
- uintptr_t rEDZONE_SIZE = 0;
- uintptr_t start = startRegs.xsp.Value() - rEDZONE_SIZE;
-# else
-# error "Unknown plat"
-# endif
- uintptr_t end = reinterpret_cast<uintptr_t>(aProfile.GetStackTop());
- uintptr_t ws = sizeof(void*);
- start &= ~(ws-1);
- end &= ~(ws-1);
- uintptr_t nToCopy = 0;
- if (start < end) {
- nToCopy = end - start;
- if (nToCopy > lul::N_STACK_BYTES)
- nToCopy = lul::N_STACK_BYTES;
- }
- MOZ_ASSERT(nToCopy <= lul::N_STACK_BYTES);
- stackImg.mLen = nToCopy;
- stackImg.mStartAvma = start;
- if (nToCopy > 0) {
- memcpy(&stackImg.mContents[0], (void*)start, nToCopy);
- (void)VALGRIND_MAKE_MEM_DEFINED(&stackImg.mContents[0], nToCopy);
- }
- }
-
- // The maximum number of frames that LUL will produce. Setting it
- // too high gives a risk of it wasting a lot of time looping on
- // corrupted stacks.
- const int MAX_NATIVE_FRAMES = 256;
-
- size_t scannedFramesAllowed = 0;
-
- uintptr_t framePCs[MAX_NATIVE_FRAMES];
- uintptr_t frameSPs[MAX_NATIVE_FRAMES];
- size_t framesAvail = mozilla::ArrayLength(framePCs);
- size_t framesUsed = 0;
- size_t scannedFramesAcquired = 0;
- sLUL->Unwind( &framePCs[0], &frameSPs[0],
- &framesUsed, &scannedFramesAcquired,
- framesAvail, scannedFramesAllowed,
- &startRegs, &stackImg );
-
- NativeStack nativeStack = {
- reinterpret_cast<void**>(framePCs),
- reinterpret_cast<void**>(frameSPs),
- mozilla::ArrayLength(framePCs),
- 0
- };
-
- nativeStack.count = framesUsed;
-
- mergeStacksIntoProfile(aProfile, aSample, nativeStack);
-
- // Update stats in the LUL stats object. Unfortunately this requires
- // three global memory operations.
- sLUL->mStats.mContext += 1;
- sLUL->mStats.mCFI += framesUsed - 1 - scannedFramesAcquired;
- sLUL->mStats.mScanned += scannedFramesAcquired;
-}
-#endif
-
-
-static
-void doSampleStackTrace(ThreadProfile &aProfile, TickSample *aSample, bool aAddLeafAddresses)
-{
- NativeStack nativeStack = { nullptr, nullptr, 0, 0 };
- mergeStacksIntoProfile(aProfile, aSample, nativeStack);
-
-#ifdef ENABLE_SPS_LEAF_DATA
- if (aSample && aAddLeafAddresses) {
- aProfile.addTag(ProfileEntry('l', (void*)aSample->pc));
-#ifdef ENABLE_ARM_LR_SAVING
- aProfile.addTag(ProfileEntry('L', (void*)aSample->lr));
-#endif
- }
-#endif
-}
-
-void GeckoSampler::Tick(TickSample* sample)
-{
- // Don't allow for ticks to happen within other ticks.
- InplaceTick(sample);
-}
-
-void GeckoSampler::InplaceTick(TickSample* sample)
-{
- ThreadProfile& currThreadProfile = *sample->threadProfile;
-
- currThreadProfile.addTag(ProfileEntry('T', currThreadProfile.ThreadId()));
-
- if (sample) {
- mozilla::TimeDuration delta = sample->timestamp - sStartTime;
- currThreadProfile.addTag(ProfileEntry('t', delta.ToMilliseconds()));
- }
-
- PseudoStack* stack = currThreadProfile.GetPseudoStack();
-
-#if defined(USE_NS_STACKWALK) || defined(USE_EHABI_STACKWALK) || \
- defined(USE_LUL_STACKWALK)
- if (mUseStackWalk) {
- doNativeBacktrace(currThreadProfile, sample);
- } else {
- doSampleStackTrace(currThreadProfile, sample, mAddLeafAddresses);
- }
-#else
- doSampleStackTrace(currThreadProfile, sample, mAddLeafAddresses);
-#endif
-
- // Don't process the PeudoStack's markers if we're
- // synchronously sampling the current thread.
- if (!sample->isSamplingCurrentThread) {
- ProfilerMarkerLinkedList* pendingMarkersList = stack->getPendingMarkers();
- while (pendingMarkersList && pendingMarkersList->peek()) {
- ProfilerMarker* marker = pendingMarkersList->popHead();
- currThreadProfile.addStoredMarker(marker);
- currThreadProfile.addTag(ProfileEntry('m', marker));
- }
- }
-
-#ifndef SPS_STANDALONE
- if (sample && currThreadProfile.GetThreadResponsiveness()->HasData()) {
- mozilla::TimeDuration delta = currThreadProfile.GetThreadResponsiveness()->GetUnresponsiveDuration(sample->timestamp);
- currThreadProfile.addTag(ProfileEntry('r', delta.ToMilliseconds()));
- }
-#endif
-
- // rssMemory is equal to 0 when we are not recording.
- if (sample && sample->rssMemory != 0) {
- currThreadProfile.addTag(ProfileEntry('R', static_cast<double>(sample->rssMemory)));
- }
-
- // ussMemory is equal to 0 when we are not recording.
- if (sample && sample->ussMemory != 0) {
- currThreadProfile.addTag(ProfileEntry('U', static_cast<double>(sample->ussMemory)));
- }
-
-#if defined(XP_WIN)
- if (mProfilePower) {
- mIntelPowerGadget->TakeSample();
- currThreadProfile.addTag(ProfileEntry('p', static_cast<double>(mIntelPowerGadget->GetTotalPackagePowerInWatts())));
- }
-#endif
-
- if (sLastFrameNumber != sFrameNumber) {
- currThreadProfile.addTag(ProfileEntry('f', sFrameNumber));
- sLastFrameNumber = sFrameNumber;
- }
-}
-
-namespace {
-
-SyncProfile* NewSyncProfile()
-{
- PseudoStack* stack = tlsPseudoStack.get();
- if (!stack) {
- MOZ_ASSERT(stack);
- return nullptr;
- }
- Thread::tid_t tid = Thread::GetCurrentId();
-
- ThreadInfo* info = new ThreadInfo("SyncProfile", tid, false, stack, nullptr);
- SyncProfile* profile = new SyncProfile(info, GET_BACKTRACE_DEFAULT_ENTRY);
- return profile;
-}
-
-} // namespace
-
-SyncProfile* GeckoSampler::GetBacktrace()
-{
- SyncProfile* profile = NewSyncProfile();
-
- TickSample sample;
- sample.threadProfile = profile;
-
-#if defined(HAVE_NATIVE_UNWIND) || defined(USE_LUL_STACKWALK)
-#if defined(XP_WIN) || defined(LINUX)
- tickcontext_t context;
- sample.PopulateContext(&context);
-#elif defined(XP_MACOSX)
- sample.PopulateContext(nullptr);
-#endif
-#endif
-
- sample.isSamplingCurrentThread = true;
- sample.timestamp = mozilla::TimeStamp::Now();
-
- profile->BeginUnwind();
- Tick(&sample);
- profile->EndUnwind();
-
- return profile;
-}
-
-void
-GeckoSampler::GetBufferInfo(uint32_t *aCurrentPosition, uint32_t *aTotalSize, uint32_t *aGeneration)
-{
- *aCurrentPosition = mBuffer->mWritePos;
- *aTotalSize = mBuffer->mEntrySize;
- *aGeneration = mBuffer->mGeneration;
-}
diff --git a/tools/profiler/core/GeckoSampler.h b/tools/profiler/core/GeckoSampler.h
deleted file mode 100644
index da1fdfe43..000000000
--- a/tools/profiler/core/GeckoSampler.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef GeckoSampler_h
-#define GeckoSampler_h
-
-#include "platform.h"
-#include "ProfileEntry.h"
-#include "mozilla/Vector.h"
-#include "ThreadProfile.h"
-#include "ThreadInfo.h"
-#ifndef SPS_STANDALONE
-#include "IntelPowerGadget.h"
-#endif
-#ifdef MOZ_TASK_TRACER
-#include "GeckoTaskTracer.h"
-#endif
-
-#include <algorithm>
-
-namespace mozilla {
-class ProfileGatherer;
-} // namespace mozilla
-
-typedef mozilla::Vector<std::string> ThreadNameFilterList;
-typedef mozilla::Vector<std::string> FeatureList;
-
-static bool
-threadSelected(ThreadInfo* aInfo, const ThreadNameFilterList &aThreadNameFilters) {
- if (aThreadNameFilters.empty()) {
- return true;
- }
-
- std::string name = aInfo->Name();
- std::transform(name.begin(), name.end(), name.begin(), ::tolower);
-
- for (uint32_t i = 0; i < aThreadNameFilters.length(); ++i) {
- std::string filter = aThreadNameFilters[i];
- std::transform(filter.begin(), filter.end(), filter.begin(), ::tolower);
-
- // Crude, non UTF-8 compatible, case insensitive substring search
- if (name.find(filter) != std::string::npos) {
- return true;
- }
- }
-
- return false;
-}
-
-extern mozilla::TimeStamp sLastTracerEvent;
-extern int sFrameNumber;
-extern int sLastFrameNumber;
-
-class GeckoSampler: public Sampler {
- public:
- GeckoSampler(double aInterval, int aEntrySize,
- const char** aFeatures, uint32_t aFeatureCount,
- const char** aThreadNameFilters, uint32_t aFilterCount);
- ~GeckoSampler();
-
- void RegisterThread(ThreadInfo* aInfo) {
- if (!aInfo->IsMainThread() && !mProfileThreads) {
- return;
- }
-
- if (!threadSelected(aInfo, mThreadNameFilters)) {
- return;
- }
-
- ThreadProfile* profile = new ThreadProfile(aInfo, mBuffer);
- aInfo->SetProfile(profile);
- }
-
- // Called within a signal. This function must be reentrant
- virtual void Tick(TickSample* sample) override;
-
- // Immediately captures the calling thread's call stack and returns it.
- virtual SyncProfile* GetBacktrace() override;
-
- // Called within a signal. This function must be reentrant
- virtual void RequestSave() override
- {
- mSaveRequested = true;
-#ifdef MOZ_TASK_TRACER
- if (mTaskTracer) {
- mozilla::tasktracer::StopLogging();
- }
-#endif
- }
-
- virtual void HandleSaveRequest() override;
- virtual void DeleteExpiredMarkers() override;
-
- ThreadProfile* GetPrimaryThreadProfile()
- {
- if (!mPrimaryThreadProfile) {
- ::MutexAutoLock lock(*sRegisteredThreadsMutex);
-
- for (uint32_t i = 0; i < sRegisteredThreads->size(); i++) {
- ThreadInfo* info = sRegisteredThreads->at(i);
- if (info->IsMainThread() && !info->IsPendingDelete()) {
- mPrimaryThreadProfile = info->Profile();
- break;
- }
- }
- }
-
- return mPrimaryThreadProfile;
- }
-
- void ToStreamAsJSON(std::ostream& stream, double aSinceTime = 0);
-#ifndef SPS_STANDALONE
- virtual JSObject *ToJSObject(JSContext *aCx, double aSinceTime = 0);
- void GetGatherer(nsISupports** aRetVal);
-#endif
- mozilla::UniquePtr<char[]> ToJSON(double aSinceTime = 0);
- virtual void ToJSObjectAsync(double aSinceTime = 0, mozilla::dom::Promise* aPromise = 0);
- void StreamMetaJSCustomObject(SpliceableJSONWriter& aWriter);
- void StreamTaskTracer(SpliceableJSONWriter& aWriter);
- void FlushOnJSShutdown(JSContext* aContext);
- bool ProfileJS() const { return mProfileJS; }
- bool ProfileJava() const { return mProfileJava; }
- bool ProfileGPU() const { return mProfileGPU; }
- bool ProfilePower() const { return mProfilePower; }
- bool ProfileThreads() const override { return mProfileThreads; }
- bool InPrivacyMode() const { return mPrivacyMode; }
- bool AddMainThreadIO() const { return mAddMainThreadIO; }
- bool ProfileMemory() const { return mProfileMemory; }
- bool TaskTracer() const { return mTaskTracer; }
- bool LayersDump() const { return mLayersDump; }
- bool DisplayListDump() const { return mDisplayListDump; }
- bool ProfileRestyle() const { return mProfileRestyle; }
- const ThreadNameFilterList& ThreadNameFilters() { return mThreadNameFilters; }
- const FeatureList& Features() { return mFeatures; }
-
- void GetBufferInfo(uint32_t *aCurrentPosition, uint32_t *aTotalSize, uint32_t *aGeneration);
-
-protected:
- // Called within a signal. This function must be reentrant
- virtual void InplaceTick(TickSample* sample);
-
- // Not implemented on platforms which do not support backtracing
- void doNativeBacktrace(ThreadProfile &aProfile, TickSample* aSample);
-
- void StreamJSON(SpliceableJSONWriter& aWriter, double aSinceTime);
-
- // This represent the application's main thread (SAMPLER_INIT)
- ThreadProfile* mPrimaryThreadProfile;
- RefPtr<ProfileBuffer> mBuffer;
- bool mSaveRequested;
- bool mAddLeafAddresses;
- bool mUseStackWalk;
- bool mProfileJS;
- bool mProfileGPU;
- bool mProfileThreads;
- bool mProfileJava;
- bool mProfilePower;
- bool mLayersDump;
- bool mDisplayListDump;
- bool mProfileRestyle;
-
- // Keep the thread filter to check against new thread that
- // are started while profiling
- ThreadNameFilterList mThreadNameFilters;
- FeatureList mFeatures;
- bool mPrivacyMode;
- bool mAddMainThreadIO;
- bool mProfileMemory;
- bool mTaskTracer;
-#if defined(XP_WIN)
- IntelPowerGadget* mIntelPowerGadget;
-#endif
-
-private:
- RefPtr<mozilla::ProfileGatherer> mGatherer;
-};
-
-#endif
-
diff --git a/tools/profiler/core/IntelPowerGadget.cpp b/tools/profiler/core/IntelPowerGadget.cpp
deleted file mode 100644
index fe267b80f..000000000
--- a/tools/profiler/core/IntelPowerGadget.cpp
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * Copyright 2013, Intel Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Author: Joe Olivas <joseph.k.olivas@intel.com>
- */
-
-#include "nsDebug.h"
-#include "nsString.h"
-#include "IntelPowerGadget.h"
-#include "prenv.h"
-
-IntelPowerGadget::IntelPowerGadget() :
- libpowergadget(nullptr),
- Initialize(nullptr),
- GetNumNodes(nullptr),
- GetMsrName(nullptr),
- GetMsrFunc(nullptr),
- ReadMSR(nullptr),
- WriteMSR(nullptr),
- GetIAFrequency(nullptr),
- GetTDP(nullptr),
- GetMaxTemperature(nullptr),
- GetThresholds(nullptr),
- GetTemperature(nullptr),
- ReadSample(nullptr),
- GetSysTime(nullptr),
- GetRDTSC(nullptr),
- GetTimeInterval(nullptr),
- GetBaseFrequency(nullptr),
- GetPowerData(nullptr),
- StartLog(nullptr),
- StopLog(nullptr),
- GetNumMsrs(nullptr),
- packageMSR(-1),
- cpuMSR(-1),
- freqMSR(-1),
- tempMSR(-1)
-{
-}
-
-bool
-IntelPowerGadget::Init()
-{
- bool success = false;
- const char *path = PR_GetEnv("IPG_Dir");
- nsCString ipg_library;
- if (path && *path) {
- ipg_library.Append(path);
- ipg_library.Append('/');
- ipg_library.AppendLiteral(PG_LIBRARY_NAME);
- libpowergadget = PR_LoadLibrary(ipg_library.get());
- }
-
- if(libpowergadget) {
- Initialize = (IPGInitialize) PR_FindFunctionSymbol(libpowergadget, "IntelEnergyLibInitialize");
- GetNumNodes = (IPGGetNumNodes) PR_FindFunctionSymbol(libpowergadget, "GetNumNodes");
- GetMsrName = (IPGGetMsrName) PR_FindFunctionSymbol(libpowergadget, "GetMsrName");
- GetMsrFunc = (IPGGetMsrFunc) PR_FindFunctionSymbol(libpowergadget, "GetMsrFunc");
- ReadMSR = (IPGReadMSR) PR_FindFunctionSymbol(libpowergadget, "ReadMSR");
- WriteMSR = (IPGWriteMSR) PR_FindFunctionSymbol(libpowergadget, "WriteMSR");
- GetIAFrequency = (IPGGetIAFrequency) PR_FindFunctionSymbol(libpowergadget, "GetIAFrequency");
- GetTDP = (IPGGetTDP) PR_FindFunctionSymbol(libpowergadget, "GetTDP");
- GetMaxTemperature = (IPGGetMaxTemperature) PR_FindFunctionSymbol(libpowergadget, "GetMaxTemperature");
- GetThresholds = (IPGGetThresholds) PR_FindFunctionSymbol(libpowergadget, "GetThresholds");
- GetTemperature = (IPGGetTemperature) PR_FindFunctionSymbol(libpowergadget, "GetTemperature");
- ReadSample = (IPGReadSample) PR_FindFunctionSymbol(libpowergadget, "ReadSample");
- GetSysTime = (IPGGetSysTime) PR_FindFunctionSymbol(libpowergadget, "GetSysTime");
- GetRDTSC = (IPGGetRDTSC) PR_FindFunctionSymbol(libpowergadget, "GetRDTSC");
- GetTimeInterval = (IPGGetTimeInterval) PR_FindFunctionSymbol(libpowergadget, "GetTimeInterval");
- GetBaseFrequency = (IPGGetBaseFrequency) PR_FindFunctionSymbol(libpowergadget, "GetBaseFrequency");
- GetPowerData = (IPGGetPowerData) PR_FindFunctionSymbol(libpowergadget, "GetPowerData");
- StartLog = (IPGStartLog) PR_FindFunctionSymbol(libpowergadget, "StartLog");
- StopLog = (IPGStopLog) PR_FindFunctionSymbol(libpowergadget, "StopLog");
- GetNumMsrs = (IPGGetNumMsrs) PR_FindFunctionSymbol(libpowergadget, "GetNumMsrs");
- }
-
- if(Initialize) {
- Initialize();
- int msrCount = GetNumberMsrs();
- wchar_t name[1024] = {0};
- for(int i = 0; i < msrCount; ++i) {
- GetMsrName(i, name);
- int func = 0;
- GetMsrFunc(i, &func);
- // MSR for frequency
- if(wcscmp(name, L"CPU Frequency") == 0 && (func == 0)) {
- this->freqMSR = i;
- }
- // MSR for Package
- else if(wcscmp(name, L"Processor") == 0 && (func == 1)) {
- this->packageMSR = i;
- }
- // MSR for CPU
- else if(wcscmp(name, L"IA") == 0 && (func == 1)) {
- this->cpuMSR = i;
- }
- // MSR for Temperature
- else if(wcscmp(name, L"Package") == 0 && (func == 2)) {
- this->tempMSR = i;
- }
- }
- // Grab one sample at startup for a diff
- TakeSample();
- success = true;
- }
- return success;
-}
-
-IntelPowerGadget::~IntelPowerGadget()
-{
- if(libpowergadget) {
- NS_WARNING("Unloading PowerGadget library!\n");
- PR_UnloadLibrary(libpowergadget);
- libpowergadget = nullptr;
- Initialize = nullptr;
- GetNumNodes = nullptr;
- GetMsrName = nullptr;
- GetMsrFunc = nullptr;
- ReadMSR = nullptr;
- WriteMSR = nullptr;
- GetIAFrequency = nullptr;
- GetTDP = nullptr;
- GetMaxTemperature = nullptr;
- GetThresholds = nullptr;
- GetTemperature = nullptr;
- ReadSample = nullptr;
- GetSysTime = nullptr;
- GetRDTSC = nullptr;
- GetTimeInterval = nullptr;
- GetBaseFrequency = nullptr;
- GetPowerData = nullptr;
- StartLog = nullptr;
- StopLog = nullptr;
- GetNumMsrs = nullptr;
- }
-}
-
-int
-IntelPowerGadget::GetNumberNodes()
-{
- int nodes = 0;
- if(GetNumNodes) {
- int ok = GetNumNodes(&nodes);
- }
- return nodes;
-}
-
-int
-IntelPowerGadget::GetNumberMsrs()
-{
- int msrs = 0;
- if(GetNumMsrs) {
- int ok = GetNumMsrs(&msrs);
- }
- return msrs;
-}
-
-int
-IntelPowerGadget::GetCPUFrequency(int node)
-{
- int frequency = 0;
- if(GetIAFrequency) {
- int ok = GetIAFrequency(node, &frequency);
- }
- return frequency;
-}
-
-double
-IntelPowerGadget::GetTdp(int node)
-{
- double tdp = 0.0;
- if(GetTDP) {
- int ok = GetTDP(node, &tdp);
- }
- return tdp;
-}
-
-int
-IntelPowerGadget::GetMaxTemp(int node)
-{
- int maxTemperatureC = 0;
- if(GetMaxTemperature) {
- int ok = GetMaxTemperature(node, &maxTemperatureC);
- }
- return maxTemperatureC;
-}
-
-int
-IntelPowerGadget::GetTemp(int node)
-{
- int temperatureC = 0;
- if(GetTemperature) {
- int ok = GetTemperature(node, &temperatureC);
- }
- return temperatureC;
-}
-
-int
-IntelPowerGadget::TakeSample()
-{
- int ok = 0;
- if(ReadSample) {
- ok = ReadSample();
- }
- return ok;
-}
-
-uint64_t
-IntelPowerGadget::GetRdtsc()
-{
- uint64_t rdtsc = 0;
- if(GetRDTSC) {
- int ok = GetRDTSC(&rdtsc);
- }
- return rdtsc;
-}
-
-double
-IntelPowerGadget::GetInterval()
-{
- double interval = 0.0;
- if(GetTimeInterval) {
- int ok = GetTimeInterval(&interval);
- }
- return interval;
-}
-
-double
-IntelPowerGadget::GetCPUBaseFrequency(int node)
-{
- double freq = 0.0;
- if(GetBaseFrequency) {
- int ok = GetBaseFrequency(node, &freq);
- }
- return freq;
-}
-
-double
-IntelPowerGadget::GetTotalPackagePowerInWatts()
-{
- int nodes = GetNumberNodes();
- double totalPower = 0.0;
- for(int i = 0; i < nodes; ++i) {
- totalPower += GetPackagePowerInWatts(i);
- }
- return totalPower;
-}
-
-double
-IntelPowerGadget::GetPackagePowerInWatts(int node)
-{
- int numResult = 0;
- double result[] = {0.0, 0.0, 0.0};
- if(GetPowerData && packageMSR != -1) {
- int ok = GetPowerData(node, packageMSR, result, &numResult);
- }
- return result[0];
-}
-
-double
-IntelPowerGadget::GetTotalCPUPowerInWatts()
-{
- int nodes = GetNumberNodes();
- double totalPower = 0.0;
- for(int i = 0; i < nodes; ++i) {
- totalPower += GetCPUPowerInWatts(i);
- }
- return totalPower;
-}
-
-double
-IntelPowerGadget::GetCPUPowerInWatts(int node)
-{
- int numResult = 0;
- double result[] = {0.0, 0.0, 0.0};
- if(GetPowerData && cpuMSR != -1) {
- int ok = GetPowerData(node, cpuMSR, result, &numResult);
- }
- return result[0];
-}
-
-double
-IntelPowerGadget::GetTotalGPUPowerInWatts()
-{
- int nodes = GetNumberNodes();
- double totalPower = 0.0;
- for(int i = 0; i < nodes; ++i) {
- totalPower += GetGPUPowerInWatts(i);
- }
- return totalPower;
-}
-
-double
-IntelPowerGadget::GetGPUPowerInWatts(int node)
-{
- return 0.0;
-}
-
diff --git a/tools/profiler/core/IntelPowerGadget.h b/tools/profiler/core/IntelPowerGadget.h
deleted file mode 100644
index 4a24215b6..000000000
--- a/tools/profiler/core/IntelPowerGadget.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright 2013, Intel Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Author: Joe Olivas <joseph.k.olivas@intel.com>
- */
-
-#ifndef profiler_IntelPowerGadget_h
-#define profiler_IntelPowerGadget_h
-
-#ifdef _MSC_VER
-typedef __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#else
-#include <stdint.h>
-#endif
-#include "prlink.h"
-
-typedef int (*IPGInitialize) ();
-typedef int (*IPGGetNumNodes) (int *nNodes);
-typedef int (*IPGGetNumMsrs) (int *nMsr);
-typedef int (*IPGGetMsrName) (int iMsr, wchar_t *szName);
-typedef int (*IPGGetMsrFunc) (int iMsr, int *pFuncID);
-typedef int (*IPGReadMSR) (int iNode, unsigned int address, uint64_t *value);
-typedef int (*IPGWriteMSR) (int iNode, unsigned int address, uint64_t value);
-typedef int (*IPGGetIAFrequency) (int iNode, int *freqInMHz);
-typedef int (*IPGGetTDP) (int iNode, double *TDP);
-typedef int (*IPGGetMaxTemperature) (int iNode, int *degreeC);
-typedef int (*IPGGetThresholds) (int iNode, int *degree1C, int *degree2C);
-typedef int (*IPGGetTemperature) (int iNode, int *degreeC);
-typedef int (*IPGReadSample) ();
-typedef int (*IPGGetSysTime) (void *pSysTime);
-typedef int (*IPGGetRDTSC) (uint64_t *pTSC);
-typedef int (*IPGGetTimeInterval) (double *pOffset);
-typedef int (*IPGGetBaseFrequency) (int iNode, double *pBaseFrequency);
-typedef int (*IPGGetPowerData) (int iNode, int iMSR, double *pResult, int *nResult);
-typedef int (*IPGStartLog) (wchar_t *szFileName);
-typedef int (*IPGStopLog) ();
-
-#if defined(__x86_64__) || defined(__x86_64) || defined(_M_AMD64)
-#define PG_LIBRARY_NAME "EnergyLib64"
-#else
-#define PG_LIBRARY_NAME "EnergyLib32"
-#endif
-
-
-class IntelPowerGadget
-{
-public:
-
- IntelPowerGadget();
- ~IntelPowerGadget();
-
- // Fails if initialization is incomplete
- bool Init();
-
- // Returns the number of packages on the system
- int GetNumberNodes();
-
- // Returns the number of MSRs being tracked
- int GetNumberMsrs();
-
- // Given a node, returns the temperature
- int GetCPUFrequency(int);
-
- // Returns the TDP of the given node
- double GetTdp(int);
-
- // Returns the maximum temperature for the given node
- int GetMaxTemp(int);
-
- // Returns the current temperature in degrees C
- // of the given node
- int GetTemp(int);
-
- // Takes a sample of data. Must be called before
- // any current data is retrieved.
- int TakeSample();
-
- // Gets the timestamp of the most recent sample
- uint64_t GetRdtsc();
-
- // returns number of seconds between the last
- // two samples
- double GetInterval();
-
- // Returns the base frequency for the given node
- double GetCPUBaseFrequency(int node);
-
- // Returns the combined package power for all
- // packages on the system for the last sample.
- double GetTotalPackagePowerInWatts();
- double GetPackagePowerInWatts(int node);
-
- // Returns the combined CPU power for all
- // packages on the system for the last sample.
- // If the reading is not available, returns 0.0
- double GetTotalCPUPowerInWatts();
- double GetCPUPowerInWatts(int node);
-
- // Returns the combined GPU power for all
- // packages on the system for the last sample.
- // If the reading is not available, returns 0.0
- double GetTotalGPUPowerInWatts();
- double GetGPUPowerInWatts(int node);
-
-private:
-
- PRLibrary *libpowergadget;
- IPGInitialize Initialize;
- IPGGetNumNodes GetNumNodes;
- IPGGetNumMsrs GetNumMsrs;
- IPGGetMsrName GetMsrName;
- IPGGetMsrFunc GetMsrFunc;
- IPGReadMSR ReadMSR;
- IPGWriteMSR WriteMSR;
- IPGGetIAFrequency GetIAFrequency;
- IPGGetTDP GetTDP;
- IPGGetMaxTemperature GetMaxTemperature;
- IPGGetThresholds GetThresholds;
- IPGGetTemperature GetTemperature;
- IPGReadSample ReadSample;
- IPGGetSysTime GetSysTime;
- IPGGetRDTSC GetRDTSC;
- IPGGetTimeInterval GetTimeInterval;
- IPGGetBaseFrequency GetBaseFrequency;
- IPGGetPowerData GetPowerData;
- IPGStartLog StartLog;
- IPGStopLog StopLog;
-
- int packageMSR;
- int cpuMSR;
- int freqMSR;
- int tempMSR;
-};
-
-#endif // profiler_IntelPowerGadget_h
diff --git a/tools/profiler/core/ProfileBuffer.cpp b/tools/profiler/core/ProfileBuffer.cpp
deleted file mode 100644
index a4b91d8fc..000000000
--- a/tools/profiler/core/ProfileBuffer.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "ProfileBuffer.h"
-
-ProfileBuffer::ProfileBuffer(int aEntrySize)
- : mEntries(MakeUnique<ProfileEntry[]>(aEntrySize))
- , mWritePos(0)
- , mReadPos(0)
- , mEntrySize(aEntrySize)
- , mGeneration(0)
-{
-}
-
-ProfileBuffer::~ProfileBuffer()
-{
- while (mStoredMarkers.peek()) {
- delete mStoredMarkers.popHead();
- }
-}
-
-// Called from signal, call only reentrant functions
-void ProfileBuffer::addTag(const ProfileEntry& aTag)
-{
- mEntries[mWritePos++] = aTag;
- if (mWritePos == mEntrySize) {
- // Wrapping around may result in things referenced in the buffer (e.g.,
- // JIT code addresses and markers) being incorrectly collected.
- MOZ_ASSERT(mGeneration != UINT32_MAX);
- mGeneration++;
- mWritePos = 0;
- }
- if (mWritePos == mReadPos) {
- // Keep one slot open.
- mEntries[mReadPos] = ProfileEntry();
- mReadPos = (mReadPos + 1) % mEntrySize;
- }
-}
-
-void ProfileBuffer::addStoredMarker(ProfilerMarker *aStoredMarker) {
- aStoredMarker->SetGeneration(mGeneration);
- mStoredMarkers.insert(aStoredMarker);
-}
-
-void ProfileBuffer::deleteExpiredStoredMarkers() {
- // Delete markers of samples that have been overwritten due to circular
- // buffer wraparound.
- uint32_t generation = mGeneration;
- while (mStoredMarkers.peek() &&
- mStoredMarkers.peek()->HasExpired(generation)) {
- delete mStoredMarkers.popHead();
- }
-}
-
-void ProfileBuffer::reset() {
- mGeneration += 2;
- mReadPos = mWritePos = 0;
-}
-
-#define DYNAMIC_MAX_STRING 8192
-
-char* ProfileBuffer::processDynamicTag(int readPos,
- int* tagsConsumed, char* tagBuff)
-{
- int readAheadPos = (readPos + 1) % mEntrySize;
- int tagBuffPos = 0;
-
- // Read the string stored in mTagData until the null character is seen
- bool seenNullByte = false;
- while (readAheadPos != mWritePos && !seenNullByte) {
- (*tagsConsumed)++;
- ProfileEntry readAheadEntry = mEntries[readAheadPos];
- for (size_t pos = 0; pos < sizeof(void*); pos++) {
- tagBuff[tagBuffPos] = readAheadEntry.mTagChars[pos];
- if (tagBuff[tagBuffPos] == '\0' || tagBuffPos == DYNAMIC_MAX_STRING-2) {
- seenNullByte = true;
- break;
- }
- tagBuffPos++;
- }
- if (!seenNullByte)
- readAheadPos = (readAheadPos + 1) % mEntrySize;
- }
- return tagBuff;
-}
-
-
diff --git a/tools/profiler/core/ProfileBuffer.h b/tools/profiler/core/ProfileBuffer.h
deleted file mode 100644
index 7d90fe385..000000000
--- a/tools/profiler/core/ProfileBuffer.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef MOZ_PROFILE_BUFFER_H
-#define MOZ_PROFILE_BUFFER_H
-
-#include "ProfileEntry.h"
-#include "platform.h"
-#include "ProfileJSONWriter.h"
-#include "mozilla/RefPtr.h"
-#include "mozilla/RefCounted.h"
-
-class ProfileBuffer : public mozilla::RefCounted<ProfileBuffer> {
-public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ProfileBuffer)
-
- explicit ProfileBuffer(int aEntrySize);
-
- virtual ~ProfileBuffer();
-
- void addTag(const ProfileEntry& aTag);
- void StreamSamplesToJSON(SpliceableJSONWriter& aWriter, int aThreadId, double aSinceTime,
- JSContext* cx, UniqueStacks& aUniqueStacks);
- void StreamMarkersToJSON(SpliceableJSONWriter& aWriter, int aThreadId, double aSinceTime,
- UniqueStacks& aUniqueStacks);
- void DuplicateLastSample(int aThreadId);
-
- void addStoredMarker(ProfilerMarker* aStoredMarker);
-
- // The following two methods are not signal safe! They delete markers.
- void deleteExpiredStoredMarkers();
- void reset();
-
-protected:
- char* processDynamicTag(int readPos, int* tagsConsumed, char* tagBuff);
- int FindLastSampleOfThread(int aThreadId);
-
-public:
- // Circular buffer 'Keep One Slot Open' implementation for simplicity
- mozilla::UniquePtr<ProfileEntry[]> mEntries;
-
- // Points to the next entry we will write to, which is also the one at which
- // we need to stop reading.
- int mWritePos;
-
- // Points to the entry at which we can start reading.
- int mReadPos;
-
- // The number of entries in our buffer.
- int mEntrySize;
-
- // How many times mWritePos has wrapped around.
- uint32_t mGeneration;
-
- // Markers that marker entries in the buffer might refer to.
- ProfilerMarkerLinkedList mStoredMarkers;
-};
-
-#endif
diff --git a/tools/profiler/core/ProfileEntry.cpp b/tools/profiler/core/ProfileEntry.cpp
deleted file mode 100644
index 22d53a6f3..000000000
--- a/tools/profiler/core/ProfileEntry.cpp
+++ /dev/null
@@ -1,881 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <ostream>
-#include "platform.h"
-#include "mozilla/HashFunctions.h"
-
-#ifndef SPS_STANDALONE
-#include "nsThreadUtils.h"
-#include "nsXULAppAPI.h"
-
-// JS
-#include "jsapi.h"
-#include "jsfriendapi.h"
-#include "js/TrackedOptimizationInfo.h"
-#endif
-
-// Self
-#include "ProfileEntry.h"
-
-using mozilla::MakeUnique;
-using mozilla::UniquePtr;
-using mozilla::Maybe;
-using mozilla::Some;
-using mozilla::Nothing;
-using mozilla::JSONWriter;
-
-
-////////////////////////////////////////////////////////////////////////
-// BEGIN ProfileEntry
-
-ProfileEntry::ProfileEntry()
- : mTagData(nullptr)
- , mTagName(0)
-{ }
-
-// aTagData must not need release (i.e. be a string from the text segment)
-ProfileEntry::ProfileEntry(char aTagName, const char *aTagData)
- : mTagData(aTagData)
- , mTagName(aTagName)
-{ }
-
-ProfileEntry::ProfileEntry(char aTagName, ProfilerMarker *aTagMarker)
- : mTagMarker(aTagMarker)
- , mTagName(aTagName)
-{ }
-
-ProfileEntry::ProfileEntry(char aTagName, void *aTagPtr)
- : mTagPtr(aTagPtr)
- , mTagName(aTagName)
-{ }
-
-ProfileEntry::ProfileEntry(char aTagName, double aTagDouble)
- : mTagDouble(aTagDouble)
- , mTagName(aTagName)
-{ }
-
-ProfileEntry::ProfileEntry(char aTagName, uintptr_t aTagOffset)
- : mTagOffset(aTagOffset)
- , mTagName(aTagName)
-{ }
-
-ProfileEntry::ProfileEntry(char aTagName, Address aTagAddress)
- : mTagAddress(aTagAddress)
- , mTagName(aTagName)
-{ }
-
-ProfileEntry::ProfileEntry(char aTagName, int aTagInt)
- : mTagInt(aTagInt)
- , mTagName(aTagName)
-{ }
-
-ProfileEntry::ProfileEntry(char aTagName, char aTagChar)
- : mTagChar(aTagChar)
- , mTagName(aTagName)
-{ }
-
-bool ProfileEntry::is_ent_hint(char hintChar) {
- return mTagName == 'h' && mTagChar == hintChar;
-}
-
-bool ProfileEntry::is_ent_hint() {
- return mTagName == 'h';
-}
-
-bool ProfileEntry::is_ent(char tagChar) {
- return mTagName == tagChar;
-}
-
-void* ProfileEntry::get_tagPtr() {
- // No consistency checking. Oh well.
- return mTagPtr;
-}
-
-// END ProfileEntry
-////////////////////////////////////////////////////////////////////////
-
-class JSONSchemaWriter
-{
- JSONWriter& mWriter;
- uint32_t mIndex;
-
-public:
- explicit JSONSchemaWriter(JSONWriter& aWriter)
- : mWriter(aWriter)
- , mIndex(0)
- {
- aWriter.StartObjectProperty("schema");
- }
-
- void WriteField(const char* aName) {
- mWriter.IntProperty(aName, mIndex++);
- }
-
- ~JSONSchemaWriter() {
- mWriter.EndObject();
- }
-};
-
-#ifndef SPS_STANDALONE
-class StreamOptimizationTypeInfoOp : public JS::ForEachTrackedOptimizationTypeInfoOp
-{
- JSONWriter& mWriter;
- UniqueJSONStrings& mUniqueStrings;
- bool mStartedTypeList;
-
-public:
- StreamOptimizationTypeInfoOp(JSONWriter& aWriter, UniqueJSONStrings& aUniqueStrings)
- : mWriter(aWriter)
- , mUniqueStrings(aUniqueStrings)
- , mStartedTypeList(false)
- { }
-
- void readType(const char* keyedBy, const char* name,
- const char* location, Maybe<unsigned> lineno) override {
- if (!mStartedTypeList) {
- mStartedTypeList = true;
- mWriter.StartObjectElement();
- mWriter.StartArrayProperty("typeset");
- }
-
- mWriter.StartObjectElement();
- {
- mUniqueStrings.WriteProperty(mWriter, "keyedBy", keyedBy);
- if (name) {
- mUniqueStrings.WriteProperty(mWriter, "name", name);
- }
- if (location) {
- mUniqueStrings.WriteProperty(mWriter, "location", location);
- }
- if (lineno.isSome()) {
- mWriter.IntProperty("line", *lineno);
- }
- }
- mWriter.EndObject();
- }
-
- void operator()(JS::TrackedTypeSite site, const char* mirType) override {
- if (mStartedTypeList) {
- mWriter.EndArray();
- mStartedTypeList = false;
- } else {
- mWriter.StartObjectElement();
- }
-
- {
- mUniqueStrings.WriteProperty(mWriter, "site", JS::TrackedTypeSiteString(site));
- mUniqueStrings.WriteProperty(mWriter, "mirType", mirType);
- }
- mWriter.EndObject();
- }
-};
-
-// As mentioned in ProfileEntry.h, the JSON format contains many arrays whose
-// elements are laid out according to various schemas to help
-// de-duplication. This RAII class helps write these arrays by keeping track of
-// the last non-null element written and adding the appropriate number of null
-// elements when writing new non-null elements. It also automatically opens and
-// closes an array element on the given JSON writer.
-//
-// Example usage:
-//
-// // Define the schema of elements in this type of array: [FOO, BAR, BAZ]
-// enum Schema : uint32_t {
-// FOO = 0,
-// BAR = 1,
-// BAZ = 2
-// };
-//
-// AutoArraySchemaWriter writer(someJsonWriter, someUniqueStrings);
-// if (shouldWriteFoo) {
-// writer.IntElement(FOO, getFoo());
-// }
-// ... etc ...
-class MOZ_RAII AutoArraySchemaWriter
-{
- friend class AutoObjectWriter;
-
- SpliceableJSONWriter& mJSONWriter;
- UniqueJSONStrings* mStrings;
- uint32_t mNextFreeIndex;
-
-public:
- AutoArraySchemaWriter(SpliceableJSONWriter& aWriter, UniqueJSONStrings& aStrings)
- : mJSONWriter(aWriter)
- , mStrings(&aStrings)
- , mNextFreeIndex(0)
- {
- mJSONWriter.StartArrayElement();
- }
-
- // If you don't have access to a UniqueStrings, you had better not try and
- // write a string element down the line!
- explicit AutoArraySchemaWriter(SpliceableJSONWriter& aWriter)
- : mJSONWriter(aWriter)
- , mStrings(nullptr)
- , mNextFreeIndex(0)
- {
- mJSONWriter.StartArrayElement();
- }
-
- ~AutoArraySchemaWriter() {
- mJSONWriter.EndArray();
- }
-
- void FillUpTo(uint32_t aIndex) {
- MOZ_ASSERT(aIndex >= mNextFreeIndex);
- mJSONWriter.NullElements(aIndex - mNextFreeIndex);
- mNextFreeIndex = aIndex + 1;
- }
-
- void IntElement(uint32_t aIndex, uint32_t aValue) {
- FillUpTo(aIndex);
- mJSONWriter.IntElement(aValue);
- }
-
- void DoubleElement(uint32_t aIndex, double aValue) {
- FillUpTo(aIndex);
- mJSONWriter.DoubleElement(aValue);
- }
-
- void StringElement(uint32_t aIndex, const char* aValue) {
- MOZ_RELEASE_ASSERT(mStrings);
- FillUpTo(aIndex);
- mStrings->WriteElement(mJSONWriter, aValue);
- }
-};
-
-class StreamOptimizationAttemptsOp : public JS::ForEachTrackedOptimizationAttemptOp
-{
- SpliceableJSONWriter& mWriter;
- UniqueJSONStrings& mUniqueStrings;
-
-public:
- StreamOptimizationAttemptsOp(SpliceableJSONWriter& aWriter, UniqueJSONStrings& aUniqueStrings)
- : mWriter(aWriter),
- mUniqueStrings(aUniqueStrings)
- { }
-
- void operator()(JS::TrackedStrategy strategy, JS::TrackedOutcome outcome) override {
- enum Schema : uint32_t {
- STRATEGY = 0,
- OUTCOME = 1
- };
-
- AutoArraySchemaWriter writer(mWriter, mUniqueStrings);
- writer.StringElement(STRATEGY, JS::TrackedStrategyString(strategy));
- writer.StringElement(OUTCOME, JS::TrackedOutcomeString(outcome));
- }
-};
-
-class StreamJSFramesOp : public JS::ForEachProfiledFrameOp
-{
- void* mReturnAddress;
- UniqueStacks::Stack& mStack;
- unsigned mDepth;
-
-public:
- StreamJSFramesOp(void* aReturnAddr, UniqueStacks::Stack& aStack)
- : mReturnAddress(aReturnAddr)
- , mStack(aStack)
- , mDepth(0)
- { }
-
- unsigned depth() const {
- MOZ_ASSERT(mDepth > 0);
- return mDepth;
- }
-
- void operator()(const JS::ForEachProfiledFrameOp::FrameHandle& aFrameHandle) override {
- UniqueStacks::OnStackFrameKey frameKey(mReturnAddress, mDepth, aFrameHandle);
- mStack.AppendFrame(frameKey);
- mDepth++;
- }
-};
-#endif
-
-uint32_t UniqueJSONStrings::GetOrAddIndex(const char* aStr)
-{
- uint32_t index;
- StringKey key(aStr);
-
- auto it = mStringToIndexMap.find(key);
-
- if (it != mStringToIndexMap.end()) {
- return it->second;
- }
- index = mStringToIndexMap.size();
- mStringToIndexMap[key] = index;
- mStringTableWriter.StringElement(aStr);
- return index;
-}
-
-bool UniqueStacks::FrameKey::operator==(const FrameKey& aOther) const
-{
- return mLocation == aOther.mLocation &&
- mLine == aOther.mLine &&
- mCategory == aOther.mCategory &&
- mJITAddress == aOther.mJITAddress &&
- mJITDepth == aOther.mJITDepth;
-}
-
-bool UniqueStacks::StackKey::operator==(const StackKey& aOther) const
-{
- MOZ_ASSERT_IF(mPrefix == aOther.mPrefix, mPrefixHash == aOther.mPrefixHash);
- return mPrefix == aOther.mPrefix && mFrame == aOther.mFrame;
-}
-
-UniqueStacks::Stack::Stack(UniqueStacks& aUniqueStacks, const OnStackFrameKey& aRoot)
- : mUniqueStacks(aUniqueStacks)
- , mStack(aUniqueStacks.GetOrAddFrameIndex(aRoot))
-{
-}
-
-void UniqueStacks::Stack::AppendFrame(const OnStackFrameKey& aFrame)
-{
- // Compute the prefix hash and index before mutating mStack.
- uint32_t prefixHash = mStack.Hash();
- uint32_t prefix = mUniqueStacks.GetOrAddStackIndex(mStack);
- mStack.UpdateHash(prefixHash, prefix, mUniqueStacks.GetOrAddFrameIndex(aFrame));
-}
-
-uint32_t UniqueStacks::Stack::GetOrAddIndex() const
-{
- return mUniqueStacks.GetOrAddStackIndex(mStack);
-}
-
-uint32_t UniqueStacks::FrameKey::Hash() const
-{
- uint32_t hash = 0;
- if (!mLocation.IsEmpty()) {
-#ifdef SPS_STANDALONE
- hash = mozilla::HashString(mLocation.c_str());
-#else
- hash = mozilla::HashString(mLocation.get());
-#endif
- }
- if (mLine.isSome()) {
- hash = mozilla::AddToHash(hash, *mLine);
- }
- if (mCategory.isSome()) {
- hash = mozilla::AddToHash(hash, *mCategory);
- }
- if (mJITAddress.isSome()) {
- hash = mozilla::AddToHash(hash, *mJITAddress);
- if (mJITDepth.isSome()) {
- hash = mozilla::AddToHash(hash, *mJITDepth);
- }
- }
- return hash;
-}
-
-uint32_t UniqueStacks::StackKey::Hash() const
-{
- if (mPrefix.isNothing()) {
- return mozilla::HashGeneric(mFrame);
- }
- return mozilla::AddToHash(*mPrefixHash, mFrame);
-}
-
-UniqueStacks::Stack UniqueStacks::BeginStack(const OnStackFrameKey& aRoot)
-{
- return Stack(*this, aRoot);
-}
-
-UniqueStacks::UniqueStacks(JSContext* aContext)
- : mContext(aContext)
- , mFrameCount(0)
-{
- mFrameTableWriter.StartBareList();
- mStackTableWriter.StartBareList();
-}
-
-#ifdef SPS_STANDALONE
-uint32_t UniqueStacks::GetOrAddStackIndex(const StackKey& aStack)
-{
- uint32_t index;
- auto it = mStackToIndexMap.find(aStack);
-
- if (it != mStackToIndexMap.end()) {
- return it->second;
- }
-
- index = mStackToIndexMap.size();
- mStackToIndexMap[aStack] = index;
- StreamStack(aStack);
- return index;
-}
-#else
-uint32_t UniqueStacks::GetOrAddStackIndex(const StackKey& aStack)
-{
- uint32_t index;
- if (mStackToIndexMap.Get(aStack, &index)) {
- MOZ_ASSERT(index < mStackToIndexMap.Count());
- return index;
- }
-
- index = mStackToIndexMap.Count();
- mStackToIndexMap.Put(aStack, index);
- StreamStack(aStack);
- return index;
-}
-#endif
-
-#ifdef SPS_STANDALONE
-uint32_t UniqueStacks::GetOrAddFrameIndex(const OnStackFrameKey& aFrame)
-{
- uint32_t index;
- auto it = mFrameToIndexMap.find(aFrame);
- if (it != mFrameToIndexMap.end()) {
- MOZ_ASSERT(it->second < mFrameCount);
- return it->second;
- }
-
- // A manual count is used instead of mFrameToIndexMap.Count() due to
- // forwarding of canonical JIT frames above.
- index = mFrameCount++;
- mFrameToIndexMap[aFrame] = index;
- StreamFrame(aFrame);
- return index;
-}
-#else
-uint32_t UniqueStacks::GetOrAddFrameIndex(const OnStackFrameKey& aFrame)
-{
- uint32_t index;
- if (mFrameToIndexMap.Get(aFrame, &index)) {
- MOZ_ASSERT(index < mFrameCount);
- return index;
- }
-
- // If aFrame isn't canonical, forward it to the canonical frame's index.
- if (aFrame.mJITFrameHandle) {
- void* canonicalAddr = aFrame.mJITFrameHandle->canonicalAddress();
- if (canonicalAddr != *aFrame.mJITAddress) {
- OnStackFrameKey canonicalKey(canonicalAddr, *aFrame.mJITDepth, *aFrame.mJITFrameHandle);
- uint32_t canonicalIndex = GetOrAddFrameIndex(canonicalKey);
- mFrameToIndexMap.Put(aFrame, canonicalIndex);
- return canonicalIndex;
- }
- }
-
- // A manual count is used instead of mFrameToIndexMap.Count() due to
- // forwarding of canonical JIT frames above.
- index = mFrameCount++;
- mFrameToIndexMap.Put(aFrame, index);
- StreamFrame(aFrame);
- return index;
-}
-#endif
-
-uint32_t UniqueStacks::LookupJITFrameDepth(void* aAddr)
-{
- uint32_t depth;
-
- auto it = mJITFrameDepthMap.find(aAddr);
- if (it != mJITFrameDepthMap.end()) {
- depth = it->second;
- MOZ_ASSERT(depth > 0);
- return depth;
- }
- return 0;
-}
-
-void UniqueStacks::AddJITFrameDepth(void* aAddr, unsigned depth)
-{
- mJITFrameDepthMap[aAddr] = depth;
-}
-
-void UniqueStacks::SpliceFrameTableElements(SpliceableJSONWriter& aWriter)
-{
- mFrameTableWriter.EndBareList();
- aWriter.TakeAndSplice(mFrameTableWriter.WriteFunc());
-}
-
-void UniqueStacks::SpliceStackTableElements(SpliceableJSONWriter& aWriter)
-{
- mStackTableWriter.EndBareList();
- aWriter.TakeAndSplice(mStackTableWriter.WriteFunc());
-}
-
-void UniqueStacks::StreamStack(const StackKey& aStack)
-{
- enum Schema : uint32_t {
- PREFIX = 0,
- FRAME = 1
- };
-
- AutoArraySchemaWriter writer(mStackTableWriter, mUniqueStrings);
- if (aStack.mPrefix.isSome()) {
- writer.IntElement(PREFIX, *aStack.mPrefix);
- }
- writer.IntElement(FRAME, aStack.mFrame);
-}
-
-void UniqueStacks::StreamFrame(const OnStackFrameKey& aFrame)
-{
- enum Schema : uint32_t {
- LOCATION = 0,
- IMPLEMENTATION = 1,
- OPTIMIZATIONS = 2,
- LINE = 3,
- CATEGORY = 4
- };
-
- AutoArraySchemaWriter writer(mFrameTableWriter, mUniqueStrings);
-
-#ifndef SPS_STANDALONE
- if (!aFrame.mJITFrameHandle) {
-#else
- {
-#endif
-#ifdef SPS_STANDALONE
- writer.StringElement(LOCATION, aFrame.mLocation.c_str());
-#else
- writer.StringElement(LOCATION, aFrame.mLocation.get());
-#endif
- if (aFrame.mLine.isSome()) {
- writer.IntElement(LINE, *aFrame.mLine);
- }
- if (aFrame.mCategory.isSome()) {
- writer.IntElement(CATEGORY, *aFrame.mCategory);
- }
- }
-#ifndef SPS_STANDALONE
- else {
- const JS::ForEachProfiledFrameOp::FrameHandle& jitFrame = *aFrame.mJITFrameHandle;
-
- writer.StringElement(LOCATION, jitFrame.label());
-
- JS::ProfilingFrameIterator::FrameKind frameKind = jitFrame.frameKind();
- MOZ_ASSERT(frameKind == JS::ProfilingFrameIterator::Frame_Ion ||
- frameKind == JS::ProfilingFrameIterator::Frame_Baseline);
- writer.StringElement(IMPLEMENTATION,
- frameKind == JS::ProfilingFrameIterator::Frame_Ion
- ? "ion"
- : "baseline");
-
- if (jitFrame.hasTrackedOptimizations()) {
- writer.FillUpTo(OPTIMIZATIONS);
- mFrameTableWriter.StartObjectElement();
- {
- mFrameTableWriter.StartArrayProperty("types");
- {
- StreamOptimizationTypeInfoOp typeInfoOp(mFrameTableWriter, mUniqueStrings);
- jitFrame.forEachOptimizationTypeInfo(typeInfoOp);
- }
- mFrameTableWriter.EndArray();
-
- JS::Rooted<JSScript*> script(mContext);
- jsbytecode* pc;
- mFrameTableWriter.StartObjectProperty("attempts");
- {
- {
- JSONSchemaWriter schema(mFrameTableWriter);
- schema.WriteField("strategy");
- schema.WriteField("outcome");
- }
-
- mFrameTableWriter.StartArrayProperty("data");
- {
- StreamOptimizationAttemptsOp attemptOp(mFrameTableWriter, mUniqueStrings);
- jitFrame.forEachOptimizationAttempt(attemptOp, script.address(), &pc);
- }
- mFrameTableWriter.EndArray();
- }
- mFrameTableWriter.EndObject();
-
- if (JSAtom* name = js::GetPropertyNameFromPC(script, pc)) {
- char buf[512];
- JS_PutEscapedFlatString(buf, mozilla::ArrayLength(buf), js::AtomToFlatString(name), 0);
- mUniqueStrings.WriteProperty(mFrameTableWriter, "propertyName", buf);
- }
-
- unsigned line, column;
- line = JS_PCToLineNumber(script, pc, &column);
- mFrameTableWriter.IntProperty("line", line);
- mFrameTableWriter.IntProperty("column", column);
- }
- mFrameTableWriter.EndObject();
- }
- }
-#endif
-}
-
-struct ProfileSample
-{
- uint32_t mStack;
- Maybe<double> mTime;
- Maybe<double> mResponsiveness;
- Maybe<double> mRSS;
- Maybe<double> mUSS;
- Maybe<int> mFrameNumber;
- Maybe<double> mPower;
-};
-
-static void WriteSample(SpliceableJSONWriter& aWriter, ProfileSample& aSample)
-{
- enum Schema : uint32_t {
- STACK = 0,
- TIME = 1,
- RESPONSIVENESS = 2,
- RSS = 3,
- USS = 4,
- FRAME_NUMBER = 5,
- POWER = 6
- };
-
- AutoArraySchemaWriter writer(aWriter);
-
- writer.IntElement(STACK, aSample.mStack);
-
- if (aSample.mTime.isSome()) {
- writer.DoubleElement(TIME, *aSample.mTime);
- }
-
- if (aSample.mResponsiveness.isSome()) {
- writer.DoubleElement(RESPONSIVENESS, *aSample.mResponsiveness);
- }
-
- if (aSample.mRSS.isSome()) {
- writer.DoubleElement(RSS, *aSample.mRSS);
- }
-
- if (aSample.mUSS.isSome()) {
- writer.DoubleElement(USS, *aSample.mUSS);
- }
-
- if (aSample.mFrameNumber.isSome()) {
- writer.IntElement(FRAME_NUMBER, *aSample.mFrameNumber);
- }
-
- if (aSample.mPower.isSome()) {
- writer.DoubleElement(POWER, *aSample.mPower);
- }
-}
-
-void ProfileBuffer::StreamSamplesToJSON(SpliceableJSONWriter& aWriter, int aThreadId,
- double aSinceTime, JSContext* aContext,
- UniqueStacks& aUniqueStacks)
-{
- Maybe<ProfileSample> sample;
- int readPos = mReadPos;
- int currentThreadID = -1;
- Maybe<double> currentTime;
- UniquePtr<char[]> tagBuff = MakeUnique<char[]>(DYNAMIC_MAX_STRING);
-
- while (readPos != mWritePos) {
- ProfileEntry entry = mEntries[readPos];
- if (entry.mTagName == 'T') {
- currentThreadID = entry.mTagInt;
- currentTime.reset();
- int readAheadPos = (readPos + 1) % mEntrySize;
- if (readAheadPos != mWritePos) {
- ProfileEntry readAheadEntry = mEntries[readAheadPos];
- if (readAheadEntry.mTagName == 't') {
- currentTime = Some(readAheadEntry.mTagDouble);
- }
- }
- }
- if (currentThreadID == aThreadId && (currentTime.isNothing() || *currentTime >= aSinceTime)) {
- switch (entry.mTagName) {
- case 'r':
- if (sample.isSome()) {
- sample->mResponsiveness = Some(entry.mTagDouble);
- }
- break;
- case 'p':
- if (sample.isSome()) {
- sample->mPower = Some(entry.mTagDouble);
- }
- break;
- case 'R':
- if (sample.isSome()) {
- sample->mRSS = Some(entry.mTagDouble);
- }
- break;
- case 'U':
- if (sample.isSome()) {
- sample->mUSS = Some(entry.mTagDouble);
- }
- break;
- case 'f':
- if (sample.isSome()) {
- sample->mFrameNumber = Some(entry.mTagInt);
- }
- break;
- case 's':
- {
- // end the previous sample if there was one
- if (sample.isSome()) {
- WriteSample(aWriter, *sample);
- sample.reset();
- }
- // begin the next sample
- sample.emplace();
- sample->mTime = currentTime;
-
- // Seek forward through the entire sample, looking for frames
- // this is an easier approach to reason about than adding more
- // control variables and cases to the loop that goes through the buffer once
-
- UniqueStacks::Stack stack =
- aUniqueStacks.BeginStack(UniqueStacks::OnStackFrameKey("(root)"));
-
- int framePos = (readPos + 1) % mEntrySize;
- ProfileEntry frame = mEntries[framePos];
- while (framePos != mWritePos && frame.mTagName != 's' && frame.mTagName != 'T') {
- int incBy = 1;
- frame = mEntries[framePos];
-
- // Read ahead to the next tag, if it's a 'd' tag process it now
- const char* tagStringData = frame.mTagData;
- int readAheadPos = (framePos + 1) % mEntrySize;
- // Make sure the string is always null terminated if it fills up
- // DYNAMIC_MAX_STRING-2
- tagBuff[DYNAMIC_MAX_STRING-1] = '\0';
-
- if (readAheadPos != mWritePos && mEntries[readAheadPos].mTagName == 'd') {
- tagStringData = processDynamicTag(framePos, &incBy, tagBuff.get());
- }
-
- // Write one frame. It can have either
- // 1. only location - 'l' containing a memory address
- // 2. location and line number - 'c' followed by 'd's,
- // an optional 'n' and an optional 'y'
- // 3. a JIT return address - 'j' containing native code address
- if (frame.mTagName == 'l') {
- // Bug 753041
- // We need a double cast here to tell GCC that we don't want to sign
- // extend 32-bit addresses starting with 0xFXXXXXX.
- unsigned long long pc = (unsigned long long)(uintptr_t)frame.mTagPtr;
- snprintf(tagBuff.get(), DYNAMIC_MAX_STRING, "%#llx", pc);
- stack.AppendFrame(UniqueStacks::OnStackFrameKey(tagBuff.get()));
- } else if (frame.mTagName == 'c') {
- UniqueStacks::OnStackFrameKey frameKey(tagStringData);
- readAheadPos = (framePos + incBy) % mEntrySize;
- if (readAheadPos != mWritePos &&
- mEntries[readAheadPos].mTagName == 'n') {
- frameKey.mLine = Some((unsigned) mEntries[readAheadPos].mTagInt);
- incBy++;
- }
- readAheadPos = (framePos + incBy) % mEntrySize;
- if (readAheadPos != mWritePos &&
- mEntries[readAheadPos].mTagName == 'y') {
- frameKey.mCategory = Some((unsigned) mEntries[readAheadPos].mTagInt);
- incBy++;
- }
- stack.AppendFrame(frameKey);
-#ifndef SPS_STANDALONE
- } else if (frame.mTagName == 'J') {
- // A JIT frame may expand to multiple frames due to inlining.
- void* pc = frame.mTagPtr;
- unsigned depth = aUniqueStacks.LookupJITFrameDepth(pc);
- if (depth == 0) {
- StreamJSFramesOp framesOp(pc, stack);
- JS::ForEachProfiledFrame(aContext, pc, framesOp);
- aUniqueStacks.AddJITFrameDepth(pc, framesOp.depth());
- } else {
- for (unsigned i = 0; i < depth; i++) {
- UniqueStacks::OnStackFrameKey inlineFrameKey(pc, i);
- stack.AppendFrame(inlineFrameKey);
- }
- }
-#endif
- }
- framePos = (framePos + incBy) % mEntrySize;
- }
-
- sample->mStack = stack.GetOrAddIndex();
- break;
- }
- }
- }
- readPos = (readPos + 1) % mEntrySize;
- }
- if (sample.isSome()) {
- WriteSample(aWriter, *sample);
- }
-}
-
-void ProfileBuffer::StreamMarkersToJSON(SpliceableJSONWriter& aWriter, int aThreadId,
- double aSinceTime, UniqueStacks& aUniqueStacks)
-{
- int readPos = mReadPos;
- int currentThreadID = -1;
- while (readPos != mWritePos) {
- ProfileEntry entry = mEntries[readPos];
- if (entry.mTagName == 'T') {
- currentThreadID = entry.mTagInt;
- } else if (currentThreadID == aThreadId && entry.mTagName == 'm') {
- const ProfilerMarker* marker = entry.getMarker();
- if (marker->GetTime() >= aSinceTime) {
- entry.getMarker()->StreamJSON(aWriter, aUniqueStacks);
- }
- }
- readPos = (readPos + 1) % mEntrySize;
- }
-}
-
-int ProfileBuffer::FindLastSampleOfThread(int aThreadId)
-{
- // We search backwards from mWritePos-1 to mReadPos.
- // Adding mEntrySize makes the result of the modulus positive.
- for (int readPos = (mWritePos + mEntrySize - 1) % mEntrySize;
- readPos != (mReadPos + mEntrySize - 1) % mEntrySize;
- readPos = (readPos + mEntrySize - 1) % mEntrySize) {
- ProfileEntry entry = mEntries[readPos];
- if (entry.mTagName == 'T' && entry.mTagInt == aThreadId) {
- return readPos;
- }
- }
-
- return -1;
-}
-
-void ProfileBuffer::DuplicateLastSample(int aThreadId)
-{
- int lastSampleStartPos = FindLastSampleOfThread(aThreadId);
- if (lastSampleStartPos == -1) {
- return;
- }
-
- MOZ_ASSERT(mEntries[lastSampleStartPos].mTagName == 'T');
-
- addTag(mEntries[lastSampleStartPos]);
-
- // Go through the whole entry and duplicate it, until we find the next one.
- for (int readPos = (lastSampleStartPos + 1) % mEntrySize;
- readPos != mWritePos;
- readPos = (readPos + 1) % mEntrySize) {
- switch (mEntries[readPos].mTagName) {
- case 'T':
- // We're done.
- return;
- case 't':
- // Copy with new time
- addTag(ProfileEntry('t', (mozilla::TimeStamp::Now() - sStartTime).ToMilliseconds()));
- break;
- case 'm':
- // Don't copy markers
- break;
- // Copy anything else we don't know about
- // L, B, S, c, s, d, l, f, h, r, t, p
- default:
- addTag(mEntries[readPos]);
- break;
- }
- }
-}
-
-// END ProfileBuffer
-////////////////////////////////////////////////////////////////////////
-
-
-////////////////////////////////////////////////////////////////////////
-// BEGIN ThreadProfile
-
-// END ThreadProfile
-////////////////////////////////////////////////////////////////////////
diff --git a/tools/profiler/core/ProfileEntry.h b/tools/profiler/core/ProfileEntry.h
deleted file mode 100644
index b82a2f271..000000000
--- a/tools/profiler/core/ProfileEntry.h
+++ /dev/null
@@ -1,407 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef MOZ_PROFILE_ENTRY_H
-#define MOZ_PROFILE_ENTRY_H
-
-#include <ostream>
-#include "GeckoProfiler.h"
-#include "platform.h"
-#include "ProfileJSONWriter.h"
-#include "ProfilerBacktrace.h"
-#include "mozilla/RefPtr.h"
-#include <string>
-#include <map>
-#ifndef SPS_STANDALONE
-#include "js/ProfilingFrameIterator.h"
-#include "js/TrackedOptimizationInfo.h"
-#include "nsHashKeys.h"
-#include "nsDataHashtable.h"
-#endif
-#include "mozilla/Maybe.h"
-#include "mozilla/Vector.h"
-#ifndef SPS_STANDALONE
-#include "gtest/MozGtestFriend.h"
-#else
-#define FRIEND_TEST(a, b) // TODO Support standalone gtest
-#endif
-#include "mozilla/HashFunctions.h"
-#include "mozilla/UniquePtr.h"
-
-class ThreadProfile;
-
-// NB: Packing this structure has been shown to cause SIGBUS issues on ARM.
-#ifndef __arm__
-#pragma pack(push, 1)
-#endif
-
-class ProfileEntry
-{
-public:
- ProfileEntry();
-
- // aTagData must not need release (i.e. be a string from the text segment)
- ProfileEntry(char aTagName, const char *aTagData);
- ProfileEntry(char aTagName, void *aTagPtr);
- ProfileEntry(char aTagName, ProfilerMarker *aTagMarker);
- ProfileEntry(char aTagName, double aTagDouble);
- ProfileEntry(char aTagName, uintptr_t aTagOffset);
- ProfileEntry(char aTagName, Address aTagAddress);
- ProfileEntry(char aTagName, int aTagLine);
- ProfileEntry(char aTagName, char aTagChar);
- bool is_ent_hint(char hintChar);
- bool is_ent_hint();
- bool is_ent(char tagName);
- void* get_tagPtr();
- const ProfilerMarker* getMarker() {
- MOZ_ASSERT(mTagName == 'm');
- return mTagMarker;
- }
-
- char getTagName() const { return mTagName; }
-
-private:
- FRIEND_TEST(ThreadProfile, InsertOneTag);
- FRIEND_TEST(ThreadProfile, InsertOneTagWithTinyBuffer);
- FRIEND_TEST(ThreadProfile, InsertTagsNoWrap);
- FRIEND_TEST(ThreadProfile, InsertTagsWrap);
- FRIEND_TEST(ThreadProfile, MemoryMeasure);
- friend class ProfileBuffer;
- union {
- const char* mTagData;
- char mTagChars[sizeof(void*)];
- void* mTagPtr;
- ProfilerMarker* mTagMarker;
- double mTagDouble;
- Address mTagAddress;
- uintptr_t mTagOffset;
- int mTagInt;
- char mTagChar;
- };
- char mTagName;
-};
-
-#ifndef __arm__
-#pragma pack(pop)
-#endif
-
-class UniqueJSONStrings
-{
-public:
- UniqueJSONStrings() {
- mStringTableWriter.StartBareList();
- }
-
- void SpliceStringTableElements(SpliceableJSONWriter& aWriter) {
- aWriter.TakeAndSplice(mStringTableWriter.WriteFunc());
- }
-
- void WriteProperty(mozilla::JSONWriter& aWriter, const char* aName, const char* aStr) {
- aWriter.IntProperty(aName, GetOrAddIndex(aStr));
- }
-
- void WriteElement(mozilla::JSONWriter& aWriter, const char* aStr) {
- aWriter.IntElement(GetOrAddIndex(aStr));
- }
-
- uint32_t GetOrAddIndex(const char* aStr);
-
- struct StringKey {
-
- explicit StringKey(const char* aStr)
- : mStr(strdup(aStr))
- {
- mHash = mozilla::HashString(mStr);
- }
-
- StringKey(const StringKey& aOther)
- : mStr(strdup(aOther.mStr))
- {
- mHash = aOther.mHash;
- }
-
- ~StringKey() {
- free(mStr);
- }
-
- uint32_t Hash() const;
- bool operator==(const StringKey& aOther) const {
- return strcmp(mStr, aOther.mStr) == 0;
- }
- bool operator<(const StringKey& aOther) const {
- return mHash < aOther.mHash;
- }
-
- private:
- uint32_t mHash;
- char* mStr;
- };
-private:
- SpliceableChunkedJSONWriter mStringTableWriter;
- std::map<StringKey, uint32_t> mStringToIndexMap;
-};
-
-class UniqueStacks
-{
-public:
- struct FrameKey {
-#ifdef SPS_STANDALONE
- std::string mLocation;
-#else
- // This cannot be a std::string, as it is not memmove compatible, which
- // is used by nsHashTable
- nsCString mLocation;
-#endif
- mozilla::Maybe<unsigned> mLine;
- mozilla::Maybe<unsigned> mCategory;
- mozilla::Maybe<void*> mJITAddress;
- mozilla::Maybe<uint32_t> mJITDepth;
-
- explicit FrameKey(const char* aLocation)
- : mLocation(aLocation)
- {
- mHash = Hash();
- }
-
- FrameKey(const FrameKey& aToCopy)
- : mLocation(aToCopy.mLocation)
- , mLine(aToCopy.mLine)
- , mCategory(aToCopy.mCategory)
- , mJITAddress(aToCopy.mJITAddress)
- , mJITDepth(aToCopy.mJITDepth)
- {
- mHash = Hash();
- }
-
- FrameKey(void* aJITAddress, uint32_t aJITDepth)
- : mJITAddress(mozilla::Some(aJITAddress))
- , mJITDepth(mozilla::Some(aJITDepth))
- {
- mHash = Hash();
- }
-
- uint32_t Hash() const;
- bool operator==(const FrameKey& aOther) const;
- bool operator<(const FrameKey& aOther) const {
- return mHash < aOther.mHash;
- }
-
- private:
- uint32_t mHash;
- };
-
- // A FrameKey that holds a scoped reference to a JIT FrameHandle.
- struct MOZ_STACK_CLASS OnStackFrameKey : public FrameKey {
- explicit OnStackFrameKey(const char* aLocation)
- : FrameKey(aLocation)
-#ifndef SPS_STANDALONE
- , mJITFrameHandle(nullptr)
-#endif
- { }
-
- OnStackFrameKey(const OnStackFrameKey& aToCopy)
- : FrameKey(aToCopy)
-#ifndef SPS_STANDALONE
- , mJITFrameHandle(aToCopy.mJITFrameHandle)
-#endif
- { }
-
-#ifndef SPS_STANDALONE
- const JS::ForEachProfiledFrameOp::FrameHandle* mJITFrameHandle;
-
- OnStackFrameKey(void* aJITAddress, unsigned aJITDepth)
- : FrameKey(aJITAddress, aJITDepth)
- , mJITFrameHandle(nullptr)
- { }
-
- OnStackFrameKey(void* aJITAddress, unsigned aJITDepth,
- const JS::ForEachProfiledFrameOp::FrameHandle& aJITFrameHandle)
- : FrameKey(aJITAddress, aJITDepth)
- , mJITFrameHandle(&aJITFrameHandle)
- { }
-#endif
- };
-
- struct StackKey {
- mozilla::Maybe<uint32_t> mPrefixHash;
- mozilla::Maybe<uint32_t> mPrefix;
- uint32_t mFrame;
-
- explicit StackKey(uint32_t aFrame)
- : mFrame(aFrame)
- {
- mHash = Hash();
- }
-
- uint32_t Hash() const;
- bool operator==(const StackKey& aOther) const;
- bool operator<(const StackKey& aOther) const {
- return mHash < aOther.mHash;
- }
-
- void UpdateHash(uint32_t aPrefixHash, uint32_t aPrefix, uint32_t aFrame) {
- mPrefixHash = mozilla::Some(aPrefixHash);
- mPrefix = mozilla::Some(aPrefix);
- mFrame = aFrame;
- mHash = Hash();
- }
-
- private:
- uint32_t mHash;
- };
-
- class Stack {
- public:
- Stack(UniqueStacks& aUniqueStacks, const OnStackFrameKey& aRoot);
-
- void AppendFrame(const OnStackFrameKey& aFrame);
- uint32_t GetOrAddIndex() const;
-
- private:
- UniqueStacks& mUniqueStacks;
- StackKey mStack;
- };
-
- explicit UniqueStacks(JSContext* aContext);
-
- Stack BeginStack(const OnStackFrameKey& aRoot);
- uint32_t LookupJITFrameDepth(void* aAddr);
- void AddJITFrameDepth(void* aAddr, unsigned depth);
- void SpliceFrameTableElements(SpliceableJSONWriter& aWriter);
- void SpliceStackTableElements(SpliceableJSONWriter& aWriter);
-
-private:
- uint32_t GetOrAddFrameIndex(const OnStackFrameKey& aFrame);
- uint32_t GetOrAddStackIndex(const StackKey& aStack);
- void StreamFrame(const OnStackFrameKey& aFrame);
- void StreamStack(const StackKey& aStack);
-
-public:
- UniqueJSONStrings mUniqueStrings;
-
-private:
- JSContext* mContext;
-
- // To avoid incurring JitcodeGlobalTable lookup costs for every JIT frame,
- // we cache the depth of frames keyed by JIT code address. If an address a
- // maps to a depth d, then frames keyed by a for depths 0 to d are
- // guaranteed to be in mFrameToIndexMap.
- std::map<void*, uint32_t> mJITFrameDepthMap;
-
- uint32_t mFrameCount;
- SpliceableChunkedJSONWriter mFrameTableWriter;
-#ifdef SPS_STANDALNOE
- std::map<FrameKey, uint32_t> mFrameToIndexMap;
-#else
- nsDataHashtable<nsGenericHashKey<FrameKey>, uint32_t> mFrameToIndexMap;
-#endif
-
- SpliceableChunkedJSONWriter mStackTableWriter;
-
- // This sucks but this is really performance critical, nsDataHashtable is way faster
- // than map/unordered_map but nsDataHashtable is tied to xpcom so we ifdef
- // until we can find a better solution.
-#ifdef SPS_STANDALONE
- std::map<StackKey, uint32_t> mStackToIndexMap;
-#else
- nsDataHashtable<nsGenericHashKey<StackKey>, uint32_t> mStackToIndexMap;
-#endif
-};
-
-//
-// ThreadProfile JSON Format
-// -------------------------
-//
-// The profile contains much duplicate information. The output JSON of the
-// profile attempts to deduplicate strings, frames, and stack prefixes, to cut
-// down on size and to increase JSON streaming speed. Deduplicated values are
-// streamed as indices into their respective tables.
-//
-// Further, arrays of objects with the same set of properties (e.g., samples,
-// frames) are output as arrays according to a schema instead of an object
-// with property names. A property that is not present is represented in the
-// array as null or undefined.
-//
-// The format of the thread profile JSON is shown by the following example
-// with 1 sample and 1 marker:
-//
-// {
-// "name": "Foo",
-// "tid": 42,
-// "samples":
-// {
-// "schema":
-// {
-// "stack": 0, /* index into stackTable */
-// "time": 1, /* number */
-// "responsiveness": 2, /* number */
-// "rss": 3, /* number */
-// "uss": 4, /* number */
-// "frameNumber": 5, /* number */
-// "power": 6 /* number */
-// },
-// "data":
-// [
-// [ 1, 0.0, 0.0 ] /* { stack: 1, time: 0.0, responsiveness: 0.0 } */
-// ]
-// },
-//
-// "markers":
-// {
-// "schema":
-// {
-// "name": 0, /* index into stringTable */
-// "time": 1, /* number */
-// "data": 2 /* arbitrary JSON */
-// },
-// "data":
-// [
-// [ 3, 0.1 ] /* { name: 'example marker', time: 0.1 } */
-// ]
-// },
-//
-// "stackTable":
-// {
-// "schema":
-// {
-// "prefix": 0, /* index into stackTable */
-// "frame": 1 /* index into frameTable */
-// },
-// "data":
-// [
-// [ null, 0 ], /* (root) */
-// [ 0, 1 ] /* (root) > foo.js */
-// ]
-// },
-//
-// "frameTable":
-// {
-// "schema":
-// {
-// "location": 0, /* index into stringTable */
-// "implementation": 1, /* index into stringTable */
-// "optimizations": 2, /* arbitrary JSON */
-// "line": 3, /* number */
-// "category": 4 /* number */
-// },
-// "data":
-// [
-// [ 0 ], /* { location: '(root)' } */
-// [ 1, 2 ] /* { location: 'foo.js', implementation: 'baseline' } */
-// ]
-// },
-//
-// "stringTable":
-// [
-// "(root)",
-// "foo.js",
-// "baseline",
-// "example marker"
-// ]
-// }
-//
-
-#endif /* ndef MOZ_PROFILE_ENTRY_H */
diff --git a/tools/profiler/core/ProfileJSONWriter.cpp b/tools/profiler/core/ProfileJSONWriter.cpp
deleted file mode 100644
index 65a9425a3..000000000
--- a/tools/profiler/core/ProfileJSONWriter.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/HashFunctions.h"
-
-#include "ProfileJSONWriter.h"
-
-void
-ChunkedJSONWriteFunc::Write(const char* aStr)
-{
- MOZ_ASSERT(mChunkPtr >= mChunkList.back().get() && mChunkPtr <= mChunkEnd);
- MOZ_ASSERT(mChunkEnd >= mChunkList.back().get() + mChunkLengths.back());
- MOZ_ASSERT(*mChunkPtr == '\0');
-
- size_t len = strlen(aStr);
-
- // Most strings to be written are small, but subprocess profiles (e.g.,
- // from the content process in e10s) may be huge. If the string is larger
- // than a chunk, allocate its own chunk.
- char* newPtr;
- if (len >= kChunkSize) {
- AllocChunk(len + 1);
- newPtr = mChunkPtr + len;
- } else {
- newPtr = mChunkPtr + len;
- if (newPtr >= mChunkEnd) {
- AllocChunk(kChunkSize);
- newPtr = mChunkPtr + len;
- }
- }
-
- memcpy(mChunkPtr, aStr, len);
- *newPtr = '\0';
- mChunkPtr = newPtr;
- mChunkLengths.back() += len;
-}
-
-mozilla::UniquePtr<char[]>
-ChunkedJSONWriteFunc::CopyData() const
-{
- MOZ_ASSERT(mChunkLengths.length() == mChunkList.length());
- size_t totalLen = 1;
- for (size_t i = 0; i < mChunkLengths.length(); i++) {
- MOZ_ASSERT(strlen(mChunkList[i].get()) == mChunkLengths[i]);
- totalLen += mChunkLengths[i];
- }
- mozilla::UniquePtr<char[]> c = mozilla::MakeUnique<char[]>(totalLen);
- char* ptr = c.get();
- for (size_t i = 0; i < mChunkList.length(); i++) {
- size_t len = mChunkLengths[i];
- memcpy(ptr, mChunkList[i].get(), len);
- ptr += len;
- }
- *ptr = '\0';
- return c;
-}
-
-void
-ChunkedJSONWriteFunc::Take(ChunkedJSONWriteFunc&& aOther)
-{
- for (size_t i = 0; i < aOther.mChunkList.length(); i++) {
- MOZ_ALWAYS_TRUE(mChunkLengths.append(aOther.mChunkLengths[i]));
- MOZ_ALWAYS_TRUE(mChunkList.append(mozilla::Move(aOther.mChunkList[i])));
- }
- mChunkPtr = mChunkList.back().get() + mChunkLengths.back();
- mChunkEnd = mChunkPtr;
- aOther.mChunkPtr = nullptr;
- aOther.mChunkEnd = nullptr;
- aOther.mChunkList.clear();
- aOther.mChunkLengths.clear();
-}
-
-void
-ChunkedJSONWriteFunc::AllocChunk(size_t aChunkSize)
-{
- MOZ_ASSERT(mChunkLengths.length() == mChunkList.length());
- mozilla::UniquePtr<char[]> newChunk = mozilla::MakeUnique<char[]>(aChunkSize);
- mChunkPtr = newChunk.get();
- mChunkEnd = mChunkPtr + aChunkSize;
- *mChunkPtr = '\0';
- MOZ_ALWAYS_TRUE(mChunkLengths.append(0));
- MOZ_ALWAYS_TRUE(mChunkList.append(mozilla::Move(newChunk)));
-}
-
-void
-SpliceableJSONWriter::TakeAndSplice(ChunkedJSONWriteFunc* aFunc)
-{
- Separator();
- for (size_t i = 0; i < aFunc->mChunkList.length(); i++) {
- WriteFunc()->Write(aFunc->mChunkList[i].get());
- }
- aFunc->mChunkPtr = nullptr;
- aFunc->mChunkEnd = nullptr;
- aFunc->mChunkList.clear();
- aFunc->mChunkLengths.clear();
- mNeedComma[mDepth] = true;
-}
-
-void
-SpliceableJSONWriter::Splice(const char* aStr)
-{
- Separator();
- WriteFunc()->Write(aStr);
- mNeedComma[mDepth] = true;
-}
-
-void
-SpliceableChunkedJSONWriter::TakeAndSplice(ChunkedJSONWriteFunc* aFunc)
-{
- Separator();
- WriteFunc()->Take(mozilla::Move(*aFunc));
- mNeedComma[mDepth] = true;
-}
diff --git a/tools/profiler/core/ProfileJSONWriter.h b/tools/profiler/core/ProfileJSONWriter.h
deleted file mode 100644
index d9e2115f9..000000000
--- a/tools/profiler/core/ProfileJSONWriter.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef PROFILEJSONWRITER_H
-#define PROFILEJSONWRITER_H
-
-#include <ostream>
-#include <string>
-#include <string.h>
-
-#include "mozilla/JSONWriter.h"
-#include "mozilla/UniquePtr.h"
-
-class SpliceableChunkedJSONWriter;
-
-// On average, profile JSONs are large enough such that we want to avoid
-// reallocating its buffer when expanding. Additionally, the contents of the
-// profile are not accessed until the profile is entirely written. For these
-// reasons we use a chunked writer that keeps an array of chunks, which is
-// concatenated together after writing is finished.
-class ChunkedJSONWriteFunc : public mozilla::JSONWriteFunc
-{
-public:
- friend class SpliceableJSONWriter;
-
- ChunkedJSONWriteFunc() {
- AllocChunk(kChunkSize);
- }
-
- bool IsEmpty() const {
- MOZ_ASSERT_IF(!mChunkPtr, !mChunkEnd &&
- mChunkList.length() == 0 &&
- mChunkLengths.length() == 0);
- return !mChunkPtr;
- }
-
- void Write(const char* aStr) override;
- mozilla::UniquePtr<char[]> CopyData() const;
- void Take(ChunkedJSONWriteFunc&& aOther);
-
-private:
- void AllocChunk(size_t aChunkSize);
-
- static const size_t kChunkSize = 4096 * 512;
-
- // Pointer for writing inside the current chunk.
- //
- // The current chunk is always at the back of mChunkList, i.e.,
- // mChunkList.back() <= mChunkPtr <= mChunkEnd.
- char* mChunkPtr;
-
- // Pointer to the end of the current chunk.
- //
- // The current chunk is always at the back of mChunkList, i.e.,
- // mChunkEnd >= mChunkList.back() + mChunkLengths.back().
- char* mChunkEnd;
-
- // List of chunks and their lengths.
- //
- // For all i, the length of the string in mChunkList[i] is
- // mChunkLengths[i].
- mozilla::Vector<mozilla::UniquePtr<char[]>> mChunkList;
- mozilla::Vector<size_t> mChunkLengths;
-};
-
-struct OStreamJSONWriteFunc : public mozilla::JSONWriteFunc
-{
- explicit OStreamJSONWriteFunc(std::ostream& aStream)
- : mStream(aStream)
- { }
-
- void Write(const char* aStr) override {
- mStream << aStr;
- }
-
- std::ostream& mStream;
-};
-
-class SpliceableJSONWriter : public mozilla::JSONWriter
-{
-public:
- explicit SpliceableJSONWriter(mozilla::UniquePtr<mozilla::JSONWriteFunc> aWriter)
- : JSONWriter(mozilla::Move(aWriter))
- { }
-
- void StartBareList(CollectionStyle aStyle = SingleLineStyle) {
- StartCollection(nullptr, "", aStyle);
- }
-
- void EndBareList() {
- EndCollection("");
- }
-
- void NullElements(uint32_t aCount) {
- for (uint32_t i = 0; i < aCount; i++) {
- NullElement();
- }
- }
-
- void Splice(const ChunkedJSONWriteFunc* aFunc);
- void Splice(const char* aStr);
-
- // Takes the chunks from aFunc and write them. If move is not possible
- // (e.g., using OStreamJSONWriteFunc), aFunc's chunks are copied and its
- // storage cleared.
- virtual void TakeAndSplice(ChunkedJSONWriteFunc* aFunc);
-};
-
-class SpliceableChunkedJSONWriter : public SpliceableJSONWriter
-{
-public:
- explicit SpliceableChunkedJSONWriter()
- : SpliceableJSONWriter(mozilla::MakeUnique<ChunkedJSONWriteFunc>())
- { }
-
- ChunkedJSONWriteFunc* WriteFunc() const {
- return static_cast<ChunkedJSONWriteFunc*>(JSONWriter::WriteFunc());
- }
-
- // Adopts the chunks from aFunc without copying.
- virtual void TakeAndSplice(ChunkedJSONWriteFunc* aFunc) override;
-};
-
-#endif // PROFILEJSONWRITER_H
diff --git a/tools/profiler/core/ProfilerBacktrace.cpp b/tools/profiler/core/ProfilerBacktrace.cpp
deleted file mode 100644
index 7302dd64c..000000000
--- a/tools/profiler/core/ProfilerBacktrace.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "ProfilerBacktrace.h"
-
-#include "ProfileJSONWriter.h"
-#include "SyncProfile.h"
-
-ProfilerBacktrace::ProfilerBacktrace(SyncProfile* aProfile)
- : mProfile(aProfile)
-{
- MOZ_COUNT_CTOR(ProfilerBacktrace);
- MOZ_ASSERT(aProfile);
-}
-
-ProfilerBacktrace::~ProfilerBacktrace()
-{
- MOZ_COUNT_DTOR(ProfilerBacktrace);
- if (mProfile->ShouldDestroy()) {
- delete mProfile;
- }
-}
-
-void
-ProfilerBacktrace::StreamJSON(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks)
-{
- ::MutexAutoLock lock(mProfile->GetMutex());
- mProfile->StreamJSON(aWriter, aUniqueStacks);
-}
diff --git a/tools/profiler/core/ProfilerMarkers.cpp b/tools/profiler/core/ProfilerMarkers.cpp
deleted file mode 100644
index 3cb47de48..000000000
--- a/tools/profiler/core/ProfilerMarkers.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "GeckoProfiler.h"
-#include "ProfilerBacktrace.h"
-#include "ProfilerMarkers.h"
-#include "SyncProfile.h"
-#ifndef SPS_STANDALONE
-#include "gfxASurface.h"
-#include "Layers.h"
-#include "mozilla/Sprintf.h"
-#endif
-
-ProfilerMarkerPayload::ProfilerMarkerPayload(ProfilerBacktrace* aStack)
- : mStack(aStack)
-{}
-
-ProfilerMarkerPayload::ProfilerMarkerPayload(const mozilla::TimeStamp& aStartTime,
- const mozilla::TimeStamp& aEndTime,
- ProfilerBacktrace* aStack)
- : mStartTime(aStartTime)
- , mEndTime(aEndTime)
- , mStack(aStack)
-{}
-
-ProfilerMarkerPayload::~ProfilerMarkerPayload()
-{
- profiler_free_backtrace(mStack);
-}
-
-void
-ProfilerMarkerPayload::streamCommonProps(const char* aMarkerType,
- SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks)
-{
- MOZ_ASSERT(aMarkerType);
- aWriter.StringProperty("type", aMarkerType);
- if (!mStartTime.IsNull()) {
- aWriter.DoubleProperty("startTime", profiler_time(mStartTime));
- }
- if (!mEndTime.IsNull()) {
- aWriter.DoubleProperty("endTime", profiler_time(mEndTime));
- }
- if (mStack) {
- aWriter.StartObjectProperty("stack");
- {
- mStack->StreamJSON(aWriter, aUniqueStacks);
- }
- aWriter.EndObject();
- }
-}
-
-ProfilerMarkerTracing::ProfilerMarkerTracing(const char* aCategory, TracingMetadata aMetaData)
- : mCategory(aCategory)
- , mMetaData(aMetaData)
-{
- if (aMetaData == TRACING_EVENT_BACKTRACE) {
- SetStack(profiler_get_backtrace());
- }
-}
-
-ProfilerMarkerTracing::ProfilerMarkerTracing(const char* aCategory, TracingMetadata aMetaData,
- ProfilerBacktrace* aCause)
- : mCategory(aCategory)
- , mMetaData(aMetaData)
-{
- if (aCause) {
- SetStack(aCause);
- }
-}
-
-void
-ProfilerMarkerTracing::StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks)
-{
- streamCommonProps("tracing", aWriter, aUniqueStacks);
-
- if (GetCategory()) {
- aWriter.StringProperty("category", GetCategory());
- }
- if (GetMetaData() != TRACING_DEFAULT) {
- if (GetMetaData() == TRACING_INTERVAL_START) {
- aWriter.StringProperty("interval", "start");
- } else if (GetMetaData() == TRACING_INTERVAL_END) {
- aWriter.StringProperty("interval", "end");
- }
- }
-}
-
-#ifndef SPS_STANDALONE
-GPUMarkerPayload::GPUMarkerPayload(
- const mozilla::TimeStamp& aCpuTimeStart,
- const mozilla::TimeStamp& aCpuTimeEnd,
- uint64_t aGpuTimeStart,
- uint64_t aGpuTimeEnd)
-
- : ProfilerMarkerPayload(aCpuTimeStart, aCpuTimeEnd)
- , mCpuTimeStart(aCpuTimeStart)
- , mCpuTimeEnd(aCpuTimeEnd)
- , mGpuTimeStart(aGpuTimeStart)
- , mGpuTimeEnd(aGpuTimeEnd)
-{ }
-
-void
-GPUMarkerPayload::StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks)
-{
- streamCommonProps("gpu_timer_query", aWriter, aUniqueStacks);
-
- aWriter.DoubleProperty("cpustart", profiler_time(mCpuTimeStart));
- aWriter.DoubleProperty("cpuend", profiler_time(mCpuTimeEnd));
- aWriter.IntProperty("gpustart", (int)mGpuTimeStart);
- aWriter.IntProperty("gpuend", (int)mGpuTimeEnd);
-}
-
-ProfilerMarkerImagePayload::ProfilerMarkerImagePayload(gfxASurface *aImg)
- : mImg(aImg)
-{ }
-
-void
-ProfilerMarkerImagePayload::StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks)
-{
- streamCommonProps("innerHTML", aWriter, aUniqueStacks);
- // TODO: Finish me
- //aWriter.NameValue("innerHTML", "<img src=''/>");
-}
-
-IOMarkerPayload::IOMarkerPayload(const char* aSource,
- const char* aFilename,
- const mozilla::TimeStamp& aStartTime,
- const mozilla::TimeStamp& aEndTime,
- ProfilerBacktrace* aStack)
- : ProfilerMarkerPayload(aStartTime, aEndTime, aStack),
- mSource(aSource)
-{
- mFilename = aFilename ? strdup(aFilename) : nullptr;
- MOZ_ASSERT(aSource);
-}
-
-IOMarkerPayload::~IOMarkerPayload(){
- free(mFilename);
-}
-
-void
-IOMarkerPayload::StreamPayload(SpliceableJSONWriter& aWriter, UniqueStacks& aUniqueStacks)
-{
- streamCommonProps("io", aWriter, aUniqueStacks);
- aWriter.StringProperty("source", mSource);
- if (mFilename != nullptr) {
- aWriter.StringProperty("filename", mFilename);
- }
-}
-
-void
-ProfilerJSEventMarker(const char *event)
-{
- PROFILER_MARKER(event);
-}
-
-LayerTranslationPayload::LayerTranslationPayload(mozilla::layers::Layer* aLayer,
- mozilla::gfx::Point aPoint)
- : ProfilerMarkerPayload(mozilla::TimeStamp::Now(), mozilla::TimeStamp::Now(), nullptr)
- , mLayer(aLayer)
- , mPoint(aPoint)
-{
-}
-
-void
-LayerTranslationPayload::StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks)
-{
- const size_t bufferSize = 32;
- char buffer[bufferSize];
- SprintfLiteral(buffer, "%p", mLayer);
-
- aWriter.StringProperty("layer", buffer);
- aWriter.IntProperty("x", mPoint.x);
- aWriter.IntProperty("y", mPoint.y);
- aWriter.StringProperty("category", "LayerTranslation");
-}
-
-TouchDataPayload::TouchDataPayload(const mozilla::ScreenIntPoint& aPoint)
- : ProfilerMarkerPayload(mozilla::TimeStamp::Now(), mozilla::TimeStamp::Now(), nullptr)
-{
- mPoint = aPoint;
-}
-
-void
-TouchDataPayload::StreamPayload(SpliceableJSONWriter& aWriter, UniqueStacks& aUniqueStacks)
-{
- aWriter.IntProperty("x", mPoint.x);
- aWriter.IntProperty("y", mPoint.y);
-}
-
-VsyncPayload::VsyncPayload(mozilla::TimeStamp aVsyncTimestamp)
- : ProfilerMarkerPayload(aVsyncTimestamp, aVsyncTimestamp, nullptr)
- , mVsyncTimestamp(aVsyncTimestamp)
-{
-}
-
-void
-VsyncPayload::StreamPayload(SpliceableJSONWriter& aWriter, UniqueStacks& aUniqueStacks)
-{
- aWriter.DoubleProperty("vsync", profiler_time(mVsyncTimestamp));
- aWriter.StringProperty("category", "VsyncTimestamp");
-}
-#endif
diff --git a/tools/profiler/core/StackTop.cpp b/tools/profiler/core/StackTop.cpp
deleted file mode 100644
index 1f7944e5e..000000000
--- a/tools/profiler/core/StackTop.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifdef XP_MACOSX
-#include <mach/task.h>
-#include <mach/thread_act.h>
-#include <pthread.h>
-#elif XP_WIN
-#include <windows.h>
-#endif
-
-#include "StackTop.h"
-
-void *GetStackTop(void *guess) {
-#if defined(XP_MACOSX)
- pthread_t thread = pthread_self();
- return pthread_get_stackaddr_np(thread);
-#elif defined(XP_WIN)
-#if defined(_MSC_VER) && defined(_M_IX86)
- // offset 0x18 from the FS segment register gives a pointer to
- // the thread information block for the current thread
- NT_TIB* pTib;
- __asm {
- MOV EAX, FS:[18h]
- MOV pTib, EAX
- }
- return static_cast<void*>(pTib->StackBase);
-#elif defined(__GNUC__) && defined(i386)
- // offset 0x18 from the FS segment register gives a pointer to
- // the thread information block for the current thread
- NT_TIB* pTib;
- asm ( "movl %%fs:0x18, %0\n"
- : "=r" (pTib)
- );
- return static_cast<void*>(pTib->StackBase);
-#elif defined(_M_X64) || defined(__x86_64)
- PNT_TIB64 pTib = reinterpret_cast<PNT_TIB64>(NtCurrentTeb());
- return reinterpret_cast<void*>(pTib->StackBase);
-#else
-#error Need a way to get the stack bounds on this platform (Windows)
-#endif
-#else
- return guess;
-#endif
-}
diff --git a/tools/profiler/core/StackTop.h b/tools/profiler/core/StackTop.h
deleted file mode 100644
index a933d10b4..000000000
--- a/tools/profiler/core/StackTop.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef MOZ_STACK_TOP_H
-#define MOZ_STACK_TOP_H
-void *GetStackTop(void *guess);
-#endif
diff --git a/tools/profiler/core/SyncProfile.cpp b/tools/profiler/core/SyncProfile.cpp
deleted file mode 100644
index 4c4742f34..000000000
--- a/tools/profiler/core/SyncProfile.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "SyncProfile.h"
-
-SyncProfile::SyncProfile(ThreadInfo* aInfo, int aEntrySize)
- : ThreadProfile(aInfo, new ProfileBuffer(aEntrySize))
- , mOwnerState(REFERENCED)
-{
- MOZ_COUNT_CTOR(SyncProfile);
-}
-
-SyncProfile::~SyncProfile()
-{
- MOZ_COUNT_DTOR(SyncProfile);
-
- // SyncProfile owns the ThreadInfo; see NewSyncProfile.
- ThreadInfo* info = GetThreadInfo();
- delete info;
-}
-
-bool
-SyncProfile::ShouldDestroy()
-{
- ::MutexAutoLock lock(GetMutex());
- if (mOwnerState == OWNED) {
- mOwnerState = OWNER_DESTROYING;
- return true;
- }
- mOwnerState = ORPHANED;
- return false;
-}
-
-void
-SyncProfile::EndUnwind()
-{
- if (mOwnerState != ORPHANED) {
- mOwnerState = OWNED;
- }
- // Save mOwnerState before we release the mutex
- OwnerState ownerState = mOwnerState;
- ThreadProfile::EndUnwind();
- if (ownerState == ORPHANED) {
- delete this;
- }
-}
-
-// SyncProfiles' stacks are deduplicated in the context of the containing
-// profile in which the backtrace is as a marker payload.
-void
-SyncProfile::StreamJSON(SpliceableJSONWriter& aWriter, UniqueStacks& aUniqueStacks)
-{
- ThreadProfile::StreamSamplesAndMarkers(aWriter, /* aSinceTime = */ 0, aUniqueStacks);
-}
diff --git a/tools/profiler/core/SyncProfile.h b/tools/profiler/core/SyncProfile.h
deleted file mode 100644
index 58f6b0d81..000000000
--- a/tools/profiler/core/SyncProfile.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef __SYNCPROFILE_H
-#define __SYNCPROFILE_H
-
-#include "ProfileEntry.h"
-#include "ThreadProfile.h"
-
-class SyncProfile : public ThreadProfile
-{
-public:
- SyncProfile(ThreadInfo* aInfo, int aEntrySize);
- ~SyncProfile();
-
- // SyncProfiles' stacks are deduplicated in the context of the containing
- // profile in which the backtrace is as a marker payload.
- void StreamJSON(SpliceableJSONWriter& aWriter, UniqueStacks& aUniqueStacks);
-
- virtual void EndUnwind();
- virtual SyncProfile* AsSyncProfile() { return this; }
-
-private:
- friend class ProfilerBacktrace;
-
- enum OwnerState
- {
- REFERENCED, // ProfilerBacktrace has a pointer to this but doesn't own
- OWNED, // ProfilerBacktrace is responsible for destroying this
- OWNER_DESTROYING, // ProfilerBacktrace owns this and is destroying
- ORPHANED // No owner, we must destroy ourselves
- };
-
- bool ShouldDestroy();
-
- OwnerState mOwnerState;
-};
-
-#endif // __SYNCPROFILE_H
-
diff --git a/tools/profiler/core/ThreadInfo.cpp b/tools/profiler/core/ThreadInfo.cpp
deleted file mode 100644
index 0e25d2330..000000000
--- a/tools/profiler/core/ThreadInfo.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "ThreadInfo.h"
-#include "ThreadProfile.h"
-
-#include "mozilla/DebugOnly.h"
-
-ThreadInfo::ThreadInfo(const char* aName, int aThreadId,
- bool aIsMainThread, PseudoStack* aPseudoStack,
- void* aStackTop)
- : mName(strdup(aName))
- , mThreadId(aThreadId)
- , mIsMainThread(aIsMainThread)
- , mPseudoStack(aPseudoStack)
- , mPlatformData(Sampler::AllocPlatformData(aThreadId))
- , mProfile(nullptr)
- , mStackTop(aStackTop)
- , mPendingDelete(false)
-{
- MOZ_COUNT_CTOR(ThreadInfo);
-#ifndef SPS_STANDALONE
- mThread = NS_GetCurrentThread();
-#endif
-
- // We don't have to guess on mac
-#ifdef XP_MACOSX
- pthread_t self = pthread_self();
- mStackTop = pthread_get_stackaddr_np(self);
-#endif
-}
-
-ThreadInfo::~ThreadInfo() {
- MOZ_COUNT_DTOR(ThreadInfo);
- free(mName);
-
- if (mProfile)
- delete mProfile;
-
- Sampler::FreePlatformData(mPlatformData);
-}
-
-void
-ThreadInfo::SetPendingDelete()
-{
- mPendingDelete = true;
- // We don't own the pseudostack so disconnect it.
- mPseudoStack = nullptr;
- if (mProfile) {
- mProfile->SetPendingDelete();
- }
-}
-
-bool
-ThreadInfo::CanInvokeJS() const
-{
-#ifdef SPS_STANDALONE
- return false;
-#else
- nsIThread* thread = GetThread();
- if (!thread) {
- MOZ_ASSERT(IsMainThread());
- return true;
- }
- bool result;
- mozilla::DebugOnly<nsresult> rv = thread->GetCanInvokeJS(&result);
- MOZ_ASSERT(NS_SUCCEEDED(rv));
- return result;
-#endif
-}
diff --git a/tools/profiler/core/ThreadInfo.h b/tools/profiler/core/ThreadInfo.h
deleted file mode 100644
index 1cb4e5dc8..000000000
--- a/tools/profiler/core/ThreadInfo.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef MOZ_THREAD_INFO_H
-#define MOZ_THREAD_INFO_H
-
-#include "platform.h"
-
-class ThreadInfo {
- public:
- ThreadInfo(const char* aName, int aThreadId, bool aIsMainThread, PseudoStack* aPseudoStack, void* aStackTop);
-
- virtual ~ThreadInfo();
-
- const char* Name() const { return mName; }
- int ThreadId() const { return mThreadId; }
-
- bool IsMainThread() const { return mIsMainThread; }
- PseudoStack* Stack() const { return mPseudoStack; }
-
- void SetProfile(ThreadProfile* aProfile) { mProfile = aProfile; }
- ThreadProfile* Profile() const { return mProfile; }
-
- PlatformData* GetPlatformData() const { return mPlatformData; }
- void* StackTop() const { return mStackTop; }
-
- virtual void SetPendingDelete();
- bool IsPendingDelete() const { return mPendingDelete; }
-
-#ifndef SPS_STANDALONE
- /**
- * May be null for the main thread if the profiler was started during startup
- */
- nsIThread* GetThread() const { return mThread.get(); }
-
-#endif
-
- bool CanInvokeJS() const;
-
- private:
- char* mName;
- int mThreadId;
- const bool mIsMainThread;
- PseudoStack* mPseudoStack;
- PlatformData* mPlatformData;
- ThreadProfile* mProfile;
- void* mStackTop;
-#ifndef SPS_STANDALONE
- nsCOMPtr<nsIThread> mThread;
-#endif
- bool mPendingDelete;
-};
-
-// Just like ThreadInfo, but owns a reference to the PseudoStack.
-class StackOwningThreadInfo : public ThreadInfo {
- public:
- StackOwningThreadInfo(const char* aName, int aThreadId, bool aIsMainThread, PseudoStack* aPseudoStack, void* aStackTop);
- virtual ~StackOwningThreadInfo();
-
- virtual void SetPendingDelete();
-};
-
-#endif
diff --git a/tools/profiler/core/ThreadProfile.cpp b/tools/profiler/core/ThreadProfile.cpp
deleted file mode 100644
index 7452a7ee8..000000000
--- a/tools/profiler/core/ThreadProfile.cpp
+++ /dev/null
@@ -1,260 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-ThreadProfile::ThreadProfile(ThreadInfo* aInfo, ProfileBuffer* aBuffer)
- : mThreadInfo(aInfo)
- , mBuffer(aBuffer)
- , mPseudoStack(aInfo->Stack())
- , mMutex(OS::CreateMutex("ThreadProfile::mMutex"))
- , mThreadId(int(aInfo->ThreadId()))
- , mIsMainThread(aInfo->IsMainThread())
- , mPlatformData(aInfo->GetPlatformData())
- , mStackTop(aInfo->StackTop())
-#ifndef SPS_STANDALONE
- , mRespInfo(this)
-#endif
-#ifdef XP_LINUX
- , mRssMemory(0)
- , mUssMemory(0)
-#endif
-{
- MOZ_COUNT_CTOR(ThreadProfile);
- MOZ_ASSERT(aBuffer);
-
- // I don't know if we can assert this. But we should warn.
- MOZ_ASSERT(aInfo->ThreadId() >= 0, "native thread ID is < 0");
- MOZ_ASSERT(aInfo->ThreadId() <= INT32_MAX, "native thread ID is > INT32_MAX");
-}
-
-ThreadProfile::~ThreadProfile()
-{
- MOZ_COUNT_DTOR(ThreadProfile);
-}
-
-void ThreadProfile::addTag(const ProfileEntry& aTag)
-{
- mBuffer->addTag(aTag);
-}
-
-void ThreadProfile::addStoredMarker(ProfilerMarker *aStoredMarker) {
- mBuffer->addStoredMarker(aStoredMarker);
-}
-
-void ThreadProfile::StreamJSON(SpliceableJSONWriter& aWriter, double aSinceTime)
-{
- // mUniqueStacks may already be emplaced from FlushSamplesAndMarkers.
- if (!mUniqueStacks.isSome()) {
-#ifndef SPS_STANDALONE
- mUniqueStacks.emplace(mPseudoStack->mContext);
-#else
- mUniqueStacks.emplace(nullptr);
-#endif
- }
-
- aWriter.Start(SpliceableJSONWriter::SingleLineStyle);
- {
- StreamSamplesAndMarkers(aWriter, aSinceTime, *mUniqueStacks);
-
- aWriter.StartObjectProperty("stackTable");
- {
- {
- JSONSchemaWriter schema(aWriter);
- schema.WriteField("prefix");
- schema.WriteField("frame");
- }
-
- aWriter.StartArrayProperty("data");
- {
- mUniqueStacks->SpliceStackTableElements(aWriter);
- }
- aWriter.EndArray();
- }
- aWriter.EndObject();
-
- aWriter.StartObjectProperty("frameTable");
- {
- {
- JSONSchemaWriter schema(aWriter);
- schema.WriteField("location");
- schema.WriteField("implementation");
- schema.WriteField("optimizations");
- schema.WriteField("line");
- schema.WriteField("category");
- }
-
- aWriter.StartArrayProperty("data");
- {
- mUniqueStacks->SpliceFrameTableElements(aWriter);
- }
- aWriter.EndArray();
- }
- aWriter.EndObject();
-
- aWriter.StartArrayProperty("stringTable");
- {
- mUniqueStacks->mUniqueStrings.SpliceStringTableElements(aWriter);
- }
- aWriter.EndArray();
- }
- aWriter.End();
-
- mUniqueStacks.reset();
-}
-
-void ThreadProfile::StreamSamplesAndMarkers(SpliceableJSONWriter& aWriter, double aSinceTime,
- UniqueStacks& aUniqueStacks)
-{
-#ifndef SPS_STANDALONE
- // Thread meta data
- if (XRE_GetProcessType() == GeckoProcessType_Plugin) {
- // TODO Add the proper plugin name
- aWriter.StringProperty("name", "Plugin");
- } else if (XRE_GetProcessType() == GeckoProcessType_Content) {
- // This isn't going to really help once we have multiple content
- // processes, but it'll do for now.
- aWriter.StringProperty("name", "Content");
- } else {
- aWriter.StringProperty("name", Name());
- }
-#else
- aWriter.StringProperty("name", Name());
-#endif
-
- aWriter.IntProperty("tid", static_cast<int>(mThreadId));
-
- aWriter.StartObjectProperty("samples");
- {
- {
- JSONSchemaWriter schema(aWriter);
- schema.WriteField("stack");
- schema.WriteField("time");
- schema.WriteField("responsiveness");
- schema.WriteField("rss");
- schema.WriteField("uss");
- schema.WriteField("frameNumber");
- schema.WriteField("power");
- }
-
- aWriter.StartArrayProperty("data");
- {
- if (mSavedStreamedSamples) {
- // We would only have saved streamed samples during shutdown
- // streaming, which cares about dumping the entire buffer, and thus
- // should have passed in 0 for aSinceTime.
- MOZ_ASSERT(aSinceTime == 0);
- aWriter.Splice(mSavedStreamedSamples.get());
- mSavedStreamedSamples.reset();
- }
- mBuffer->StreamSamplesToJSON(aWriter, mThreadId, aSinceTime,
-#ifndef SPS_STANDALONE
- mPseudoStack->mContext,
-#else
- nullptr,
-#endif
- aUniqueStacks);
- }
- aWriter.EndArray();
- }
- aWriter.EndObject();
-
- aWriter.StartObjectProperty("markers");
- {
- {
- JSONSchemaWriter schema(aWriter);
- schema.WriteField("name");
- schema.WriteField("time");
- schema.WriteField("data");
- }
-
- aWriter.StartArrayProperty("data");
- {
- if (mSavedStreamedMarkers) {
- MOZ_ASSERT(aSinceTime == 0);
- aWriter.Splice(mSavedStreamedMarkers.get());
- mSavedStreamedMarkers.reset();
- }
- mBuffer->StreamMarkersToJSON(aWriter, mThreadId, aSinceTime, aUniqueStacks);
- }
- aWriter.EndArray();
- }
- aWriter.EndObject();
-}
-
-void ThreadProfile::FlushSamplesAndMarkers()
-{
- // This function is used to serialize the current buffer just before
- // JSContext destruction.
- MOZ_ASSERT(mPseudoStack->mContext);
-
- // Unlike StreamJSObject, do not surround the samples in brackets by calling
- // aWriter.{Start,End}BareList. The result string will be a comma-separated
- // list of JSON object literals that will prepended by StreamJSObject into
- // an existing array.
- //
- // Note that the UniqueStacks instance is persisted so that the frame-index
- // mapping is stable across JS shutdown.
-#ifndef SPS_STANDALONE
- mUniqueStacks.emplace(mPseudoStack->mContext);
-#else
- mUniqueStacks.emplace(nullptr);
-#endif
-
- {
- SpliceableChunkedJSONWriter b;
- b.StartBareList();
- {
- mBuffer->StreamSamplesToJSON(b, mThreadId, /* aSinceTime = */ 0,
-#ifndef SPS_STANDALONE
- mPseudoStack->mContext,
-#else
- nullptr,
-#endif
- *mUniqueStacks);
- }
- b.EndBareList();
- mSavedStreamedSamples = b.WriteFunc()->CopyData();
- }
-
- {
- SpliceableChunkedJSONWriter b;
- b.StartBareList();
- {
- mBuffer->StreamMarkersToJSON(b, mThreadId, /* aSinceTime = */ 0, *mUniqueStacks);
- }
- b.EndBareList();
- mSavedStreamedMarkers = b.WriteFunc()->CopyData();
- }
-
- // Reset the buffer. Attempting to symbolicate JS samples after mContext has
- // gone away will crash.
- mBuffer->reset();
-}
-
-PseudoStack* ThreadProfile::GetPseudoStack()
-{
- return mPseudoStack;
-}
-
-void ThreadProfile::BeginUnwind()
-{
- mMutex->Lock();
-}
-
-void ThreadProfile::EndUnwind()
-{
- mMutex->Unlock();
-}
-
-::Mutex& ThreadProfile::GetMutex()
-{
- return *mMutex.get();
-}
-
-void ThreadProfile::DuplicateLastSample()
-{
- mBuffer->DuplicateLastSample(mThreadId);
-}
-
diff --git a/tools/profiler/core/ThreadProfile.h b/tools/profiler/core/ThreadProfile.h
deleted file mode 100644
index ca2bbfe7a..000000000
--- a/tools/profiler/core/ThreadProfile.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef MOZ_THREAD_PROFILE_H
-#define MOZ_THREAD_PROFILE_H
-
-#include "ProfileBuffer.h"
-#include "ThreadInfo.h"
-
-class ThreadProfile
-{
-public:
- ThreadProfile(ThreadInfo* aThreadInfo, ProfileBuffer* aBuffer);
- virtual ~ThreadProfile();
- void addTag(const ProfileEntry& aTag);
-
- /**
- * Track a marker which has been inserted into the ThreadProfile.
- * This marker can safely be deleted once the generation has
- * expired.
- */
- void addStoredMarker(ProfilerMarker *aStoredMarker);
- PseudoStack* GetPseudoStack();
- ::Mutex& GetMutex();
- void StreamJSON(SpliceableJSONWriter& aWriter, double aSinceTime = 0);
-
- /**
- * Call this method when the JS entries inside the buffer are about to
- * become invalid, i.e., just before JS shutdown.
- */
- void FlushSamplesAndMarkers();
-
- void BeginUnwind();
- virtual void EndUnwind();
- virtual SyncProfile* AsSyncProfile() { return nullptr; }
-
- bool IsMainThread() const { return mIsMainThread; }
- const char* Name() const { return mThreadInfo->Name(); }
- int ThreadId() const { return mThreadId; }
-
- PlatformData* GetPlatformData() const { return mPlatformData; }
- void* GetStackTop() const { return mStackTop; }
- void DuplicateLastSample();
-
- ThreadInfo* GetThreadInfo() const { return mThreadInfo; }
-#ifndef SPS_STANDALONE
- ThreadResponsiveness* GetThreadResponsiveness() { return &mRespInfo; }
-#endif
-
- bool CanInvokeJS() const { return mThreadInfo->CanInvokeJS(); }
-
- void SetPendingDelete()
- {
- mPseudoStack = nullptr;
- mPlatformData = nullptr;
- }
-
- uint32_t bufferGeneration() const {
- return mBuffer->mGeneration;
- }
-
-protected:
- void StreamSamplesAndMarkers(SpliceableJSONWriter& aWriter, double aSinceTime,
- UniqueStacks& aUniqueStacks);
-
-private:
- FRIEND_TEST(ThreadProfile, InsertOneTag);
- FRIEND_TEST(ThreadProfile, InsertOneTagWithTinyBuffer);
- FRIEND_TEST(ThreadProfile, InsertTagsNoWrap);
- FRIEND_TEST(ThreadProfile, InsertTagsWrap);
- FRIEND_TEST(ThreadProfile, MemoryMeasure);
- ThreadInfo* mThreadInfo;
-
- const RefPtr<ProfileBuffer> mBuffer;
-
- // JS frames in the buffer may require a live JSRuntime to stream (e.g.,
- // stringifying JIT frames). In the case of JSRuntime destruction,
- // FlushSamplesAndMarkers should be called to save them. These are spliced
- // into the final stream.
- mozilla::UniquePtr<char[]> mSavedStreamedSamples;
- mozilla::UniquePtr<char[]> mSavedStreamedMarkers;
- mozilla::Maybe<UniqueStacks> mUniqueStacks;
-
- PseudoStack* mPseudoStack;
- mozilla::UniquePtr<Mutex> mMutex;
- int mThreadId;
- bool mIsMainThread;
- PlatformData* mPlatformData; // Platform specific data.
- void* const mStackTop;
-#ifndef SPS_STANDALONE
- ThreadResponsiveness mRespInfo;
-#endif
-
- // Only Linux is using a signal sender, instead of stopping the thread, so we
- // need some space to store the data which cannot be collected in the signal
- // handler code.
-#ifdef XP_LINUX
-public:
- int64_t mRssMemory;
- int64_t mUssMemory;
-#endif
-};
-
-#endif
diff --git a/tools/profiler/core/platform-linux.cc b/tools/profiler/core/platform-linux.cc
deleted file mode 100644
index 160873c9d..000000000
--- a/tools/profiler/core/platform-linux.cc
+++ /dev/null
@@ -1,715 +0,0 @@
-// Copyright (c) 2006-2011 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google, Inc. nor the names of its contributors
-// may be used to endorse or promote products derived from this
-// software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE.
-
-/*
-# vim: sw=2
-*/
-#include <stdio.h>
-#include <math.h>
-
-#include <pthread.h>
-#include <semaphore.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/syscall.h>
-#include <sys/types.h>
-#include <sys/prctl.h> // set name
-#include <stdlib.h>
-#include <sched.h>
-#ifdef ANDROID
-#include <android/log.h>
-#else
-#define __android_log_print(a, ...)
-#endif
-#include <ucontext.h>
-// Ubuntu Dapper requires memory pages to be marked as
-// executable. Otherwise, OS raises an exception when executing code
-// in that page.
-#include <sys/types.h> // mmap & munmap
-#include <sys/mman.h> // mmap & munmap
-#include <sys/stat.h> // open
-#include <fcntl.h> // open
-#include <unistd.h> // sysconf
-#include <semaphore.h>
-#ifdef __GLIBC__
-#include <execinfo.h> // backtrace, backtrace_symbols
-#endif // def __GLIBC__
-#include <strings.h> // index
-#include <errno.h>
-#include <stdarg.h>
-#include "prenv.h"
-#include "platform.h"
-#include "GeckoProfiler.h"
-#include "mozilla/Mutex.h"
-#include "mozilla/Atomics.h"
-#include "mozilla/LinuxSignal.h"
-#include "mozilla/TimeStamp.h"
-#include "mozilla/DebugOnly.h"
-#include "ProfileEntry.h"
-#include "nsThreadUtils.h"
-#include "GeckoSampler.h"
-#include "ThreadResponsiveness.h"
-
-#if defined(__ARM_EABI__) && defined(ANDROID)
- // Should also work on other Android and ARM Linux, but not tested there yet.
-# define USE_EHABI_STACKWALK
-# include "EHABIStackWalk.h"
-#elif defined(SPS_PLAT_amd64_linux) || defined(SPS_PLAT_x86_linux)
-# define USE_LUL_STACKWALK
-# include "lul/LulMain.h"
-# include "lul/platform-linux-lul.h"
-#endif
-
-// Memory profile
-#include "nsMemoryReporterManager.h"
-
-#include <string.h>
-#include <list>
-
-#define SIGNAL_SAVE_PROFILE SIGUSR2
-
-using namespace mozilla;
-
-#if defined(USE_LUL_STACKWALK)
-// A singleton instance of the library. It is initialised at first
-// use. Currently only the main thread can call Sampler::Start, so
-// there is no need for a mechanism to ensure that it is only
-// created once in a multi-thread-use situation.
-lul::LUL* sLUL = nullptr;
-
-// This is the sLUL initialization routine.
-static void sLUL_initialization_routine(void)
-{
- MOZ_ASSERT(!sLUL);
- MOZ_ASSERT(gettid() == getpid()); /* "this is the main thread" */
- sLUL = new lul::LUL(logging_sink_for_LUL);
- // Read all the unwind info currently available.
- read_procmaps(sLUL);
-}
-#endif
-
-/* static */ Thread::tid_t
-Thread::GetCurrentId()
-{
- return gettid();
-}
-
-#if !defined(ANDROID)
-// Keep track of when any of our threads calls fork(), so we can
-// temporarily disable signal delivery during the fork() call. Not
-// doing so appears to cause a kind of race, in which signals keep
-// getting delivered to the thread doing fork(), which keeps causing
-// it to fail and be restarted; hence forward progress is delayed a
-// great deal. A side effect of this is to permanently disable
-// sampling in the child process. See bug 837390.
-
-// Unfortunately this is only doable on non-Android, since Bionic
-// doesn't have pthread_atfork.
-
-// This records the current state at the time we paused it.
-static bool was_paused = false;
-
-// In the parent, just before the fork, record the pausedness state,
-// and then pause.
-static void paf_prepare(void) {
- if (Sampler::GetActiveSampler()) {
- was_paused = Sampler::GetActiveSampler()->IsPaused();
- Sampler::GetActiveSampler()->SetPaused(true);
- } else {
- was_paused = false;
- }
-}
-
-// In the parent, just after the fork, return pausedness to the
-// pre-fork state.
-static void paf_parent(void) {
- if (Sampler::GetActiveSampler())
- Sampler::GetActiveSampler()->SetPaused(was_paused);
-}
-
-// Set up the fork handlers.
-static void* setup_atfork() {
- pthread_atfork(paf_prepare, paf_parent, NULL);
- return NULL;
-}
-#endif /* !defined(ANDROID) */
-
-struct SamplerRegistry {
- static void AddActiveSampler(Sampler *sampler) {
- ASSERT(!SamplerRegistry::sampler);
- SamplerRegistry::sampler = sampler;
- }
- static void RemoveActiveSampler(Sampler *sampler) {
- SamplerRegistry::sampler = NULL;
- }
- static Sampler *sampler;
-};
-
-Sampler *SamplerRegistry::sampler = NULL;
-
-static mozilla::Atomic<ThreadProfile*> sCurrentThreadProfile;
-static sem_t sSignalHandlingDone;
-
-static void ProfilerSaveSignalHandler(int signal, siginfo_t* info, void* context) {
- Sampler::GetActiveSampler()->RequestSave();
-}
-
-static void SetSampleContext(TickSample* sample, void* context)
-{
- // Extracting the sample from the context is extremely machine dependent.
- ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
- mcontext_t& mcontext = ucontext->uc_mcontext;
-#if V8_HOST_ARCH_IA32
- sample->pc = reinterpret_cast<Address>(mcontext.gregs[REG_EIP]);
- sample->sp = reinterpret_cast<Address>(mcontext.gregs[REG_ESP]);
- sample->fp = reinterpret_cast<Address>(mcontext.gregs[REG_EBP]);
-#elif V8_HOST_ARCH_X64
- sample->pc = reinterpret_cast<Address>(mcontext.gregs[REG_RIP]);
- sample->sp = reinterpret_cast<Address>(mcontext.gregs[REG_RSP]);
- sample->fp = reinterpret_cast<Address>(mcontext.gregs[REG_RBP]);
-#elif V8_HOST_ARCH_ARM
-// An undefined macro evaluates to 0, so this applies to Android's Bionic also.
-#if !defined(ANDROID) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
- sample->pc = reinterpret_cast<Address>(mcontext.gregs[R15]);
- sample->sp = reinterpret_cast<Address>(mcontext.gregs[R13]);
- sample->fp = reinterpret_cast<Address>(mcontext.gregs[R11]);
-#ifdef ENABLE_ARM_LR_SAVING
- sample->lr = reinterpret_cast<Address>(mcontext.gregs[R14]);
-#endif
-#else
- sample->pc = reinterpret_cast<Address>(mcontext.arm_pc);
- sample->sp = reinterpret_cast<Address>(mcontext.arm_sp);
- sample->fp = reinterpret_cast<Address>(mcontext.arm_fp);
-#ifdef ENABLE_ARM_LR_SAVING
- sample->lr = reinterpret_cast<Address>(mcontext.arm_lr);
-#endif
-#endif
-#elif V8_HOST_ARCH_MIPS
- // Implement this on MIPS.
- UNIMPLEMENTED();
-#endif
-}
-
-#ifdef ANDROID
-#define V8_HOST_ARCH_ARM 1
-#define SYS_gettid __NR_gettid
-#define SYS_tgkill __NR_tgkill
-#else
-#define V8_HOST_ARCH_X64 1
-#endif
-
-namespace {
-
-void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
- // Avoid TSan warning about clobbering errno.
- int savedErrno = errno;
-
- if (!Sampler::GetActiveSampler()) {
- sem_post(&sSignalHandlingDone);
- errno = savedErrno;
- return;
- }
-
- TickSample sample_obj;
- TickSample* sample = &sample_obj;
- sample->context = context;
-
- // If profiling, we extract the current pc and sp.
- if (Sampler::GetActiveSampler()->IsProfiling()) {
- SetSampleContext(sample, context);
- }
- sample->threadProfile = sCurrentThreadProfile;
- sample->timestamp = mozilla::TimeStamp::Now();
- sample->rssMemory = sample->threadProfile->mRssMemory;
- sample->ussMemory = sample->threadProfile->mUssMemory;
-
- Sampler::GetActiveSampler()->Tick(sample);
-
- sCurrentThreadProfile = NULL;
- sem_post(&sSignalHandlingDone);
- errno = savedErrno;
-}
-
-} // namespace
-
-static void ProfilerSignalThread(ThreadProfile *profile,
- bool isFirstProfiledThread)
-{
- if (isFirstProfiledThread && Sampler::GetActiveSampler()->ProfileMemory()) {
- profile->mRssMemory = nsMemoryReporterManager::ResidentFast();
- profile->mUssMemory = nsMemoryReporterManager::ResidentUnique();
- } else {
- profile->mRssMemory = 0;
- profile->mUssMemory = 0;
- }
-}
-
-int tgkill(pid_t tgid, pid_t tid, int signalno) {
- return syscall(SYS_tgkill, tgid, tid, signalno);
-}
-
-class PlatformData {
- public:
- PlatformData()
- {
- MOZ_COUNT_CTOR(PlatformData);
- }
-
- ~PlatformData()
- {
- MOZ_COUNT_DTOR(PlatformData);
- }
-};
-
-/* static */ PlatformData*
-Sampler::AllocPlatformData(int aThreadId)
-{
- return new PlatformData;
-}
-
-/* static */ void
-Sampler::FreePlatformData(PlatformData* aData)
-{
- delete aData;
-}
-
-static void* SignalSender(void* arg) {
- // Taken from platform_thread_posix.cc
- prctl(PR_SET_NAME, "SamplerThread", 0, 0, 0);
-
- int vm_tgid_ = getpid();
- DebugOnly<int> my_tid = gettid();
-
- unsigned int nSignalsSent = 0;
-
- TimeDuration lastSleepOverhead = 0;
- TimeStamp sampleStart = TimeStamp::Now();
- while (SamplerRegistry::sampler->IsActive()) {
-
- SamplerRegistry::sampler->HandleSaveRequest();
- SamplerRegistry::sampler->DeleteExpiredMarkers();
-
- if (!SamplerRegistry::sampler->IsPaused()) {
- ::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
- std::vector<ThreadInfo*> threads =
- SamplerRegistry::sampler->GetRegisteredThreads();
-
- bool isFirstProfiledThread = true;
- for (uint32_t i = 0; i < threads.size(); i++) {
- ThreadInfo* info = threads[i];
-
- // This will be null if we're not interested in profiling this thread.
- if (!info->Profile() || info->IsPendingDelete())
- continue;
-
- PseudoStack::SleepState sleeping = info->Stack()->observeSleeping();
- if (sleeping == PseudoStack::SLEEPING_AGAIN) {
- info->Profile()->DuplicateLastSample();
- continue;
- }
-
- info->Profile()->GetThreadResponsiveness()->Update();
-
- // We use sCurrentThreadProfile the ThreadProfile for the
- // thread we're profiling to the signal handler
- sCurrentThreadProfile = info->Profile();
-
- int threadId = info->ThreadId();
- MOZ_ASSERT(threadId != my_tid);
-
- // Profile from the signal sender for information which is not signal
- // safe, and will have low variation between the emission of the signal
- // and the signal handler catch.
- ProfilerSignalThread(sCurrentThreadProfile, isFirstProfiledThread);
-
- // Profile from the signal handler for information which is signal safe
- // and needs to be precise too, such as the stack of the interrupted
- // thread.
- if (tgkill(vm_tgid_, threadId, SIGPROF) != 0) {
- printf_stderr("profiler failed to signal tid=%d\n", threadId);
-#ifdef DEBUG
- abort();
-#else
- continue;
-#endif
- }
-
- // Wait for the signal handler to run before moving on to the next one
- sem_wait(&sSignalHandlingDone);
- isFirstProfiledThread = false;
-
- // The LUL unwind object accumulates frame statistics.
- // Periodically we should poke it to give it a chance to print
- // those statistics. This involves doing I/O (fprintf,
- // __android_log_print, etc) and so can't safely be done from
- // the unwinder threads, which is why it is done here.
- if ((++nSignalsSent & 0xF) == 0) {
-# if defined(USE_LUL_STACKWALK)
- sLUL->MaybeShowStats();
-# endif
- }
- }
- }
-
- TimeStamp targetSleepEndTime = sampleStart + TimeDuration::FromMicroseconds(SamplerRegistry::sampler->interval() * 1000);
- TimeStamp beforeSleep = TimeStamp::Now();
- TimeDuration targetSleepDuration = targetSleepEndTime - beforeSleep;
- double sleepTime = std::max(0.0, (targetSleepDuration - lastSleepOverhead).ToMicroseconds());
- OS::SleepMicro(sleepTime);
- sampleStart = TimeStamp::Now();
- lastSleepOverhead = sampleStart - (beforeSleep + TimeDuration::FromMicroseconds(sleepTime));
- }
- return 0;
-}
-
-Sampler::Sampler(double interval, bool profiling, int entrySize)
- : interval_(interval),
- profiling_(profiling),
- paused_(false),
- active_(false),
- entrySize_(entrySize) {
- MOZ_COUNT_CTOR(Sampler);
-}
-
-Sampler::~Sampler() {
- MOZ_COUNT_DTOR(Sampler);
- ASSERT(!signal_sender_launched_);
-}
-
-
-void Sampler::Start() {
- LOG("Sampler started");
-
-#if defined(USE_EHABI_STACKWALK)
- mozilla::EHABIStackWalkInit();
-#elif defined(USE_LUL_STACKWALK)
- // NOTE: this isn't thread-safe. But we expect Sampler::Start to be
- // called only from the main thread, so this is OK in general.
- if (!sLUL) {
- sLUL_initialization_routine();
- }
-#endif
-
- SamplerRegistry::AddActiveSampler(this);
-
- // Initialize signal handler communication
- sCurrentThreadProfile = NULL;
- if (sem_init(&sSignalHandlingDone, /* pshared: */ 0, /* value: */ 0) != 0) {
- LOG("Error initializing semaphore");
- return;
- }
-
- // Request profiling signals.
- LOG("Request signal");
- struct sigaction sa;
- sa.sa_sigaction = MOZ_SIGNAL_TRAMPOLINE(ProfilerSignalHandler);
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_RESTART | SA_SIGINFO;
- if (sigaction(SIGPROF, &sa, &old_sigprof_signal_handler_) != 0) {
- LOG("Error installing signal");
- return;
- }
-
- // Request save profile signals
- struct sigaction sa2;
- sa2.sa_sigaction = ProfilerSaveSignalHandler;
- sigemptyset(&sa2.sa_mask);
- sa2.sa_flags = SA_RESTART | SA_SIGINFO;
- if (sigaction(SIGNAL_SAVE_PROFILE, &sa2, &old_sigsave_signal_handler_) != 0) {
- LOG("Error installing start signal");
- return;
- }
- LOG("Signal installed");
- signal_handler_installed_ = true;
-
-#if defined(USE_LUL_STACKWALK)
- // Switch into unwind mode. After this point, we can't add or
- // remove any unwind info to/from this LUL instance. The only thing
- // we can do with it is Unwind() calls.
- sLUL->EnableUnwinding();
-
- // Has a test been requested?
- if (PR_GetEnv("MOZ_PROFILER_LUL_TEST")) {
- int nTests = 0, nTestsPassed = 0;
- RunLulUnitTests(&nTests, &nTestsPassed, sLUL);
- }
-#endif
-
- // Start a thread that sends SIGPROF signal to VM thread.
- // Sending the signal ourselves instead of relying on itimer provides
- // much better accuracy.
- SetActive(true);
- if (pthread_create(
- &signal_sender_thread_, NULL, SignalSender, NULL) == 0) {
- signal_sender_launched_ = true;
- }
- LOG("Profiler thread started");
-}
-
-
-void Sampler::Stop() {
- SetActive(false);
-
- // Wait for signal sender termination (it will exit after setting
- // active_ to false).
- if (signal_sender_launched_) {
- pthread_join(signal_sender_thread_, NULL);
- signal_sender_launched_ = false;
- }
-
- SamplerRegistry::RemoveActiveSampler(this);
-
- // Restore old signal handler
- if (signal_handler_installed_) {
- sigaction(SIGNAL_SAVE_PROFILE, &old_sigsave_signal_handler_, 0);
- sigaction(SIGPROF, &old_sigprof_signal_handler_, 0);
- signal_handler_installed_ = false;
- }
-}
-
-bool Sampler::RegisterCurrentThread(const char* aName,
- PseudoStack* aPseudoStack,
- bool aIsMainThread, void* stackTop)
-{
- if (!Sampler::sRegisteredThreadsMutex)
- return false;
-
- ::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
-
- int id = gettid();
- for (uint32_t i = 0; i < sRegisteredThreads->size(); i++) {
- ThreadInfo* info = sRegisteredThreads->at(i);
- if (info->ThreadId() == id && !info->IsPendingDelete()) {
- // Thread already registered. This means the first unregister will be
- // too early.
- ASSERT(false);
- return false;
- }
- }
-
- set_tls_stack_top(stackTop);
-
- ThreadInfo* info = new StackOwningThreadInfo(aName, id,
- aIsMainThread, aPseudoStack, stackTop);
-
- if (sActiveSampler) {
- sActiveSampler->RegisterThread(info);
- }
-
- sRegisteredThreads->push_back(info);
-
- return true;
-}
-
-void Sampler::UnregisterCurrentThread()
-{
- if (!Sampler::sRegisteredThreadsMutex)
- return;
-
- tlsStackTop.set(nullptr);
-
- ::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
-
- int id = gettid();
-
- for (uint32_t i = 0; i < sRegisteredThreads->size(); i++) {
- ThreadInfo* info = sRegisteredThreads->at(i);
- if (info->ThreadId() == id && !info->IsPendingDelete()) {
- if (profiler_is_active()) {
- // We still want to show the results of this thread if you
- // save the profile shortly after a thread is terminated.
- // For now we will defer the delete to profile stop.
- info->SetPendingDelete();
- break;
- } else {
- delete info;
- sRegisteredThreads->erase(sRegisteredThreads->begin() + i);
- break;
- }
- }
- }
-}
-
-#ifdef ANDROID
-static struct sigaction old_sigstart_signal_handler;
-const int SIGSTART = SIGUSR2;
-
-static void freeArray(const char** array, int size) {
- for (int i = 0; i < size; i++) {
- free((void*) array[i]);
- }
-}
-
-static uint32_t readCSVArray(char* csvList, const char** buffer) {
- uint32_t count;
- char* savePtr;
- int newlinePos = strlen(csvList) - 1;
- if (csvList[newlinePos] == '\n') {
- csvList[newlinePos] = '\0';
- }
-
- char* item = strtok_r(csvList, ",", &savePtr);
- for (count = 0; item; item = strtok_r(NULL, ",", &savePtr)) {
- int length = strlen(item) + 1; // Include \0
- char* newBuf = (char*) malloc(sizeof(char) * length);
- buffer[count] = newBuf;
- strncpy(newBuf, item, length);
- count++;
- }
-
- return count;
-}
-
-// Currently support only the env variables
-// reported in read_profiler_env
-static void ReadProfilerVars(const char* fileName, const char** features,
- uint32_t* featureCount, const char** threadNames, uint32_t* threadCount) {
- FILE* file = fopen(fileName, "r");
- const int bufferSize = 1024;
- char line[bufferSize];
- char* feature;
- char* value;
- char* savePtr;
-
- if (file) {
- while (fgets(line, bufferSize, file) != NULL) {
- feature = strtok_r(line, "=", &savePtr);
- value = strtok_r(NULL, "", &savePtr);
-
- if (strncmp(feature, PROFILER_INTERVAL, bufferSize) == 0) {
- set_profiler_interval(value);
- } else if (strncmp(feature, PROFILER_ENTRIES, bufferSize) == 0) {
- set_profiler_entries(value);
- } else if (strncmp(feature, PROFILER_STACK, bufferSize) == 0) {
- set_profiler_scan(value);
- } else if (strncmp(feature, PROFILER_FEATURES, bufferSize) == 0) {
- *featureCount = readCSVArray(value, features);
- } else if (strncmp(feature, "threads", bufferSize) == 0) {
- *threadCount = readCSVArray(value, threadNames);
- }
- }
-
- fclose(file);
- }
-}
-
-static void DoStartTask() {
- uint32_t featureCount = 0;
- uint32_t threadCount = 0;
-
- // Just allocate 10 features for now
- // FIXME: these don't really point to const chars*
- // So we free them later, but we don't want to change the const char**
- // declaration in profiler_start. Annoying but ok for now.
- const char* threadNames[10];
- const char* features[10];
- const char* profilerConfigFile = "/data/local/tmp/profiler.options";
-
- ReadProfilerVars(profilerConfigFile, features, &featureCount, threadNames, &threadCount);
- MOZ_ASSERT(featureCount < 10);
- MOZ_ASSERT(threadCount < 10);
-
- profiler_start(PROFILE_DEFAULT_ENTRY, 1,
- features, featureCount,
- threadNames, threadCount);
-
- freeArray(threadNames, threadCount);
- freeArray(features, featureCount);
-}
-
-static void StartSignalHandler(int signal, siginfo_t* info, void* context) {
- class StartTask : public Runnable {
- public:
- NS_IMETHOD Run() override {
- DoStartTask();
- return NS_OK;
- }
- };
- // XXX: technically NS_DispatchToMainThread is NOT async signal safe. We risk
- // nasty things like deadlocks, but the probability is very low and we
- // typically only do this once so it tends to be ok. See bug 909403.
- NS_DispatchToMainThread(new StartTask());
-}
-
-void OS::Startup()
-{
- LOG("Registering start signal");
- struct sigaction sa;
- sa.sa_sigaction = StartSignalHandler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_RESTART | SA_SIGINFO;
- if (sigaction(SIGSTART, &sa, &old_sigstart_signal_handler) != 0) {
- LOG("Error installing signal");
- }
-}
-
-#else
-
-void OS::Startup() {
- // Set up the fork handlers.
- setup_atfork();
-}
-
-#endif
-
-
-
-void TickSample::PopulateContext(void* aContext)
-{
- MOZ_ASSERT(aContext);
- ucontext_t* pContext = reinterpret_cast<ucontext_t*>(aContext);
- if (!getcontext(pContext)) {
- context = pContext;
- SetSampleContext(this, aContext);
- }
-}
-
-void OS::SleepMicro(int microseconds)
-{
- if (MOZ_UNLIKELY(microseconds >= 1000000)) {
- // Use usleep for larger intervals, because the nanosleep
- // code below only supports intervals < 1 second.
- MOZ_ALWAYS_TRUE(!::usleep(microseconds));
- return;
- }
-
- struct timespec ts;
- ts.tv_sec = 0;
- ts.tv_nsec = microseconds * 1000UL;
-
- int rv = ::nanosleep(&ts, &ts);
-
- while (rv != 0 && errno == EINTR) {
- // Keep waiting in case of interrupt.
- // nanosleep puts the remaining time back into ts.
- rv = ::nanosleep(&ts, &ts);
- }
-
- MOZ_ASSERT(!rv, "nanosleep call failed");
-}
diff --git a/tools/profiler/core/platform-macos.cc b/tools/profiler/core/platform-macos.cc
deleted file mode 100644
index 9a98d1a26..000000000
--- a/tools/profiler/core/platform-macos.cc
+++ /dev/null
@@ -1,469 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <dlfcn.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <mach/mach_init.h>
-#include <mach-o/dyld.h>
-#include <mach-o/getsect.h>
-
-#include <AvailabilityMacros.h>
-
-#include <pthread.h>
-#include <semaphore.h>
-#include <signal.h>
-#include <libkern/OSAtomic.h>
-#include <mach/mach.h>
-#include <mach/semaphore.h>
-#include <mach/task.h>
-#include <mach/vm_statistics.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/types.h>
-#include <sys/sysctl.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <math.h>
-
-#ifndef SPS_STANDALONE
-#include "ThreadResponsiveness.h"
-#include "nsThreadUtils.h"
-
-// Memory profile
-#include "nsMemoryReporterManager.h"
-#endif
-
-#include "platform.h"
-#include "GeckoSampler.h"
-#include "mozilla/TimeStamp.h"
-
-using mozilla::TimeStamp;
-using mozilla::TimeDuration;
-
-// this port is based off of v8 svn revision 9837
-
-// XXX: this is a very stubbed out implementation
-// that only supports a single Sampler
-struct SamplerRegistry {
- static void AddActiveSampler(Sampler *sampler) {
- ASSERT(!SamplerRegistry::sampler);
- SamplerRegistry::sampler = sampler;
- }
- static void RemoveActiveSampler(Sampler *sampler) {
- SamplerRegistry::sampler = NULL;
- }
- static Sampler *sampler;
-};
-
-Sampler *SamplerRegistry::sampler = NULL;
-
-#ifdef DEBUG
-// 0 is never a valid thread id on MacOSX since a pthread_t is a pointer.
-static const pthread_t kNoThread = (pthread_t) 0;
-#endif
-
-void OS::Startup() {
-}
-
-void OS::Sleep(int milliseconds) {
- usleep(1000 * milliseconds);
-}
-
-void OS::SleepMicro(int microseconds) {
- usleep(microseconds);
-}
-
-Thread::Thread(const char* name)
- : stack_size_(0) {
- set_name(name);
-}
-
-
-Thread::~Thread() {
-}
-
-
-static void SetThreadName(const char* name) {
- // pthread_setname_np is only available in 10.6 or later, so test
- // for it at runtime.
- int (*dynamic_pthread_setname_np)(const char*);
- *reinterpret_cast<void**>(&dynamic_pthread_setname_np) =
- dlsym(RTLD_DEFAULT, "pthread_setname_np");
- if (!dynamic_pthread_setname_np)
- return;
-
- // Mac OS X does not expose the length limit of the name, so hardcode it.
- static const int kMaxNameLength = 63;
- USE(kMaxNameLength);
- ASSERT(Thread::kMaxThreadNameLength <= kMaxNameLength);
- dynamic_pthread_setname_np(name);
-}
-
-
-static void* ThreadEntry(void* arg) {
- Thread* thread = reinterpret_cast<Thread*>(arg);
-
- thread->thread_ = pthread_self();
- SetThreadName(thread->name());
- ASSERT(thread->thread_ != kNoThread);
- thread->Run();
- return NULL;
-}
-
-
-void Thread::set_name(const char* name) {
- strncpy(name_, name, sizeof(name_));
- name_[sizeof(name_) - 1] = '\0';
-}
-
-
-void Thread::Start() {
- pthread_attr_t* attr_ptr = NULL;
- pthread_attr_t attr;
- if (stack_size_ > 0) {
- pthread_attr_init(&attr);
- pthread_attr_setstacksize(&attr, static_cast<size_t>(stack_size_));
- attr_ptr = &attr;
- }
- pthread_create(&thread_, attr_ptr, ThreadEntry, this);
- ASSERT(thread_ != kNoThread);
-}
-
-void Thread::Join() {
- pthread_join(thread_, NULL);
-}
-
-class PlatformData {
- public:
- PlatformData() : profiled_thread_(mach_thread_self())
- {
- profiled_pthread_ = pthread_from_mach_thread_np(profiled_thread_);
- }
-
- ~PlatformData() {
- // Deallocate Mach port for thread.
- mach_port_deallocate(mach_task_self(), profiled_thread_);
- }
-
- thread_act_t profiled_thread() { return profiled_thread_; }
- pthread_t profiled_pthread() { return profiled_pthread_; }
-
- private:
- // Note: for profiled_thread_ Mach primitives are used instead of PThread's
- // because the latter doesn't provide thread manipulation primitives required.
- // For details, consult "Mac OS X Internals" book, Section 7.3.
- thread_act_t profiled_thread_;
- // we also store the pthread because Mach threads have no concept of stack
- // and we want to be able to get the stack size when we need to unwind the
- // stack using frame pointers.
- pthread_t profiled_pthread_;
-};
-
-/* static */ PlatformData*
-Sampler::AllocPlatformData(int aThreadId)
-{
- return new PlatformData;
-}
-
-/* static */ void
-Sampler::FreePlatformData(PlatformData* aData)
-{
- delete aData;
-}
-
-class SamplerThread : public Thread {
- public:
- explicit SamplerThread(double interval)
- : Thread("SamplerThread")
- , intervalMicro_(floor(interval * 1000 + 0.5))
- {
- if (intervalMicro_ <= 0) {
- intervalMicro_ = 1;
- }
- }
-
- static void AddActiveSampler(Sampler* sampler) {
- SamplerRegistry::AddActiveSampler(sampler);
- if (instance_ == NULL) {
- instance_ = new SamplerThread(sampler->interval());
- instance_->Start();
- }
- }
-
- static void RemoveActiveSampler(Sampler* sampler) {
- instance_->Join();
- //XXX: unlike v8 we need to remove the active sampler after doing the Join
- // because we drop the sampler immediately
- SamplerRegistry::RemoveActiveSampler(sampler);
- delete instance_;
- instance_ = NULL;
- }
-
- // Implement Thread::Run().
- virtual void Run() {
- TimeDuration lastSleepOverhead = 0;
- TimeStamp sampleStart = TimeStamp::Now();
- while (SamplerRegistry::sampler->IsActive()) {
- SamplerRegistry::sampler->DeleteExpiredMarkers();
- if (!SamplerRegistry::sampler->IsPaused()) {
- ::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
- std::vector<ThreadInfo*> threads =
- SamplerRegistry::sampler->GetRegisteredThreads();
- bool isFirstProfiledThread = true;
- for (uint32_t i = 0; i < threads.size(); i++) {
- ThreadInfo* info = threads[i];
-
- // This will be null if we're not interested in profiling this thread.
- if (!info->Profile() || info->IsPendingDelete())
- continue;
-
- PseudoStack::SleepState sleeping = info->Stack()->observeSleeping();
- if (sleeping == PseudoStack::SLEEPING_AGAIN) {
- info->Profile()->DuplicateLastSample();
- continue;
- }
-
-#ifndef SPS_STANDALONE
- info->Profile()->GetThreadResponsiveness()->Update();
-#endif
-
- ThreadProfile* thread_profile = info->Profile();
-
- SampleContext(SamplerRegistry::sampler, thread_profile,
- isFirstProfiledThread);
- isFirstProfiledThread = false;
- }
- }
-
- TimeStamp targetSleepEndTime = sampleStart + TimeDuration::FromMicroseconds(intervalMicro_);
- TimeStamp beforeSleep = TimeStamp::Now();
- TimeDuration targetSleepDuration = targetSleepEndTime - beforeSleep;
- double sleepTime = std::max(0.0, (targetSleepDuration - lastSleepOverhead).ToMicroseconds());
- OS::SleepMicro(sleepTime);
- sampleStart = TimeStamp::Now();
- lastSleepOverhead = sampleStart - (beforeSleep + TimeDuration::FromMicroseconds(sleepTime));
- }
- }
-
- void SampleContext(Sampler* sampler, ThreadProfile* thread_profile,
- bool isFirstProfiledThread)
- {
- thread_act_t profiled_thread =
- thread_profile->GetPlatformData()->profiled_thread();
-
- TickSample sample_obj;
- TickSample* sample = &sample_obj;
-
- // Unique Set Size is not supported on Mac.
- sample->ussMemory = 0;
- sample->rssMemory = 0;
-
-#ifndef SPS_STANDALONE
- if (isFirstProfiledThread && Sampler::GetActiveSampler()->ProfileMemory()) {
- sample->rssMemory = nsMemoryReporterManager::ResidentFast();
- }
-#endif
-
- // We're using thread_suspend on OS X because pthread_kill (which is what
- // we're using on Linux) has less consistent performance and causes
- // strange crashes, see bug 1166778 and bug 1166808.
-
- if (KERN_SUCCESS != thread_suspend(profiled_thread)) return;
-
-#if V8_HOST_ARCH_X64
- thread_state_flavor_t flavor = x86_THREAD_STATE64;
- x86_thread_state64_t state;
- mach_msg_type_number_t count = x86_THREAD_STATE64_COUNT;
-#if __DARWIN_UNIX03
-#define REGISTER_FIELD(name) __r ## name
-#else
-#define REGISTER_FIELD(name) r ## name
-#endif // __DARWIN_UNIX03
-#elif V8_HOST_ARCH_IA32
- thread_state_flavor_t flavor = i386_THREAD_STATE;
- i386_thread_state_t state;
- mach_msg_type_number_t count = i386_THREAD_STATE_COUNT;
-#if __DARWIN_UNIX03
-#define REGISTER_FIELD(name) __e ## name
-#else
-#define REGISTER_FIELD(name) e ## name
-#endif // __DARWIN_UNIX03
-#else
-#error Unsupported Mac OS X host architecture.
-#endif // V8_HOST_ARCH
-
- if (thread_get_state(profiled_thread,
- flavor,
- reinterpret_cast<natural_t*>(&state),
- &count) == KERN_SUCCESS) {
- sample->pc = reinterpret_cast<Address>(state.REGISTER_FIELD(ip));
- sample->sp = reinterpret_cast<Address>(state.REGISTER_FIELD(sp));
- sample->fp = reinterpret_cast<Address>(state.REGISTER_FIELD(bp));
- sample->timestamp = mozilla::TimeStamp::Now();
- sample->threadProfile = thread_profile;
-
- sampler->Tick(sample);
- }
- thread_resume(profiled_thread);
- }
-
- int intervalMicro_;
- //RuntimeProfilerRateLimiter rate_limiter_;
-
- static SamplerThread* instance_;
-
- DISALLOW_COPY_AND_ASSIGN(SamplerThread);
-};
-
-#undef REGISTER_FIELD
-
-SamplerThread* SamplerThread::instance_ = NULL;
-
-Sampler::Sampler(double interval, bool profiling, int entrySize)
- : // isolate_(isolate),
- interval_(interval),
- profiling_(profiling),
- paused_(false),
- active_(false),
- entrySize_(entrySize) /*,
- samples_taken_(0)*/ {
-}
-
-
-Sampler::~Sampler() {
- ASSERT(!IsActive());
-}
-
-
-void Sampler::Start() {
- ASSERT(!IsActive());
- SetActive(true);
- SamplerThread::AddActiveSampler(this);
-}
-
-
-void Sampler::Stop() {
- ASSERT(IsActive());
- SetActive(false);
- SamplerThread::RemoveActiveSampler(this);
-}
-
-pthread_t
-Sampler::GetProfiledThread(PlatformData* aData)
-{
- return aData->profiled_pthread();
-}
-
-#include <sys/syscall.h>
-pid_t gettid()
-{
- return (pid_t) syscall(SYS_thread_selfid);
-}
-
-/* static */ Thread::tid_t
-Thread::GetCurrentId()
-{
- return gettid();
-}
-
-bool Sampler::RegisterCurrentThread(const char* aName,
- PseudoStack* aPseudoStack,
- bool aIsMainThread, void* stackTop)
-{
- if (!Sampler::sRegisteredThreadsMutex)
- return false;
-
-
- ::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
-
- int id = gettid();
- for (uint32_t i = 0; i < sRegisteredThreads->size(); i++) {
- ThreadInfo* info = sRegisteredThreads->at(i);
- if (info->ThreadId() == id && !info->IsPendingDelete()) {
- // Thread already registered. This means the first unregister will be
- // too early.
- ASSERT(false);
- return false;
- }
- }
-
- set_tls_stack_top(stackTop);
-
- ThreadInfo* info = new StackOwningThreadInfo(aName, id,
- aIsMainThread, aPseudoStack, stackTop);
-
- if (sActiveSampler) {
- sActiveSampler->RegisterThread(info);
- }
-
- sRegisteredThreads->push_back(info);
-
- return true;
-}
-
-void Sampler::UnregisterCurrentThread()
-{
- if (!Sampler::sRegisteredThreadsMutex)
- return;
-
- tlsStackTop.set(nullptr);
-
- ::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
-
- int id = gettid();
-
- for (uint32_t i = 0; i < sRegisteredThreads->size(); i++) {
- ThreadInfo* info = sRegisteredThreads->at(i);
- if (info->ThreadId() == id && !info->IsPendingDelete()) {
- if (profiler_is_active()) {
- // We still want to show the results of this thread if you
- // save the profile shortly after a thread is terminated.
- // For now we will defer the delete to profile stop.
- info->SetPendingDelete();
- break;
- } else {
- delete info;
- sRegisteredThreads->erase(sRegisteredThreads->begin() + i);
- break;
- }
- }
- }
-}
-
-void TickSample::PopulateContext(void* aContext)
-{
- // Note that this asm changes if PopulateContext's parameter list is altered
-#if defined(SPS_PLAT_amd64_darwin)
- asm (
- // Compute caller's %rsp by adding to %rbp:
- // 8 bytes for previous %rbp, 8 bytes for return address
- "leaq 0x10(%%rbp), %0\n\t"
- // Dereference %rbp to get previous %rbp
- "movq (%%rbp), %1\n\t"
- :
- "=r"(sp),
- "=r"(fp)
- );
-#elif defined(SPS_PLAT_x86_darwin)
- asm (
- // Compute caller's %esp by adding to %ebp:
- // 4 bytes for aContext + 4 bytes for return address +
- // 4 bytes for previous %ebp
- "leal 0xc(%%ebp), %0\n\t"
- // Dereference %ebp to get previous %ebp
- "movl (%%ebp), %1\n\t"
- :
- "=r"(sp),
- "=r"(fp)
- );
-#else
-# error "Unsupported architecture"
-#endif
- pc = reinterpret_cast<Address>(__builtin_extract_return_addr(
- __builtin_return_address(0)));
-}
-
diff --git a/tools/profiler/core/platform-win32.cc b/tools/profiler/core/platform-win32.cc
deleted file mode 100644
index 74b311f28..000000000
--- a/tools/profiler/core/platform-win32.cc
+++ /dev/null
@@ -1,431 +0,0 @@
-// Copyright (c) 2006-2011 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google, Inc. nor the names of its contributors
-// may be used to endorse or promote products derived from this
-// software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE.
-
-#include <windows.h>
-#include <mmsystem.h>
-#include <process.h>
-#include "platform.h"
-#include "GeckoSampler.h"
-#include "ThreadResponsiveness.h"
-#include "ProfileEntry.h"
-
-// Memory profile
-#include "nsMemoryReporterManager.h"
-
-#include "mozilla/StackWalk_windows.h"
-
-
-class PlatformData {
- public:
- // Get a handle to the calling thread. This is the thread that we are
- // going to profile. We need to make a copy of the handle because we are
- // going to use it in the sampler thread. Using GetThreadHandle() will
- // not work in this case. We're using OpenThread because DuplicateHandle
- // for some reason doesn't work in Chrome's sandbox.
- PlatformData(int aThreadId) : profiled_thread_(OpenThread(THREAD_GET_CONTEXT |
- THREAD_SUSPEND_RESUME |
- THREAD_QUERY_INFORMATION,
- false,
- aThreadId)) {}
-
- ~PlatformData() {
- if (profiled_thread_ != NULL) {
- CloseHandle(profiled_thread_);
- profiled_thread_ = NULL;
- }
- }
-
- HANDLE profiled_thread() { return profiled_thread_; }
-
- private:
- HANDLE profiled_thread_;
-};
-
-/* static */ PlatformData*
-Sampler::AllocPlatformData(int aThreadId)
-{
- return new PlatformData(aThreadId);
-}
-
-/* static */ void
-Sampler::FreePlatformData(PlatformData* aData)
-{
- delete aData;
-}
-
-uintptr_t
-Sampler::GetThreadHandle(PlatformData* aData)
-{
- return (uintptr_t) aData->profiled_thread();
-}
-
-class SamplerThread : public Thread {
- public:
- SamplerThread(double interval, Sampler* sampler)
- : Thread("SamplerThread")
- , sampler_(sampler)
- , interval_(interval)
- {
- interval_ = floor(interval + 0.5);
- if (interval_ <= 0) {
- interval_ = 1;
- }
- }
-
- static void StartSampler(Sampler* sampler) {
- if (instance_ == NULL) {
- instance_ = new SamplerThread(sampler->interval(), sampler);
- instance_->Start();
- } else {
- ASSERT(instance_->interval_ == sampler->interval());
- }
- }
-
- static void StopSampler() {
- instance_->Join();
- delete instance_;
- instance_ = NULL;
- }
-
- // Implement Thread::Run().
- virtual void Run() {
-
- // By default we'll not adjust the timer resolution which tends to be around
- // 16ms. However, if the requested interval is sufficiently low we'll try to
- // adjust the resolution to match.
- if (interval_ < 10)
- ::timeBeginPeriod(interval_);
-
- while (sampler_->IsActive()) {
- sampler_->DeleteExpiredMarkers();
-
- if (!sampler_->IsPaused()) {
- ::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
- std::vector<ThreadInfo*> threads =
- sampler_->GetRegisteredThreads();
- bool isFirstProfiledThread = true;
- for (uint32_t i = 0; i < threads.size(); i++) {
- ThreadInfo* info = threads[i];
-
- // This will be null if we're not interested in profiling this thread.
- if (!info->Profile() || info->IsPendingDelete())
- continue;
-
- PseudoStack::SleepState sleeping = info->Stack()->observeSleeping();
- if (sleeping == PseudoStack::SLEEPING_AGAIN) {
- info->Profile()->DuplicateLastSample();
- continue;
- }
-
- info->Profile()->GetThreadResponsiveness()->Update();
-
- ThreadProfile* thread_profile = info->Profile();
-
- SampleContext(sampler_, thread_profile, isFirstProfiledThread);
- isFirstProfiledThread = false;
- }
- }
- OS::Sleep(interval_);
- }
-
- // disable any timer resolution changes we've made
- if (interval_ < 10)
- ::timeEndPeriod(interval_);
- }
-
- void SampleContext(Sampler* sampler, ThreadProfile* thread_profile,
- bool isFirstProfiledThread)
- {
- uintptr_t thread = Sampler::GetThreadHandle(
- thread_profile->GetPlatformData());
- HANDLE profiled_thread = reinterpret_cast<HANDLE>(thread);
- if (profiled_thread == NULL)
- return;
-
- // Context used for sampling the register state of the profiled thread.
- CONTEXT context;
- memset(&context, 0, sizeof(context));
-
- TickSample sample_obj;
- TickSample* sample = &sample_obj;
-
- // Grab the timestamp before pausing the thread, to avoid deadlocks.
- sample->timestamp = mozilla::TimeStamp::Now();
- sample->threadProfile = thread_profile;
-
- if (isFirstProfiledThread && Sampler::GetActiveSampler()->ProfileMemory()) {
- sample->rssMemory = nsMemoryReporterManager::ResidentFast();
- } else {
- sample->rssMemory = 0;
- }
-
- // Unique Set Size is not supported on Windows.
- sample->ussMemory = 0;
-
- static const DWORD kSuspendFailed = static_cast<DWORD>(-1);
- if (SuspendThread(profiled_thread) == kSuspendFailed)
- return;
-
- // SuspendThread is asynchronous, so the thread may still be running.
- // Call GetThreadContext first to ensure the thread is really suspended.
- // See https://blogs.msdn.microsoft.com/oldnewthing/20150205-00/?p=44743.
-
- // Using only CONTEXT_CONTROL is faster but on 64-bit it causes crashes in
- // RtlVirtualUnwind (see bug 1120126) so we set all the flags.
-#if V8_HOST_ARCH_X64
- context.ContextFlags = CONTEXT_FULL;
-#else
- context.ContextFlags = CONTEXT_CONTROL;
-#endif
- if (!GetThreadContext(profiled_thread, &context)) {
- ResumeThread(profiled_thread);
- return;
- }
-
- // Threads that may invoke JS require extra attention. Since, on windows,
- // the jits also need to modify the same dynamic function table that we need
- // to get a stack trace, we have to be wary of that to avoid deadlock.
- //
- // When embedded in Gecko, for threads that aren't the main thread,
- // CanInvokeJS consults an unlocked value in the nsIThread, so we must
- // consult this after suspending the profiled thread to avoid racing
- // against a value change.
- if (thread_profile->CanInvokeJS()) {
- if (!TryAcquireStackWalkWorkaroundLock()) {
- ResumeThread(profiled_thread);
- return;
- }
-
- // It is safe to immediately drop the lock. We only need to contend with
- // the case in which the profiled thread held needed system resources.
- // If the profiled thread had held those resources, the trylock would have
- // failed. Anyone else who grabs those resources will continue to make
- // progress, since those threads are not suspended. Because of this,
- // we cannot deadlock with them, and should let them run as they please.
- ReleaseStackWalkWorkaroundLock();
- }
-
-#if V8_HOST_ARCH_X64
- sample->pc = reinterpret_cast<Address>(context.Rip);
- sample->sp = reinterpret_cast<Address>(context.Rsp);
- sample->fp = reinterpret_cast<Address>(context.Rbp);
-#else
- sample->pc = reinterpret_cast<Address>(context.Eip);
- sample->sp = reinterpret_cast<Address>(context.Esp);
- sample->fp = reinterpret_cast<Address>(context.Ebp);
-#endif
-
- sample->context = &context;
- sampler->Tick(sample);
-
- ResumeThread(profiled_thread);
- }
-
- Sampler* sampler_;
- int interval_; // units: ms
-
- // Protects the process wide state below.
- static SamplerThread* instance_;
-
- DISALLOW_COPY_AND_ASSIGN(SamplerThread);
-};
-
-SamplerThread* SamplerThread::instance_ = NULL;
-
-
-Sampler::Sampler(double interval, bool profiling, int entrySize)
- : interval_(interval),
- profiling_(profiling),
- paused_(false),
- active_(false),
- entrySize_(entrySize) {
-}
-
-Sampler::~Sampler() {
- ASSERT(!IsActive());
-}
-
-void Sampler::Start() {
- ASSERT(!IsActive());
- SetActive(true);
- SamplerThread::StartSampler(this);
-}
-
-void Sampler::Stop() {
- ASSERT(IsActive());
- SetActive(false);
- SamplerThread::StopSampler();
-}
-
-
-static const HANDLE kNoThread = INVALID_HANDLE_VALUE;
-
-static unsigned int __stdcall ThreadEntry(void* arg) {
- Thread* thread = reinterpret_cast<Thread*>(arg);
- thread->Run();
- return 0;
-}
-
-// Initialize a Win32 thread object. The thread has an invalid thread
-// handle until it is started.
-Thread::Thread(const char* name)
- : stack_size_(0) {
- thread_ = kNoThread;
- set_name(name);
-}
-
-void Thread::set_name(const char* name) {
- strncpy(name_, name, sizeof(name_));
- name_[sizeof(name_) - 1] = '\0';
-}
-
-// Close our own handle for the thread.
-Thread::~Thread() {
- if (thread_ != kNoThread) CloseHandle(thread_);
-}
-
-// Create a new thread. It is important to use _beginthreadex() instead of
-// the Win32 function CreateThread(), because the CreateThread() does not
-// initialize thread specific structures in the C runtime library.
-void Thread::Start() {
- thread_ = reinterpret_cast<HANDLE>(
- _beginthreadex(NULL,
- static_cast<unsigned>(stack_size_),
- ThreadEntry,
- this,
- 0,
- (unsigned int*) &thread_id_));
-}
-
-// Wait for thread to terminate.
-void Thread::Join() {
- if (thread_id_ != GetCurrentId()) {
- WaitForSingleObject(thread_, INFINITE);
- }
-}
-
-/* static */ Thread::tid_t
-Thread::GetCurrentId()
-{
- return GetCurrentThreadId();
-}
-
-void OS::Startup() {
-}
-
-void OS::Sleep(int milliseconds) {
- ::Sleep(milliseconds);
-}
-
-bool Sampler::RegisterCurrentThread(const char* aName,
- PseudoStack* aPseudoStack,
- bool aIsMainThread, void* stackTop)
-{
- if (!Sampler::sRegisteredThreadsMutex)
- return false;
-
-
- ::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
-
- int id = GetCurrentThreadId();
-
- for (uint32_t i = 0; i < sRegisteredThreads->size(); i++) {
- ThreadInfo* info = sRegisteredThreads->at(i);
- if (info->ThreadId() == id && !info->IsPendingDelete()) {
- // Thread already registered. This means the first unregister will be
- // too early.
- ASSERT(false);
- return false;
- }
- }
-
- set_tls_stack_top(stackTop);
-
- ThreadInfo* info = new StackOwningThreadInfo(aName, id,
- aIsMainThread, aPseudoStack, stackTop);
-
- if (sActiveSampler) {
- sActiveSampler->RegisterThread(info);
- }
-
- sRegisteredThreads->push_back(info);
-
- return true;
-}
-
-void Sampler::UnregisterCurrentThread()
-{
- if (!Sampler::sRegisteredThreadsMutex)
- return;
-
- tlsStackTop.set(nullptr);
-
- ::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
-
- int id = GetCurrentThreadId();
-
- for (uint32_t i = 0; i < sRegisteredThreads->size(); i++) {
- ThreadInfo* info = sRegisteredThreads->at(i);
- if (info->ThreadId() == id && !info->IsPendingDelete()) {
- if (profiler_is_active()) {
- // We still want to show the results of this thread if you
- // save the profile shortly after a thread is terminated.
- // For now we will defer the delete to profile stop.
- info->SetPendingDelete();
- break;
- } else {
- delete info;
- sRegisteredThreads->erase(sRegisteredThreads->begin() + i);
- break;
- }
- }
- }
-}
-
-void TickSample::PopulateContext(void* aContext)
-{
- MOZ_ASSERT(aContext);
- CONTEXT* pContext = reinterpret_cast<CONTEXT*>(aContext);
- context = pContext;
- RtlCaptureContext(pContext);
-
-#if defined(SPS_PLAT_amd64_windows)
-
- pc = reinterpret_cast<Address>(pContext->Rip);
- sp = reinterpret_cast<Address>(pContext->Rsp);
- fp = reinterpret_cast<Address>(pContext->Rbp);
-
-#elif defined(SPS_PLAT_x86_windows)
-
- pc = reinterpret_cast<Address>(pContext->Eip);
- sp = reinterpret_cast<Address>(pContext->Esp);
- fp = reinterpret_cast<Address>(pContext->Ebp);
-
-#endif
-}
-
diff --git a/tools/profiler/core/platform.cpp b/tools/profiler/core/platform.cpp
deleted file mode 100644
index a8a09d66f..000000000
--- a/tools/profiler/core/platform.cpp
+++ /dev/null
@@ -1,1257 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <ostream>
-#include <fstream>
-#include <sstream>
-#include <errno.h>
-
-#include "platform.h"
-#include "PlatformMacros.h"
-#include "mozilla/ArrayUtils.h"
-#include "mozilla/UniquePtr.h"
-#include "GeckoProfiler.h"
-#ifndef SPS_STANDALONE
-#include "ProfilerIOInterposeObserver.h"
-#include "mozilla/StaticPtr.h"
-#endif
-#include "mozilla/ThreadLocal.h"
-#include "mozilla/TimeStamp.h"
-#include "mozilla/Sprintf.h"
-#include "PseudoStack.h"
-#include "GeckoSampler.h"
-#ifndef SPS_STANDALONE
-#include "nsIObserverService.h"
-#include "nsDirectoryServiceUtils.h"
-#include "nsDirectoryServiceDefs.h"
-#include "nsXULAppAPI.h"
-#include "nsProfilerStartParams.h"
-#include "mozilla/Services.h"
-#include "nsThreadUtils.h"
-#endif
-#include "ProfilerMarkers.h"
-
-#ifdef MOZ_TASK_TRACER
-#include "GeckoTaskTracer.h"
-#endif
-
-#if defined(SPS_OS_android)
- #include "FennecJNIWrappers.h"
-#endif
-
-#if defined(SPS_OS_android)
-#include "FennecJNINatives.h"
-#endif
-
-#ifndef SPS_STANDALONE
-#if defined(SPS_PLAT_amd64_linux) || defined(SPS_PLAT_x86_linux)
-# define USE_LUL_STACKWALK
-# include "lul/LulMain.h"
-# include "lul/platform-linux-lul.h"
-#endif
-#endif
-
-#if defined(SPS_OS_android)
-class GeckoJavaSampler : public java::GeckoJavaSampler::Natives<GeckoJavaSampler>
-{
-private:
- GeckoJavaSampler();
-
-public:
- static double GetProfilerTime() {
- if (!profiler_is_active()) {
- return 0.0;
- }
- return profiler_time();
- };
-};
-#endif
-
-MOZ_THREAD_LOCAL(PseudoStack *) tlsPseudoStack;
-MOZ_THREAD_LOCAL(GeckoSampler *) tlsTicker;
-MOZ_THREAD_LOCAL(void *) tlsStackTop;
-// We need to track whether we've been initialized otherwise
-// we end up using tlsStack without initializing it.
-// Because tlsStack is totally opaque to us we can't reuse
-// it as the flag itself.
-bool stack_key_initialized;
-
-mozilla::TimeStamp sLastTracerEvent; // is raced on
-mozilla::TimeStamp sStartTime;
-int sFrameNumber = 0;
-int sLastFrameNumber = 0;
-int sInitCount = 0; // Each init must have a matched shutdown.
-static bool sIsProfiling = false; // is raced on
-static bool sIsGPUProfiling = false; // is raced on
-static bool sIsLayersDump = false; // is raced on
-static bool sIsDisplayListDump = false; // is raced on
-static bool sIsRestyleProfiling = false; // is raced on
-
-// Environment variables to control the profiler
-const char* PROFILER_HELP = "MOZ_PROFILER_HELP";
-const char* PROFILER_INTERVAL = "MOZ_PROFILER_INTERVAL";
-const char* PROFILER_ENTRIES = "MOZ_PROFILER_ENTRIES";
-const char* PROFILER_STACK = "MOZ_PROFILER_STACK_SCAN";
-const char* PROFILER_FEATURES = "MOZ_PROFILING_FEATURES";
-
-/* we don't need to worry about overflow because we only treat the
- * case of them being the same as special. i.e. we only run into
- * a problem if 2^32 events happen between samples that we need
- * to know are associated with different events */
-
-// Values harvested from env vars, that control the profiler.
-static int sUnwindInterval; /* in milliseconds */
-static int sUnwindStackScan; /* max # of dubious frames allowed */
-static int sProfileEntries; /* how many entries do we store? */
-
-std::vector<ThreadInfo*>* Sampler::sRegisteredThreads = nullptr;
-mozilla::UniquePtr< ::Mutex> Sampler::sRegisteredThreadsMutex;
-
-GeckoSampler* Sampler::sActiveSampler;
-
-#ifndef SPS_STANDALONE
-static mozilla::StaticAutoPtr<mozilla::ProfilerIOInterposeObserver>
- sInterposeObserver;
-#endif
-
-// The name that identifies the gecko thread for calls to
-// profiler_register_thread.
-static const char * gGeckoThreadName = "GeckoMain";
-
-void Sampler::Startup() {
- sRegisteredThreads = new std::vector<ThreadInfo*>();
- sRegisteredThreadsMutex = OS::CreateMutex("sRegisteredThreads mutex");
-
- // We could create the sLUL object and read unwind info into it at
- // this point. That would match the lifetime implied by destruction
- // of it in Sampler::Shutdown just below. However, that gives a big
- // delay on startup, even if no profiling is actually to be done.
- // So, instead, sLUL is created on demand at the first call to
- // Sampler::Start.
-}
-
-void Sampler::Shutdown() {
- while (sRegisteredThreads->size() > 0) {
- delete sRegisteredThreads->back();
- sRegisteredThreads->pop_back();
- }
-
- sRegisteredThreadsMutex = nullptr;
- delete sRegisteredThreads;
-
- // UnregisterThread can be called after shutdown in XPCShell. Thus
- // we need to point to null to ignore such a call after shutdown.
- sRegisteredThreadsMutex = nullptr;
- sRegisteredThreads = nullptr;
-
-#if defined(USE_LUL_STACKWALK)
- // Delete the sLUL object, if it actually got created.
- if (sLUL) {
- delete sLUL;
- sLUL = nullptr;
- }
-#endif
-}
-
-StackOwningThreadInfo::StackOwningThreadInfo(const char* aName, int aThreadId,
- bool aIsMainThread,
- PseudoStack* aPseudoStack,
- void* aStackTop)
- : ThreadInfo(aName, aThreadId, aIsMainThread, aPseudoStack, aStackTop)
-{
- aPseudoStack->ref();
-}
-
-StackOwningThreadInfo::~StackOwningThreadInfo()
-{
- PseudoStack* stack = Stack();
- if (stack) {
- stack->deref();
- }
-}
-
-void
-StackOwningThreadInfo::SetPendingDelete()
-{
- PseudoStack* stack = Stack();
- if (stack) {
- stack->deref();
- }
- ThreadInfo::SetPendingDelete();
-}
-
-ProfilerMarker::ProfilerMarker(const char* aMarkerName,
- ProfilerMarkerPayload* aPayload,
- double aTime)
- : mMarkerName(strdup(aMarkerName))
- , mPayload(aPayload)
- , mTime(aTime)
-{
-}
-
-ProfilerMarker::~ProfilerMarker() {
- free(mMarkerName);
- delete mPayload;
-}
-
-void
-ProfilerMarker::SetGeneration(uint32_t aGenID) {
- mGenID = aGenID;
-}
-
-double
-ProfilerMarker::GetTime() const {
- return mTime;
-}
-
-void ProfilerMarker::StreamJSON(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks) const
-{
- // Schema:
- // [name, time, data]
-
- aWriter.StartArrayElement();
- {
- aUniqueStacks.mUniqueStrings.WriteElement(aWriter, GetMarkerName());
- aWriter.DoubleElement(mTime);
- // TODO: Store the callsite for this marker if available:
- // if have location data
- // b.NameValue(marker, "location", ...);
- if (mPayload) {
- aWriter.StartObjectElement();
- {
- mPayload->StreamPayload(aWriter, aUniqueStacks);
- }
- aWriter.EndObject();
- }
- }
- aWriter.EndArray();
-}
-
-/* Has MOZ_PROFILER_VERBOSE been set? */
-
-// Verbosity control for the profiler. The aim is to check env var
-// MOZ_PROFILER_VERBOSE only once. However, we may need to temporarily
-// override that so as to print the profiler's help message. That's
-// what moz_profiler_set_verbosity is for.
-
-enum class ProfilerVerbosity : int8_t { UNCHECKED, NOTVERBOSE, VERBOSE };
-
-// Raced on, potentially
-static ProfilerVerbosity profiler_verbosity = ProfilerVerbosity::UNCHECKED;
-
-bool moz_profiler_verbose()
-{
- if (profiler_verbosity == ProfilerVerbosity::UNCHECKED) {
- if (getenv("MOZ_PROFILER_VERBOSE") != nullptr)
- profiler_verbosity = ProfilerVerbosity::VERBOSE;
- else
- profiler_verbosity = ProfilerVerbosity::NOTVERBOSE;
- }
-
- return profiler_verbosity == ProfilerVerbosity::VERBOSE;
-}
-
-void moz_profiler_set_verbosity(ProfilerVerbosity pv)
-{
- MOZ_ASSERT(pv == ProfilerVerbosity::UNCHECKED ||
- pv == ProfilerVerbosity::VERBOSE);
- profiler_verbosity = pv;
-}
-
-
-bool set_profiler_interval(const char* interval) {
- if (interval) {
- errno = 0;
- long int n = strtol(interval, (char**)nullptr, 10);
- if (errno == 0 && n >= 1 && n <= 1000) {
- sUnwindInterval = n;
- return true;
- }
- return false;
- }
-
- return true;
-}
-
-bool set_profiler_entries(const char* entries) {
- if (entries) {
- errno = 0;
- long int n = strtol(entries, (char**)nullptr, 10);
- if (errno == 0 && n > 0) {
- sProfileEntries = n;
- return true;
- }
- return false;
- }
-
- return true;
-}
-
-bool set_profiler_scan(const char* scanCount) {
- if (scanCount) {
- errno = 0;
- long int n = strtol(scanCount, (char**)nullptr, 10);
- if (errno == 0 && n >= 0 && n <= 100) {
- sUnwindStackScan = n;
- return true;
- }
- return false;
- }
-
- return true;
-}
-
-bool is_native_unwinding_avail() {
-# if defined(HAVE_NATIVE_UNWIND)
- return true;
-#else
- return false;
-#endif
-}
-
-// Read env vars at startup, so as to set:
-// sUnwindInterval, sProfileEntries, sUnwindStackScan.
-void read_profiler_env_vars()
-{
- /* Set defaults */
- sUnwindInterval = 0; /* We'll have to look elsewhere */
- sProfileEntries = 0;
-
- const char* interval = getenv(PROFILER_INTERVAL);
- const char* entries = getenv(PROFILER_ENTRIES);
- const char* scanCount = getenv(PROFILER_STACK);
-
- if (getenv(PROFILER_HELP)) {
- // Enable verbose output
- moz_profiler_set_verbosity(ProfilerVerbosity::VERBOSE);
- profiler_usage();
- // Now force the next enquiry of moz_profiler_verbose to re-query
- // env var MOZ_PROFILER_VERBOSE.
- moz_profiler_set_verbosity(ProfilerVerbosity::UNCHECKED);
- }
-
- if (!set_profiler_interval(interval) ||
- !set_profiler_entries(entries) ||
- !set_profiler_scan(scanCount)) {
- profiler_usage();
- } else {
- LOG( "SPS:");
- LOGF("SPS: Sampling interval = %d ms (zero means \"platform default\")",
- (int)sUnwindInterval);
- LOGF("SPS: Entry store size = %d (zero means \"platform default\")",
- (int)sProfileEntries);
- LOGF("SPS: UnwindStackScan = %d (max dubious frames per unwind).",
- (int)sUnwindStackScan);
- LOG( "SPS:");
- }
-}
-
-void profiler_usage() {
- LOG( "SPS: ");
- LOG( "SPS: Environment variable usage:");
- LOG( "SPS: ");
- LOG( "SPS: MOZ_PROFILER_HELP");
- LOG( "SPS: If set to any value, prints this message.");
- LOG( "SPS: ");
- LOG( "SPS: MOZ_PROFILER_INTERVAL=<number> (milliseconds, 1 to 1000)");
- LOG( "SPS: If unset, platform default is used.");
- LOG( "SPS: ");
- LOG( "SPS: MOZ_PROFILER_ENTRIES=<number> (count, minimum of 1)");
- LOG( "SPS: If unset, platform default is used.");
- LOG( "SPS: ");
- LOG( "SPS: MOZ_PROFILER_VERBOSE");
- LOG( "SPS: If set to any value, increases verbosity (recommended).");
- LOG( "SPS: ");
- LOG( "SPS: MOZ_PROFILER_STACK_SCAN=<number> (default is zero)");
- LOG( "SPS: The number of dubious (stack-scanned) frames allowed");
- LOG( "SPS: ");
- LOG( "SPS: MOZ_PROFILER_LUL_TEST");
- LOG( "SPS: If set to any value, runs LUL unit tests at startup of");
- LOG( "SPS: the unwinder thread, and prints a short summary of results.");
- LOG( "SPS: ");
- LOGF("SPS: This platform %s native unwinding.",
- is_native_unwinding_avail() ? "supports" : "does not support");
- LOG( "SPS: ");
-
- /* Re-set defaults */
- sUnwindInterval = 0; /* We'll have to look elsewhere */
- sProfileEntries = 0;
- sUnwindStackScan = 0;
-
- LOG( "SPS:");
- LOGF("SPS: Sampling interval = %d ms (zero means \"platform default\")",
- (int)sUnwindInterval);
- LOGF("SPS: Entry store size = %d (zero means \"platform default\")",
- (int)sProfileEntries);
- LOGF("SPS: UnwindStackScan = %d (max dubious frames per unwind).",
- (int)sUnwindStackScan);
- LOG( "SPS:");
-
- return;
-}
-
-void set_tls_stack_top(void* stackTop)
-{
- // Round |stackTop| up to the end of the containing page. We may
- // as well do this -- there's no danger of a fault, and we might
- // get a few more base-of-the-stack frames as a result. This
- // assumes that no target has a page size smaller than 4096.
- uintptr_t stackTopR = (uintptr_t)stackTop;
- if (stackTop) {
- stackTopR = (stackTopR & ~(uintptr_t)4095) + (uintptr_t)4095;
- }
- tlsStackTop.set((void*)stackTopR);
-}
-
-bool is_main_thread_name(const char* aName) {
- if (!aName) {
- return false;
- }
- return strcmp(aName, gGeckoThreadName) == 0;
-}
-
-#ifndef SPS_STANDALONE
-#ifdef HAVE_VA_COPY
-#define VARARGS_ASSIGN(foo, bar) VA_COPY(foo,bar)
-#elif defined(HAVE_VA_LIST_AS_ARRAY)
-#define VARARGS_ASSIGN(foo, bar) foo[0] = bar[0]
-#else
-#define VARARGS_ASSIGN(foo, bar) (foo) = (bar)
-#endif
-
-void
-mozilla_sampler_log(const char *fmt, va_list args)
-{
- if (profiler_is_active()) {
- // nsAutoCString AppendPrintf would be nicer but
- // this is mozilla external code
- char buf[2048];
- va_list argsCpy;
- VARARGS_ASSIGN(argsCpy, args);
- int required = VsprintfLiteral(buf, fmt, argsCpy);
- va_end(argsCpy);
-
- if (required < 0) {
- return; // silently drop for now
- } else if (required < 2048) {
- profiler_tracing("log", buf, TRACING_EVENT);
- } else {
- char* heapBuf = new char[required+1];
- va_list argsCpy;
- VARARGS_ASSIGN(argsCpy, args);
- vsnprintf(heapBuf, required+1, fmt, argsCpy);
- va_end(argsCpy);
- // EVENT_BACKTRACE could be used to get a source
- // for all log events. This could be a runtime
- // flag later.
- profiler_tracing("log", heapBuf, TRACING_EVENT);
- delete[] heapBuf;
- }
- }
-}
-#endif
-
-////////////////////////////////////////////////////////////////////////
-// BEGIN externally visible functions
-
-void mozilla_sampler_init(void* stackTop)
-{
- sInitCount++;
-
- if (stack_key_initialized)
- return;
-
-#ifdef MOZ_TASK_TRACER
- mozilla::tasktracer::InitTaskTracer();
-#endif
-
-#ifdef SPS_STANDALONE
- mozilla::TimeStamp::Startup();
-#endif
-
- LOG("BEGIN mozilla_sampler_init");
- if (!tlsPseudoStack.init() || !tlsTicker.init() || !tlsStackTop.init()) {
- LOG("Failed to init.");
- return;
- }
- bool ignore;
- sStartTime = mozilla::TimeStamp::ProcessCreation(ignore);
-
- stack_key_initialized = true;
-
- Sampler::Startup();
-
- PseudoStack *stack = PseudoStack::create();
- tlsPseudoStack.set(stack);
-
- bool isMainThread = true;
- Sampler::RegisterCurrentThread(isMainThread ?
- gGeckoThreadName : "Application Thread",
- stack, isMainThread, stackTop);
-
- // Read interval settings from MOZ_PROFILER_INTERVAL and stack-scan
- // threshhold from MOZ_PROFILER_STACK_SCAN.
- read_profiler_env_vars();
-
- // platform specific initialization
- OS::Startup();
-
-#ifndef SPS_STANDALONE
- set_stderr_callback(mozilla_sampler_log);
-#endif
-
-#if defined(SPS_OS_android)
- if (mozilla::jni::IsFennec()) {
- GeckoJavaSampler::Init();
- }
-#endif
-
- // We can't open pref so we use an environment variable
- // to know if we should trigger the profiler on startup
- // NOTE: Default
- const char *val = getenv("MOZ_PROFILER_STARTUP");
- if (!val || !*val) {
- return;
- }
-
- const char* features[] = {"js"
- , "leaf"
- , "threads"
-#if defined(XP_WIN) || defined(XP_MACOSX) \
- || (defined(SPS_ARCH_arm) && defined(linux)) \
- || defined(SPS_PLAT_amd64_linux) || defined(SPS_PLAT_x86_linux)
- , "stackwalk"
-#endif
-#if defined(SPS_OS_android)
- , "java"
-#endif
- };
-
- const char* threadFilters[] = { "GeckoMain", "Compositor" };
-
- profiler_start(PROFILE_DEFAULT_ENTRY, PROFILE_DEFAULT_INTERVAL,
- features, MOZ_ARRAY_LENGTH(features),
- threadFilters, MOZ_ARRAY_LENGTH(threadFilters));
- LOG("END mozilla_sampler_init");
-}
-
-void mozilla_sampler_shutdown()
-{
- sInitCount--;
-
- if (sInitCount > 0)
- return;
-
- // Save the profile on shutdown if requested.
- GeckoSampler *t = tlsTicker.get();
- if (t) {
- const char *val = getenv("MOZ_PROFILER_SHUTDOWN");
- if (val) {
- std::ofstream stream;
- stream.open(val);
- if (stream.is_open()) {
- t->ToStreamAsJSON(stream);
- stream.close();
- }
- }
- }
-
- profiler_stop();
-
-#ifndef SPS_STANDALONE
- set_stderr_callback(nullptr);
-#endif
-
- Sampler::Shutdown();
-
-#ifdef SPS_STANDALONE
- mozilla::TimeStamp::Shutdown();
-#endif
-
- PseudoStack *stack = tlsPseudoStack.get();
- stack->deref();
- tlsPseudoStack.set(nullptr);
-
-#ifdef MOZ_TASK_TRACER
- mozilla::tasktracer::ShutdownTaskTracer();
-#endif
-}
-
-void mozilla_sampler_save()
-{
- GeckoSampler *t = tlsTicker.get();
- if (!t) {
- return;
- }
-
- t->RequestSave();
- // We're on the main thread already so we don't
- // have to wait to handle the save request.
- t->HandleSaveRequest();
-}
-
-mozilla::UniquePtr<char[]> mozilla_sampler_get_profile(double aSinceTime)
-{
- GeckoSampler *t = tlsTicker.get();
- if (!t) {
- return nullptr;
- }
-
- return t->ToJSON(aSinceTime);
-}
-
-#ifndef SPS_STANDALONE
-JSObject *mozilla_sampler_get_profile_data(JSContext *aCx, double aSinceTime)
-{
- GeckoSampler *t = tlsTicker.get();
- if (!t) {
- return nullptr;
- }
-
- return t->ToJSObject(aCx, aSinceTime);
-}
-
-void mozilla_sampler_get_profile_data_async(double aSinceTime,
- mozilla::dom::Promise* aPromise)
-{
- GeckoSampler *t = tlsTicker.get();
- if (NS_WARN_IF(!t)) {
- return;
- }
-
- t->ToJSObjectAsync(aSinceTime, aPromise);
-}
-
-void mozilla_sampler_get_profiler_start_params(int* aEntrySize,
- double* aInterval,
- mozilla::Vector<const char*>* aFilters,
- mozilla::Vector<const char*>* aFeatures)
-{
- if (NS_WARN_IF(!aEntrySize) || NS_WARN_IF(!aInterval) ||
- NS_WARN_IF(!aFilters) || NS_WARN_IF(!aFeatures)) {
- return;
- }
-
- GeckoSampler *t = tlsTicker.get();
- if (NS_WARN_IF(!t)) {
- return;
- }
-
- *aEntrySize = t->EntrySize();
- *aInterval = t->interval();
-
- const ThreadNameFilterList& threadNameFilterList = t->ThreadNameFilters();
- MOZ_ALWAYS_TRUE(aFilters->resize(threadNameFilterList.length()));
- for (uint32_t i = 0; i < threadNameFilterList.length(); ++i) {
- (*aFilters)[i] = threadNameFilterList[i].c_str();
- }
-
- const FeatureList& featureList = t->Features();
- MOZ_ALWAYS_TRUE(aFeatures->resize(featureList.length()));
- for (size_t i = 0; i < featureList.length(); ++i) {
- (*aFeatures)[i] = featureList[i].c_str();
- }
-}
-
-void mozilla_sampler_get_gatherer(nsISupports** aRetVal)
-{
- if (!aRetVal) {
- return;
- }
-
- if (NS_WARN_IF(!profiler_is_active())) {
- *aRetVal = nullptr;
- return;
- }
-
- GeckoSampler *t = tlsTicker.get();
- if (NS_WARN_IF(!t)) {
- *aRetVal = nullptr;
- return;
- }
-
- t->GetGatherer(aRetVal);
-}
-
-#endif
-
-void mozilla_sampler_save_profile_to_file(const char* aFilename)
-{
- GeckoSampler *t = tlsTicker.get();
- if (!t) {
- return;
- }
-
- std::ofstream stream;
- stream.open(aFilename);
- if (stream.is_open()) {
- t->ToStreamAsJSON(stream);
- stream.close();
- LOGF("Saved to %s", aFilename);
- } else {
- LOG("Fail to open profile log file.");
- }
-}
-
-
-const char** mozilla_sampler_get_features()
-{
- static const char* features[] = {
-#if defined(MOZ_PROFILING) && defined(HAVE_NATIVE_UNWIND)
- // Walk the C++ stack.
- "stackwalk",
-#endif
-#if defined(ENABLE_SPS_LEAF_DATA)
- // Include the C++ leaf node if not stackwalking. DevTools
- // profiler doesn't want the native addresses.
- "leaf",
-#endif
-#if !defined(SPS_OS_windows)
- // Use a seperate thread of walking the stack.
- "unwinder",
-#endif
- "java",
- // Only record samples during periods of bad responsiveness
- "jank",
- // Tell the JS engine to emmit pseudostack entries in the
- // pro/epilogue.
- "js",
- // GPU Profiling (may not be supported by the GL)
- "gpu",
- // Profile the registered secondary threads.
- "threads",
- // Do not include user-identifiable information
- "privacy",
- // Dump the layer tree with the textures.
- "layersdump",
- // Dump the display list with the textures.
- "displaylistdump",
- // Add main thread I/O to the profile
- "mainthreadio",
- // Add RSS collection
- "memory",
-#ifdef MOZ_TASK_TRACER
- // Start profiling with feature TaskTracer.
- "tasktracer",
-#endif
-#if defined(XP_WIN)
- // Add power collection
- "power",
-#endif
- nullptr
- };
-
- return features;
-}
-
-void mozilla_sampler_get_buffer_info(uint32_t *aCurrentPosition, uint32_t *aTotalSize,
- uint32_t *aGeneration)
-{
- *aCurrentPosition = 0;
- *aTotalSize = 0;
- *aGeneration = 0;
-
- if (!stack_key_initialized)
- return;
-
- GeckoSampler *t = tlsTicker.get();
- if (!t)
- return;
-
- t->GetBufferInfo(aCurrentPosition, aTotalSize, aGeneration);
-}
-
-// Values are only honored on the first start
-void mozilla_sampler_start(int aProfileEntries, double aInterval,
- const char** aFeatures, uint32_t aFeatureCount,
- const char** aThreadNameFilters, uint32_t aFilterCount)
-
-{
- LOG("BEGIN mozilla_sampler_start");
-
- if (!stack_key_initialized)
- profiler_init(nullptr);
-
- /* If the sampling interval was set using env vars, use that
- in preference to anything else. */
- if (sUnwindInterval > 0)
- aInterval = sUnwindInterval;
-
- /* If the entry count was set using env vars, use that, too: */
- if (sProfileEntries > 0)
- aProfileEntries = sProfileEntries;
-
- // Reset the current state if the profiler is running
- profiler_stop();
-
- GeckoSampler* t;
- t = new GeckoSampler(aInterval ? aInterval : PROFILE_DEFAULT_INTERVAL,
- aProfileEntries ? aProfileEntries : PROFILE_DEFAULT_ENTRY,
- aFeatures, aFeatureCount,
- aThreadNameFilters, aFilterCount);
-
- tlsTicker.set(t);
- t->Start();
- if (t->ProfileJS() || t->InPrivacyMode()) {
- ::MutexAutoLock lock(*Sampler::sRegisteredThreadsMutex);
- std::vector<ThreadInfo*> threads = t->GetRegisteredThreads();
-
- for (uint32_t i = 0; i < threads.size(); i++) {
- ThreadInfo* info = threads[i];
- if (info->IsPendingDelete()) {
- continue;
- }
- ThreadProfile* thread_profile = info->Profile();
- if (!thread_profile) {
- continue;
- }
- thread_profile->GetPseudoStack()->reinitializeOnResume();
-#ifndef SPS_STANDALONE
- if (t->ProfileJS()) {
- thread_profile->GetPseudoStack()->enableJSSampling();
- }
- if (t->InPrivacyMode()) {
- thread_profile->GetPseudoStack()->mPrivacyMode = true;
- }
-#endif
- }
- }
-
-#if defined(SPS_OS_android)
- if (t->ProfileJava()) {
- int javaInterval = aInterval;
- // Java sampling doesn't accuratly keep up with 1ms sampling
- if (javaInterval < 10) {
- aInterval = 10;
- }
- java::GeckoJavaSampler::Start(javaInterval, 1000);
- }
-#endif
-
-#ifndef SPS_STANDALONE
- if (t->AddMainThreadIO()) {
- if (!sInterposeObserver) {
- // Lazily create IO interposer observer
- sInterposeObserver = new mozilla::ProfilerIOInterposeObserver();
- }
- mozilla::IOInterposer::Register(mozilla::IOInterposeObserver::OpAll,
- sInterposeObserver);
- }
-#endif
-
- sIsProfiling = true;
-#ifndef SPS_STANDALONE
- sIsGPUProfiling = t->ProfileGPU();
- sIsLayersDump = t->LayersDump();
- sIsDisplayListDump = t->DisplayListDump();
- sIsRestyleProfiling = t->ProfileRestyle();
-
- if (Sampler::CanNotifyObservers()) {
- nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
- if (os) {
- nsTArray<nsCString> featuresArray;
- nsTArray<nsCString> threadNameFiltersArray;
-
- for (size_t i = 0; i < aFeatureCount; ++i) {
- featuresArray.AppendElement(aFeatures[i]);
- }
-
- for (size_t i = 0; i < aFilterCount; ++i) {
- threadNameFiltersArray.AppendElement(aThreadNameFilters[i]);
- }
-
- nsCOMPtr<nsIProfilerStartParams> params =
- new nsProfilerStartParams(aProfileEntries, aInterval, featuresArray,
- threadNameFiltersArray);
-
- os->NotifyObservers(params, "profiler-started", nullptr);
- }
- }
-#endif
-
- LOG("END mozilla_sampler_start");
-}
-
-void mozilla_sampler_stop()
-{
- LOG("BEGIN mozilla_sampler_stop");
-
- if (!stack_key_initialized)
- return;
-
- GeckoSampler *t = tlsTicker.get();
- if (!t) {
- LOG("END mozilla_sampler_stop-early");
- return;
- }
-
- bool disableJS = t->ProfileJS();
-
- t->Stop();
- delete t;
- tlsTicker.set(nullptr);
-
-#ifndef SPS_STANDALONE
- if (disableJS) {
- PseudoStack *stack = tlsPseudoStack.get();
- ASSERT(stack != nullptr);
- stack->disableJSSampling();
- }
-
- mozilla::IOInterposer::Unregister(mozilla::IOInterposeObserver::OpAll,
- sInterposeObserver);
- sInterposeObserver = nullptr;
-#endif
-
- sIsProfiling = false;
-#ifndef SPS_STANDALONE
- sIsGPUProfiling = false;
- sIsLayersDump = false;
- sIsDisplayListDump = false;
- sIsRestyleProfiling = false;
-
- if (Sampler::CanNotifyObservers()) {
- nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
- if (os)
- os->NotifyObservers(nullptr, "profiler-stopped", nullptr);
- }
-#endif
-
- LOG("END mozilla_sampler_stop");
-}
-
-bool mozilla_sampler_is_paused() {
- if (Sampler::GetActiveSampler()) {
- return Sampler::GetActiveSampler()->IsPaused();
- } else {
- return false;
- }
-}
-
-void mozilla_sampler_pause() {
- if (Sampler::GetActiveSampler()) {
- Sampler::GetActiveSampler()->SetPaused(true);
-#ifndef SPS_STANDALONE
- if (Sampler::CanNotifyObservers()) {
- nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
- if (os)
- os->NotifyObservers(nullptr, "profiler-paused", nullptr);
- }
-#endif
- }
-}
-
-void mozilla_sampler_resume() {
- if (Sampler::GetActiveSampler()) {
- Sampler::GetActiveSampler()->SetPaused(false);
-#ifndef SPS_STANDALONE
- if (Sampler::CanNotifyObservers()) {
- nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
- if (os)
- os->NotifyObservers(nullptr, "profiler-resumed", nullptr);
- }
-#endif
- }
-}
-
-bool mozilla_sampler_feature_active(const char* aName)
-{
- if (!profiler_is_active()) {
- return false;
- }
-
- if (strcmp(aName, "gpu") == 0) {
- return sIsGPUProfiling;
- }
-
- if (strcmp(aName, "layersdump") == 0) {
- return sIsLayersDump;
- }
-
- if (strcmp(aName, "displaylistdump") == 0) {
- return sIsDisplayListDump;
- }
-
- if (strcmp(aName, "restyle") == 0) {
- return sIsRestyleProfiling;
- }
-
- return false;
-}
-
-bool mozilla_sampler_is_active()
-{
- return sIsProfiling;
-}
-
-void mozilla_sampler_responsiveness(const mozilla::TimeStamp& aTime)
-{
- sLastTracerEvent = aTime;
-}
-
-void mozilla_sampler_frame_number(int frameNumber)
-{
- sFrameNumber = frameNumber;
-}
-
-void mozilla_sampler_lock()
-{
- profiler_stop();
-#ifndef SPS_STANDALONE
- nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
- if (os)
- os->NotifyObservers(nullptr, "profiler-locked", nullptr);
-#endif
-}
-
-void mozilla_sampler_unlock()
-{
-#ifndef SPS_STANDALONE
- nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
- if (os)
- os->NotifyObservers(nullptr, "profiler-unlocked", nullptr);
-#endif
-}
-
-bool mozilla_sampler_register_thread(const char* aName, void* aGuessStackTop)
-{
- if (sInitCount == 0) {
- return false;
- }
-
- MOZ_ASSERT(tlsPseudoStack.get() == nullptr);
- PseudoStack* stack = PseudoStack::create();
- tlsPseudoStack.set(stack);
- bool isMainThread = is_main_thread_name(aName);
- void* stackTop = GetStackTop(aGuessStackTop);
- return Sampler::RegisterCurrentThread(aName, stack, isMainThread, stackTop);
-}
-
-void mozilla_sampler_unregister_thread()
-{
- // Don't check sInitCount count here -- we may be unregistering the
- // thread after the sampler was shut down.
- if (!stack_key_initialized) {
- return;
- }
-
- PseudoStack *stack = tlsPseudoStack.get();
- if (!stack) {
- return;
- }
- stack->deref();
- tlsPseudoStack.set(nullptr);
-
- Sampler::UnregisterCurrentThread();
-}
-
-void mozilla_sampler_sleep_start() {
- if (sInitCount == 0) {
- return;
- }
-
- PseudoStack *stack = tlsPseudoStack.get();
- if (stack == nullptr) {
- return;
- }
- stack->setSleeping(1);
-}
-
-void mozilla_sampler_sleep_end() {
- if (sInitCount == 0) {
- return;
- }
-
- PseudoStack *stack = tlsPseudoStack.get();
- if (stack == nullptr) {
- return;
- }
- stack->setSleeping(0);
-}
-
-bool mozilla_sampler_is_sleeping() {
- if (sInitCount == 0) {
- return false;
- }
- PseudoStack *stack = tlsPseudoStack.get();
- if (stack == nullptr) {
- return false;
- }
- return stack->isSleeping();
-}
-
-double mozilla_sampler_time(const mozilla::TimeStamp& aTime)
-{
- mozilla::TimeDuration delta = aTime - sStartTime;
- return delta.ToMilliseconds();
-}
-
-double mozilla_sampler_time()
-{
- return mozilla_sampler_time(mozilla::TimeStamp::Now());
-}
-
-ProfilerBacktrace* mozilla_sampler_get_backtrace()
-{
- if (!stack_key_initialized)
- return nullptr;
-
- // Don't capture a stack if we're not profiling
- if (!profiler_is_active()) {
- return nullptr;
- }
-
- // Don't capture a stack if we don't want to include personal information
- if (profiler_in_privacy_mode()) {
- return nullptr;
- }
-
- GeckoSampler* t = tlsTicker.get();
- if (!t) {
- return nullptr;
- }
-
- return new ProfilerBacktrace(t->GetBacktrace());
-}
-
-void mozilla_sampler_free_backtrace(ProfilerBacktrace* aBacktrace)
-{
- delete aBacktrace;
-}
-
-// Fill the output buffer with the following pattern:
-// "Lable 1" "\0" "Label 2" "\0" ... "Label N" "\0" "\0"
-// TODO: use the unwinder instead of pseudo stack.
-void mozilla_sampler_get_backtrace_noalloc(char *output, size_t outputSize)
-{
- MOZ_ASSERT(outputSize >= 2);
- char *bound = output + outputSize - 2;
- output[0] = output[1] = '\0';
- PseudoStack *pseudoStack = tlsPseudoStack.get();
- if (!pseudoStack) {
- return;
- }
-
- volatile StackEntry *pseudoFrames = pseudoStack->mStack;
- uint32_t pseudoCount = pseudoStack->stackSize();
-
- for (uint32_t i = 0; i < pseudoCount; i++) {
- size_t len = strlen(pseudoFrames[i].label());
- if (output + len >= bound)
- break;
- strcpy(output, pseudoFrames[i].label());
- output += len;
- *output++ = '\0';
- *output = '\0';
- }
-}
-
-void mozilla_sampler_tracing(const char* aCategory, const char* aInfo,
- TracingMetadata aMetaData)
-{
- mozilla_sampler_add_marker(aInfo, new ProfilerMarkerTracing(aCategory, aMetaData));
-}
-
-void mozilla_sampler_tracing(const char* aCategory, const char* aInfo,
- ProfilerBacktrace* aCause,
- TracingMetadata aMetaData)
-{
- mozilla_sampler_add_marker(aInfo, new ProfilerMarkerTracing(aCategory, aMetaData, aCause));
-}
-
-void mozilla_sampler_add_marker(const char *aMarker, ProfilerMarkerPayload *aPayload)
-{
- // Note that aPayload may be allocated by the caller, so we need to make sure
- // that we free it at some point.
- mozilla::UniquePtr<ProfilerMarkerPayload> payload(aPayload);
-
- if (!stack_key_initialized)
- return;
-
- // Don't insert a marker if we're not profiling to avoid
- // the heap copy (malloc).
- if (!profiler_is_active()) {
- return;
- }
-
- // Don't add a marker if we don't want to include personal information
- if (profiler_in_privacy_mode()) {
- return;
- }
-
- PseudoStack *stack = tlsPseudoStack.get();
- if (!stack) {
- return;
- }
-
- mozilla::TimeStamp origin = (aPayload && !aPayload->GetStartTime().IsNull()) ?
- aPayload->GetStartTime() : mozilla::TimeStamp::Now();
- mozilla::TimeDuration delta = origin - sStartTime;
- stack->addMarker(aMarker, payload.release(), delta.ToMilliseconds());
-}
-
-#ifndef SPS_STANDALONE
-#include "mozilla/Mutex.h"
-
-class GeckoMutex : public ::Mutex {
- public:
- explicit GeckoMutex(const char* aDesc) :
- mMutex(aDesc)
- {}
-
- virtual ~GeckoMutex() {}
-
- virtual int Lock() {
- mMutex.Lock();
- return 0;
- }
-
- virtual int Unlock() {
- mMutex.Unlock();
- return 0;
- }
-
- private:
- mozilla::Mutex mMutex;
-};
-
-mozilla::UniquePtr< ::Mutex> OS::CreateMutex(const char* aDesc) {
- return mozilla::MakeUnique<GeckoMutex>(aDesc);
-}
-
-#else
-// Otherwise use c++11 Mutex
-#include <mutex>
-
-class OSXMutex : public ::Mutex {
- public:
- OSXMutex(const char* aDesc) :
- mMutex()
- {}
-
- virtual ~OSXMutex() {}
-
- virtual int Lock() {
- mMutex.lock();
- return 0;
- }
-
- virtual int Unlock() {
- mMutex.unlock();
- return 0;
- }
-
- private:
- std::mutex mMutex;
-};
-
-mozilla::UniquePtr< ::Mutex> OS::CreateMutex(const char* aDesc) {
- return mozilla::MakeUnique<GeckoMutex>(aDesc);
-}
-
-#endif
-
-// END externally visible functions
-////////////////////////////////////////////////////////////////////////
diff --git a/tools/profiler/core/platform.h b/tools/profiler/core/platform.h
deleted file mode 100644
index 17c8dd25c..000000000
--- a/tools/profiler/core/platform.h
+++ /dev/null
@@ -1,428 +0,0 @@
-// Copyright (c) 2006-2011 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google, Inc. nor the names of its contributors
-// may be used to endorse or promote products derived from this
-// software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE.
-
-#ifndef TOOLS_PLATFORM_H_
-#define TOOLS_PLATFORM_H_
-
-#ifdef SPS_STANDALONE
-#define MOZ_COUNT_CTOR(name)
-#define MOZ_COUNT_DTOR(name)
-#endif
-
-#ifdef ANDROID
-#include <android/log.h>
-#else
-#define __android_log_print(a, ...)
-#endif
-
-#ifdef XP_UNIX
-#include <pthread.h>
-#endif
-
-#include <stdint.h>
-#include <math.h>
-#ifndef SPS_STANDALONE
-#include "MainThreadUtils.h"
-#include "mozilla/Mutex.h"
-#include "ThreadResponsiveness.h"
-#endif
-#include "mozilla/TimeStamp.h"
-#include "mozilla/UniquePtr.h"
-#include "mozilla/Unused.h"
-#include "PlatformMacros.h"
-#include "v8-support.h"
-#include <vector>
-#include "StackTop.h"
-
-// We need a definition of gettid(), but Linux libc implementations don't
-// provide a wrapper for it (except for Bionic)
-#if defined(__linux__)
-#include <unistd.h>
-#if !defined(__BIONIC__)
-#include <sys/syscall.h>
-static inline pid_t gettid()
-{
- return (pid_t) syscall(SYS_gettid);
-}
-#endif
-#endif
-
-#ifdef XP_WIN
-#include <windows.h>
-#endif
-
-#define ASSERT(a) MOZ_ASSERT(a)
-
-bool moz_profiler_verbose();
-
-#ifdef ANDROID
-# if defined(__arm__) || defined(__thumb__)
-# define ENABLE_SPS_LEAF_DATA
-# define ENABLE_ARM_LR_SAVING
-# endif
-# define LOG(text) \
- do { if (moz_profiler_verbose()) \
- __android_log_write(ANDROID_LOG_ERROR, "Profiler", text); \
- } while (0)
-# define LOGF(format, ...) \
- do { if (moz_profiler_verbose()) \
- __android_log_print(ANDROID_LOG_ERROR, "Profiler", format, \
- __VA_ARGS__); \
- } while (0)
-
-#else
-# define LOG(text) \
- do { if (moz_profiler_verbose()) fprintf(stderr, "Profiler: %s\n", text); \
- } while (0)
-# define LOGF(format, ...) \
- do { if (moz_profiler_verbose()) fprintf(stderr, "Profiler: " format \
- "\n", __VA_ARGS__); \
- } while (0)
-
-#endif
-
-#if defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_LINUX)
-#define ENABLE_SPS_LEAF_DATA
-#endif
-
-typedef int32_t Atomic32;
-
-extern mozilla::TimeStamp sStartTime;
-
-typedef uint8_t* Address;
-
-// ----------------------------------------------------------------------------
-// Mutex
-//
-// Mutexes are used for serializing access to non-reentrant sections of code.
-// The implementations of mutex should allow for nested/recursive locking.
-
-class Mutex {
- public:
- virtual ~Mutex() {}
-
- // Locks the given mutex. If the mutex is currently unlocked, it becomes
- // locked and owned by the calling thread, and immediately. If the mutex
- // is already locked by another thread, suspends the calling thread until
- // the mutex is unlocked.
- virtual int Lock() = 0;
-
- // Unlocks the given mutex. The mutex is assumed to be locked and owned by
- // the calling thread on entrance.
- virtual int Unlock() = 0;
-};
-
-class MutexAutoLock {
- public:
- explicit MutexAutoLock(::Mutex& aMutex)
- : mMutex(&aMutex)
- {
- mMutex->Lock();
- }
-
- ~MutexAutoLock() {
- mMutex->Unlock();
- }
-
- private:
- Mutex* mMutex;
-};
-
-// ----------------------------------------------------------------------------
-// OS
-//
-// This class has static methods for the different platform specific
-// functions. Add methods here to cope with differences between the
-// supported platforms.
-
-class OS {
- public:
-
- // Sleep for a number of milliseconds.
- static void Sleep(const int milliseconds);
-
- // Sleep for a number of microseconds.
- static void SleepMicro(const int microseconds);
-
- // Called on startup to initialize platform specific things
- static void Startup();
-
- static mozilla::UniquePtr< ::Mutex> CreateMutex(const char* aDesc);
-
- private:
- static const int msPerSecond = 1000;
-
-};
-
-
-
-
-// ----------------------------------------------------------------------------
-// Thread
-//
-// Thread objects are used for creating and running threads. When the start()
-// method is called the new thread starts running the run() method in the new
-// thread. The Thread object should not be deallocated before the thread has
-// terminated.
-
-class Thread {
- public:
- // Create new thread.
- explicit Thread(const char* name);
- virtual ~Thread();
-
- // Start new thread by calling the Run() method in the new thread.
- void Start();
-
- void Join();
-
- inline const char* name() const {
- return name_;
- }
-
- // Abstract method for run handler.
- virtual void Run() = 0;
-
- // The thread name length is limited to 16 based on Linux's implementation of
- // prctl().
- static const int kMaxThreadNameLength = 16;
-
-#ifdef XP_WIN
- HANDLE thread_;
- typedef DWORD tid_t;
- tid_t thread_id_;
-#else
- typedef ::pid_t tid_t;
-#endif
-#if defined(XP_MACOSX)
- pthread_t thread_;
-#endif
-
- static tid_t GetCurrentId();
-
- private:
- void set_name(const char *name);
-
- char name_[kMaxThreadNameLength];
- int stack_size_;
-
- DISALLOW_COPY_AND_ASSIGN(Thread);
-};
-
-// ----------------------------------------------------------------------------
-// HAVE_NATIVE_UNWIND
-//
-// Pseudo backtraces are available on all platforms. Native
-// backtraces are available only on selected platforms. Breakpad is
-// the only supported native unwinder. HAVE_NATIVE_UNWIND is set at
-// build time to indicate whether native unwinding is possible on this
-// platform.
-
-#undef HAVE_NATIVE_UNWIND
-#if defined(MOZ_PROFILING) \
- && (defined(SPS_PLAT_amd64_linux) || defined(SPS_PLAT_arm_android) \
- || (defined(MOZ_WIDGET_ANDROID) && defined(__arm__)) \
- || defined(SPS_PLAT_x86_linux) \
- || defined(SPS_OS_windows) \
- || defined(SPS_OS_darwin))
-# define HAVE_NATIVE_UNWIND
-#endif
-
-/* Some values extracted at startup from environment variables, that
- control the behaviour of the breakpad unwinder. */
-extern const char* PROFILER_INTERVAL;
-extern const char* PROFILER_ENTRIES;
-extern const char* PROFILER_STACK;
-extern const char* PROFILER_FEATURES;
-
-void read_profiler_env_vars();
-void profiler_usage();
-
-// Helper methods to expose modifying profiler behavior
-bool set_profiler_interval(const char*);
-bool set_profiler_entries(const char*);
-bool set_profiler_scan(const char*);
-bool is_native_unwinding_avail();
-
-void set_tls_stack_top(void* stackTop);
-
-// ----------------------------------------------------------------------------
-// Sampler
-//
-// A sampler periodically samples the state of the VM and optionally
-// (if used for profiling) the program counter and stack pointer for
-// the thread that created it.
-
-struct PseudoStack;
-class ThreadProfile;
-
-// TickSample captures the information collected for each sample.
-class TickSample {
- public:
- TickSample()
- : pc(NULL)
- , sp(NULL)
- , fp(NULL)
-#ifdef ENABLE_ARM_LR_SAVING
- , lr(NULL)
-#endif
- , context(NULL)
- , isSamplingCurrentThread(false)
- , threadProfile(nullptr)
- , rssMemory(0)
- , ussMemory(0)
- {}
-
- void PopulateContext(void* aContext);
-
- Address pc; // Instruction pointer.
- Address sp; // Stack pointer.
- Address fp; // Frame pointer.
-#ifdef ENABLE_ARM_LR_SAVING
- Address lr; // ARM link register
-#endif
- void* context; // The context from the signal handler, if available. On
- // Win32 this may contain the windows thread context.
- bool isSamplingCurrentThread;
- ThreadProfile* threadProfile;
- mozilla::TimeStamp timestamp;
- int64_t rssMemory;
- int64_t ussMemory;
-};
-
-class ThreadInfo;
-class PlatformData;
-class GeckoSampler;
-class SyncProfile;
-class Sampler {
- public:
- // Initialize sampler.
- explicit Sampler(double interval, bool profiling, int entrySize);
- virtual ~Sampler();
-
- double interval() const { return interval_; }
-
- // This method is called for each sampling period with the current
- // program counter.
- virtual void Tick(TickSample* sample) = 0;
-
- // Immediately captures the calling thread's call stack and returns it.
- virtual SyncProfile* GetBacktrace() = 0;
-
- // Request a save from a signal handler
- virtual void RequestSave() = 0;
- // Process any outstanding request outside a signal handler.
- virtual void HandleSaveRequest() = 0;
- // Delete markers which are no longer part of the profile due to buffer wraparound.
- virtual void DeleteExpiredMarkers() = 0;
-
- // Start and stop sampler.
- void Start();
- void Stop();
-
- // Is the sampler used for profiling?
- bool IsProfiling() const { return profiling_; }
-
- // Whether the sampler is running (that is, consumes resources).
- bool IsActive() const { return active_; }
-
- // Low overhead way to stop the sampler from ticking
- bool IsPaused() const { return paused_; }
- void SetPaused(bool value) { NoBarrier_Store(&paused_, value); }
-
- virtual bool ProfileThreads() const = 0;
-
- int EntrySize() { return entrySize_; }
-
- // We can't new/delete the type safely without defining it
- // (-Wdelete-incomplete). Use these Alloc/Free functions instead.
- static PlatformData* AllocPlatformData(int aThreadId);
- static void FreePlatformData(PlatformData*);
-
- // If we move the backtracing code into the platform files we won't
- // need to have these hacks
-#ifdef XP_WIN
- // xxxehsan sucky hack :(
- static uintptr_t GetThreadHandle(PlatformData*);
-#endif
-#ifdef XP_MACOSX
- static pthread_t GetProfiledThread(PlatformData*);
-#endif
-
- static std::vector<ThreadInfo*> GetRegisteredThreads() {
- return *sRegisteredThreads;
- }
-
- static bool RegisterCurrentThread(const char* aName,
- PseudoStack* aPseudoStack,
- bool aIsMainThread, void* stackTop);
- static void UnregisterCurrentThread();
-
- static void Startup();
- // Should only be called on shutdown
- static void Shutdown();
-
- static GeckoSampler* GetActiveSampler() { return sActiveSampler; }
- static void SetActiveSampler(GeckoSampler* sampler) { sActiveSampler = sampler; }
-
- static mozilla::UniquePtr<Mutex> sRegisteredThreadsMutex;
-
- static bool CanNotifyObservers() {
-#if defined(SPS_OS_android)
- // Android ANR reporter uses the profiler off the main thread
- return NS_IsMainThread();
-#else
- MOZ_ASSERT(NS_IsMainThread());
- return true;
-#endif
- }
-
- protected:
- static std::vector<ThreadInfo*>* sRegisteredThreads;
- static GeckoSampler* sActiveSampler;
-
- private:
- void SetActive(bool value) { NoBarrier_Store(&active_, value); }
-
- const double interval_;
- const bool profiling_;
- Atomic32 paused_;
- Atomic32 active_;
- const int entrySize_;
-
- // Refactor me!
-#if defined(SPS_OS_linux) || defined(SPS_OS_android)
- bool signal_handler_installed_;
- struct sigaction old_sigprof_signal_handler_;
- struct sigaction old_sigsave_signal_handler_;
- bool signal_sender_launched_;
- pthread_t signal_sender_thread_;
-#endif
-};
-
-#endif /* ndef TOOLS_PLATFORM_H_ */
diff --git a/tools/profiler/core/shared-libraries-linux.cc b/tools/profiler/core/shared-libraries-linux.cc
deleted file mode 100644
index 553039fb7..000000000
--- a/tools/profiler/core/shared-libraries-linux.cc
+++ /dev/null
@@ -1,145 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "shared-libraries.h"
-
-#define PATH_MAX_TOSTRING(x) #x
-#define PATH_MAX_STRING(x) PATH_MAX_TOSTRING(x)
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <limits.h>
-#include <unistd.h>
-#include <fstream>
-#include "platform.h"
-#include "shared-libraries.h"
-
-#include "common/linux/file_id.h"
-#include <algorithm>
-
-#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
-
-// Get the breakpad Id for the binary file pointed by bin_name
-static std::string getId(const char *bin_name)
-{
- using namespace google_breakpad;
- using namespace std;
-
- PageAllocator allocator;
- auto_wasteful_vector<uint8_t, sizeof(MDGUID)> identifier(&allocator);
-
- FileID file_id(bin_name);
- if (file_id.ElfFileIdentifier(identifier)) {
- return FileID::ConvertIdentifierToUUIDString(identifier) + "0";
- }
-
- return "";
-}
-
-// TODO fix me with proper include
-#include "nsDebug.h"
-#ifdef ANDROID
-#include "ElfLoader.h" // dl_phdr_info
-#else
-#include <link.h> // dl_phdr_info
-#endif
-#include <features.h>
-#include <dlfcn.h>
-#include <sys/types.h>
-
-#ifdef ANDROID
-extern "C" MOZ_EXPORT __attribute__((weak))
-int dl_iterate_phdr(
- int (*callback) (struct dl_phdr_info *info,
- size_t size, void *data),
- void *data);
-#endif
-
-static int
-dl_iterate_callback(struct dl_phdr_info *dl_info, size_t size, void *data)
-{
- SharedLibraryInfo& info = *reinterpret_cast<SharedLibraryInfo*>(data);
-
- if (dl_info->dlpi_phnum <= 0)
- return 0;
-
- unsigned long libStart = -1;
- unsigned long libEnd = 0;
-
- for (size_t i = 0; i < dl_info->dlpi_phnum; i++) {
- if (dl_info->dlpi_phdr[i].p_type != PT_LOAD) {
- continue;
- }
- unsigned long start = dl_info->dlpi_addr + dl_info->dlpi_phdr[i].p_vaddr;
- unsigned long end = start + dl_info->dlpi_phdr[i].p_memsz;
- if (start < libStart)
- libStart = start;
- if (end > libEnd)
- libEnd = end;
- }
- const char *name = dl_info->dlpi_name;
- SharedLibrary shlib(libStart, libEnd, 0, getId(name), name);
- info.AddSharedLibrary(shlib);
-
- return 0;
-}
-
-SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf()
-{
- SharedLibraryInfo info;
-
-#ifdef ANDROID
- if (!dl_iterate_phdr) {
- // On ARM Android, dl_iterate_phdr is provided by the custom linker.
- // So if libxul was loaded by the system linker (e.g. as part of
- // xpcshell when running tests), it won't be available and we should
- // not call it.
- return info;
- }
-#endif // ANDROID
-
- dl_iterate_phdr(dl_iterate_callback, &info);
-
-#if defined(ANDROID)
- pid_t pid = getpid();
- char path[PATH_MAX];
- snprintf(path, PATH_MAX, "/proc/%d/maps", pid);
- std::ifstream maps(path);
- std::string line;
- int count = 0;
- while (std::getline(maps, line)) {
- int ret;
- //XXX: needs input sanitizing
- unsigned long start;
- unsigned long end;
- char perm[6] = "";
- unsigned long offset;
- char name[PATH_MAX] = "";
- ret = sscanf(line.c_str(),
- "%lx-%lx %6s %lx %*s %*x %" PATH_MAX_STRING(PATH_MAX) "s\n",
- &start, &end, perm, &offset, name);
- if (!strchr(perm, 'x')) {
- // Ignore non executable entries
- continue;
- }
- if (ret != 5 && ret != 4) {
- LOG("Get maps line failed");
- continue;
- }
- // Use proc/pid/maps to get the dalvik-jit section since it has
- // no associated phdrs
- if (strcmp(name, "/dev/ashmem/dalvik-jit-code-cache") != 0)
- continue;
- SharedLibrary shlib(start, end, offset, getId(name), name);
- info.AddSharedLibrary(shlib);
- if (count > 10000) {
- LOG("Get maps failed");
- break;
- }
- count++;
- }
-#endif // ANDROID
-
- return info;
-}
diff --git a/tools/profiler/core/shared-libraries-macos.cc b/tools/profiler/core/shared-libraries-macos.cc
deleted file mode 100644
index e218d2280..000000000
--- a/tools/profiler/core/shared-libraries-macos.cc
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <AvailabilityMacros.h>
-#include <mach-o/loader.h>
-#include <mach-o/dyld_images.h>
-#include <mach/task_info.h>
-#include <mach/task.h>
-#include <mach/mach_init.h>
-#include <mach/mach_traps.h>
-#include <string.h>
-#include <stdlib.h>
-#include <vector>
-#include <sstream>
-
-#include "shared-libraries.h"
-
-#ifndef MAC_OS_X_VERSION_10_6
-#define MAC_OS_X_VERSION_10_6 1060
-#endif
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
-// borrowed from Breakpad
-// Fallback declarations for TASK_DYLD_INFO and friends, introduced in
-// <mach/task_info.h> in the Mac OS X 10.6 SDK.
-#define TASK_DYLD_INFO 17
-struct task_dyld_info {
- mach_vm_address_t all_image_info_addr;
- mach_vm_size_t all_image_info_size;
- };
-typedef struct task_dyld_info task_dyld_info_data_t;
-typedef struct task_dyld_info *task_dyld_info_t;
-#define TASK_DYLD_INFO_COUNT (sizeof(task_dyld_info_data_t) / sizeof(natural_t))
-
-#endif
-
-// Architecture specific abstraction.
-#ifdef __i386__
-typedef mach_header platform_mach_header;
-typedef segment_command mach_segment_command_type;
-#define MACHO_MAGIC_NUMBER MH_MAGIC
-#define CMD_SEGMENT LC_SEGMENT
-#define seg_size uint32_t
-#else
-typedef mach_header_64 platform_mach_header;
-typedef segment_command_64 mach_segment_command_type;
-#define MACHO_MAGIC_NUMBER MH_MAGIC_64
-#define CMD_SEGMENT LC_SEGMENT_64
-#define seg_size uint64_t
-#endif
-
-static
-void addSharedLibrary(const platform_mach_header* header, char *name, SharedLibraryInfo &info) {
- const struct load_command *cmd =
- reinterpret_cast<const struct load_command *>(header + 1);
-
- seg_size size = 0;
- unsigned long long start = reinterpret_cast<unsigned long long>(header);
- // Find the cmd segment in the macho image. It will contain the offset we care about.
- const uint8_t *uuid_bytes = nullptr;
- for (unsigned int i = 0;
- cmd && (i < header->ncmds) && (uuid_bytes == nullptr || size == 0);
- ++i) {
- if (cmd->cmd == CMD_SEGMENT) {
- const mach_segment_command_type *seg =
- reinterpret_cast<const mach_segment_command_type *>(cmd);
-
- if (!strcmp(seg->segname, "__TEXT")) {
- size = seg->vmsize;
- }
- } else if (cmd->cmd == LC_UUID) {
- const uuid_command *ucmd = reinterpret_cast<const uuid_command *>(cmd);
- uuid_bytes = ucmd->uuid;
- }
-
- cmd = reinterpret_cast<const struct load_command *>
- (reinterpret_cast<const char *>(cmd) + cmd->cmdsize);
- }
-
- std::stringstream uuid;
- uuid << std::hex << std::uppercase;
- if (uuid_bytes != nullptr) {
- for (int i = 0; i < 16; ++i) {
- uuid << ((uuid_bytes[i] & 0xf0) >> 4);
- uuid << (uuid_bytes[i] & 0xf);
- }
- uuid << '0';
- }
-
- info.AddSharedLibrary(SharedLibrary(start, start + size, 0, uuid.str(),
- name));
-}
-
-// Use dyld to inspect the macho image information. We can build the SharedLibraryEntry structure
-// giving us roughtly the same info as /proc/PID/maps in Linux.
-SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf()
-{
- SharedLibraryInfo sharedLibraryInfo;
-
- task_dyld_info_data_t task_dyld_info;
- mach_msg_type_number_t count = TASK_DYLD_INFO_COUNT;
- if (task_info(mach_task_self (), TASK_DYLD_INFO, (task_info_t)&task_dyld_info,
- &count) != KERN_SUCCESS) {
- return sharedLibraryInfo;
- }
-
- struct dyld_all_image_infos* aii = (struct dyld_all_image_infos*)task_dyld_info.all_image_info_addr;
- size_t infoCount = aii->infoArrayCount;
-
- // Iterate through all dyld images (loaded libraries) to get their names
- // and offests.
- for (size_t i = 0; i < infoCount; ++i) {
- const dyld_image_info *info = &aii->infoArray[i];
-
- // If the magic number doesn't match then go no further
- // since we're not pointing to where we think we are.
- if (info->imageLoadAddress->magic != MACHO_MAGIC_NUMBER) {
- continue;
- }
-
- const platform_mach_header* header =
- reinterpret_cast<const platform_mach_header*>(info->imageLoadAddress);
-
- // Add the entry for this image.
- addSharedLibrary(header, (char*)info->imageFilePath, sharedLibraryInfo);
-
- }
- return sharedLibraryInfo;
-}
-
diff --git a/tools/profiler/core/shared-libraries-win32.cc b/tools/profiler/core/shared-libraries-win32.cc
deleted file mode 100644
index e2db2579b..000000000
--- a/tools/profiler/core/shared-libraries-win32.cc
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <windows.h>
-#include <tlhelp32.h>
-#include <dbghelp.h>
-#include <sstream>
-
-#include "shared-libraries.h"
-#include "nsWindowsHelpers.h"
-
-#define CV_SIGNATURE 0x53445352 // 'SDSR'
-
-struct CodeViewRecord70
-{
- uint32_t signature;
- GUID pdbSignature;
- uint32_t pdbAge;
- char pdbFileName[1];
-};
-
-static bool GetPdbInfo(uintptr_t aStart, nsID& aSignature, uint32_t& aAge, char** aPdbName)
-{
- if (!aStart) {
- return false;
- }
-
- PIMAGE_DOS_HEADER dosHeader = reinterpret_cast<PIMAGE_DOS_HEADER>(aStart);
- if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE) {
- return false;
- }
-
- PIMAGE_NT_HEADERS ntHeaders = reinterpret_cast<PIMAGE_NT_HEADERS>(
- aStart + dosHeader->e_lfanew);
- if (ntHeaders->Signature != IMAGE_NT_SIGNATURE) {
- return false;
- }
-
- uint32_t relativeVirtualAddress =
- ntHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress;
- if (!relativeVirtualAddress) {
- return false;
- }
-
- PIMAGE_DEBUG_DIRECTORY debugDirectory =
- reinterpret_cast<PIMAGE_DEBUG_DIRECTORY>(aStart + relativeVirtualAddress);
- if (!debugDirectory || debugDirectory->Type != IMAGE_DEBUG_TYPE_CODEVIEW) {
- return false;
- }
-
- CodeViewRecord70 *debugInfo = reinterpret_cast<CodeViewRecord70 *>(
- aStart + debugDirectory->AddressOfRawData);
- if (!debugInfo || debugInfo->signature != CV_SIGNATURE) {
- return false;
- }
-
- aAge = debugInfo->pdbAge;
- GUID& pdbSignature = debugInfo->pdbSignature;
- aSignature.m0 = pdbSignature.Data1;
- aSignature.m1 = pdbSignature.Data2;
- aSignature.m2 = pdbSignature.Data3;
- memcpy(aSignature.m3, pdbSignature.Data4, sizeof(pdbSignature.Data4));
-
- // The PDB file name could be different from module filename, so report both
- // e.g. The PDB for C:\Windows\SysWOW64\ntdll.dll is wntdll.pdb
- char * leafName = strrchr(debugInfo->pdbFileName, '\\');
- if (leafName) {
- // Only report the file portion of the path
- *aPdbName = leafName + 1;
- } else {
- *aPdbName = debugInfo->pdbFileName;
- }
-
- return true;
-}
-
-static bool IsDashOrBraces(char c)
-{
- return c == '-' || c == '{' || c == '}';
-}
-
-SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf()
-{
- SharedLibraryInfo sharedLibraryInfo;
-
- nsAutoHandle snap(CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId()));
-
- MODULEENTRY32 module = {0};
- module.dwSize = sizeof(MODULEENTRY32);
- if (Module32First(snap, &module)) {
- do {
- nsID pdbSig;
- uint32_t pdbAge;
- char *pdbName = NULL;
-
- // Load the module again to make sure that its handle will remain remain
- // valid as we attempt to read the PDB information from it. We load the
- // DLL as a datafile so that if the module actually gets unloaded between
- // the call to Module32Next and the following LoadLibraryEx, we don't end
- // up running the now newly loaded module's DllMain function. If the
- // module is already loaded, LoadLibraryEx just increments its refcount.
- //
- // Note that because of the race condition above, merely loading the DLL
- // again is not safe enough, therefore we also need to make sure that we
- // can read the memory mapped at the base address before we can safely
- // proceed to actually access those pages.
- HMODULE handleLock = LoadLibraryEx(module.szExePath, NULL, LOAD_LIBRARY_AS_DATAFILE);
- MEMORY_BASIC_INFORMATION vmemInfo = {0};
- if (handleLock &&
- sizeof(vmemInfo) == VirtualQuery(module.modBaseAddr, &vmemInfo, sizeof(vmemInfo)) &&
- vmemInfo.State == MEM_COMMIT &&
- GetPdbInfo((uintptr_t)module.modBaseAddr, pdbSig, pdbAge, &pdbName)) {
- std::ostringstream stream;
- stream << pdbSig.ToString() << std::hex << pdbAge;
- std::string breakpadId = stream.str();
- std::string::iterator end =
- std::remove_if(breakpadId.begin(), breakpadId.end(), IsDashOrBraces);
- breakpadId.erase(end, breakpadId.end());
- std::transform(breakpadId.begin(), breakpadId.end(),
- breakpadId.begin(), toupper);
-
- SharedLibrary shlib((uintptr_t)module.modBaseAddr,
- (uintptr_t)module.modBaseAddr+module.modBaseSize,
- 0, // DLLs are always mapped at offset 0 on Windows
- breakpadId,
- pdbName);
- sharedLibraryInfo.AddSharedLibrary(shlib);
- }
- FreeLibrary(handleLock); // ok to free null handles
- } while (Module32Next(snap, &module));
- }
-
- return sharedLibraryInfo;
-}
-
diff --git a/tools/profiler/gecko/ProfileGatherer.cpp b/tools/profiler/gecko/ProfileGatherer.cpp
deleted file mode 100644
index 5cd45bee3..000000000
--- a/tools/profiler/gecko/ProfileGatherer.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/ProfileGatherer.h"
-#include "mozilla/Services.h"
-#include "nsIObserverService.h"
-#include "GeckoSampler.h"
-
-using mozilla::dom::AutoJSAPI;
-using mozilla::dom::Promise;
-
-namespace mozilla {
-
-/**
- * When a subprocess exits before we've gathered profiles, we'll
- * store profiles for those processes until gathering starts. We'll
- * only store up to MAX_SUBPROCESS_EXIT_PROFILES. The buffer is
- * circular, so as soon as we receive another exit profile, we'll
- * bump the oldest one out of the buffer.
- */
-static const uint32_t MAX_SUBPROCESS_EXIT_PROFILES = 5;
-
-NS_IMPL_ISUPPORTS(ProfileGatherer, nsIObserver)
-
-ProfileGatherer::ProfileGatherer(GeckoSampler* aTicker)
- : mTicker(aTicker)
- , mSinceTime(0)
- , mPendingProfiles(0)
- , mGathering(false)
-{
-}
-
-void
-ProfileGatherer::GatheredOOPProfile()
-{
- MOZ_ASSERT(NS_IsMainThread());
- if (!mGathering) {
- // If we're not actively gathering, then we don't actually
- // care that we gathered a profile here. This can happen for
- // processes that exit while profiling.
- return;
- }
-
- if (NS_WARN_IF(!mPromise)) {
- // If we're not holding on to a Promise, then someone is
- // calling us erroneously.
- return;
- }
-
- mPendingProfiles--;
-
- if (mPendingProfiles == 0) {
- // We've got all of the async profiles now. Let's
- // finish off the profile and resolve the Promise.
- Finish();
- }
-}
-
-void
-ProfileGatherer::WillGatherOOPProfile()
-{
- mPendingProfiles++;
-}
-
-void
-ProfileGatherer::Start(double aSinceTime,
- Promise* aPromise)
-{
- MOZ_ASSERT(NS_IsMainThread());
- if (mGathering) {
- // If we're already gathering, reject the promise - this isn't going
- // to end well.
- if (aPromise) {
- aPromise->MaybeReject(NS_ERROR_NOT_AVAILABLE);
- }
- return;
- }
-
- mSinceTime = aSinceTime;
- mPromise = aPromise;
- mGathering = true;
- mPendingProfiles = 0;
-
- nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
- if (os) {
- DebugOnly<nsresult> rv =
- os->AddObserver(this, "profiler-subprocess", false);
- NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "AddObserver failed");
- rv = os->NotifyObservers(this, "profiler-subprocess-gather", nullptr);
- NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "NotifyObservers failed");
- }
-
- if (!mPendingProfiles) {
- Finish();
- }
-}
-
-void
-ProfileGatherer::Finish()
-{
- MOZ_ASSERT(NS_IsMainThread());
-
- if (!mTicker) {
- // We somehow got called after we were cancelled! This shouldn't
- // be possible, but doing a belt-and-suspenders check to be sure.
- return;
- }
-
- UniquePtr<char[]> buf = mTicker->ToJSON(mSinceTime);
-
- nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
- if (os) {
- DebugOnly<nsresult> rv = os->RemoveObserver(this, "profiler-subprocess");
- NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "RemoveObserver failed");
- }
-
- AutoJSAPI jsapi;
- if (NS_WARN_IF(!jsapi.Init(mPromise->GlobalJSObject()))) {
- // We're really hosed if we can't get a JS context for some reason.
- Reset();
- return;
- }
-
- JSContext* cx = jsapi.cx();
-
- // Now parse the JSON so that we resolve with a JS Object.
- JS::RootedValue val(cx);
- {
- NS_ConvertUTF8toUTF16 js_string(nsDependentCString(buf.get()));
- if (!JS_ParseJSON(cx, static_cast<const char16_t*>(js_string.get()),
- js_string.Length(), &val)) {
- if (!jsapi.HasException()) {
- mPromise->MaybeReject(NS_ERROR_DOM_UNKNOWN_ERR);
- } else {
- JS::RootedValue exn(cx);
- DebugOnly<bool> gotException = jsapi.StealException(&exn);
- MOZ_ASSERT(gotException);
-
- jsapi.ClearException();
- mPromise->MaybeReject(cx, exn);
- }
- } else {
- mPromise->MaybeResolve(val);
- }
- }
-
- Reset();
-}
-
-void
-ProfileGatherer::Reset()
-{
- mSinceTime = 0;
- mPromise = nullptr;
- mPendingProfiles = 0;
- mGathering = false;
-}
-
-void
-ProfileGatherer::Cancel()
-{
- // The GeckoSampler is going away. If we have a Promise in flight, we
- // should reject it.
- if (mPromise) {
- mPromise->MaybeReject(NS_ERROR_DOM_ABORT_ERR);
- }
-
- // Clear out the GeckoSampler reference, since it's being destroyed.
- mTicker = nullptr;
-}
-
-void
-ProfileGatherer::OOPExitProfile(const nsCString& aProfile)
-{
- if (mExitProfiles.Length() >= MAX_SUBPROCESS_EXIT_PROFILES) {
- mExitProfiles.RemoveElementAt(0);
- }
- mExitProfiles.AppendElement(aProfile);
-
- // If a process exited while gathering, we need to make
- // sure we decrement the counter.
- if (mGathering) {
- GatheredOOPProfile();
- }
-}
-
-NS_IMETHODIMP
-ProfileGatherer::Observe(nsISupports* aSubject,
- const char* aTopic,
- const char16_t *someData)
-{
- if (!strcmp(aTopic, "profiler-subprocess")) {
- nsCOMPtr<nsIProfileSaveEvent> pse = do_QueryInterface(aSubject);
- if (pse) {
- for (size_t i = 0; i < mExitProfiles.Length(); ++i) {
- if (!mExitProfiles[i].IsEmpty()) {
- pse->AddSubProfile(mExitProfiles[i].get());
- }
- }
- mExitProfiles.Clear();
- }
- }
- return NS_OK;
-}
-
-} // namespace mozilla
diff --git a/tools/profiler/gecko/Profiler.jsm b/tools/profiler/gecko/Profiler.jsm
deleted file mode 100644
index c61218875..000000000
--- a/tools/profiler/gecko/Profiler.jsm
+++ /dev/null
@@ -1,16 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cr = Components.results;
-
-this.EXPORTED_SYMBOLS = ["Profiler"];
-
-this.Profiler = {
-
-};
-
diff --git a/tools/profiler/gecko/ProfilerIOInterposeObserver.cpp b/tools/profiler/gecko/ProfilerIOInterposeObserver.cpp
deleted file mode 100644
index 07801535d..000000000
--- a/tools/profiler/gecko/ProfilerIOInterposeObserver.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "GeckoProfiler.h"
-#include "ProfilerIOInterposeObserver.h"
-#include "ProfilerMarkers.h"
-
-using namespace mozilla;
-
-void ProfilerIOInterposeObserver::Observe(Observation& aObservation)
-{
- if (!IsMainThread()) {
- return;
- }
-
- ProfilerBacktrace* stack = profiler_get_backtrace();
-
- nsCString filename;
- if (aObservation.Filename()) {
- filename = NS_ConvertUTF16toUTF8(aObservation.Filename());
- }
-
- IOMarkerPayload* markerPayload = new IOMarkerPayload(aObservation.Reference(),
- filename.get(),
- aObservation.Start(),
- aObservation.End(),
- stack);
- PROFILER_MARKER_PAYLOAD(aObservation.ObservedOperationString(), markerPayload);
-}
diff --git a/tools/profiler/gecko/ProfilerIOInterposeObserver.h b/tools/profiler/gecko/ProfilerIOInterposeObserver.h
index 8661b197e..fd47e48bd 100644
--- a/tools/profiler/gecko/ProfilerIOInterposeObserver.h
+++ b/tools/profiler/gecko/ProfilerIOInterposeObserver.h
@@ -5,24 +5,6 @@
#ifndef PROFILERIOINTERPOSEOBSERVER_H
#define PROFILERIOINTERPOSEOBSERVER_H
-#ifdef MOZ_ENABLE_PROFILER_SPS
-
-#include "mozilla/IOInterposer.h"
-
-namespace mozilla {
-
-/**
- * This class is the observer that calls into the profiler whenever
- * main thread I/O occurs.
- */
-class ProfilerIOInterposeObserver final : public IOInterposeObserver
-{
-public:
- virtual void Observe(Observation& aObservation);
-};
-
-} // namespace mozilla
-
-#endif // MOZ_ENABLE_PROFILER_SPS
+ /*** STUB ***/
#endif // PROFILERIOINTERPOSEOBSERVER_H
diff --git a/tools/profiler/gecko/SaveProfileTask.cpp b/tools/profiler/gecko/SaveProfileTask.cpp
deleted file mode 100644
index dbbbe4836..000000000
--- a/tools/profiler/gecko/SaveProfileTask.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "SaveProfileTask.h"
-#include "GeckoProfiler.h"
-
-nsresult
-SaveProfileTask::Run() {
- // Get file path
-#if defined(SPS_PLAT_arm_android)
- nsCString tmpPath;
- tmpPath.AppendPrintf("/sdcard/profile_%i_%i.txt", XRE_GetProcessType(), getpid());
-#else
- nsCOMPtr<nsIFile> tmpFile;
- nsAutoCString tmpPath;
- if (NS_FAILED(NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(tmpFile)))) {
- LOG("Failed to find temporary directory.");
- return NS_ERROR_FAILURE;
- }
- tmpPath.AppendPrintf("profile_%i_%i.txt", XRE_GetProcessType(), getpid());
-
- nsresult rv = tmpFile->AppendNative(tmpPath);
- if (NS_FAILED(rv))
- return rv;
-
- rv = tmpFile->GetNativePath(tmpPath);
- if (NS_FAILED(rv))
- return rv;
-#endif
-
- profiler_save_profile_to_file(tmpPath.get());
-
- return NS_OK;
-}
-
-NS_IMPL_ISUPPORTS(ProfileSaveEvent, nsIProfileSaveEvent)
-
-nsresult
-ProfileSaveEvent::AddSubProfile(const char* aProfile) {
- mFunc(aProfile, mClosure);
- return NS_OK;
-}
-
diff --git a/tools/profiler/gecko/SaveProfileTask.h b/tools/profiler/gecko/SaveProfileTask.h
deleted file mode 100644
index 4a215bba0..000000000
--- a/tools/profiler/gecko/SaveProfileTask.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef PROFILER_SAVETASK_H_
-#define PROFILER_SAVETASK_H_
-
-#include "platform.h"
-#include "nsThreadUtils.h"
-#include "nsIXULRuntime.h"
-#include "nsDirectoryServiceUtils.h"
-#include "nsDirectoryServiceDefs.h"
-#include "nsXULAppAPI.h"
-#include "nsIProfileSaveEvent.h"
-
-#ifdef XP_WIN
- #include <windows.h>
- #define getpid GetCurrentProcessId
-#else
- #include <unistd.h>
-#endif
-
-/**
- * This is an event used to save the profile on the main thread
- * to be sure that it is not being modified while saving.
- */
-class SaveProfileTask : public mozilla::Runnable {
-public:
- SaveProfileTask() {}
-
- NS_IMETHOD Run();
-};
-
-class ProfileSaveEvent final : public nsIProfileSaveEvent {
-public:
- typedef void (*AddSubProfileFunc)(const char* aProfile, void* aClosure);
- NS_DECL_ISUPPORTS
-
- ProfileSaveEvent(AddSubProfileFunc aFunc, void* aClosure)
- : mFunc(aFunc)
- , mClosure(aClosure)
- {}
-
- NS_IMETHOD AddSubProfile(const char* aProfile) override;
-private:
- ~ProfileSaveEvent() {}
-
- AddSubProfileFunc mFunc;
- void* mClosure;
-};
-
-#endif
-
diff --git a/tools/profiler/gecko/ThreadResponsiveness.cpp b/tools/profiler/gecko/ThreadResponsiveness.cpp
deleted file mode 100644
index 0057251e2..000000000
--- a/tools/profiler/gecko/ThreadResponsiveness.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "ThreadResponsiveness.h"
-#include "platform.h"
-#include "nsComponentManagerUtils.h"
-#include "nsThreadUtils.h"
-#include "nsITimer.h"
-#include "mozilla/Monitor.h"
-#include "ProfileEntry.h"
-#include "ThreadProfile.h"
-
-using mozilla::Monitor;
-using mozilla::MonitorAutoLock;
-using mozilla::TimeStamp;
-
-class CheckResponsivenessTask : public mozilla::Runnable,
- public nsITimerCallback {
-public:
- CheckResponsivenessTask()
- : mLastTracerTime(TimeStamp::Now())
- , mMonitor("CheckResponsivenessTask")
- , mTimer(nullptr)
- , mStop(false)
- {
- MOZ_COUNT_CTOR(CheckResponsivenessTask);
- }
-
-protected:
- ~CheckResponsivenessTask()
- {
- MOZ_COUNT_DTOR(CheckResponsivenessTask);
- }
-
-public:
- NS_IMETHOD Run() override
- {
- MonitorAutoLock mon(mMonitor);
- if (mStop)
- return NS_OK;
-
- // This is raced on because we might pause the thread here
- // for profiling so if we tried to use a monitor to protect
- // mLastTracerTime we could deadlock. We're risking seeing
- // a partial write which will show up as an outlier in our
- // performance data.
- mLastTracerTime = TimeStamp::Now();
- if (!mTimer) {
- mTimer = do_CreateInstance("@mozilla.org/timer;1");
- }
- mTimer->InitWithCallback(this, 16, nsITimer::TYPE_ONE_SHOT);
-
- return NS_OK;
- }
-
- NS_IMETHOD Notify(nsITimer* aTimer) final
- {
- NS_DispatchToMainThread(this);
- return NS_OK;
- }
-
- void Terminate() {
- MonitorAutoLock mon(mMonitor);
- mStop = true;
- }
-
- const TimeStamp& GetLastTracerTime() const {
- return mLastTracerTime;
- }
-
- NS_DECL_ISUPPORTS_INHERITED
-
-private:
- TimeStamp mLastTracerTime;
- Monitor mMonitor;
- nsCOMPtr<nsITimer> mTimer;
- bool mStop;
-};
-
-NS_IMPL_ISUPPORTS_INHERITED(CheckResponsivenessTask, mozilla::Runnable,
- nsITimerCallback)
-
-ThreadResponsiveness::ThreadResponsiveness(ThreadProfile *aThreadProfile)
- : mThreadProfile(aThreadProfile)
- , mActiveTracerEvent(nullptr)
-{
- MOZ_COUNT_CTOR(ThreadResponsiveness);
-}
-
-ThreadResponsiveness::~ThreadResponsiveness()
-{
- MOZ_COUNT_DTOR(ThreadResponsiveness);
- if (mActiveTracerEvent) {
- mActiveTracerEvent->Terminate();
- }
-}
-
-void
-ThreadResponsiveness::Update()
-{
- if (!mActiveTracerEvent) {
- if (mThreadProfile->GetThreadInfo()->IsMainThread()) {
- mActiveTracerEvent = new CheckResponsivenessTask();
- NS_DispatchToMainThread(mActiveTracerEvent);
- } else if (mThreadProfile->GetThreadInfo()->GetThread()) {
- mActiveTracerEvent = new CheckResponsivenessTask();
- mThreadProfile->GetThreadInfo()->
- GetThread()->Dispatch(mActiveTracerEvent, NS_DISPATCH_NORMAL);
- }
- }
-
- if (mActiveTracerEvent) {
- mLastTracerTime = mActiveTracerEvent->GetLastTracerTime();
- }
-}
-
diff --git a/tools/profiler/gecko/ThreadResponsiveness.h b/tools/profiler/gecko/ThreadResponsiveness.h
deleted file mode 100644
index 5454c3c05..000000000
--- a/tools/profiler/gecko/ThreadResponsiveness.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef ThreadResponsiveness_h
-#define ThreadResponsiveness_h
-
-#include "nsISupports.h"
-#include "mozilla/RefPtr.h"
-#include "mozilla/TimeStamp.h"
-
-class ThreadProfile;
-class CheckResponsivenessTask;
-
-class ThreadResponsiveness {
-public:
- explicit ThreadResponsiveness(ThreadProfile *aThreadProfile);
-
- ~ThreadResponsiveness();
-
- void Update();
-
- mozilla::TimeDuration GetUnresponsiveDuration(const mozilla::TimeStamp& now) const {
- return now - mLastTracerTime;
- }
-
- bool HasData() const {
- return !mLastTracerTime.IsNull();
- }
-private:
- ThreadProfile* mThreadProfile;
- RefPtr<CheckResponsivenessTask> mActiveTracerEvent;
- mozilla::TimeStamp mLastTracerTime;
-};
-
-#endif
-
diff --git a/tools/profiler/gecko/nsIProfileSaveEvent.idl b/tools/profiler/gecko/nsIProfileSaveEvent.idl
deleted file mode 100644
index c2c4bed02..000000000
--- a/tools/profiler/gecko/nsIProfileSaveEvent.idl
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-[uuid(f5ad0830-e178-41f9-b253-db9b4fae4cb3)]
-interface nsIProfileSaveEvent : nsISupports
-{
- /**
- * Call this method when observing this event to include
- * a sub profile origining from an external source such
- * as a non native thread or another process.
- */
- void AddSubProfile(in string aMarker);
-};
-
-
diff --git a/tools/profiler/gecko/nsIProfiler.idl b/tools/profiler/gecko/nsIProfiler.idl
deleted file mode 100644
index f9b118650..000000000
--- a/tools/profiler/gecko/nsIProfiler.idl
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-%{C++
-#include "nsTArrayForwardDeclare.h"
-class nsCString;
-%}
-
-[ref] native StringArrayRef(const nsTArray<nsCString>);
-
-/**
- * Start-up parameters for subprocesses are passed through nsIObserverService,
- * which, unfortunately, means we need to implement nsISupports in order to
- * go through it.
- */
-[uuid(0a175ba7-8fcf-4ce9-9c4b-ccc6272f4425)]
-interface nsIProfilerStartParams : nsISupports
-{
- attribute uint32_t entries;
- attribute double interval;
-
- [noscript, notxpcom, nostdcall] StringArrayRef getFeatures();
- [noscript, notxpcom, nostdcall] StringArrayRef getThreadFilterNames();
-};
-
-[scriptable, uuid(ead3f75c-0e0e-4fbb-901c-1e5392ef5b2a)]
-interface nsIProfiler : nsISupports
-{
- boolean CanProfile();
- void StartProfiler(in uint32_t aEntries, in double aInterval,
- [array, size_is(aFeatureCount)] in string aFeatures,
- in uint32_t aFeatureCount,
- [array, size_is(aFilterCount), optional] in string aThreadNameFilters,
- [optional] in uint32_t aFilterCount);
- void StopProfiler();
- boolean IsPaused();
- void PauseSampling();
- void ResumeSampling();
- void AddMarker(in string aMarker);
- /*
- * Returns the JSON string of the profile. If aSinceTime is passed, only
- * report samples taken at >= aSinceTime.
- */
- string GetProfile([optional] in double aSinceTime);
-
- /*
- * Returns a JS object of the profile. If aSinceTime is passed, only report
- * samples taken at >= aSinceTime.
- */
- [implicit_jscontext]
- jsval getProfileData([optional] in double aSinceTime);
-
- [implicit_jscontext]
- nsISupports getProfileDataAsync([optional] in double aSinceTime);
-
- boolean IsActive();
- void GetFeatures(out uint32_t aCount, [retval, array, size_is(aCount)] out string aFeatures);
-
- /**
- * The starting parameters that were sent to the profiler for sampling.
- * If the profiler is not currently sampling, this will return null.
- */
- readonly attribute nsIProfilerStartParams startParams;
-
- /**
- * The profileGatherer will be null if the profiler is not currently
- * active.
- */
- readonly attribute nsISupports profileGatherer;
-
- void GetBufferInfo(out uint32_t aCurrentPosition, out uint32_t aTotalSize,
- out uint32_t aGeneration);
-
- /**
- * Returns the elapsed time, in milliseconds, since the profiler's epoch.
- * The epoch is guaranteed to be constant for the duration of the
- * process, but is otherwise arbitrary.
- */
- double getElapsedTime();
-
- /**
- * Returns a JSON string of an array of shared library objects.
- * Every object has three properties: start, end, and name.
- * start and end are integers describing the address range that the library
- * occupies in memory. name is the path of the library as a string.
- *
- * On Windows profiling builds, the shared library objects will have
- * additional pdbSignature and pdbAge properties for uniquely identifying
- * shared library versions for stack symbolication.
- */
- AString getSharedLibraryInformation();
-
- /**
- * Dump the collected profile to a file.
- */
- void dumpProfileToFile(in string aFilename);
-};
diff --git a/tools/profiler/gecko/nsProfiler.cpp b/tools/profiler/gecko/nsProfiler.cpp
deleted file mode 100644
index c38447381..000000000
--- a/tools/profiler/gecko/nsProfiler.cpp
+++ /dev/null
@@ -1,308 +0,0 @@
-/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <string>
-#include <sstream>
-#include "GeckoProfiler.h"
-#include "nsProfiler.h"
-#include "nsProfilerStartParams.h"
-#include "nsMemory.h"
-#include "nsString.h"
-#include "mozilla/Services.h"
-#include "nsIObserverService.h"
-#include "nsIInterfaceRequestor.h"
-#include "nsILoadContext.h"
-#include "nsIWebNavigation.h"
-#include "nsIInterfaceRequestorUtils.h"
-#include "shared-libraries.h"
-#include "js/Value.h"
-#include "mozilla/ErrorResult.h"
-#include "mozilla/dom/Promise.h"
-
-using mozilla::ErrorResult;
-using mozilla::dom::Promise;
-using std::string;
-
-NS_IMPL_ISUPPORTS(nsProfiler, nsIProfiler)
-
-nsProfiler::nsProfiler()
- : mLockedForPrivateBrowsing(false)
-{
-}
-
-nsProfiler::~nsProfiler()
-{
- nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
- if (observerService) {
- observerService->RemoveObserver(this, "chrome-document-global-created");
- observerService->RemoveObserver(this, "last-pb-context-exited");
- }
-}
-
-nsresult
-nsProfiler::Init() {
- nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
- if (observerService) {
- observerService->AddObserver(this, "chrome-document-global-created", false);
- observerService->AddObserver(this, "last-pb-context-exited", false);
- }
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::Observe(nsISupports *aSubject,
- const char *aTopic,
- const char16_t *aData)
-{
- if (strcmp(aTopic, "chrome-document-global-created") == 0) {
- nsCOMPtr<nsIInterfaceRequestor> requestor = do_QueryInterface(aSubject);
- nsCOMPtr<nsIWebNavigation> parentWebNav = do_GetInterface(requestor);
- nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(parentWebNav);
- if (loadContext && loadContext->UsePrivateBrowsing() && !mLockedForPrivateBrowsing) {
- mLockedForPrivateBrowsing = true;
- profiler_lock();
- }
- } else if (strcmp(aTopic, "last-pb-context-exited") == 0) {
- mLockedForPrivateBrowsing = false;
- profiler_unlock();
- }
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::CanProfile(bool *aCanProfile)
-{
- *aCanProfile = !mLockedForPrivateBrowsing;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::StartProfiler(uint32_t aEntries, double aInterval,
- const char** aFeatures, uint32_t aFeatureCount,
- const char** aThreadNameFilters, uint32_t aFilterCount)
-{
- if (mLockedForPrivateBrowsing) {
- return NS_ERROR_NOT_AVAILABLE;
- }
-
- profiler_start(aEntries, aInterval,
- aFeatures, aFeatureCount,
- aThreadNameFilters, aFilterCount);
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::StopProfiler()
-{
- profiler_stop();
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::IsPaused(bool *aIsPaused)
-{
- *aIsPaused = profiler_is_paused();
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::PauseSampling()
-{
- profiler_pause();
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::ResumeSampling()
-{
- profiler_resume();
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::AddMarker(const char *aMarker)
-{
- PROFILER_MARKER(aMarker);
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::GetProfile(double aSinceTime, char** aProfile)
-{
- mozilla::UniquePtr<char[]> profile = profiler_get_profile(aSinceTime);
- if (profile) {
- size_t len = strlen(profile.get());
- char *profileStr = static_cast<char *>
- (nsMemory::Clone(profile.get(), (len + 1) * sizeof(char)));
- profileStr[len] = '\0';
- *aProfile = profileStr;
- }
- return NS_OK;
-}
-
-std::string GetSharedLibraryInfoStringInternal();
-
-std::string
-GetSharedLibraryInfoString()
-{
- return GetSharedLibraryInfoStringInternal();
-}
-
-NS_IMETHODIMP
-nsProfiler::GetSharedLibraryInformation(nsAString& aOutString)
-{
- aOutString.Assign(NS_ConvertUTF8toUTF16(GetSharedLibraryInfoString().c_str()));
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::DumpProfileToFile(const char* aFilename)
-{
- profiler_save_profile_to_file(aFilename);
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::GetProfileData(double aSinceTime, JSContext* aCx,
- JS::MutableHandle<JS::Value> aResult)
-{
- JS::RootedObject obj(aCx, profiler_get_profile_jsobject(aCx, aSinceTime));
- if (!obj) {
- return NS_ERROR_FAILURE;
- }
- aResult.setObject(*obj);
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::GetProfileDataAsync(double aSinceTime, JSContext* aCx,
- nsISupports** aPromise)
-{
- MOZ_ASSERT(NS_IsMainThread());
-
- if (NS_WARN_IF(!aCx)) {
- return NS_ERROR_FAILURE;
- }
-
- nsIGlobalObject* go = xpc::NativeGlobal(JS::CurrentGlobalOrNull(aCx));
-
- if (NS_WARN_IF(!go)) {
- return NS_ERROR_FAILURE;
- }
-
- ErrorResult result;
- RefPtr<Promise> promise = Promise::Create(go, result);
- if (NS_WARN_IF(result.Failed())) {
- return result.StealNSResult();
- }
-
- profiler_get_profile_jsobject_async(aSinceTime, promise);
-
- promise.forget(aPromise);
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::GetElapsedTime(double* aElapsedTime)
-{
- *aElapsedTime = profiler_time();
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::IsActive(bool *aIsActive)
-{
- *aIsActive = profiler_is_active();
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::GetFeatures(uint32_t *aCount, char ***aFeatures)
-{
- uint32_t len = 0;
-
- const char **features = profiler_get_features();
- if (!features) {
- *aCount = 0;
- *aFeatures = nullptr;
- return NS_OK;
- }
-
- while (features[len]) {
- len++;
- }
-
- char **featureList = static_cast<char **>
- (moz_xmalloc(len * sizeof(char*)));
-
- for (size_t i = 0; i < len; i++) {
- size_t strLen = strlen(features[i]);
- featureList[i] = static_cast<char *>
- (nsMemory::Clone(features[i], (strLen + 1) * sizeof(char)));
- }
-
- *aFeatures = featureList;
- *aCount = len;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::GetStartParams(nsIProfilerStartParams** aRetVal)
-{
- if (!profiler_is_active()) {
- *aRetVal = nullptr;
- } else {
- int entrySize = 0;
- double interval = 0;
- mozilla::Vector<const char*> filters;
- mozilla::Vector<const char*> features;
- profiler_get_start_params(&entrySize, &interval, &filters, &features);
-
- nsTArray<nsCString> filtersArray;
- for (uint32_t i = 0; i < filters.length(); ++i) {
- filtersArray.AppendElement(filters[i]);
- }
-
- nsTArray<nsCString> featuresArray;
- for (size_t i = 0; i < features.length(); ++i) {
- featuresArray.AppendElement(features[i]);
- }
-
- nsCOMPtr<nsIProfilerStartParams> startParams =
- new nsProfilerStartParams(entrySize, interval, featuresArray,
- filtersArray);
-
- startParams.forget(aRetVal);
- }
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::GetBufferInfo(uint32_t *aCurrentPosition, uint32_t *aTotalSize, uint32_t *aGeneration)
-{
- MOZ_ASSERT(aCurrentPosition);
- MOZ_ASSERT(aTotalSize);
- MOZ_ASSERT(aGeneration);
- profiler_get_buffer_info(aCurrentPosition, aTotalSize, aGeneration);
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfiler::GetProfileGatherer(nsISupports** aRetVal)
-{
- if (!aRetVal) {
- return NS_ERROR_INVALID_POINTER;
- }
-
- // If we're not profiling, there will be no gatherer.
- if (!profiler_is_active()) {
- *aRetVal = nullptr;
- } else {
- nsCOMPtr<nsISupports> gatherer;
- profiler_get_gatherer(getter_AddRefs(gatherer));
- gatherer.forget(aRetVal);
- }
- return NS_OK;
-} \ No newline at end of file
diff --git a/tools/profiler/gecko/nsProfiler.h b/tools/profiler/gecko/nsProfiler.h
deleted file mode 100644
index 50dabd278..000000000
--- a/tools/profiler/gecko/nsProfiler.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef _NSPROFILER_H_
-#define _NSPROFILER_H_
-
-#include "nsIProfiler.h"
-#include "nsIObserver.h"
-#include "mozilla/Attributes.h"
-
-class nsProfiler final : public nsIProfiler, public nsIObserver
-{
-public:
- nsProfiler();
-
- NS_DECL_ISUPPORTS
- NS_DECL_NSIOBSERVER
- NS_DECL_NSIPROFILER
-
- nsresult Init();
-private:
- ~nsProfiler();
- bool mLockedForPrivateBrowsing;
-};
-
-#endif /* _NSPROFILER_H_ */
-
diff --git a/tools/profiler/gecko/nsProfilerFactory.cpp b/tools/profiler/gecko/nsProfilerFactory.cpp
deleted file mode 100644
index 0cab23e89..000000000
--- a/tools/profiler/gecko/nsProfilerFactory.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/ModuleUtils.h"
-#include "nsCOMPtr.h"
-#include "nsProfiler.h"
-#include "nsProfilerCIID.h"
-
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsProfiler, Init)
-
-NS_DEFINE_NAMED_CID(NS_PROFILER_CID);
-
-static const mozilla::Module::CIDEntry kProfilerCIDs[] = {
- { &kNS_PROFILER_CID, false, nullptr, nsProfilerConstructor },
- { nullptr }
-};
-
-static const mozilla::Module::ContractIDEntry kProfilerContracts[] = {
- { "@mozilla.org/tools/profiler;1", &kNS_PROFILER_CID },
- { nullptr }
-};
-
-static const mozilla::Module kProfilerModule = {
- mozilla::Module::kVersion,
- kProfilerCIDs,
- kProfilerContracts
-};
-
-NSMODULE_DEFN(nsProfilerModule) = &kProfilerModule;
diff --git a/tools/profiler/gecko/nsProfilerStartParams.cpp b/tools/profiler/gecko/nsProfilerStartParams.cpp
deleted file mode 100644
index 5335e694e..000000000
--- a/tools/profiler/gecko/nsProfilerStartParams.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsProfilerStartParams.h"
-
-NS_IMPL_ISUPPORTS(nsProfilerStartParams, nsIProfilerStartParams)
-
-nsProfilerStartParams::nsProfilerStartParams(uint32_t aEntries,
- double aInterval,
- const nsTArray<nsCString>& aFeatures,
- const nsTArray<nsCString>& aThreadFilterNames) :
- mEntries(aEntries),
- mInterval(aInterval),
- mFeatures(aFeatures),
- mThreadFilterNames(aThreadFilterNames)
-{
-}
-
-nsProfilerStartParams::~nsProfilerStartParams()
-{
-}
-
-NS_IMETHODIMP
-nsProfilerStartParams::GetEntries(uint32_t* aEntries)
-{
- NS_ENSURE_ARG_POINTER(aEntries);
- *aEntries = mEntries;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfilerStartParams::SetEntries(uint32_t aEntries)
-{
- NS_ENSURE_ARG(aEntries);
- mEntries = aEntries;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfilerStartParams::GetInterval(double* aInterval)
-{
- NS_ENSURE_ARG_POINTER(aInterval);
- *aInterval = mInterval;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsProfilerStartParams::SetInterval(double aInterval)
-{
- NS_ENSURE_ARG(aInterval);
- mInterval = aInterval;
- return NS_OK;
-}
-
-const nsTArray<nsCString>&
-nsProfilerStartParams::GetFeatures()
-{
- return mFeatures;
-}
-
-const nsTArray<nsCString>&
-nsProfilerStartParams::GetThreadFilterNames()
-{
- return mThreadFilterNames;
-}
diff --git a/tools/profiler/gecko/nsProfilerStartParams.h b/tools/profiler/gecko/nsProfilerStartParams.h
deleted file mode 100644
index 98788077f..000000000
--- a/tools/profiler/gecko/nsProfilerStartParams.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef _NSPROFILERSTARTPARAMS_H_
-#define _NSPROFILERSTARTPARAMS_H_
-
-#include "nsIProfiler.h"
-#include "nsString.h"
-#include "nsTArray.h"
-
-class nsProfilerStartParams : public nsIProfilerStartParams
-{
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIPROFILERSTARTPARAMS
-
- nsProfilerStartParams(uint32_t aEntries,
- double aInterval,
- const nsTArray<nsCString>& aFeatures,
- const nsTArray<nsCString>& aThreadFilterNames);
-
-private:
- virtual ~nsProfilerStartParams();
- uint32_t mEntries;
- double mInterval;
- nsTArray<nsCString> mFeatures;
- nsTArray<nsCString> mThreadFilterNames;
-};
-
-#endif
diff --git a/tools/profiler/lul/AutoObjectMapper.cpp b/tools/profiler/lul/AutoObjectMapper.cpp
deleted file mode 100644
index 1bc5ce62a..000000000
--- a/tools/profiler/lul/AutoObjectMapper.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <sys/mman.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include "mozilla/Assertions.h"
-#include "mozilla/Sprintf.h"
-
-#include "PlatformMacros.h"
-#include "AutoObjectMapper.h"
-
-#if defined(SPS_OS_android)
-# include <dlfcn.h>
-# include "mozilla/Types.h"
- // FIXME move these out of mozglue/linker/ElfLoader.h into their
- // own header, so as to avoid conflicts arising from two definitions
- // of Array
- extern "C" {
- MFBT_API size_t
- __dl_get_mappable_length(void *handle);
- MFBT_API void *
- __dl_mmap(void *handle, void *addr, size_t length, off_t offset);
- MFBT_API void
- __dl_munmap(void *handle, void *addr, size_t length);
- }
- // The following are for get_installation_lib_dir()
-# include "nsString.h"
-# include "nsDirectoryServiceUtils.h"
-# include "nsDirectoryServiceDefs.h"
-#endif
-
-
-// A helper function for creating failure error messages in
-// AutoObjectMapper*::Map.
-static void
-failedToMessage(void(*aLog)(const char*),
- const char* aHowFailed, std::string aFileName)
-{
- char buf[300];
- SprintfLiteral(buf, "AutoObjectMapper::Map: Failed to %s \'%s\'",
- aHowFailed, aFileName.c_str());
- buf[sizeof(buf)-1] = 0;
- aLog(buf);
-}
-
-
-AutoObjectMapperPOSIX::AutoObjectMapperPOSIX(void(*aLog)(const char*))
- : mImage(nullptr)
- , mSize(0)
- , mLog(aLog)
- , mIsMapped(false)
-{}
-
-AutoObjectMapperPOSIX::~AutoObjectMapperPOSIX() {
- if (!mIsMapped) {
- // There's nothing to do.
- MOZ_ASSERT(!mImage);
- MOZ_ASSERT(mSize == 0);
- return;
- }
- MOZ_ASSERT(mSize > 0);
- // The following assertion doesn't necessarily have to be true,
- // but we assume (reasonably enough) that no mmap facility would
- // be crazy enough to map anything at page zero.
- MOZ_ASSERT(mImage);
- munmap(mImage, mSize);
-}
-
-bool AutoObjectMapperPOSIX::Map(/*OUT*/void** start, /*OUT*/size_t* length,
- std::string fileName)
-{
- MOZ_ASSERT(!mIsMapped);
-
- int fd = open(fileName.c_str(), O_RDONLY);
- if (fd == -1) {
- failedToMessage(mLog, "open", fileName);
- return false;
- }
-
- struct stat st;
- int err = fstat(fd, &st);
- size_t sz = (err == 0) ? st.st_size : 0;
- if (err != 0 || sz == 0) {
- failedToMessage(mLog, "fstat", fileName);
- close(fd);
- return false;
- }
-
- void* image = mmap(nullptr, sz, PROT_READ, MAP_SHARED, fd, 0);
- if (image == MAP_FAILED) {
- failedToMessage(mLog, "mmap", fileName);
- close(fd);
- return false;
- }
-
- close(fd);
- mIsMapped = true;
- mImage = *start = image;
- mSize = *length = sz;
- return true;
-}
-
-
-#if defined(SPS_OS_android)
-// A helper function for AutoObjectMapperFaultyLib::Map. Finds out
-// where the installation's lib directory is, since we'll have to look
-// in there to get hold of libmozglue.so. Returned C string is heap
-// allocated and the caller must deallocate it.
-static char*
-get_installation_lib_dir()
-{
- nsCOMPtr<nsIProperties>
- directoryService(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID));
- if (!directoryService) {
- return nullptr;
- }
- nsCOMPtr<nsIFile> greDir;
- nsresult rv = directoryService->Get(NS_GRE_DIR, NS_GET_IID(nsIFile),
- getter_AddRefs(greDir));
- if (NS_FAILED(rv)) return nullptr;
- nsCString path;
- rv = greDir->GetNativePath(path);
- if (NS_FAILED(rv)) {
- return nullptr;
- }
- return strdup(path.get());
-}
-
-AutoObjectMapperFaultyLib::AutoObjectMapperFaultyLib(void(*aLog)(const char*))
- : AutoObjectMapperPOSIX(aLog)
- , mHdl(nullptr)
-{}
-
-AutoObjectMapperFaultyLib::~AutoObjectMapperFaultyLib() {
- if (mHdl) {
- // We've got an object mapped by faulty.lib. Unmap it via faulty.lib.
- MOZ_ASSERT(mSize > 0);
- // Assert on the basis that no valid mapping would start at page zero.
- MOZ_ASSERT(mImage);
- __dl_munmap(mHdl, mImage, mSize);
- dlclose(mHdl);
- // Stop assertions in ~AutoObjectMapperPOSIX from failing.
- mImage = nullptr;
- mSize = 0;
- }
- // At this point the parent class destructor, ~AutoObjectMapperPOSIX,
- // gets called. If that has something mapped in the normal way, it
- // will unmap it in the normal way. Unfortunately there's no
- // obvious way to enforce the requirement that the object is mapped
- // either by faulty.lib or by the parent class, but not by both.
-}
-
-bool AutoObjectMapperFaultyLib::Map(/*OUT*/void** start, /*OUT*/size_t* length,
- std::string fileName)
-{
- MOZ_ASSERT(!mHdl);
-
- if (fileName == "libmozglue.so") {
-
- // Do (2) in the comment above.
- char* libdir = get_installation_lib_dir();
- if (libdir) {
- fileName = std::string(libdir) + "/lib/" + fileName;
- free(libdir);
- }
- // Hand the problem off to the standard mapper.
- return AutoObjectMapperPOSIX::Map(start, length, fileName);
-
- } else {
-
- // Do cases (1) and (3) in the comment above. We have to
- // grapple with faulty.lib directly.
- void* hdl = dlopen(fileName.c_str(), RTLD_GLOBAL | RTLD_LAZY);
- if (!hdl) {
- failedToMessage(mLog, "get handle for ELF file", fileName);
- return false;
- }
-
- size_t sz = __dl_get_mappable_length(hdl);
- if (sz == 0) {
- dlclose(hdl);
- failedToMessage(mLog, "get size for ELF file", fileName);
- return false;
- }
-
- void* image = __dl_mmap(hdl, nullptr, sz, 0);
- if (image == MAP_FAILED) {
- dlclose(hdl);
- failedToMessage(mLog, "mmap ELF file", fileName);
- return false;
- }
-
- mHdl = hdl;
- mImage = *start = image;
- mSize = *length = sz;
- return true;
- }
-}
-
-#endif // defined(SPS_OS_android)
diff --git a/tools/profiler/lul/AutoObjectMapper.h b/tools/profiler/lul/AutoObjectMapper.h
deleted file mode 100644
index 3f60dc44d..000000000
--- a/tools/profiler/lul/AutoObjectMapper.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef AutoObjectMapper_h
-#define AutoObjectMapper_h
-
-#include <string>
-
-#include "mozilla/Attributes.h"
-#include "PlatformMacros.h"
-
-// A (nearly-) RAII class that maps an object in and then unmaps it on
-// destruction. This base class version uses the "normal" POSIX
-// functions: open, fstat, close, mmap, munmap.
-
-class MOZ_STACK_CLASS AutoObjectMapperPOSIX {
-public:
- // The constructor does not attempt to map the file, because that
- // might fail. Instead, once the object has been constructed,
- // call Map() to attempt the mapping. There is no corresponding
- // Unmap() since the unmapping is done in the destructor. Failure
- // messages are sent to |aLog|.
- explicit AutoObjectMapperPOSIX(void(*aLog)(const char*));
-
- // Unmap the file on destruction of this object.
- ~AutoObjectMapperPOSIX();
-
- // Map |fileName| into the address space and return the mapping
- // extents. If the file is zero sized this will fail. The file is
- // mapped read-only and private. Returns true iff the mapping
- // succeeded, in which case *start and *length hold its extent.
- // Once a call to Map succeeds, all subsequent calls to it will
- // fail.
- bool Map(/*OUT*/void** start, /*OUT*/size_t* length, std::string fileName);
-
-protected:
- // If we are currently holding a mapped object, these record the
- // mapped address range.
- void* mImage;
- size_t mSize;
-
- // A logging sink, for complaining about mapping failures.
- void (*mLog)(const char*);
-
-private:
- // Are we currently holding a mapped object? This is private to
- // the base class. Derived classes need to have their own way to
- // track whether they are holding a mapped object.
- bool mIsMapped;
-
- // Disable copying and assignment.
- AutoObjectMapperPOSIX(const AutoObjectMapperPOSIX&);
- AutoObjectMapperPOSIX& operator=(const AutoObjectMapperPOSIX&);
- // Disable heap allocation of this class.
- void* operator new(size_t);
- void* operator new[](size_t);
- void operator delete(void*);
- void operator delete[](void*);
-};
-
-
-#if defined(SPS_OS_android)
-// This is a variant of AutoObjectMapperPOSIX suitable for use in
-// conjunction with faulty.lib on Android. How it behaves depends on
-// the name of the file to be mapped. There are three possible cases:
-//
-// (1) /foo/bar/xyzzy/blah.apk!/libwurble.so
-// We hand it as-is to faulty.lib and let it fish the relevant
-// bits out of the APK.
-//
-// (2) libmozglue.so
-// This is part of the Fennec installation, but is not in the
-// APK. Instead we have to figure out the installation path
-// and look for it there. Because of faulty.lib limitations,
-// we have to use regular open/mmap instead of faulty.lib.
-//
-// (3) libanythingelse.so
-// faulty.lib assumes this is a system library, and prepends
-// "/system/lib/" to the path. So as in (1), we can give it
-// as-is to faulty.lib.
-//
-// Hence (1) and (3) require special-casing here. Case (2) simply
-// hands the problem to the parent class.
-
-class MOZ_STACK_CLASS AutoObjectMapperFaultyLib : public AutoObjectMapperPOSIX {
-public:
- AutoObjectMapperFaultyLib(void(*aLog)(const char*));
-
- ~AutoObjectMapperFaultyLib();
-
- bool Map(/*OUT*/void** start, /*OUT*/size_t* length, std::string fileName);
-
-private:
- // faulty.lib requires us to maintain an abstract handle that can be
- // used later to unmap the area. If this is non-NULL, it is assumed
- // that unmapping is to be done by faulty.lib. Otherwise it goes
- // via the normal mechanism.
- void* mHdl;
-
- // Disable copying and assignment.
- AutoObjectMapperFaultyLib(const AutoObjectMapperFaultyLib&);
- AutoObjectMapperFaultyLib& operator=(const AutoObjectMapperFaultyLib&);
- // Disable heap allocation of this class.
- void* operator new(size_t);
- void* operator new[](size_t);
- void operator delete(void*);
- void operator delete[](void*);
-};
-
-#endif // defined(SPS_OS_android)
-
-#endif // AutoObjectMapper_h
diff --git a/tools/profiler/lul/LulCommon.cpp b/tools/profiler/lul/LulCommon.cpp
deleted file mode 100644
index 7321251c8..000000000
--- a/tools/profiler/lul/LulCommon.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-
-// Copyright (c) 2011, 2013 Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Original author: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com>
-
-
-// This file is derived from the following files in
-// toolkit/crashreporter/google-breakpad:
-// src/common/module.cc
-// src/common/unique_string.cc
-
-// There's no internal-only interface for LulCommon. Hence include
-// the external interface directly.
-#include "LulCommonExt.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <string>
-#include <map>
-
-
-namespace lul {
-
-using std::string;
-
-////////////////////////////////////////////////////////////////
-// Module
-//
-Module::Module(const string &name, const string &os,
- const string &architecture, const string &id) :
- name_(name),
- os_(os),
- architecture_(architecture),
- id_(id) { }
-
-Module::~Module() {
-}
-
-
-////////////////////////////////////////////////////////////////
-// UniqueString
-//
-class UniqueString {
- public:
- explicit UniqueString(string str) { str_ = strdup(str.c_str()); }
- ~UniqueString() { free(reinterpret_cast<void*>(const_cast<char*>(str_))); }
- const char* str_;
-};
-
-const char* FromUniqueString(const UniqueString* ustr)
-{
- return ustr->str_;
-}
-
-bool IsEmptyUniqueString(const UniqueString* ustr)
-{
- return (ustr->str_)[0] == '\0';
-}
-
-
-////////////////////////////////////////////////////////////////
-// UniqueStringUniverse
-//
-UniqueStringUniverse::~UniqueStringUniverse()
-{
- for (std::map<string, UniqueString*>::iterator it = map_.begin();
- it != map_.end(); it++) {
- delete it->second;
- }
-}
-
-const UniqueString* UniqueStringUniverse::ToUniqueString(string str)
-{
- std::map<string, UniqueString*>::iterator it = map_.find(str);
- if (it == map_.end()) {
- UniqueString* ustr = new UniqueString(str);
- map_[str] = ustr;
- return ustr;
- } else {
- return it->second;
- }
-}
-
-} // namespace lul
diff --git a/tools/profiler/lul/LulDwarf.cpp b/tools/profiler/lul/LulDwarf.cpp
deleted file mode 100644
index 1bdbdabb6..000000000
--- a/tools/profiler/lul/LulDwarf.cpp
+++ /dev/null
@@ -1,2180 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-
-// Copyright (c) 2010 Google Inc. All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// CFI reader author: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com>
-// Original author: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com>
-
-// Implementation of dwarf2reader::LineInfo, dwarf2reader::CompilationUnit,
-// and dwarf2reader::CallFrameInfo. See dwarf2reader.h for details.
-
-// This file is derived from the following files in
-// toolkit/crashreporter/google-breakpad:
-// src/common/dwarf/bytereader.cc
-// src/common/dwarf/dwarf2reader.cc
-// src/common/dwarf_cfi_to_module.cc
-
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <map>
-#include <stack>
-#include <string>
-
-#include "mozilla/Assertions.h"
-#include "mozilla/Sprintf.h"
-
-#include "LulCommonExt.h"
-#include "LulDwarfInt.h"
-
-
-// Set this to 1 for verbose logging
-#define DEBUG_DWARF 0
-
-
-namespace lul {
-
-using std::string;
-
-ByteReader::ByteReader(enum Endianness endian)
- :offset_reader_(NULL), address_reader_(NULL), endian_(endian),
- address_size_(0), offset_size_(0),
- have_section_base_(), have_text_base_(), have_data_base_(),
- have_function_base_() { }
-
-ByteReader::~ByteReader() { }
-
-void ByteReader::SetOffsetSize(uint8 size) {
- offset_size_ = size;
- MOZ_ASSERT(size == 4 || size == 8);
- if (size == 4) {
- this->offset_reader_ = &ByteReader::ReadFourBytes;
- } else {
- this->offset_reader_ = &ByteReader::ReadEightBytes;
- }
-}
-
-void ByteReader::SetAddressSize(uint8 size) {
- address_size_ = size;
- MOZ_ASSERT(size == 4 || size == 8);
- if (size == 4) {
- this->address_reader_ = &ByteReader::ReadFourBytes;
- } else {
- this->address_reader_ = &ByteReader::ReadEightBytes;
- }
-}
-
-uint64 ByteReader::ReadInitialLength(const char* start, size_t* len) {
- const uint64 initial_length = ReadFourBytes(start);
- start += 4;
-
- // In DWARF2/3, if the initial length is all 1 bits, then the offset
- // size is 8 and we need to read the next 8 bytes for the real length.
- if (initial_length == 0xffffffff) {
- SetOffsetSize(8);
- *len = 12;
- return ReadOffset(start);
- } else {
- SetOffsetSize(4);
- *len = 4;
- }
- return initial_length;
-}
-
-bool ByteReader::ValidEncoding(DwarfPointerEncoding encoding) const {
- if (encoding == DW_EH_PE_omit) return true;
- if (encoding == DW_EH_PE_aligned) return true;
- if ((encoding & 0x7) > DW_EH_PE_udata8)
- return false;
- if ((encoding & 0x70) > DW_EH_PE_funcrel)
- return false;
- return true;
-}
-
-bool ByteReader::UsableEncoding(DwarfPointerEncoding encoding) const {
- switch (encoding & 0x70) {
- case DW_EH_PE_absptr: return true;
- case DW_EH_PE_pcrel: return have_section_base_;
- case DW_EH_PE_textrel: return have_text_base_;
- case DW_EH_PE_datarel: return have_data_base_;
- case DW_EH_PE_funcrel: return have_function_base_;
- default: return false;
- }
-}
-
-uint64 ByteReader::ReadEncodedPointer(const char *buffer,
- DwarfPointerEncoding encoding,
- size_t *len) const {
- // UsableEncoding doesn't approve of DW_EH_PE_omit, so we shouldn't
- // see it here.
- MOZ_ASSERT(encoding != DW_EH_PE_omit);
-
- // The Linux Standards Base 4.0 does not make this clear, but the
- // GNU tools (gcc/unwind-pe.h; readelf/dwarf.c; gdb/dwarf2-frame.c)
- // agree that aligned pointers are always absolute, machine-sized,
- // machine-signed pointers.
- if (encoding == DW_EH_PE_aligned) {
- MOZ_ASSERT(have_section_base_);
-
- // We don't need to align BUFFER in *our* address space. Rather, we
- // need to find the next position in our buffer that would be aligned
- // when the .eh_frame section the buffer contains is loaded into the
- // program's memory. So align assuming that buffer_base_ gets loaded at
- // address section_base_, where section_base_ itself may or may not be
- // aligned.
-
- // First, find the offset to START from the closest prior aligned
- // address.
- uint64 skew = section_base_ & (AddressSize() - 1);
- // Now find the offset from that aligned address to buffer.
- uint64 offset = skew + (buffer - buffer_base_);
- // Round up to the next boundary.
- uint64 aligned = (offset + AddressSize() - 1) & -AddressSize();
- // Convert back to a pointer.
- const char *aligned_buffer = buffer_base_ + (aligned - skew);
- // Finally, store the length and actually fetch the pointer.
- *len = aligned_buffer - buffer + AddressSize();
- return ReadAddress(aligned_buffer);
- }
-
- // Extract the value first, ignoring whether it's a pointer or an
- // offset relative to some base.
- uint64 offset;
- switch (encoding & 0x0f) {
- case DW_EH_PE_absptr:
- // DW_EH_PE_absptr is weird, as it is used as a meaningful value for
- // both the high and low nybble of encoding bytes. When it appears in
- // the high nybble, it means that the pointer is absolute, not an
- // offset from some base address. When it appears in the low nybble,
- // as here, it means that the pointer is stored as a normal
- // machine-sized and machine-signed address. A low nybble of
- // DW_EH_PE_absptr does not imply that the pointer is absolute; it is
- // correct for us to treat the value as an offset from a base address
- // if the upper nybble is not DW_EH_PE_absptr.
- offset = ReadAddress(buffer);
- *len = AddressSize();
- break;
-
- case DW_EH_PE_uleb128:
- offset = ReadUnsignedLEB128(buffer, len);
- break;
-
- case DW_EH_PE_udata2:
- offset = ReadTwoBytes(buffer);
- *len = 2;
- break;
-
- case DW_EH_PE_udata4:
- offset = ReadFourBytes(buffer);
- *len = 4;
- break;
-
- case DW_EH_PE_udata8:
- offset = ReadEightBytes(buffer);
- *len = 8;
- break;
-
- case DW_EH_PE_sleb128:
- offset = ReadSignedLEB128(buffer, len);
- break;
-
- case DW_EH_PE_sdata2:
- offset = ReadTwoBytes(buffer);
- // Sign-extend from 16 bits.
- offset = (offset ^ 0x8000) - 0x8000;
- *len = 2;
- break;
-
- case DW_EH_PE_sdata4:
- offset = ReadFourBytes(buffer);
- // Sign-extend from 32 bits.
- offset = (offset ^ 0x80000000ULL) - 0x80000000ULL;
- *len = 4;
- break;
-
- case DW_EH_PE_sdata8:
- // No need to sign-extend; this is the full width of our type.
- offset = ReadEightBytes(buffer);
- *len = 8;
- break;
-
- default:
- abort();
- }
-
- // Find the appropriate base address.
- uint64 base;
- switch (encoding & 0x70) {
- case DW_EH_PE_absptr:
- base = 0;
- break;
-
- case DW_EH_PE_pcrel:
- MOZ_ASSERT(have_section_base_);
- base = section_base_ + (buffer - buffer_base_);
- break;
-
- case DW_EH_PE_textrel:
- MOZ_ASSERT(have_text_base_);
- base = text_base_;
- break;
-
- case DW_EH_PE_datarel:
- MOZ_ASSERT(have_data_base_);
- base = data_base_;
- break;
-
- case DW_EH_PE_funcrel:
- MOZ_ASSERT(have_function_base_);
- base = function_base_;
- break;
-
- default:
- abort();
- }
-
- uint64 pointer = base + offset;
-
- // Remove inappropriate upper bits.
- if (AddressSize() == 4)
- pointer = pointer & 0xffffffff;
- else
- MOZ_ASSERT(AddressSize() == sizeof(uint64));
-
- return pointer;
-}
-
-
-// A DWARF rule for recovering the address or value of a register, or
-// computing the canonical frame address. There is one subclass of this for
-// each '*Rule' member function in CallFrameInfo::Handler.
-//
-// It's annoying that we have to handle Rules using pointers (because
-// the concrete instances can have an arbitrary size). They're small,
-// so it would be much nicer if we could just handle them by value
-// instead of fretting about ownership and destruction.
-//
-// It seems like all these could simply be instances of std::tr1::bind,
-// except that we need instances to be EqualityComparable, too.
-//
-// This could logically be nested within State, but then the qualified names
-// get horrendous.
-class CallFrameInfo::Rule {
- public:
- virtual ~Rule() { }
-
- // Tell HANDLER that, at ADDRESS in the program, REGISTER can be
- // recovered using this rule. If REGISTER is kCFARegister, then this rule
- // describes how to compute the canonical frame address. Return what the
- // HANDLER member function returned.
- virtual bool Handle(Handler *handler, uint64 address, int register) const = 0;
-
- // Equality on rules. We use these to decide which rules we need
- // to report after a DW_CFA_restore_state instruction.
- virtual bool operator==(const Rule &rhs) const = 0;
-
- bool operator!=(const Rule &rhs) const { return ! (*this == rhs); }
-
- // Return a pointer to a copy of this rule.
- virtual Rule *Copy() const = 0;
-
- // If this is a base+offset rule, change its base register to REG.
- // Otherwise, do nothing. (Ugly, but required for DW_CFA_def_cfa_register.)
- virtual void SetBaseRegister(unsigned reg) { }
-
- // If this is a base+offset rule, change its offset to OFFSET. Otherwise,
- // do nothing. (Ugly, but required for DW_CFA_def_cfa_offset.)
- virtual void SetOffset(long long offset) { }
-
- // A RTTI workaround, to make it possible to implement equality
- // comparisons on classes derived from this one.
- enum CFIRTag {
- CFIR_UNDEFINED_RULE,
- CFIR_SAME_VALUE_RULE,
- CFIR_OFFSET_RULE,
- CFIR_VAL_OFFSET_RULE,
- CFIR_REGISTER_RULE,
- CFIR_EXPRESSION_RULE,
- CFIR_VAL_EXPRESSION_RULE
- };
-
- // Produce the tag that identifies the child class of this object.
- virtual CFIRTag getTag() const = 0;
-};
-
-// Rule: the value the register had in the caller cannot be recovered.
-class CallFrameInfo::UndefinedRule: public CallFrameInfo::Rule {
- public:
- UndefinedRule() { }
- ~UndefinedRule() { }
- CFIRTag getTag() const { return CFIR_UNDEFINED_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
- return handler->UndefinedRule(address, reg);
- }
- bool operator==(const Rule &rhs) const {
- if (rhs.getTag() != CFIR_UNDEFINED_RULE) return false;
- return true;
- }
- Rule *Copy() const { return new UndefinedRule(*this); }
-};
-
-// Rule: the register's value is the same as that it had in the caller.
-class CallFrameInfo::SameValueRule: public CallFrameInfo::Rule {
- public:
- SameValueRule() { }
- ~SameValueRule() { }
- CFIRTag getTag() const { return CFIR_SAME_VALUE_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
- return handler->SameValueRule(address, reg);
- }
- bool operator==(const Rule &rhs) const {
- if (rhs.getTag() != CFIR_SAME_VALUE_RULE) return false;
- return true;
- }
- Rule *Copy() const { return new SameValueRule(*this); }
-};
-
-// Rule: the register is saved at OFFSET from BASE_REGISTER. BASE_REGISTER
-// may be CallFrameInfo::Handler::kCFARegister.
-class CallFrameInfo::OffsetRule: public CallFrameInfo::Rule {
- public:
- OffsetRule(int base_register, long offset)
- : base_register_(base_register), offset_(offset) { }
- ~OffsetRule() { }
- CFIRTag getTag() const { return CFIR_OFFSET_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
- return handler->OffsetRule(address, reg, base_register_, offset_);
- }
- bool operator==(const Rule &rhs) const {
- if (rhs.getTag() != CFIR_OFFSET_RULE) return false;
- const OffsetRule *our_rhs = static_cast<const OffsetRule *>(&rhs);
- return (base_register_ == our_rhs->base_register_ &&
- offset_ == our_rhs->offset_);
- }
- Rule *Copy() const { return new OffsetRule(*this); }
- // We don't actually need SetBaseRegister or SetOffset here, since they
- // are only ever applied to CFA rules, for DW_CFA_def_cfa_offset, and it
- // doesn't make sense to use OffsetRule for computing the CFA: it
- // computes the address at which a register is saved, not a value.
- private:
- int base_register_;
- long offset_;
-};
-
-// Rule: the value the register had in the caller is the value of
-// BASE_REGISTER plus offset. BASE_REGISTER may be
-// CallFrameInfo::Handler::kCFARegister.
-class CallFrameInfo::ValOffsetRule: public CallFrameInfo::Rule {
- public:
- ValOffsetRule(int base_register, long offset)
- : base_register_(base_register), offset_(offset) { }
- ~ValOffsetRule() { }
- CFIRTag getTag() const { return CFIR_VAL_OFFSET_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
- return handler->ValOffsetRule(address, reg, base_register_, offset_);
- }
- bool operator==(const Rule &rhs) const {
- if (rhs.getTag() != CFIR_VAL_OFFSET_RULE) return false;
- const ValOffsetRule *our_rhs = static_cast<const ValOffsetRule *>(&rhs);
- return (base_register_ == our_rhs->base_register_ &&
- offset_ == our_rhs->offset_);
- }
- Rule *Copy() const { return new ValOffsetRule(*this); }
- void SetBaseRegister(unsigned reg) { base_register_ = reg; }
- void SetOffset(long long offset) { offset_ = offset; }
- private:
- int base_register_;
- long offset_;
-};
-
-// Rule: the register has been saved in another register REGISTER_NUMBER_.
-class CallFrameInfo::RegisterRule: public CallFrameInfo::Rule {
- public:
- explicit RegisterRule(int register_number)
- : register_number_(register_number) { }
- ~RegisterRule() { }
- CFIRTag getTag() const { return CFIR_REGISTER_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
- return handler->RegisterRule(address, reg, register_number_);
- }
- bool operator==(const Rule &rhs) const {
- if (rhs.getTag() != CFIR_REGISTER_RULE) return false;
- const RegisterRule *our_rhs = static_cast<const RegisterRule *>(&rhs);
- return (register_number_ == our_rhs->register_number_);
- }
- Rule *Copy() const { return new RegisterRule(*this); }
- private:
- int register_number_;
-};
-
-// Rule: EXPRESSION evaluates to the address at which the register is saved.
-class CallFrameInfo::ExpressionRule: public CallFrameInfo::Rule {
- public:
- explicit ExpressionRule(const string &expression)
- : expression_(expression) { }
- ~ExpressionRule() { }
- CFIRTag getTag() const { return CFIR_EXPRESSION_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
- return handler->ExpressionRule(address, reg, expression_);
- }
- bool operator==(const Rule &rhs) const {
- if (rhs.getTag() != CFIR_EXPRESSION_RULE) return false;
- const ExpressionRule *our_rhs = static_cast<const ExpressionRule *>(&rhs);
- return (expression_ == our_rhs->expression_);
- }
- Rule *Copy() const { return new ExpressionRule(*this); }
- private:
- string expression_;
-};
-
-// Rule: EXPRESSION evaluates to the previous value of the register.
-class CallFrameInfo::ValExpressionRule: public CallFrameInfo::Rule {
- public:
- explicit ValExpressionRule(const string &expression)
- : expression_(expression) { }
- ~ValExpressionRule() { }
- CFIRTag getTag() const { return CFIR_VAL_EXPRESSION_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
- return handler->ValExpressionRule(address, reg, expression_);
- }
- bool operator==(const Rule &rhs) const {
- if (rhs.getTag() != CFIR_VAL_EXPRESSION_RULE) return false;
- const ValExpressionRule *our_rhs =
- static_cast<const ValExpressionRule *>(&rhs);
- return (expression_ == our_rhs->expression_);
- }
- Rule *Copy() const { return new ValExpressionRule(*this); }
- private:
- string expression_;
-};
-
-// A map from register numbers to rules.
-class CallFrameInfo::RuleMap {
- public:
- RuleMap() : cfa_rule_(NULL) { }
- RuleMap(const RuleMap &rhs) : cfa_rule_(NULL) { *this = rhs; }
- ~RuleMap() { Clear(); }
-
- RuleMap &operator=(const RuleMap &rhs);
-
- // Set the rule for computing the CFA to RULE. Take ownership of RULE.
- void SetCFARule(Rule *rule) { delete cfa_rule_; cfa_rule_ = rule; }
-
- // Return the current CFA rule. Unlike RegisterRule, this RuleMap retains
- // ownership of the rule. We use this for DW_CFA_def_cfa_offset and
- // DW_CFA_def_cfa_register, and for detecting references to the CFA before
- // a rule for it has been established.
- Rule *CFARule() const { return cfa_rule_; }
-
- // Return the rule for REG, or NULL if there is none. The caller takes
- // ownership of the result.
- Rule *RegisterRule(int reg) const;
-
- // Set the rule for computing REG to RULE. Take ownership of RULE.
- void SetRegisterRule(int reg, Rule *rule);
-
- // Make all the appropriate calls to HANDLER as if we were changing from
- // this RuleMap to NEW_RULES at ADDRESS. We use this to implement
- // DW_CFA_restore_state, where lots of rules can change simultaneously.
- // Return true if all handlers returned true; otherwise, return false.
- bool HandleTransitionTo(Handler *handler, uint64 address,
- const RuleMap &new_rules) const;
-
- private:
- // A map from register numbers to Rules.
- typedef std::map<int, Rule *> RuleByNumber;
-
- // Remove all register rules and clear cfa_rule_.
- void Clear();
-
- // The rule for computing the canonical frame address. This RuleMap owns
- // this rule.
- Rule *cfa_rule_;
-
- // A map from register numbers to postfix expressions to recover
- // their values. This RuleMap owns the Rules the map refers to.
- RuleByNumber registers_;
-};
-
-CallFrameInfo::RuleMap &CallFrameInfo::RuleMap::operator=(const RuleMap &rhs) {
- Clear();
- // Since each map owns the rules it refers to, assignment must copy them.
- if (rhs.cfa_rule_) cfa_rule_ = rhs.cfa_rule_->Copy();
- for (RuleByNumber::const_iterator it = rhs.registers_.begin();
- it != rhs.registers_.end(); it++)
- registers_[it->first] = it->second->Copy();
- return *this;
-}
-
-CallFrameInfo::Rule *CallFrameInfo::RuleMap::RegisterRule(int reg) const {
- MOZ_ASSERT(reg != Handler::kCFARegister);
- RuleByNumber::const_iterator it = registers_.find(reg);
- if (it != registers_.end())
- return it->second->Copy();
- else
- return NULL;
-}
-
-void CallFrameInfo::RuleMap::SetRegisterRule(int reg, Rule *rule) {
- MOZ_ASSERT(reg != Handler::kCFARegister);
- MOZ_ASSERT(rule);
- Rule **slot = &registers_[reg];
- delete *slot;
- *slot = rule;
-}
-
-bool CallFrameInfo::RuleMap::HandleTransitionTo(
- Handler *handler,
- uint64 address,
- const RuleMap &new_rules) const {
- // Transition from cfa_rule_ to new_rules.cfa_rule_.
- if (cfa_rule_ && new_rules.cfa_rule_) {
- if (*cfa_rule_ != *new_rules.cfa_rule_ &&
- !new_rules.cfa_rule_->Handle(handler, address, Handler::kCFARegister))
- return false;
- } else if (cfa_rule_) {
- // this RuleMap has a CFA rule but new_rules doesn't.
- // CallFrameInfo::Handler has no way to handle this --- and shouldn't;
- // it's garbage input. The instruction interpreter should have
- // detected this and warned, so take no action here.
- } else if (new_rules.cfa_rule_) {
- // This shouldn't be possible: NEW_RULES is some prior state, and
- // there's no way to remove entries.
- MOZ_ASSERT(0);
- } else {
- // Both CFA rules are empty. No action needed.
- }
-
- // Traverse the two maps in order by register number, and report
- // whatever differences we find.
- RuleByNumber::const_iterator old_it = registers_.begin();
- RuleByNumber::const_iterator new_it = new_rules.registers_.begin();
- while (old_it != registers_.end() && new_it != new_rules.registers_.end()) {
- if (old_it->first < new_it->first) {
- // This RuleMap has an entry for old_it->first, but NEW_RULES
- // doesn't.
- //
- // This isn't really the right thing to do, but since CFI generally
- // only mentions callee-saves registers, and GCC's convention for
- // callee-saves registers is that they are unchanged, it's a good
- // approximation.
- if (!handler->SameValueRule(address, old_it->first))
- return false;
- old_it++;
- } else if (old_it->first > new_it->first) {
- // NEW_RULES has entry for new_it->first, but this RuleMap
- // doesn't. This shouldn't be possible: NEW_RULES is some prior
- // state, and there's no way to remove entries.
- MOZ_ASSERT(0);
- } else {
- // Both maps have an entry for this register. Report the new
- // rule if it is different.
- if (*old_it->second != *new_it->second &&
- !new_it->second->Handle(handler, address, new_it->first))
- return false;
- new_it++, old_it++;
- }
- }
- // Finish off entries from this RuleMap with no counterparts in new_rules.
- while (old_it != registers_.end()) {
- if (!handler->SameValueRule(address, old_it->first))
- return false;
- old_it++;
- }
- // Since we only make transitions from a rule set to some previously
- // saved rule set, and we can only add rules to the map, NEW_RULES
- // must have fewer rules than *this.
- MOZ_ASSERT(new_it == new_rules.registers_.end());
-
- return true;
-}
-
-// Remove all register rules and clear cfa_rule_.
-void CallFrameInfo::RuleMap::Clear() {
- delete cfa_rule_;
- cfa_rule_ = NULL;
- for (RuleByNumber::iterator it = registers_.begin();
- it != registers_.end(); it++)
- delete it->second;
- registers_.clear();
-}
-
-// The state of the call frame information interpreter as it processes
-// instructions from a CIE and FDE.
-class CallFrameInfo::State {
- public:
- // Create a call frame information interpreter state with the given
- // reporter, reader, handler, and initial call frame info address.
- State(ByteReader *reader, Handler *handler, Reporter *reporter,
- uint64 address)
- : reader_(reader), handler_(handler), reporter_(reporter),
- address_(address), entry_(NULL), cursor_(NULL),
- saved_rules_(NULL) { }
-
- ~State() {
- if (saved_rules_)
- delete saved_rules_;
- }
-
- // Interpret instructions from CIE, save the resulting rule set for
- // DW_CFA_restore instructions, and return true. On error, report
- // the problem to reporter_ and return false.
- bool InterpretCIE(const CIE &cie);
-
- // Interpret instructions from FDE, and return true. On error,
- // report the problem to reporter_ and return false.
- bool InterpretFDE(const FDE &fde);
-
- private:
- // The operands of a CFI instruction, for ParseOperands.
- struct Operands {
- unsigned register_number; // A register number.
- uint64 offset; // An offset or address.
- long signed_offset; // A signed offset.
- string expression; // A DWARF expression.
- };
-
- // Parse CFI instruction operands from STATE's instruction stream as
- // described by FORMAT. On success, populate OPERANDS with the
- // results, and return true. On failure, report the problem and
- // return false.
- //
- // Each character of FORMAT should be one of the following:
- //
- // 'r' unsigned LEB128 register number (OPERANDS->register_number)
- // 'o' unsigned LEB128 offset (OPERANDS->offset)
- // 's' signed LEB128 offset (OPERANDS->signed_offset)
- // 'a' machine-size address (OPERANDS->offset)
- // (If the CIE has a 'z' augmentation string, 'a' uses the
- // encoding specified by the 'R' argument.)
- // '1' a one-byte offset (OPERANDS->offset)
- // '2' a two-byte offset (OPERANDS->offset)
- // '4' a four-byte offset (OPERANDS->offset)
- // '8' an eight-byte offset (OPERANDS->offset)
- // 'e' a DW_FORM_block holding a (OPERANDS->expression)
- // DWARF expression
- bool ParseOperands(const char *format, Operands *operands);
-
- // Interpret one CFI instruction from STATE's instruction stream, update
- // STATE, report any rule changes to handler_, and return true. On
- // failure, report the problem and return false.
- bool DoInstruction();
-
- // The following Do* member functions are subroutines of DoInstruction,
- // factoring out the actual work of operations that have several
- // different encodings.
-
- // Set the CFA rule to be the value of BASE_REGISTER plus OFFSET, and
- // return true. On failure, report and return false. (Used for
- // DW_CFA_def_cfa and DW_CFA_def_cfa_sf.)
- bool DoDefCFA(unsigned base_register, long offset);
-
- // Change the offset of the CFA rule to OFFSET, and return true. On
- // failure, report and return false. (Subroutine for
- // DW_CFA_def_cfa_offset and DW_CFA_def_cfa_offset_sf.)
- bool DoDefCFAOffset(long offset);
-
- // Specify that REG can be recovered using RULE, and return true. On
- // failure, report and return false.
- bool DoRule(unsigned reg, Rule *rule);
-
- // Specify that REG can be found at OFFSET from the CFA, and return true.
- // On failure, report and return false. (Subroutine for DW_CFA_offset,
- // DW_CFA_offset_extended, and DW_CFA_offset_extended_sf.)
- bool DoOffset(unsigned reg, long offset);
-
- // Specify that the caller's value for REG is the CFA plus OFFSET,
- // and return true. On failure, report and return false. (Subroutine
- // for DW_CFA_val_offset and DW_CFA_val_offset_sf.)
- bool DoValOffset(unsigned reg, long offset);
-
- // Restore REG to the rule established in the CIE, and return true. On
- // failure, report and return false. (Subroutine for DW_CFA_restore and
- // DW_CFA_restore_extended.)
- bool DoRestore(unsigned reg);
-
- // Return the section offset of the instruction at cursor. For use
- // in error messages.
- uint64 CursorOffset() { return entry_->offset + (cursor_ - entry_->start); }
-
- // Report that entry_ is incomplete, and return false. For brevity.
- bool ReportIncomplete() {
- reporter_->Incomplete(entry_->offset, entry_->kind);
- return false;
- }
-
- // For reading multi-byte values with the appropriate endianness.
- ByteReader *reader_;
-
- // The handler to which we should report the data we find.
- Handler *handler_;
-
- // For reporting problems in the info we're parsing.
- Reporter *reporter_;
-
- // The code address to which the next instruction in the stream applies.
- uint64 address_;
-
- // The entry whose instructions we are currently processing. This is
- // first a CIE, and then an FDE.
- const Entry *entry_;
-
- // The next instruction to process.
- const char *cursor_;
-
- // The current set of rules.
- RuleMap rules_;
-
- // The set of rules established by the CIE, used by DW_CFA_restore
- // and DW_CFA_restore_extended. We set this after interpreting the
- // CIE's instructions.
- RuleMap cie_rules_;
-
- // A stack of saved states, for DW_CFA_remember_state and
- // DW_CFA_restore_state.
- std::stack<RuleMap>* saved_rules_;
-};
-
-bool CallFrameInfo::State::InterpretCIE(const CIE &cie) {
- entry_ = &cie;
- cursor_ = entry_->instructions;
- while (cursor_ < entry_->end)
- if (!DoInstruction())
- return false;
- // Note the rules established by the CIE, for use by DW_CFA_restore
- // and DW_CFA_restore_extended.
- cie_rules_ = rules_;
- return true;
-}
-
-bool CallFrameInfo::State::InterpretFDE(const FDE &fde) {
- entry_ = &fde;
- cursor_ = entry_->instructions;
- while (cursor_ < entry_->end)
- if (!DoInstruction())
- return false;
- return true;
-}
-
-bool CallFrameInfo::State::ParseOperands(const char *format,
- Operands *operands) {
- size_t len;
- const char *operand;
-
- for (operand = format; *operand; operand++) {
- size_t bytes_left = entry_->end - cursor_;
- switch (*operand) {
- case 'r':
- operands->register_number = reader_->ReadUnsignedLEB128(cursor_, &len);
- if (len > bytes_left) return ReportIncomplete();
- cursor_ += len;
- break;
-
- case 'o':
- operands->offset = reader_->ReadUnsignedLEB128(cursor_, &len);
- if (len > bytes_left) return ReportIncomplete();
- cursor_ += len;
- break;
-
- case 's':
- operands->signed_offset = reader_->ReadSignedLEB128(cursor_, &len);
- if (len > bytes_left) return ReportIncomplete();
- cursor_ += len;
- break;
-
- case 'a':
- operands->offset =
- reader_->ReadEncodedPointer(cursor_, entry_->cie->pointer_encoding,
- &len);
- if (len > bytes_left) return ReportIncomplete();
- cursor_ += len;
- break;
-
- case '1':
- if (1 > bytes_left) return ReportIncomplete();
- operands->offset = static_cast<unsigned char>(*cursor_++);
- break;
-
- case '2':
- if (2 > bytes_left) return ReportIncomplete();
- operands->offset = reader_->ReadTwoBytes(cursor_);
- cursor_ += 2;
- break;
-
- case '4':
- if (4 > bytes_left) return ReportIncomplete();
- operands->offset = reader_->ReadFourBytes(cursor_);
- cursor_ += 4;
- break;
-
- case '8':
- if (8 > bytes_left) return ReportIncomplete();
- operands->offset = reader_->ReadEightBytes(cursor_);
- cursor_ += 8;
- break;
-
- case 'e': {
- size_t expression_length = reader_->ReadUnsignedLEB128(cursor_, &len);
- if (len > bytes_left || expression_length > bytes_left - len)
- return ReportIncomplete();
- cursor_ += len;
- operands->expression = string(cursor_, expression_length);
- cursor_ += expression_length;
- break;
- }
-
- default:
- MOZ_ASSERT(0);
- }
- }
-
- return true;
-}
-
-bool CallFrameInfo::State::DoInstruction() {
- CIE *cie = entry_->cie;
- Operands ops;
-
- // Our entry's kind should have been set by now.
- MOZ_ASSERT(entry_->kind != kUnknown);
-
- // We shouldn't have been invoked unless there were more
- // instructions to parse.
- MOZ_ASSERT(cursor_ < entry_->end);
-
- unsigned opcode = *cursor_++;
- if ((opcode & 0xc0) != 0) {
- switch (opcode & 0xc0) {
- // Advance the address.
- case DW_CFA_advance_loc: {
- size_t code_offset = opcode & 0x3f;
- address_ += code_offset * cie->code_alignment_factor;
- break;
- }
-
- // Find a register at an offset from the CFA.
- case DW_CFA_offset:
- if (!ParseOperands("o", &ops) ||
- !DoOffset(opcode & 0x3f, ops.offset * cie->data_alignment_factor))
- return false;
- break;
-
- // Restore the rule established for a register by the CIE.
- case DW_CFA_restore:
- if (!DoRestore(opcode & 0x3f)) return false;
- break;
-
- // The 'if' above should have excluded this possibility.
- default:
- MOZ_ASSERT(0);
- }
-
- // Return here, so the big switch below won't be indented.
- return true;
- }
-
- switch (opcode) {
- // Set the address.
- case DW_CFA_set_loc:
- if (!ParseOperands("a", &ops)) return false;
- address_ = ops.offset;
- break;
-
- // Advance the address.
- case DW_CFA_advance_loc1:
- if (!ParseOperands("1", &ops)) return false;
- address_ += ops.offset * cie->code_alignment_factor;
- break;
-
- // Advance the address.
- case DW_CFA_advance_loc2:
- if (!ParseOperands("2", &ops)) return false;
- address_ += ops.offset * cie->code_alignment_factor;
- break;
-
- // Advance the address.
- case DW_CFA_advance_loc4:
- if (!ParseOperands("4", &ops)) return false;
- address_ += ops.offset * cie->code_alignment_factor;
- break;
-
- // Advance the address.
- case DW_CFA_MIPS_advance_loc8:
- if (!ParseOperands("8", &ops)) return false;
- address_ += ops.offset * cie->code_alignment_factor;
- break;
-
- // Compute the CFA by adding an offset to a register.
- case DW_CFA_def_cfa:
- if (!ParseOperands("ro", &ops) ||
- !DoDefCFA(ops.register_number, ops.offset))
- return false;
- break;
-
- // Compute the CFA by adding an offset to a register.
- case DW_CFA_def_cfa_sf:
- if (!ParseOperands("rs", &ops) ||
- !DoDefCFA(ops.register_number,
- ops.signed_offset * cie->data_alignment_factor))
- return false;
- break;
-
- // Change the base register used to compute the CFA.
- case DW_CFA_def_cfa_register: {
- Rule *cfa_rule = rules_.CFARule();
- if (!cfa_rule) {
- reporter_->NoCFARule(entry_->offset, entry_->kind, CursorOffset());
- return false;
- }
- if (!ParseOperands("r", &ops)) return false;
- cfa_rule->SetBaseRegister(ops.register_number);
- if (!cfa_rule->Handle(handler_, address_, Handler::kCFARegister))
- return false;
- break;
- }
-
- // Change the offset used to compute the CFA.
- case DW_CFA_def_cfa_offset:
- if (!ParseOperands("o", &ops) ||
- !DoDefCFAOffset(ops.offset))
- return false;
- break;
-
- // Change the offset used to compute the CFA.
- case DW_CFA_def_cfa_offset_sf:
- if (!ParseOperands("s", &ops) ||
- !DoDefCFAOffset(ops.signed_offset * cie->data_alignment_factor))
- return false;
- break;
-
- // Specify an expression whose value is the CFA.
- case DW_CFA_def_cfa_expression: {
- if (!ParseOperands("e", &ops))
- return false;
- Rule *rule = new ValExpressionRule(ops.expression);
- rules_.SetCFARule(rule);
- if (!rule->Handle(handler_, address_, Handler::kCFARegister))
- return false;
- break;
- }
-
- // The register's value cannot be recovered.
- case DW_CFA_undefined: {
- if (!ParseOperands("r", &ops) ||
- !DoRule(ops.register_number, new UndefinedRule()))
- return false;
- break;
- }
-
- // The register's value is unchanged from its value in the caller.
- case DW_CFA_same_value: {
- if (!ParseOperands("r", &ops) ||
- !DoRule(ops.register_number, new SameValueRule()))
- return false;
- break;
- }
-
- // Find a register at an offset from the CFA.
- case DW_CFA_offset_extended:
- if (!ParseOperands("ro", &ops) ||
- !DoOffset(ops.register_number,
- ops.offset * cie->data_alignment_factor))
- return false;
- break;
-
- // The register is saved at an offset from the CFA.
- case DW_CFA_offset_extended_sf:
- if (!ParseOperands("rs", &ops) ||
- !DoOffset(ops.register_number,
- ops.signed_offset * cie->data_alignment_factor))
- return false;
- break;
-
- // The register is saved at an offset from the CFA.
- case DW_CFA_GNU_negative_offset_extended:
- if (!ParseOperands("ro", &ops) ||
- !DoOffset(ops.register_number,
- -ops.offset * cie->data_alignment_factor))
- return false;
- break;
-
- // The register's value is the sum of the CFA plus an offset.
- case DW_CFA_val_offset:
- if (!ParseOperands("ro", &ops) ||
- !DoValOffset(ops.register_number,
- ops.offset * cie->data_alignment_factor))
- return false;
- break;
-
- // The register's value is the sum of the CFA plus an offset.
- case DW_CFA_val_offset_sf:
- if (!ParseOperands("rs", &ops) ||
- !DoValOffset(ops.register_number,
- ops.signed_offset * cie->data_alignment_factor))
- return false;
- break;
-
- // The register has been saved in another register.
- case DW_CFA_register: {
- if (!ParseOperands("ro", &ops) ||
- !DoRule(ops.register_number, new RegisterRule(ops.offset)))
- return false;
- break;
- }
-
- // An expression yields the address at which the register is saved.
- case DW_CFA_expression: {
- if (!ParseOperands("re", &ops) ||
- !DoRule(ops.register_number, new ExpressionRule(ops.expression)))
- return false;
- break;
- }
-
- // An expression yields the caller's value for the register.
- case DW_CFA_val_expression: {
- if (!ParseOperands("re", &ops) ||
- !DoRule(ops.register_number, new ValExpressionRule(ops.expression)))
- return false;
- break;
- }
-
- // Restore the rule established for a register by the CIE.
- case DW_CFA_restore_extended:
- if (!ParseOperands("r", &ops) ||
- !DoRestore( ops.register_number))
- return false;
- break;
-
- // Save the current set of rules on a stack.
- case DW_CFA_remember_state:
- if (!saved_rules_) {
- saved_rules_ = new std::stack<RuleMap>();
- }
- saved_rules_->push(rules_);
- break;
-
- // Pop the current set of rules off the stack.
- case DW_CFA_restore_state: {
- if (!saved_rules_ || saved_rules_->empty()) {
- reporter_->EmptyStateStack(entry_->offset, entry_->kind,
- CursorOffset());
- return false;
- }
- const RuleMap &new_rules = saved_rules_->top();
- if (rules_.CFARule() && !new_rules.CFARule()) {
- reporter_->ClearingCFARule(entry_->offset, entry_->kind,
- CursorOffset());
- return false;
- }
- rules_.HandleTransitionTo(handler_, address_, new_rules);
- rules_ = new_rules;
- saved_rules_->pop();
- break;
- }
-
- // No operation. (Padding instruction.)
- case DW_CFA_nop:
- break;
-
- // A SPARC register window save: Registers 8 through 15 (%o0-%o7)
- // are saved in registers 24 through 31 (%i0-%i7), and registers
- // 16 through 31 (%l0-%l7 and %i0-%i7) are saved at CFA offsets
- // (0-15 * the register size). The register numbers must be
- // hard-coded. A GNU extension, and not a pretty one.
- case DW_CFA_GNU_window_save: {
- // Save %o0-%o7 in %i0-%i7.
- for (int i = 8; i < 16; i++)
- if (!DoRule(i, new RegisterRule(i + 16)))
- return false;
- // Save %l0-%l7 and %i0-%i7 at the CFA.
- for (int i = 16; i < 32; i++)
- // Assume that the byte reader's address size is the same as
- // the architecture's register size. !@#%*^ hilarious.
- if (!DoRule(i, new OffsetRule(Handler::kCFARegister,
- (i - 16) * reader_->AddressSize())))
- return false;
- break;
- }
-
- // I'm not sure what this is. GDB doesn't use it for unwinding.
- case DW_CFA_GNU_args_size:
- if (!ParseOperands("o", &ops)) return false;
- break;
-
- // An opcode we don't recognize.
- default: {
- reporter_->BadInstruction(entry_->offset, entry_->kind, CursorOffset());
- return false;
- }
- }
-
- return true;
-}
-
-bool CallFrameInfo::State::DoDefCFA(unsigned base_register, long offset) {
- Rule *rule = new ValOffsetRule(base_register, offset);
- rules_.SetCFARule(rule);
- return rule->Handle(handler_, address_, Handler::kCFARegister);
-}
-
-bool CallFrameInfo::State::DoDefCFAOffset(long offset) {
- Rule *cfa_rule = rules_.CFARule();
- if (!cfa_rule) {
- reporter_->NoCFARule(entry_->offset, entry_->kind, CursorOffset());
- return false;
- }
- cfa_rule->SetOffset(offset);
- return cfa_rule->Handle(handler_, address_, Handler::kCFARegister);
-}
-
-bool CallFrameInfo::State::DoRule(unsigned reg, Rule *rule) {
- rules_.SetRegisterRule(reg, rule);
- return rule->Handle(handler_, address_, reg);
-}
-
-bool CallFrameInfo::State::DoOffset(unsigned reg, long offset) {
- if (!rules_.CFARule()) {
- reporter_->NoCFARule(entry_->offset, entry_->kind, CursorOffset());
- return false;
- }
- return DoRule(reg,
- new OffsetRule(Handler::kCFARegister, offset));
-}
-
-bool CallFrameInfo::State::DoValOffset(unsigned reg, long offset) {
- if (!rules_.CFARule()) {
- reporter_->NoCFARule(entry_->offset, entry_->kind, CursorOffset());
- return false;
- }
- return DoRule(reg,
- new ValOffsetRule(Handler::kCFARegister, offset));
-}
-
-bool CallFrameInfo::State::DoRestore(unsigned reg) {
- // DW_CFA_restore and DW_CFA_restore_extended don't make sense in a CIE.
- if (entry_->kind == kCIE) {
- reporter_->RestoreInCIE(entry_->offset, CursorOffset());
- return false;
- }
- Rule *rule = cie_rules_.RegisterRule(reg);
- if (!rule) {
- // This isn't really the right thing to do, but since CFI generally
- // only mentions callee-saves registers, and GCC's convention for
- // callee-saves registers is that they are unchanged, it's a good
- // approximation.
- rule = new SameValueRule();
- }
- return DoRule(reg, rule);
-}
-
-bool CallFrameInfo::ReadEntryPrologue(const char *cursor, Entry *entry) {
- const char *buffer_end = buffer_ + buffer_length_;
-
- // Initialize enough of ENTRY for use in error reporting.
- entry->offset = cursor - buffer_;
- entry->start = cursor;
- entry->kind = kUnknown;
- entry->end = NULL;
-
- // Read the initial length. This sets reader_'s offset size.
- size_t length_size;
- uint64 length = reader_->ReadInitialLength(cursor, &length_size);
- if (length_size > size_t(buffer_end - cursor))
- return ReportIncomplete(entry);
- cursor += length_size;
-
- // In a .eh_frame section, a length of zero marks the end of the series
- // of entries.
- if (length == 0 && eh_frame_) {
- entry->kind = kTerminator;
- entry->end = cursor;
- return true;
- }
-
- // Validate the length.
- if (length > size_t(buffer_end - cursor))
- return ReportIncomplete(entry);
-
- // The length is the number of bytes after the initial length field;
- // we have that position handy at this point, so compute the end
- // now. (If we're parsing 64-bit-offset DWARF on a 32-bit machine,
- // and the length didn't fit in a size_t, we would have rejected it
- // above.)
- entry->end = cursor + length;
-
- // Parse the next field: either the offset of a CIE or a CIE id.
- size_t offset_size = reader_->OffsetSize();
- if (offset_size > size_t(entry->end - cursor)) return ReportIncomplete(entry);
- entry->id = reader_->ReadOffset(cursor);
-
- // Don't advance cursor past id field yet; in .eh_frame data we need
- // the id's position to compute the section offset of an FDE's CIE.
-
- // Now we can decide what kind of entry this is.
- if (eh_frame_) {
- // In .eh_frame data, an ID of zero marks the entry as a CIE, and
- // anything else is an offset from the id field of the FDE to the start
- // of the CIE.
- if (entry->id == 0) {
- entry->kind = kCIE;
- } else {
- entry->kind = kFDE;
- // Turn the offset from the id into an offset from the buffer's start.
- entry->id = (cursor - buffer_) - entry->id;
- }
- } else {
- // In DWARF CFI data, an ID of ~0 (of the appropriate width, given the
- // offset size for the entry) marks the entry as a CIE, and anything
- // else is the offset of the CIE from the beginning of the section.
- if (offset_size == 4)
- entry->kind = (entry->id == 0xffffffff) ? kCIE : kFDE;
- else {
- MOZ_ASSERT(offset_size == 8);
- entry->kind = (entry->id == 0xffffffffffffffffULL) ? kCIE : kFDE;
- }
- }
-
- // Now advance cursor past the id.
- cursor += offset_size;
-
- // The fields specific to this kind of entry start here.
- entry->fields = cursor;
-
- entry->cie = NULL;
-
- return true;
-}
-
-bool CallFrameInfo::ReadCIEFields(CIE *cie) {
- const char *cursor = cie->fields;
- size_t len;
-
- MOZ_ASSERT(cie->kind == kCIE);
-
- // Prepare for early exit.
- cie->version = 0;
- cie->augmentation.clear();
- cie->code_alignment_factor = 0;
- cie->data_alignment_factor = 0;
- cie->return_address_register = 0;
- cie->has_z_augmentation = false;
- cie->pointer_encoding = DW_EH_PE_absptr;
- cie->instructions = 0;
-
- // Parse the version number.
- if (cie->end - cursor < 1)
- return ReportIncomplete(cie);
- cie->version = reader_->ReadOneByte(cursor);
- cursor++;
-
- // If we don't recognize the version, we can't parse any more fields of the
- // CIE. For DWARF CFI, we handle versions 1 through 3 (there was never a
- // version 2 of CFI data). For .eh_frame, we handle versions 1 and 3 as well;
- // the difference between those versions seems to be the same as for
- // .debug_frame.
- if (cie->version < 1 || cie->version > 3) {
- reporter_->UnrecognizedVersion(cie->offset, cie->version);
- return false;
- }
-
- const char *augmentation_start = cursor;
- const void *augmentation_end =
- memchr(augmentation_start, '\0', cie->end - augmentation_start);
- if (! augmentation_end) return ReportIncomplete(cie);
- cursor = static_cast<const char *>(augmentation_end);
- cie->augmentation = string(augmentation_start,
- cursor - augmentation_start);
- // Skip the terminating '\0'.
- cursor++;
-
- // Is this CFI augmented?
- if (!cie->augmentation.empty()) {
- // Is it an augmentation we recognize?
- if (cie->augmentation[0] == DW_Z_augmentation_start) {
- // Linux C++ ABI 'z' augmentation, used for exception handling data.
- cie->has_z_augmentation = true;
- } else {
- // Not an augmentation we recognize. Augmentations can have arbitrary
- // effects on the form of rest of the content, so we have to give up.
- reporter_->UnrecognizedAugmentation(cie->offset, cie->augmentation);
- return false;
- }
- }
-
- // Parse the code alignment factor.
- cie->code_alignment_factor = reader_->ReadUnsignedLEB128(cursor, &len);
- if (size_t(cie->end - cursor) < len) return ReportIncomplete(cie);
- cursor += len;
-
- // Parse the data alignment factor.
- cie->data_alignment_factor = reader_->ReadSignedLEB128(cursor, &len);
- if (size_t(cie->end - cursor) < len) return ReportIncomplete(cie);
- cursor += len;
-
- // Parse the return address register. This is a ubyte in version 1, and
- // a ULEB128 in version 3.
- if (cie->version == 1) {
- if (cursor >= cie->end) return ReportIncomplete(cie);
- cie->return_address_register = uint8(*cursor++);
- } else {
- cie->return_address_register = reader_->ReadUnsignedLEB128(cursor, &len);
- if (size_t(cie->end - cursor) < len) return ReportIncomplete(cie);
- cursor += len;
- }
-
- // If we have a 'z' augmentation string, find the augmentation data and
- // use the augmentation string to parse it.
- if (cie->has_z_augmentation) {
- uint64_t data_size = reader_->ReadUnsignedLEB128(cursor, &len);
- if (size_t(cie->end - cursor) < len + data_size)
- return ReportIncomplete(cie);
- cursor += len;
- const char *data = cursor;
- cursor += data_size;
- const char *data_end = cursor;
-
- cie->has_z_lsda = false;
- cie->has_z_personality = false;
- cie->has_z_signal_frame = false;
-
- // Walk the augmentation string, and extract values from the
- // augmentation data as the string directs.
- for (size_t i = 1; i < cie->augmentation.size(); i++) {
- switch (cie->augmentation[i]) {
- case DW_Z_has_LSDA:
- // The CIE's augmentation data holds the language-specific data
- // area pointer's encoding, and the FDE's augmentation data holds
- // the pointer itself.
- cie->has_z_lsda = true;
- // Fetch the LSDA encoding from the augmentation data.
- if (data >= data_end) return ReportIncomplete(cie);
- cie->lsda_encoding = DwarfPointerEncoding(*data++);
- if (!reader_->ValidEncoding(cie->lsda_encoding)) {
- reporter_->InvalidPointerEncoding(cie->offset, cie->lsda_encoding);
- return false;
- }
- // Don't check if the encoding is usable here --- we haven't
- // read the FDE's fields yet, so we're not prepared for
- // DW_EH_PE_funcrel, although that's a fine encoding for the
- // LSDA to use, since it appears in the FDE.
- break;
-
- case DW_Z_has_personality_routine:
- // The CIE's augmentation data holds the personality routine
- // pointer's encoding, followed by the pointer itself.
- cie->has_z_personality = true;
- // Fetch the personality routine pointer's encoding from the
- // augmentation data.
- if (data >= data_end) return ReportIncomplete(cie);
- cie->personality_encoding = DwarfPointerEncoding(*data++);
- if (!reader_->ValidEncoding(cie->personality_encoding)) {
- reporter_->InvalidPointerEncoding(cie->offset,
- cie->personality_encoding);
- return false;
- }
- if (!reader_->UsableEncoding(cie->personality_encoding)) {
- reporter_->UnusablePointerEncoding(cie->offset,
- cie->personality_encoding);
- return false;
- }
- // Fetch the personality routine's pointer itself from the data.
- cie->personality_address =
- reader_->ReadEncodedPointer(data, cie->personality_encoding,
- &len);
- if (len > size_t(data_end - data))
- return ReportIncomplete(cie);
- data += len;
- break;
-
- case DW_Z_has_FDE_address_encoding:
- // The CIE's augmentation data holds the pointer encoding to use
- // for addresses in the FDE.
- if (data >= data_end) return ReportIncomplete(cie);
- cie->pointer_encoding = DwarfPointerEncoding(*data++);
- if (!reader_->ValidEncoding(cie->pointer_encoding)) {
- reporter_->InvalidPointerEncoding(cie->offset,
- cie->pointer_encoding);
- return false;
- }
- if (!reader_->UsableEncoding(cie->pointer_encoding)) {
- reporter_->UnusablePointerEncoding(cie->offset,
- cie->pointer_encoding);
- return false;
- }
- break;
-
- case DW_Z_is_signal_trampoline:
- // Frames using this CIE are signal delivery frames.
- cie->has_z_signal_frame = true;
- break;
-
- default:
- // An augmentation we don't recognize.
- reporter_->UnrecognizedAugmentation(cie->offset, cie->augmentation);
- return false;
- }
- }
- }
-
- // The CIE's instructions start here.
- cie->instructions = cursor;
-
- return true;
-}
-
-bool CallFrameInfo::ReadFDEFields(FDE *fde) {
- const char *cursor = fde->fields;
- size_t size;
-
- fde->address = reader_->ReadEncodedPointer(cursor, fde->cie->pointer_encoding,
- &size);
- if (size > size_t(fde->end - cursor))
- return ReportIncomplete(fde);
- cursor += size;
- reader_->SetFunctionBase(fde->address);
-
- // For the length, we strip off the upper nybble of the encoding used for
- // the starting address.
- DwarfPointerEncoding length_encoding =
- DwarfPointerEncoding(fde->cie->pointer_encoding & 0x0f);
- fde->size = reader_->ReadEncodedPointer(cursor, length_encoding, &size);
- if (size > size_t(fde->end - cursor))
- return ReportIncomplete(fde);
- cursor += size;
-
- // If the CIE has a 'z' augmentation string, then augmentation data
- // appears here.
- if (fde->cie->has_z_augmentation) {
- uint64_t data_size = reader_->ReadUnsignedLEB128(cursor, &size);
- if (size_t(fde->end - cursor) < size + data_size)
- return ReportIncomplete(fde);
- cursor += size;
-
- // In the abstract, we should walk the augmentation string, and extract
- // items from the FDE's augmentation data as we encounter augmentation
- // string characters that specify their presence: the ordering of items
- // in the augmentation string determines the arrangement of values in
- // the augmentation data.
- //
- // In practice, there's only ever one value in FDE augmentation data
- // that we support --- the LSDA pointer --- and we have to bail if we
- // see any unrecognized augmentation string characters. So if there is
- // anything here at all, we know what it is, and where it starts.
- if (fde->cie->has_z_lsda) {
- // Check whether the LSDA's pointer encoding is usable now: only once
- // we've parsed the FDE's starting address do we call reader_->
- // SetFunctionBase, so that the DW_EH_PE_funcrel encoding becomes
- // usable.
- if (!reader_->UsableEncoding(fde->cie->lsda_encoding)) {
- reporter_->UnusablePointerEncoding(fde->cie->offset,
- fde->cie->lsda_encoding);
- return false;
- }
-
- fde->lsda_address =
- reader_->ReadEncodedPointer(cursor, fde->cie->lsda_encoding, &size);
- if (size > data_size)
- return ReportIncomplete(fde);
- // Ideally, we would also complain here if there were unconsumed
- // augmentation data.
- }
-
- cursor += data_size;
- }
-
- // The FDE's instructions start after those.
- fde->instructions = cursor;
-
- return true;
-}
-
-bool CallFrameInfo::Start() {
- const char *buffer_end = buffer_ + buffer_length_;
- const char *cursor;
- bool all_ok = true;
- const char *entry_end;
- bool ok;
-
- // Traverse all the entries in buffer_, skipping CIEs and offering
- // FDEs to the handler.
- for (cursor = buffer_; cursor < buffer_end;
- cursor = entry_end, all_ok = all_ok && ok) {
- FDE fde;
-
- // Make it easy to skip this entry with 'continue': assume that
- // things are not okay until we've checked all the data, and
- // prepare the address of the next entry.
- ok = false;
-
- // Read the entry's prologue.
- if (!ReadEntryPrologue(cursor, &fde)) {
- if (!fde.end) {
- // If we couldn't even figure out this entry's extent, then we
- // must stop processing entries altogether.
- all_ok = false;
- break;
- }
- entry_end = fde.end;
- continue;
- }
-
- // The next iteration picks up after this entry.
- entry_end = fde.end;
-
- // Did we see an .eh_frame terminating mark?
- if (fde.kind == kTerminator) {
- // If there appears to be more data left in the section after the
- // terminating mark, warn the user. But this is just a warning;
- // we leave all_ok true.
- if (fde.end < buffer_end) reporter_->EarlyEHTerminator(fde.offset);
- break;
- }
-
- // In this loop, we skip CIEs. We only parse them fully when we
- // parse an FDE that refers to them. This limits our memory
- // consumption (beyond the buffer itself) to that needed to
- // process the largest single entry.
- if (fde.kind != kFDE) {
- ok = true;
- continue;
- }
-
- // Validate the CIE pointer.
- if (fde.id > buffer_length_) {
- reporter_->CIEPointerOutOfRange(fde.offset, fde.id);
- continue;
- }
-
- CIE cie;
-
- // Parse this FDE's CIE header.
- if (!ReadEntryPrologue(buffer_ + fde.id, &cie))
- continue;
- // This had better be an actual CIE.
- if (cie.kind != kCIE) {
- reporter_->BadCIEId(fde.offset, fde.id);
- continue;
- }
- if (!ReadCIEFields(&cie))
- continue;
-
- // We now have the values that govern both the CIE and the FDE.
- cie.cie = &cie;
- fde.cie = &cie;
-
- // Parse the FDE's header.
- if (!ReadFDEFields(&fde))
- continue;
-
- // Call Entry to ask the consumer if they're interested.
- if (!handler_->Entry(fde.offset, fde.address, fde.size,
- cie.version, cie.augmentation,
- cie.return_address_register)) {
- // The handler isn't interested in this entry. That's not an error.
- ok = true;
- continue;
- }
-
- if (cie.has_z_augmentation) {
- // Report the personality routine address, if we have one.
- if (cie.has_z_personality) {
- if (!handler_
- ->PersonalityRoutine(cie.personality_address,
- IsIndirectEncoding(cie.personality_encoding)))
- continue;
- }
-
- // Report the language-specific data area address, if we have one.
- if (cie.has_z_lsda) {
- if (!handler_
- ->LanguageSpecificDataArea(fde.lsda_address,
- IsIndirectEncoding(cie.lsda_encoding)))
- continue;
- }
-
- // If this is a signal-handling frame, report that.
- if (cie.has_z_signal_frame) {
- if (!handler_->SignalHandler())
- continue;
- }
- }
-
- // Interpret the CIE's instructions, and then the FDE's instructions.
- State state(reader_, handler_, reporter_, fde.address);
- ok = state.InterpretCIE(cie) && state.InterpretFDE(fde);
-
- // Tell the ByteReader that the function start address from the
- // FDE header is no longer valid.
- reader_->ClearFunctionBase();
-
- // Report the end of the entry.
- handler_->End();
- }
-
- return all_ok;
-}
-
-const char *CallFrameInfo::KindName(EntryKind kind) {
- if (kind == CallFrameInfo::kUnknown)
- return "entry";
- else if (kind == CallFrameInfo::kCIE)
- return "common information entry";
- else if (kind == CallFrameInfo::kFDE)
- return "frame description entry";
- else {
- MOZ_ASSERT (kind == CallFrameInfo::kTerminator);
- return ".eh_frame sequence terminator";
- }
-}
-
-bool CallFrameInfo::ReportIncomplete(Entry *entry) {
- reporter_->Incomplete(entry->offset, entry->kind);
- return false;
-}
-
-void CallFrameInfo::Reporter::Incomplete(uint64 offset,
- CallFrameInfo::EntryKind kind) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI %s at offset 0x%llx in '%s': entry ends early\n",
- filename_.c_str(), CallFrameInfo::KindName(kind), offset,
- section_.c_str());
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::EarlyEHTerminator(uint64 offset) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI at offset 0x%llx in '%s': saw end-of-data marker"
- " before end of section contents\n",
- filename_.c_str(), offset, section_.c_str());
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::CIEPointerOutOfRange(uint64 offset,
- uint64 cie_offset) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI frame description entry at offset 0x%llx in '%s':"
- " CIE pointer is out of range: 0x%llx\n",
- filename_.c_str(), offset, section_.c_str(), cie_offset);
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::BadCIEId(uint64 offset, uint64 cie_offset) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI frame description entry at offset 0x%llx in '%s':"
- " CIE pointer does not point to a CIE: 0x%llx\n",
- filename_.c_str(), offset, section_.c_str(), cie_offset);
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::UnrecognizedVersion(uint64 offset, int version) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI frame description entry at offset 0x%llx in '%s':"
- " CIE specifies unrecognized version: %d\n",
- filename_.c_str(), offset, section_.c_str(), version);
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::UnrecognizedAugmentation(uint64 offset,
- const string &aug) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI frame description entry at offset 0x%llx in '%s':"
- " CIE specifies unrecognized augmentation: '%s'\n",
- filename_.c_str(), offset, section_.c_str(), aug.c_str());
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::InvalidPointerEncoding(uint64 offset,
- uint8 encoding) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI common information entry at offset 0x%llx in '%s':"
- " 'z' augmentation specifies invalid pointer encoding: "
- "0x%02x\n",
- filename_.c_str(), offset, section_.c_str(), encoding);
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::UnusablePointerEncoding(uint64 offset,
- uint8 encoding) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI common information entry at offset 0x%llx in '%s':"
- " 'z' augmentation specifies a pointer encoding for which"
- " we have no base address: 0x%02x\n",
- filename_.c_str(), offset, section_.c_str(), encoding);
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::RestoreInCIE(uint64 offset, uint64 insn_offset) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI common information entry at offset 0x%llx in '%s':"
- " the DW_CFA_restore instruction at offset 0x%llx"
- " cannot be used in a common information entry\n",
- filename_.c_str(), offset, section_.c_str(), insn_offset);
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::BadInstruction(uint64 offset,
- CallFrameInfo::EntryKind kind,
- uint64 insn_offset) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI %s at offset 0x%llx in section '%s':"
- " the instruction at offset 0x%llx is unrecognized\n",
- filename_.c_str(), CallFrameInfo::KindName(kind),
- offset, section_.c_str(), insn_offset);
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::NoCFARule(uint64 offset,
- CallFrameInfo::EntryKind kind,
- uint64 insn_offset) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI %s at offset 0x%llx in section '%s':"
- " the instruction at offset 0x%llx assumes that a CFA rule "
- "has been set, but none has been set\n",
- filename_.c_str(), CallFrameInfo::KindName(kind), offset,
- section_.c_str(), insn_offset);
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::EmptyStateStack(uint64 offset,
- CallFrameInfo::EntryKind kind,
- uint64 insn_offset) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI %s at offset 0x%llx in section '%s':"
- " the DW_CFA_restore_state instruction at offset 0x%llx"
- " should pop a saved state from the stack, but the stack "
- "is empty\n",
- filename_.c_str(), CallFrameInfo::KindName(kind), offset,
- section_.c_str(), insn_offset);
- log_(buf);
-}
-
-void CallFrameInfo::Reporter::ClearingCFARule(uint64 offset,
- CallFrameInfo::EntryKind kind,
- uint64 insn_offset) {
- char buf[300];
- SprintfLiteral(buf,
- "%s: CFI %s at offset 0x%llx in section '%s':"
- " the DW_CFA_restore_state instruction at offset 0x%llx"
- " would clear the CFA rule in effect\n",
- filename_.c_str(), CallFrameInfo::KindName(kind), offset,
- section_.c_str(), insn_offset);
- log_(buf);
-}
-
-
-unsigned int DwarfCFIToModule::RegisterNames::I386() {
- /*
- 8 "$eax", "$ecx", "$edx", "$ebx", "$esp", "$ebp", "$esi", "$edi",
- 3 "$eip", "$eflags", "$unused1",
- 8 "$st0", "$st1", "$st2", "$st3", "$st4", "$st5", "$st6", "$st7",
- 2 "$unused2", "$unused3",
- 8 "$xmm0", "$xmm1", "$xmm2", "$xmm3", "$xmm4", "$xmm5", "$xmm6", "$xmm7",
- 8 "$mm0", "$mm1", "$mm2", "$mm3", "$mm4", "$mm5", "$mm6", "$mm7",
- 3 "$fcw", "$fsw", "$mxcsr",
- 8 "$es", "$cs", "$ss", "$ds", "$fs", "$gs", "$unused4", "$unused5",
- 2 "$tr", "$ldtr"
- */
- return 8 + 3 + 8 + 2 + 8 + 8 + 3 + 8 + 2;
-}
-
-unsigned int DwarfCFIToModule::RegisterNames::X86_64() {
- /*
- 8 "$rax", "$rdx", "$rcx", "$rbx", "$rsi", "$rdi", "$rbp", "$rsp",
- 8 "$r8", "$r9", "$r10", "$r11", "$r12", "$r13", "$r14", "$r15",
- 1 "$rip",
- 8 "$xmm0","$xmm1","$xmm2", "$xmm3", "$xmm4", "$xmm5", "$xmm6", "$xmm7",
- 8 "$xmm8","$xmm9","$xmm10","$xmm11","$xmm12","$xmm13","$xmm14","$xmm15",
- 8 "$st0", "$st1", "$st2", "$st3", "$st4", "$st5", "$st6", "$st7",
- 8 "$mm0", "$mm1", "$mm2", "$mm3", "$mm4", "$mm5", "$mm6", "$mm7",
- 1 "$rflags",
- 8 "$es", "$cs", "$ss", "$ds", "$fs", "$gs", "$unused1", "$unused2",
- 4 "$fs.base", "$gs.base", "$unused3", "$unused4",
- 2 "$tr", "$ldtr",
- 3 "$mxcsr", "$fcw", "$fsw"
- */
- return 8 + 8 + 1 + 8 + 8 + 8 + 8 + 1 + 8 + 4 + 2 + 3;
-}
-
-// Per ARM IHI 0040A, section 3.1
-unsigned int DwarfCFIToModule::RegisterNames::ARM() {
- /*
- 8 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- 8 "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc",
- 8 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
- 8 "fps", "cpsr", "", "", "", "", "", "",
- 8 "", "", "", "", "", "", "", "",
- 8 "", "", "", "", "", "", "", "",
- 8 "", "", "", "", "", "", "", "",
- 8 "", "", "", "", "", "", "", "",
- 8 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
- 8 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15",
- 8 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23",
- 8 "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31",
- 8 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7"
- */
- return 13 * 8;
-}
-
-// See prototype for comments.
-int32_t parseDwarfExpr(Summariser* summ, const ByteReader* reader,
- string expr, bool debug,
- bool pushCfaAtStart, bool derefAtEnd)
-{
- const char* cursor = expr.c_str();
- const char* end1 = cursor + expr.length();
-
- char buf[100];
- if (debug) {
- SprintfLiteral(buf, "LUL.DW << DwarfExpr, len is %d\n",
- (int)(end1 - cursor));
- summ->Log(buf);
- }
-
- // Add a marker for the start of this expression. In it, indicate
- // whether or not the CFA should be pushed onto the stack prior to
- // evaluation.
- int32_t start_ix
- = summ->AddPfxInstr(PfxInstr(PX_Start, pushCfaAtStart ? 1 : 0));
- MOZ_ASSERT(start_ix >= 0);
-
- while (cursor < end1) {
-
- uint8 opc = reader->ReadOneByte(cursor);
- cursor++;
-
- const char* nm = nullptr;
- PfxExprOp pxop = PX_End;
-
- switch (opc) {
-
- case DW_OP_lit0 ... DW_OP_lit31: {
- int32_t simm32 = (int32_t)(opc - DW_OP_lit0);
- if (debug) {
- SprintfLiteral(buf, "LUL.DW DW_OP_lit%d\n", (int)simm32);
- summ->Log(buf);
- }
- (void) summ->AddPfxInstr(PfxInstr(PX_SImm32, simm32));
- break;
- }
-
- case DW_OP_breg0 ... DW_OP_breg31: {
- size_t len;
- int64_t n = reader->ReadSignedLEB128(cursor, &len);
- cursor += len;
- DW_REG_NUMBER reg = (DW_REG_NUMBER)(opc - DW_OP_breg0);
- if (debug) {
- SprintfLiteral(buf, "LUL.DW DW_OP_breg%d %lld\n",
- (int)reg, (long long int)n);
- summ->Log(buf);
- }
- // PfxInstr only allows a 32 bit signed offset. So we
- // must fail if the immediate is out of range.
- if (n < INT32_MIN || INT32_MAX < n)
- goto fail;
- (void) summ->AddPfxInstr(PfxInstr(PX_DwReg, reg));
- (void) summ->AddPfxInstr(PfxInstr(PX_SImm32, (int32_t)n));
- (void) summ->AddPfxInstr(PfxInstr(PX_Add));
- break;
- }
-
- case DW_OP_const4s: {
- uint64_t u64 = reader->ReadFourBytes(cursor);
- cursor += 4;
- // u64 is guaranteed by |ReadFourBytes| to be in the
- // range 0 .. FFFFFFFF inclusive. But to be safe:
- uint32_t u32 = (uint32_t)(u64 & 0xFFFFFFFF);
- int32_t s32 = (int32_t)u32;
- if (debug) {
- SprintfLiteral(buf, "LUL.DW DW_OP_const4s %d\n", (int)s32);
- summ->Log(buf);
- }
- (void) summ->AddPfxInstr(PfxInstr(PX_SImm32, s32));
- break;
- }
-
- case DW_OP_deref: nm = "deref"; pxop = PX_Deref; goto no_operands;
- case DW_OP_and: nm = "and"; pxop = PX_And; goto no_operands;
- case DW_OP_plus: nm = "plus"; pxop = PX_Add; goto no_operands;
- case DW_OP_minus: nm = "minus"; pxop = PX_Sub; goto no_operands;
- case DW_OP_shl: nm = "shl"; pxop = PX_Shl; goto no_operands;
- case DW_OP_ge: nm = "ge"; pxop = PX_CmpGES; goto no_operands;
- no_operands:
- MOZ_ASSERT(nm && pxop != PX_End);
- if (debug) {
- SprintfLiteral(buf, "LUL.DW DW_OP_%s\n", nm);
- summ->Log(buf);
- }
- (void) summ->AddPfxInstr(PfxInstr(pxop));
- break;
-
- default:
- if (debug) {
- SprintfLiteral(buf, "LUL.DW unknown opc %d\n", (int)opc);
- summ->Log(buf);
- }
- goto fail;
-
- } // switch (opc)
-
- } // while (cursor < end1)
-
- MOZ_ASSERT(cursor >= end1);
-
- if (cursor > end1) {
- // We overran the Dwarf expression. Give up.
- goto fail;
- }
-
- // For DW_CFA_expression, what the expression denotes is the address
- // of where the previous value is located. The caller of this routine
- // may therefore request one last dereference before the end marker is
- // inserted.
- if (derefAtEnd) {
- (void) summ->AddPfxInstr(PfxInstr(PX_Deref));
- }
-
- // Insert an end marker, and declare success.
- (void) summ->AddPfxInstr(PfxInstr(PX_End));
- if (debug) {
- SprintfLiteral(buf, "LUL.DW conversion of dwarf expression succeeded, "
- "ix = %d\n", (int)start_ix);
- summ->Log(buf);
- summ->Log("LUL.DW >>\n");
- }
- return start_ix;
-
- fail:
- if (debug) {
- summ->Log("LUL.DW conversion of dwarf expression failed\n");
- summ->Log("LUL.DW >>\n");
- }
- return -1;
-}
-
-
-bool DwarfCFIToModule::Entry(size_t offset, uint64 address, uint64 length,
- uint8 version, const string &augmentation,
- unsigned return_address) {
- if (DEBUG_DWARF) {
- char buf[100];
- SprintfLiteral(buf, "LUL.DW DwarfCFIToModule::Entry 0x%llx,+%lld\n",
- address, length);
- summ_->Log(buf);
- }
-
- summ_->Entry(address, length);
-
- // If dwarf2reader::CallFrameInfo can handle this version and
- // augmentation, then we should be okay with that, so there's no
- // need to check them here.
-
- // Get ready to collect entries.
- return_address_ = return_address;
-
- // Breakpad STACK CFI records must provide a .ra rule, but DWARF CFI
- // may not establish any rule for .ra if the return address column
- // is an ordinary register, and that register holds the return
- // address on entry to the function. So establish an initial .ra
- // rule citing the return address register.
- if (return_address_ < num_dw_regs_) {
- summ_->Rule(address, return_address_, NODEREF, return_address, 0);
- }
-
- return true;
-}
-
-const UniqueString* DwarfCFIToModule::RegisterName(int i) {
- if (i < 0) {
- MOZ_ASSERT(i == kCFARegister);
- return usu_->ToUniqueString(".cfa");
- }
- unsigned reg = i;
- if (reg == return_address_)
- return usu_->ToUniqueString(".ra");
-
- char buf[30];
- SprintfLiteral(buf, "dwarf_reg_%u", reg);
- return usu_->ToUniqueString(buf);
-}
-
-bool DwarfCFIToModule::UndefinedRule(uint64 address, int reg) {
- reporter_->UndefinedNotSupported(entry_offset_, RegisterName(reg));
- // Treat this as a non-fatal error.
- return true;
-}
-
-bool DwarfCFIToModule::SameValueRule(uint64 address, int reg) {
- if (DEBUG_DWARF) {
- char buf[100];
- SprintfLiteral(buf, "LUL.DW 0x%llx: old r%d = Same\n", address, reg);
- summ_->Log(buf);
- }
- // reg + 0
- summ_->Rule(address, reg, NODEREF, reg, 0);
- return true;
-}
-
-bool DwarfCFIToModule::OffsetRule(uint64 address, int reg,
- int base_register, long offset) {
- if (DEBUG_DWARF) {
- char buf[100];
- SprintfLiteral(buf, "LUL.DW 0x%llx: old r%d = *(r%d + %ld)\n",
- address, reg, base_register, offset);
- summ_->Log(buf);
- }
- // *(base_register + offset)
- summ_->Rule(address, reg, DEREF, base_register, offset);
- return true;
-}
-
-bool DwarfCFIToModule::ValOffsetRule(uint64 address, int reg,
- int base_register, long offset) {
- if (DEBUG_DWARF) {
- char buf[100];
- SprintfLiteral(buf, "LUL.DW 0x%llx: old r%d = r%d + %ld\n",
- address, reg, base_register, offset);
- summ_->Log(buf);
- }
- // base_register + offset
- summ_->Rule(address, reg, NODEREF, base_register, offset);
- return true;
-}
-
-bool DwarfCFIToModule::RegisterRule(uint64 address, int reg,
- int base_register) {
- if (DEBUG_DWARF) {
- char buf[100];
- SprintfLiteral(buf, "LUL.DW 0x%llx: old r%d = r%d\n",
- address, reg, base_register);
- summ_->Log(buf);
- }
- // base_register + 0
- summ_->Rule(address, reg, NODEREF, base_register, 0);
- return true;
-}
-
-bool DwarfCFIToModule::ExpressionRule(uint64 address, int reg,
- const string &expression)
-{
- bool debug = !!DEBUG_DWARF;
- int32_t start_ix = parseDwarfExpr(summ_, reader_, expression, debug,
- true/*pushCfaAtStart*/,
- true/*derefAtEnd*/);
- if (start_ix >= 0) {
- summ_->Rule(address, reg, PFXEXPR, 0, start_ix);
- } else {
- // Parsing of the Dwarf expression failed. Treat this as a
- // non-fatal error, hence return |true| even on this path.
- reporter_->ExpressionCouldNotBeSummarised(entry_offset_, RegisterName(reg));
- }
- return true;
-}
-
-bool DwarfCFIToModule::ValExpressionRule(uint64 address, int reg,
- const string &expression)
-{
- bool debug = !!DEBUG_DWARF;
- int32_t start_ix = parseDwarfExpr(summ_, reader_, expression, debug,
- true/*pushCfaAtStart*/,
- false/*!derefAtEnd*/);
- if (start_ix >= 0) {
- summ_->Rule(address, reg, PFXEXPR, 0, start_ix);
- } else {
- // Parsing of the Dwarf expression failed. Treat this as a
- // non-fatal error, hence return |true| even on this path.
- reporter_->ExpressionCouldNotBeSummarised(entry_offset_, RegisterName(reg));
- }
- return true;
-}
-
-bool DwarfCFIToModule::End() {
- //module_->AddStackFrameEntry(entry_);
- if (DEBUG_DWARF) {
- summ_->Log("LUL.DW DwarfCFIToModule::End()\n");
- }
- summ_->End();
- return true;
-}
-
-void DwarfCFIToModule::Reporter::UndefinedNotSupported(
- size_t offset,
- const UniqueString* reg) {
- char buf[300];
- SprintfLiteral(buf, "DwarfCFIToModule::Reporter::UndefinedNotSupported()\n");
- log_(buf);
- //BPLOG(INFO) << file_ << ", section '" << section_
- // << "': the call frame entry at offset 0x"
- // << std::setbase(16) << offset << std::setbase(10)
- // << " sets the rule for register '" << FromUniqueString(reg)
- // << "' to 'undefined', but the Breakpad symbol file format cannot "
- // << " express this";
-}
-
-// FIXME: move this somewhere sensible
-static bool is_power_of_2(uint64_t n)
-{
- int i, nSetBits = 0;
- for (i = 0; i < 8*(int)sizeof(n); i++) {
- if ((n & ((uint64_t)1) << i) != 0)
- nSetBits++;
- }
- return nSetBits <= 1;
-}
-
-void DwarfCFIToModule::Reporter::ExpressionCouldNotBeSummarised(
- size_t offset,
- const UniqueString* reg) {
- static uint64_t n_complaints = 0; // This isn't threadsafe
- n_complaints++;
- if (!is_power_of_2(n_complaints))
- return;
- char buf[300];
- SprintfLiteral(buf,
- "DwarfCFIToModule::Reporter::"
- "ExpressionCouldNotBeSummarised(shown %llu times)\n",
- (unsigned long long int)n_complaints);
- log_(buf);
-}
-
-} // namespace lul
diff --git a/tools/profiler/lul/LulDwarfSummariser.cpp b/tools/profiler/lul/LulDwarfSummariser.cpp
deleted file mode 100644
index 74c2565df..000000000
--- a/tools/profiler/lul/LulDwarfSummariser.cpp
+++ /dev/null
@@ -1,359 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "LulDwarfSummariser.h"
-
-#include "mozilla/Assertions.h"
-
-// Set this to 1 for verbose logging
-#define DEBUG_SUMMARISER 0
-
-namespace lul {
-
-// Do |s64|'s lowest 32 bits sign extend back to |s64| itself?
-static inline bool fitsIn32Bits(int64 s64) {
- return s64 == ((s64 & 0xffffffff) ^ 0x80000000) - 0x80000000;
-}
-
-// Check a LExpr prefix expression, starting at pfxInstrs[start] up to
-// the next PX_End instruction, to ensure that:
-// * It only mentions registers that are tracked on this target
-// * The start point is sane
-// If the expression is ok, return NULL. Else return a pointer
-// a const char* holding a bit of text describing the problem.
-static const char*
-checkPfxExpr(const vector<PfxInstr>* pfxInstrs, int64_t start)
-{
- size_t nInstrs = pfxInstrs->size();
- if (start < 0 || start >= (ssize_t)nInstrs) {
- return "bogus start point";
- }
- size_t i;
- for (i = start; i < nInstrs; i++) {
- PfxInstr pxi = (*pfxInstrs)[i];
- if (pxi.mOpcode == PX_End)
- break;
- if (pxi.mOpcode == PX_DwReg &&
- !registerIsTracked((DW_REG_NUMBER)pxi.mOperand)) {
- return "uses untracked reg";
- }
- }
- return nullptr; // success
-}
-
-
-Summariser::Summariser(SecMap* aSecMap, uintptr_t aTextBias,
- void(*aLog)(const char*))
- : mSecMap(aSecMap)
- , mTextBias(aTextBias)
- , mLog(aLog)
-{
- mCurrAddr = 0;
- mMax1Addr = 0; // Gives an empty range.
-
- // Initialise the running RuleSet to "haven't got a clue" status.
- new (&mCurrRules) RuleSet();
-}
-
-void
-Summariser::Entry(uintptr_t aAddress, uintptr_t aLength)
-{
- aAddress += mTextBias;
- if (DEBUG_SUMMARISER) {
- char buf[100];
- SprintfLiteral(buf,
- "LUL Entry(%llx, %llu)\n",
- (unsigned long long int)aAddress,
- (unsigned long long int)aLength);
- mLog(buf);
- }
- // This throws away any previous summary, that is, assumes
- // that the previous summary, if any, has been properly finished
- // by a call to End().
- mCurrAddr = aAddress;
- mMax1Addr = aAddress + aLength;
- new (&mCurrRules) RuleSet();
-}
-
-void
-Summariser::Rule(uintptr_t aAddress, int aNewReg,
- LExprHow how, int16_t oldReg, int64_t offset)
-{
- aAddress += mTextBias;
- if (DEBUG_SUMMARISER) {
- char buf[100];
- if (how == NODEREF || how == DEREF) {
- bool deref = how == DEREF;
- SprintfLiteral(buf,
- "LUL 0x%llx old-r%d = %sr%d + %lld%s\n",
- (unsigned long long int)aAddress, aNewReg,
- deref ? "*(" : "", (int)oldReg, (long long int)offset,
- deref ? ")" : "");
- } else if (how == PFXEXPR) {
- SprintfLiteral(buf,
- "LUL 0x%llx old-r%d = pfx-expr-at %lld\n",
- (unsigned long long int)aAddress, aNewReg,
- (long long int)offset);
- } else {
- SprintfLiteral(buf,
- "LUL 0x%llx old-r%d = (invalid LExpr!)\n",
- (unsigned long long int)aAddress, aNewReg);
- }
- mLog(buf);
- }
-
- if (mCurrAddr < aAddress) {
- // Flush the existing summary first.
- mCurrRules.mAddr = mCurrAddr;
- mCurrRules.mLen = aAddress - mCurrAddr;
- mSecMap->AddRuleSet(&mCurrRules);
- if (DEBUG_SUMMARISER) {
- mLog("LUL "); mCurrRules.Print(mLog);
- mLog("\n");
- }
- mCurrAddr = aAddress;
- }
-
- // If for some reason summarisation fails, either or both of these
- // become non-null and point at constant text describing the
- // problem. Using two rather than just one avoids complications of
- // having to concatenate two strings to produce a complete error message.
- const char* reason1 = nullptr;
- const char* reason2 = nullptr;
-
- // |offset| needs to be a 32 bit value that sign extends to 64 bits
- // on a 64 bit target. We will need to incorporate |offset| into
- // any LExpr made here. So we may as well check it right now.
- if (!fitsIn32Bits(offset)) {
- reason1 = "offset not in signed 32-bit range";
- goto cant_summarise;
- }
-
- // FIXME: factor out common parts of the arch-dependent summarisers.
-
-#if defined(LUL_ARCH_arm)
-
- // ----------------- arm ----------------- //
-
- // Now, can we add the rule to our summary? This depends on whether
- // the registers and the overall expression are representable. This
- // is the heart of the summarisation process.
- switch (aNewReg) {
-
- case DW_REG_CFA:
- // This is a rule that defines the CFA. The only forms we
- // choose to represent are: r7/11/12/13 + offset. The offset
- // must fit into 32 bits since 'uintptr_t' is 32 bit on ARM,
- // hence there is no need to check it for overflow.
- if (how != NODEREF) {
- reason1 = "rule for DW_REG_CFA: invalid |how|";
- goto cant_summarise;
- }
- switch (oldReg) {
- case DW_REG_ARM_R7: case DW_REG_ARM_R11:
- case DW_REG_ARM_R12: case DW_REG_ARM_R13:
- break;
- default:
- reason1 = "rule for DW_REG_CFA: invalid |oldReg|";
- goto cant_summarise;
- }
- mCurrRules.mCfaExpr = LExpr(how, oldReg, offset);
- break;
-
- case DW_REG_ARM_R7: case DW_REG_ARM_R11: case DW_REG_ARM_R12:
- case DW_REG_ARM_R13: case DW_REG_ARM_R14: case DW_REG_ARM_R15: {
- // This is a new rule for R7, R11, R12, R13 (SP), R14 (LR) or
- // R15 (the return address).
- switch (how) {
- case NODEREF: case DEREF:
- // Check the old register is one we're tracking.
- if (!registerIsTracked((DW_REG_NUMBER)oldReg) &&
- oldReg != DW_REG_CFA) {
- reason1 = "rule for R7/11/12/13/14/15: uses untracked reg";
- goto cant_summarise;
- }
- break;
- case PFXEXPR: {
- // Check that the prefix expression only mentions tracked registers.
- const vector<PfxInstr>* pfxInstrs = mSecMap->GetPfxInstrs();
- reason2 = checkPfxExpr(pfxInstrs, offset);
- if (reason2) {
- reason1 = "rule for R7/11/12/13/14/15: ";
- goto cant_summarise;
- }
- break;
- }
- default:
- goto cant_summarise;
- }
- LExpr expr = LExpr(how, oldReg, offset);
- switch (aNewReg) {
- case DW_REG_ARM_R7: mCurrRules.mR7expr = expr; break;
- case DW_REG_ARM_R11: mCurrRules.mR11expr = expr; break;
- case DW_REG_ARM_R12: mCurrRules.mR12expr = expr; break;
- case DW_REG_ARM_R13: mCurrRules.mR13expr = expr; break;
- case DW_REG_ARM_R14: mCurrRules.mR14expr = expr; break;
- case DW_REG_ARM_R15: mCurrRules.mR15expr = expr; break;
- default: MOZ_ASSERT(0);
- }
- break;
- }
-
- default:
- // Leave |reason1| and |reason2| unset here. This program point
- // is reached so often that it causes a flood of "Can't
- // summarise" messages. In any case, we don't really care about
- // the fact that this summary would produce a new value for a
- // register that we're not tracking. We do on the other hand
- // care if the summary's expression *uses* a register that we're
- // not tracking. But in that case one of the above failures
- // should tell us which.
- goto cant_summarise;
- }
-
- // Mark callee-saved registers (r4 .. r11) as unchanged, if there is
- // no other information about them. FIXME: do this just once, at
- // the point where the ruleset is committed.
- if (mCurrRules.mR7expr.mHow == UNKNOWN) {
- mCurrRules.mR7expr = LExpr(NODEREF, DW_REG_ARM_R7, 0);
- }
- if (mCurrRules.mR11expr.mHow == UNKNOWN) {
- mCurrRules.mR11expr = LExpr(NODEREF, DW_REG_ARM_R11, 0);
- }
- if (mCurrRules.mR12expr.mHow == UNKNOWN) {
- mCurrRules.mR12expr = LExpr(NODEREF, DW_REG_ARM_R12, 0);
- }
-
- // The old r13 (SP) value before the call is always the same as the
- // CFA.
- mCurrRules.mR13expr = LExpr(NODEREF, DW_REG_CFA, 0);
-
- // If there's no information about R15 (the return address), say
- // it's a copy of R14 (the link register).
- if (mCurrRules.mR15expr.mHow == UNKNOWN) {
- mCurrRules.mR15expr = LExpr(NODEREF, DW_REG_ARM_R14, 0);
- }
-
-#elif defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
-
- // ---------------- x64/x86 ---------------- //
-
- // Now, can we add the rule to our summary? This depends on whether
- // the registers and the overall expression are representable. This
- // is the heart of the summarisation process.
- switch (aNewReg) {
-
- case DW_REG_CFA:
- // This is a rule that defines the CFA. The only forms we can
- // represent are: = SP+offset or = FP+offset.
- if (how != NODEREF) {
- reason1 = "rule for DW_REG_CFA: invalid |how|";
- goto cant_summarise;
- }
- if (oldReg != DW_REG_INTEL_XSP && oldReg != DW_REG_INTEL_XBP) {
- reason1 = "rule for DW_REG_CFA: invalid |oldReg|";
- goto cant_summarise;
- }
- mCurrRules.mCfaExpr = LExpr(how, oldReg, offset);
- break;
-
- case DW_REG_INTEL_XSP: case DW_REG_INTEL_XBP: case DW_REG_INTEL_XIP: {
- // This is a new rule for XSP, XBP or XIP (the return address).
- switch (how) {
- case NODEREF: case DEREF:
- // Check the old register is one we're tracking.
- if (!registerIsTracked((DW_REG_NUMBER)oldReg) &&
- oldReg != DW_REG_CFA) {
- reason1 = "rule for XSP/XBP/XIP: uses untracked reg";
- goto cant_summarise;
- }
- break;
- case PFXEXPR: {
- // Check that the prefix expression only mentions tracked registers.
- const vector<PfxInstr>* pfxInstrs = mSecMap->GetPfxInstrs();
- reason2 = checkPfxExpr(pfxInstrs, offset);
- if (reason2) {
- reason1 = "rule for XSP/XBP/XIP: ";
- goto cant_summarise;
- }
- break;
- }
- default:
- goto cant_summarise;
- }
- LExpr expr = LExpr(how, oldReg, offset);
- switch (aNewReg) {
- case DW_REG_INTEL_XBP: mCurrRules.mXbpExpr = expr; break;
- case DW_REG_INTEL_XSP: mCurrRules.mXspExpr = expr; break;
- case DW_REG_INTEL_XIP: mCurrRules.mXipExpr = expr; break;
- default: MOZ_CRASH("impossible value for aNewReg");
- }
- break;
- }
-
- default:
- // Leave |reason1| and |reason2| unset here, for the reasons
- // explained in the analogous point in the ARM case just above.
- goto cant_summarise;
-
- }
-
- // On Intel, it seems the old SP value before the call is always the
- // same as the CFA. Therefore, in the absence of any other way to
- // recover the SP, specify that the CFA should be copied.
- if (mCurrRules.mXspExpr.mHow == UNKNOWN) {
- mCurrRules.mXspExpr = LExpr(NODEREF, DW_REG_CFA, 0);
- }
-
- // Also, gcc says "Undef" for BP when it is unchanged.
- if (mCurrRules.mXbpExpr.mHow == UNKNOWN) {
- mCurrRules.mXbpExpr = LExpr(NODEREF, DW_REG_INTEL_XBP, 0);
- }
-
-#else
-
-# error "Unsupported arch"
-#endif
-
- return;
-
- cant_summarise:
- if (reason1 || reason2) {
- char buf[200];
- SprintfLiteral(buf, "LUL can't summarise: "
- "SVMA=0x%llx: %s%s, expr=LExpr(%s,%u,%lld)\n",
- (unsigned long long int)(aAddress - mTextBias),
- reason1 ? reason1 : "", reason2 ? reason2 : "",
- NameOf_LExprHow(how),
- (unsigned int)oldReg, (long long int)offset);
- mLog(buf);
- }
-}
-
-uint32_t
-Summariser::AddPfxInstr(PfxInstr pfxi)
-{
- return mSecMap->AddPfxInstr(pfxi);
-}
-
-void
-Summariser::End()
-{
- if (DEBUG_SUMMARISER) {
- mLog("LUL End\n");
- }
- if (mCurrAddr < mMax1Addr) {
- mCurrRules.mAddr = mCurrAddr;
- mCurrRules.mLen = mMax1Addr - mCurrAddr;
- mSecMap->AddRuleSet(&mCurrRules);
- if (DEBUG_SUMMARISER) {
- mLog("LUL "); mCurrRules.Print(mLog);
- mLog("\n");
- }
- }
-}
-
-} // namespace lul
diff --git a/tools/profiler/lul/LulDwarfSummariser.h b/tools/profiler/lul/LulDwarfSummariser.h
deleted file mode 100644
index b41db1ee3..000000000
--- a/tools/profiler/lul/LulDwarfSummariser.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef LulDwarfSummariser_h
-#define LulDwarfSummariser_h
-
-#include "LulMainInt.h"
-
-namespace lul {
-
-class Summariser
-{
-public:
- Summariser(SecMap* aSecMap, uintptr_t aTextBias, void(*aLog)(const char*));
-
- virtual void Entry(uintptr_t aAddress, uintptr_t aLength);
- virtual void End();
-
- // Tell the summariser that the value for |aNewReg| at |aAddress| is
- // recovered using the LExpr that can be constructed using the
- // components |how|, |oldReg| and |offset|. The summariser will
- // inspect the components and may reject them for various reasons,
- // but the hope is that it will find them acceptable and record this
- // rule permanently.
- virtual void Rule(uintptr_t aAddress, int aNewReg,
- LExprHow how, int16_t oldReg, int64_t offset);
-
- virtual uint32_t AddPfxInstr(PfxInstr pfxi);
-
- // Send output to the logging sink, for debugging.
- virtual void Log(const char* str) { mLog(str); }
-
-private:
- // The SecMap in which we park the finished summaries (RuleSets) and
- // also any PfxInstrs derived from Dwarf expressions.
- SecMap* mSecMap;
-
- // Running state for the current summary (RuleSet) under construction.
- RuleSet mCurrRules;
-
- // The start of the address range to which the RuleSet under
- // construction applies.
- uintptr_t mCurrAddr;
-
- // The highest address, plus one, for which the RuleSet under
- // construction could possibly apply. If there are no further
- // incoming events then mCurrRules will eventually be emitted
- // as-is, for the range mCurrAddr.. mMax1Addr - 1, if that is
- // nonempty.
- uintptr_t mMax1Addr;
-
- // The bias value (to add to the SVMAs, to get AVMAs) to be used
- // when adding entries into mSecMap.
- uintptr_t mTextBias;
-
- // A logging sink, for debugging.
- void (*mLog)(const char* aFmt);
-};
-
-} // namespace lul
-
-#endif // LulDwarfSummariser_h
diff --git a/tools/profiler/lul/LulElf.cpp b/tools/profiler/lul/LulElf.cpp
deleted file mode 100644
index 6f90d5f13..000000000
--- a/tools/profiler/lul/LulElf.cpp
+++ /dev/null
@@ -1,915 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-
-// Copyright (c) 2006, 2011, 2012 Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Restructured in 2009 by: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com>
-
-// (derived from)
-// dump_symbols.cc: implement google_breakpad::WriteSymbolFile:
-// Find all the debugging info in a file and dump it as a Breakpad symbol file.
-//
-// dump_symbols.h: Read debugging information from an ELF file, and write
-// it out as a Breakpad symbol file.
-
-// This file is derived from the following files in
-// toolkit/crashreporter/google-breakpad:
-// src/common/linux/dump_symbols.cc
-// src/common/linux/elfutils.cc
-// src/common/linux/file_id.cc
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <arpa/inet.h>
-
-#include <set>
-#include <string>
-#include <vector>
-
-#include "mozilla/Assertions.h"
-#include "mozilla/Sprintf.h"
-
-#include "LulPlatformMacros.h"
-#include "LulCommonExt.h"
-#include "LulDwarfExt.h"
-#include "LulElfInt.h"
-#include "LulMainInt.h"
-
-
-#if defined(LUL_PLAT_arm_android) && !defined(SHT_ARM_EXIDX)
-// bionic and older glibsc don't define it
-# define SHT_ARM_EXIDX (SHT_LOPROC + 1)
-#endif
-
-
-// This namespace contains helper functions.
-namespace {
-
-using lul::DwarfCFIToModule;
-using lul::FindElfSectionByName;
-using lul::GetOffset;
-using lul::IsValidElf;
-using lul::Module;
-using lul::UniqueStringUniverse;
-using lul::scoped_ptr;
-using lul::Summariser;
-using std::string;
-using std::vector;
-using std::set;
-
-//
-// FDWrapper
-//
-// Wrapper class to make sure opened file is closed.
-//
-class FDWrapper {
- public:
- explicit FDWrapper(int fd) :
- fd_(fd) {}
- ~FDWrapper() {
- if (fd_ != -1)
- close(fd_);
- }
- int get() {
- return fd_;
- }
- int release() {
- int fd = fd_;
- fd_ = -1;
- return fd;
- }
- private:
- int fd_;
-};
-
-//
-// MmapWrapper
-//
-// Wrapper class to make sure mapped regions are unmapped.
-//
-class MmapWrapper {
- public:
- MmapWrapper() : is_set_(false), base_(NULL), size_(0){}
- ~MmapWrapper() {
- if (is_set_ && base_ != NULL) {
- MOZ_ASSERT(size_ > 0);
- munmap(base_, size_);
- }
- }
- void set(void *mapped_address, size_t mapped_size) {
- is_set_ = true;
- base_ = mapped_address;
- size_ = mapped_size;
- }
- void release() {
- MOZ_ASSERT(is_set_);
- is_set_ = false;
- base_ = NULL;
- size_ = 0;
- }
-
- private:
- bool is_set_;
- void *base_;
- size_t size_;
-};
-
-
-// Set NUM_DW_REGNAMES to be the number of Dwarf register names
-// appropriate to the machine architecture given in HEADER. Return
-// true on success, or false if HEADER's machine architecture is not
-// supported.
-template<typename ElfClass>
-bool DwarfCFIRegisterNames(const typename ElfClass::Ehdr* elf_header,
- unsigned int* num_dw_regnames) {
- switch (elf_header->e_machine) {
- case EM_386:
- *num_dw_regnames = DwarfCFIToModule::RegisterNames::I386();
- return true;
- case EM_ARM:
- *num_dw_regnames = DwarfCFIToModule::RegisterNames::ARM();
- return true;
- case EM_X86_64:
- *num_dw_regnames = DwarfCFIToModule::RegisterNames::X86_64();
- return true;
- default:
- MOZ_ASSERT(0);
- return false;
- }
-}
-
-template<typename ElfClass>
-bool LoadDwarfCFI(const string& dwarf_filename,
- const typename ElfClass::Ehdr* elf_header,
- const char* section_name,
- const typename ElfClass::Shdr* section,
- const bool eh_frame,
- const typename ElfClass::Shdr* got_section,
- const typename ElfClass::Shdr* text_section,
- const bool big_endian,
- SecMap* smap,
- uintptr_t text_bias,
- UniqueStringUniverse* usu,
- void (*log)(const char*)) {
- // Find the appropriate set of register names for this file's
- // architecture.
- unsigned int num_dw_regs = 0;
- if (!DwarfCFIRegisterNames<ElfClass>(elf_header, &num_dw_regs)) {
- fprintf(stderr, "%s: unrecognized ELF machine architecture '%d';"
- " cannot convert DWARF call frame information\n",
- dwarf_filename.c_str(), elf_header->e_machine);
- return false;
- }
-
- const lul::Endianness endianness
- = big_endian ? lul::ENDIANNESS_BIG : lul::ENDIANNESS_LITTLE;
-
- // Find the call frame information and its size.
- const char* cfi =
- GetOffset<ElfClass, char>(elf_header, section->sh_offset);
- size_t cfi_size = section->sh_size;
-
- // Plug together the parser, handler, and their entourages.
-
- // Here's a summariser, which will receive the output of the
- // parser, create summaries, and add them to |smap|.
- Summariser summ(smap, text_bias, log);
-
- lul::ByteReader reader(endianness);
- reader.SetAddressSize(ElfClass::kAddrSize);
-
- DwarfCFIToModule::Reporter module_reporter(log, dwarf_filename, section_name);
- DwarfCFIToModule handler(num_dw_regs, &module_reporter, &reader, usu, &summ);
-
- // Provide the base addresses for .eh_frame encoded pointers, if
- // possible.
- reader.SetCFIDataBase(section->sh_addr, cfi);
- if (got_section)
- reader.SetDataBase(got_section->sh_addr);
- if (text_section)
- reader.SetTextBase(text_section->sh_addr);
-
- lul::CallFrameInfo::Reporter dwarf_reporter(log, dwarf_filename,
- section_name);
- lul::CallFrameInfo parser(cfi, cfi_size,
- &reader, &handler, &dwarf_reporter,
- eh_frame);
- parser.Start();
-
- return true;
-}
-
-bool LoadELF(const string& obj_file, MmapWrapper* map_wrapper,
- void** elf_header) {
- int obj_fd = open(obj_file.c_str(), O_RDONLY);
- if (obj_fd < 0) {
- fprintf(stderr, "Failed to open ELF file '%s': %s\n",
- obj_file.c_str(), strerror(errno));
- return false;
- }
- FDWrapper obj_fd_wrapper(obj_fd);
- struct stat st;
- if (fstat(obj_fd, &st) != 0 && st.st_size <= 0) {
- fprintf(stderr, "Unable to fstat ELF file '%s': %s\n",
- obj_file.c_str(), strerror(errno));
- return false;
- }
- // Mapping it read-only is good enough. In any case, mapping it
- // read-write confuses Valgrind's debuginfo acquire/discard
- // heuristics, making it hard to profile the profiler.
- void *obj_base = mmap(nullptr, st.st_size,
- PROT_READ, MAP_PRIVATE, obj_fd, 0);
- if (obj_base == MAP_FAILED) {
- fprintf(stderr, "Failed to mmap ELF file '%s': %s\n",
- obj_file.c_str(), strerror(errno));
- return false;
- }
- map_wrapper->set(obj_base, st.st_size);
- *elf_header = obj_base;
- if (!IsValidElf(*elf_header)) {
- fprintf(stderr, "Not a valid ELF file: %s\n", obj_file.c_str());
- return false;
- }
- return true;
-}
-
-// Get the endianness of ELF_HEADER. If it's invalid, return false.
-template<typename ElfClass>
-bool ElfEndianness(const typename ElfClass::Ehdr* elf_header,
- bool* big_endian) {
- if (elf_header->e_ident[EI_DATA] == ELFDATA2LSB) {
- *big_endian = false;
- return true;
- }
- if (elf_header->e_ident[EI_DATA] == ELFDATA2MSB) {
- *big_endian = true;
- return true;
- }
-
- fprintf(stderr, "bad data encoding in ELF header: %d\n",
- elf_header->e_ident[EI_DATA]);
- return false;
-}
-
-//
-// LoadSymbolsInfo
-//
-// Holds the state between the two calls to LoadSymbols() in case it's necessary
-// to follow the .gnu_debuglink section and load debug information from a
-// different file.
-//
-template<typename ElfClass>
-class LoadSymbolsInfo {
- public:
- typedef typename ElfClass::Addr Addr;
-
- explicit LoadSymbolsInfo(const vector<string>& dbg_dirs) :
- debug_dirs_(dbg_dirs),
- has_loading_addr_(false) {}
-
- // Keeps track of which sections have been loaded so sections don't
- // accidentally get loaded twice from two different files.
- void LoadedSection(const string &section) {
- if (loaded_sections_.count(section) == 0) {
- loaded_sections_.insert(section);
- } else {
- fprintf(stderr, "Section %s has already been loaded.\n",
- section.c_str());
- }
- }
-
- string debuglink_file() const {
- return debuglink_file_;
- }
-
- private:
- const vector<string>& debug_dirs_; // Directories in which to
- // search for the debug ELF file.
-
- string debuglink_file_; // Full path to the debug ELF file.
-
- bool has_loading_addr_; // Indicate if LOADING_ADDR_ is valid.
-
- set<string> loaded_sections_; // Tracks the Loaded ELF sections
- // between calls to LoadSymbols().
-};
-
-// Find the preferred loading address of the binary.
-template<typename ElfClass>
-typename ElfClass::Addr GetLoadingAddress(
- const typename ElfClass::Phdr* program_headers,
- int nheader) {
- typedef typename ElfClass::Phdr Phdr;
-
- // For non-PIC executables (e_type == ET_EXEC), the load address is
- // the start address of the first PT_LOAD segment. (ELF requires
- // the segments to be sorted by load address.) For PIC executables
- // and dynamic libraries (e_type == ET_DYN), this address will
- // normally be zero.
- for (int i = 0; i < nheader; ++i) {
- const Phdr& header = program_headers[i];
- if (header.p_type == PT_LOAD)
- return header.p_vaddr;
- }
- return 0;
-}
-
-template<typename ElfClass>
-bool LoadSymbols(const string& obj_file,
- const bool big_endian,
- const typename ElfClass::Ehdr* elf_header,
- const bool read_gnu_debug_link,
- LoadSymbolsInfo<ElfClass>* info,
- SecMap* smap,
- void* rx_avma, size_t rx_size,
- UniqueStringUniverse* usu,
- void (*log)(const char*)) {
- typedef typename ElfClass::Phdr Phdr;
- typedef typename ElfClass::Shdr Shdr;
-
- char buf[500];
- SprintfLiteral(buf, "LoadSymbols: BEGIN %s\n", obj_file.c_str());
- buf[sizeof(buf)-1] = 0;
- log(buf);
-
- // This is how the text bias is calculated.
- // BEGIN CALCULATE BIAS
- uintptr_t loading_addr = GetLoadingAddress<ElfClass>(
- GetOffset<ElfClass, Phdr>(elf_header, elf_header->e_phoff),
- elf_header->e_phnum);
- uintptr_t text_bias = ((uintptr_t)rx_avma) - loading_addr;
- SprintfLiteral(buf,
- "LoadSymbols: rx_avma=%llx, text_bias=%llx",
- (unsigned long long int)(uintptr_t)rx_avma,
- (unsigned long long int)text_bias);
- buf[sizeof(buf)-1] = 0;
- log(buf);
- // END CALCULATE BIAS
-
- const Shdr* sections =
- GetOffset<ElfClass, Shdr>(elf_header, elf_header->e_shoff);
- const Shdr* section_names = sections + elf_header->e_shstrndx;
- const char* names =
- GetOffset<ElfClass, char>(elf_header, section_names->sh_offset);
- const char *names_end = names + section_names->sh_size;
- bool found_usable_info = false;
-
- // Dwarf Call Frame Information (CFI) is actually independent from
- // the other DWARF debugging information, and can be used alone.
- const Shdr* dwarf_cfi_section =
- FindElfSectionByName<ElfClass>(".debug_frame", SHT_PROGBITS,
- sections, names, names_end,
- elf_header->e_shnum);
- if (dwarf_cfi_section) {
- // Ignore the return value of this function; even without call frame
- // information, the other debugging information could be perfectly
- // useful.
- info->LoadedSection(".debug_frame");
- bool result =
- LoadDwarfCFI<ElfClass>(obj_file, elf_header, ".debug_frame",
- dwarf_cfi_section, false, 0, 0, big_endian,
- smap, text_bias, usu, log);
- found_usable_info = found_usable_info || result;
- if (result)
- log("LoadSymbols: read CFI from .debug_frame");
- }
-
- // Linux C++ exception handling information can also provide
- // unwinding data.
- const Shdr* eh_frame_section =
- FindElfSectionByName<ElfClass>(".eh_frame", SHT_PROGBITS,
- sections, names, names_end,
- elf_header->e_shnum);
- if (eh_frame_section) {
- // Pointers in .eh_frame data may be relative to the base addresses of
- // certain sections. Provide those sections if present.
- const Shdr* got_section =
- FindElfSectionByName<ElfClass>(".got", SHT_PROGBITS,
- sections, names, names_end,
- elf_header->e_shnum);
- const Shdr* text_section =
- FindElfSectionByName<ElfClass>(".text", SHT_PROGBITS,
- sections, names, names_end,
- elf_header->e_shnum);
- info->LoadedSection(".eh_frame");
- // As above, ignore the return value of this function.
- bool result =
- LoadDwarfCFI<ElfClass>(obj_file, elf_header, ".eh_frame",
- eh_frame_section, true,
- got_section, text_section, big_endian,
- smap, text_bias, usu, log);
- found_usable_info = found_usable_info || result;
- if (result)
- log("LoadSymbols: read CFI from .eh_frame");
- }
-
- SprintfLiteral(buf, "LoadSymbols: END %s\n", obj_file.c_str());
- buf[sizeof(buf)-1] = 0;
- log(buf);
-
- return found_usable_info;
-}
-
-// Return the breakpad symbol file identifier for the architecture of
-// ELF_HEADER.
-template<typename ElfClass>
-const char* ElfArchitecture(const typename ElfClass::Ehdr* elf_header) {
- typedef typename ElfClass::Half Half;
- Half arch = elf_header->e_machine;
- switch (arch) {
- case EM_386: return "x86";
- case EM_ARM: return "arm";
- case EM_MIPS: return "mips";
- case EM_PPC64: return "ppc64";
- case EM_PPC: return "ppc";
- case EM_S390: return "s390";
- case EM_SPARC: return "sparc";
- case EM_SPARCV9: return "sparcv9";
- case EM_X86_64: return "x86_64";
- default: return NULL;
- }
-}
-
-// Format the Elf file identifier in IDENTIFIER as a UUID with the
-// dashes removed.
-string FormatIdentifier(unsigned char identifier[16]) {
- char identifier_str[40];
- lul::FileID::ConvertIdentifierToString(
- identifier,
- identifier_str,
- sizeof(identifier_str));
- string id_no_dash;
- for (int i = 0; identifier_str[i] != '\0'; ++i)
- if (identifier_str[i] != '-')
- id_no_dash += identifier_str[i];
- // Add an extra "0" by the end. PDB files on Windows have an 'age'
- // number appended to the end of the file identifier; this isn't
- // really used or necessary on other platforms, but be consistent.
- id_no_dash += '0';
- return id_no_dash;
-}
-
-// Return the non-directory portion of FILENAME: the portion after the
-// last slash, or the whole filename if there are no slashes.
-string BaseFileName(const string &filename) {
- // Lots of copies! basename's behavior is less than ideal.
- char *c_filename = strdup(filename.c_str());
- string base = basename(c_filename);
- free(c_filename);
- return base;
-}
-
-template<typename ElfClass>
-bool ReadSymbolDataElfClass(const typename ElfClass::Ehdr* elf_header,
- const string& obj_filename,
- const vector<string>& debug_dirs,
- SecMap* smap, void* rx_avma, size_t rx_size,
- UniqueStringUniverse* usu,
- void (*log)(const char*)) {
- typedef typename ElfClass::Ehdr Ehdr;
-
- unsigned char identifier[16];
- if (!lul
- ::FileID::ElfFileIdentifierFromMappedFile(elf_header, identifier)) {
- fprintf(stderr, "%s: unable to generate file identifier\n",
- obj_filename.c_str());
- return false;
- }
-
- const char *architecture = ElfArchitecture<ElfClass>(elf_header);
- if (!architecture) {
- fprintf(stderr, "%s: unrecognized ELF machine architecture: %d\n",
- obj_filename.c_str(), elf_header->e_machine);
- return false;
- }
-
- // Figure out what endianness this file is.
- bool big_endian;
- if (!ElfEndianness<ElfClass>(elf_header, &big_endian))
- return false;
-
- string name = BaseFileName(obj_filename);
- string os = "Linux";
- string id = FormatIdentifier(identifier);
-
- LoadSymbolsInfo<ElfClass> info(debug_dirs);
- if (!LoadSymbols<ElfClass>(obj_filename, big_endian, elf_header,
- !debug_dirs.empty(), &info,
- smap, rx_avma, rx_size, usu, log)) {
- const string debuglink_file = info.debuglink_file();
- if (debuglink_file.empty())
- return false;
-
- // Load debuglink ELF file.
- fprintf(stderr, "Found debugging info in %s\n", debuglink_file.c_str());
- MmapWrapper debug_map_wrapper;
- Ehdr* debug_elf_header = NULL;
- if (!LoadELF(debuglink_file, &debug_map_wrapper,
- reinterpret_cast<void**>(&debug_elf_header)))
- return false;
- // Sanity checks to make sure everything matches up.
- const char *debug_architecture =
- ElfArchitecture<ElfClass>(debug_elf_header);
- if (!debug_architecture) {
- fprintf(stderr, "%s: unrecognized ELF machine architecture: %d\n",
- debuglink_file.c_str(), debug_elf_header->e_machine);
- return false;
- }
- if (strcmp(architecture, debug_architecture)) {
- fprintf(stderr, "%s with ELF machine architecture %s does not match "
- "%s with ELF architecture %s\n",
- debuglink_file.c_str(), debug_architecture,
- obj_filename.c_str(), architecture);
- return false;
- }
-
- bool debug_big_endian;
- if (!ElfEndianness<ElfClass>(debug_elf_header, &debug_big_endian))
- return false;
- if (debug_big_endian != big_endian) {
- fprintf(stderr, "%s and %s does not match in endianness\n",
- obj_filename.c_str(), debuglink_file.c_str());
- return false;
- }
-
- if (!LoadSymbols<ElfClass>(debuglink_file, debug_big_endian,
- debug_elf_header, false, &info,
- smap, rx_avma, rx_size, usu, log)) {
- return false;
- }
- }
-
- return true;
-}
-
-} // namespace (anon)
-
-
-namespace lul {
-
-bool ReadSymbolDataInternal(const uint8_t* obj_file,
- const string& obj_filename,
- const vector<string>& debug_dirs,
- SecMap* smap, void* rx_avma, size_t rx_size,
- UniqueStringUniverse* usu,
- void (*log)(const char*)) {
-
- if (!IsValidElf(obj_file)) {
- fprintf(stderr, "Not a valid ELF file: %s\n", obj_filename.c_str());
- return false;
- }
-
- int elfclass = ElfClass(obj_file);
- if (elfclass == ELFCLASS32) {
- return ReadSymbolDataElfClass<ElfClass32>(
- reinterpret_cast<const Elf32_Ehdr*>(obj_file),
- obj_filename, debug_dirs, smap, rx_avma, rx_size, usu, log);
- }
- if (elfclass == ELFCLASS64) {
- return ReadSymbolDataElfClass<ElfClass64>(
- reinterpret_cast<const Elf64_Ehdr*>(obj_file),
- obj_filename, debug_dirs, smap, rx_avma, rx_size, usu, log);
- }
-
- return false;
-}
-
-bool ReadSymbolData(const string& obj_file,
- const vector<string>& debug_dirs,
- SecMap* smap, void* rx_avma, size_t rx_size,
- UniqueStringUniverse* usu,
- void (*log)(const char*)) {
- MmapWrapper map_wrapper;
- void* elf_header = NULL;
- if (!LoadELF(obj_file, &map_wrapper, &elf_header))
- return false;
-
- return ReadSymbolDataInternal(reinterpret_cast<uint8_t*>(elf_header),
- obj_file, debug_dirs,
- smap, rx_avma, rx_size, usu, log);
-}
-
-
-namespace {
-
-template<typename ElfClass>
-void FindElfClassSection(const char *elf_base,
- const char *section_name,
- typename ElfClass::Word section_type,
- const void **section_start,
- int *section_size) {
- typedef typename ElfClass::Ehdr Ehdr;
- typedef typename ElfClass::Shdr Shdr;
-
- MOZ_ASSERT(elf_base);
- MOZ_ASSERT(section_start);
- MOZ_ASSERT(section_size);
-
- MOZ_ASSERT(strncmp(elf_base, ELFMAG, SELFMAG) == 0);
-
- const Ehdr* elf_header = reinterpret_cast<const Ehdr*>(elf_base);
- MOZ_ASSERT(elf_header->e_ident[EI_CLASS] == ElfClass::kClass);
-
- const Shdr* sections =
- GetOffset<ElfClass,Shdr>(elf_header, elf_header->e_shoff);
- const Shdr* section_names = sections + elf_header->e_shstrndx;
- const char* names =
- GetOffset<ElfClass,char>(elf_header, section_names->sh_offset);
- const char *names_end = names + section_names->sh_size;
-
- const Shdr* section =
- FindElfSectionByName<ElfClass>(section_name, section_type,
- sections, names, names_end,
- elf_header->e_shnum);
-
- if (section != NULL && section->sh_size > 0) {
- *section_start = elf_base + section->sh_offset;
- *section_size = section->sh_size;
- }
-}
-
-template<typename ElfClass>
-void FindElfClassSegment(const char *elf_base,
- typename ElfClass::Word segment_type,
- const void **segment_start,
- int *segment_size) {
- typedef typename ElfClass::Ehdr Ehdr;
- typedef typename ElfClass::Phdr Phdr;
-
- MOZ_ASSERT(elf_base);
- MOZ_ASSERT(segment_start);
- MOZ_ASSERT(segment_size);
-
- MOZ_ASSERT(strncmp(elf_base, ELFMAG, SELFMAG) == 0);
-
- const Ehdr* elf_header = reinterpret_cast<const Ehdr*>(elf_base);
- MOZ_ASSERT(elf_header->e_ident[EI_CLASS] == ElfClass::kClass);
-
- const Phdr* phdrs =
- GetOffset<ElfClass,Phdr>(elf_header, elf_header->e_phoff);
-
- for (int i = 0; i < elf_header->e_phnum; ++i) {
- if (phdrs[i].p_type == segment_type) {
- *segment_start = elf_base + phdrs[i].p_offset;
- *segment_size = phdrs[i].p_filesz;
- return;
- }
- }
-}
-
-} // namespace (anon)
-
-bool IsValidElf(const void* elf_base) {
- return strncmp(reinterpret_cast<const char*>(elf_base),
- ELFMAG, SELFMAG) == 0;
-}
-
-int ElfClass(const void* elf_base) {
- const ElfW(Ehdr)* elf_header =
- reinterpret_cast<const ElfW(Ehdr)*>(elf_base);
-
- return elf_header->e_ident[EI_CLASS];
-}
-
-bool FindElfSection(const void *elf_mapped_base,
- const char *section_name,
- uint32_t section_type,
- const void **section_start,
- int *section_size,
- int *elfclass) {
- MOZ_ASSERT(elf_mapped_base);
- MOZ_ASSERT(section_start);
- MOZ_ASSERT(section_size);
-
- *section_start = NULL;
- *section_size = 0;
-
- if (!IsValidElf(elf_mapped_base))
- return false;
-
- int cls = ElfClass(elf_mapped_base);
- if (elfclass) {
- *elfclass = cls;
- }
-
- const char* elf_base =
- static_cast<const char*>(elf_mapped_base);
-
- if (cls == ELFCLASS32) {
- FindElfClassSection<ElfClass32>(elf_base, section_name, section_type,
- section_start, section_size);
- return *section_start != NULL;
- } else if (cls == ELFCLASS64) {
- FindElfClassSection<ElfClass64>(elf_base, section_name, section_type,
- section_start, section_size);
- return *section_start != NULL;
- }
-
- return false;
-}
-
-bool FindElfSegment(const void *elf_mapped_base,
- uint32_t segment_type,
- const void **segment_start,
- int *segment_size,
- int *elfclass) {
- MOZ_ASSERT(elf_mapped_base);
- MOZ_ASSERT(segment_start);
- MOZ_ASSERT(segment_size);
-
- *segment_start = NULL;
- *segment_size = 0;
-
- if (!IsValidElf(elf_mapped_base))
- return false;
-
- int cls = ElfClass(elf_mapped_base);
- if (elfclass) {
- *elfclass = cls;
- }
-
- const char* elf_base =
- static_cast<const char*>(elf_mapped_base);
-
- if (cls == ELFCLASS32) {
- FindElfClassSegment<ElfClass32>(elf_base, segment_type,
- segment_start, segment_size);
- return *segment_start != NULL;
- } else if (cls == ELFCLASS64) {
- FindElfClassSegment<ElfClass64>(elf_base, segment_type,
- segment_start, segment_size);
- return *segment_start != NULL;
- }
-
- return false;
-}
-
-
-// (derived from)
-// file_id.cc: Return a unique identifier for a file
-//
-// See file_id.h for documentation
-//
-
-// ELF note name and desc are 32-bits word padded.
-#define NOTE_PADDING(a) ((a + 3) & ~3)
-
-// These functions are also used inside the crashed process, so be safe
-// and use the syscall/libc wrappers instead of direct syscalls or libc.
-
-template<typename ElfClass>
-static bool ElfClassBuildIDNoteIdentifier(const void *section, int length,
- uint8_t identifier[kMDGUIDSize]) {
- typedef typename ElfClass::Nhdr Nhdr;
-
- const void* section_end = reinterpret_cast<const char*>(section) + length;
- const Nhdr* note_header = reinterpret_cast<const Nhdr*>(section);
- while (reinterpret_cast<const void *>(note_header) < section_end) {
- if (note_header->n_type == NT_GNU_BUILD_ID)
- break;
- note_header = reinterpret_cast<const Nhdr*>(
- reinterpret_cast<const char*>(note_header) + sizeof(Nhdr) +
- NOTE_PADDING(note_header->n_namesz) +
- NOTE_PADDING(note_header->n_descsz));
- }
- if (reinterpret_cast<const void *>(note_header) >= section_end ||
- note_header->n_descsz == 0) {
- return false;
- }
-
- const char* build_id = reinterpret_cast<const char*>(note_header) +
- sizeof(Nhdr) + NOTE_PADDING(note_header->n_namesz);
- // Copy as many bits of the build ID as will fit
- // into the GUID space.
- memset(identifier, 0, kMDGUIDSize);
- memcpy(identifier, build_id,
- std::min(kMDGUIDSize, (size_t)note_header->n_descsz));
-
- return true;
-}
-
-// Attempt to locate a .note.gnu.build-id section in an ELF binary
-// and copy as many bytes of it as will fit into |identifier|.
-static bool FindElfBuildIDNote(const void *elf_mapped_base,
- uint8_t identifier[kMDGUIDSize]) {
- void* note_section;
- int note_size, elfclass;
- if ((!FindElfSegment(elf_mapped_base, PT_NOTE,
- (const void**)&note_section, &note_size, &elfclass) ||
- note_size == 0) &&
- (!FindElfSection(elf_mapped_base, ".note.gnu.build-id", SHT_NOTE,
- (const void**)&note_section, &note_size, &elfclass) ||
- note_size == 0)) {
- return false;
- }
-
- if (elfclass == ELFCLASS32) {
- return ElfClassBuildIDNoteIdentifier<ElfClass32>(note_section, note_size,
- identifier);
- } else if (elfclass == ELFCLASS64) {
- return ElfClassBuildIDNoteIdentifier<ElfClass64>(note_section, note_size,
- identifier);
- }
-
- return false;
-}
-
-// Attempt to locate the .text section of an ELF binary and generate
-// a simple hash by XORing the first page worth of bytes into |identifier|.
-static bool HashElfTextSection(const void *elf_mapped_base,
- uint8_t identifier[kMDGUIDSize]) {
- void* text_section;
- int text_size;
- if (!FindElfSection(elf_mapped_base, ".text", SHT_PROGBITS,
- (const void**)&text_section, &text_size, NULL) ||
- text_size == 0) {
- return false;
- }
-
- memset(identifier, 0, kMDGUIDSize);
- const uint8_t* ptr = reinterpret_cast<const uint8_t*>(text_section);
- const uint8_t* ptr_end = ptr + std::min(text_size, 4096);
- while (ptr < ptr_end) {
- for (unsigned i = 0; i < kMDGUIDSize; i++)
- identifier[i] ^= ptr[i];
- ptr += kMDGUIDSize;
- }
- return true;
-}
-
-// static
-bool FileID::ElfFileIdentifierFromMappedFile(const void* base,
- uint8_t identifier[kMDGUIDSize]) {
- // Look for a build id note first.
- if (FindElfBuildIDNote(base, identifier))
- return true;
-
- // Fall back on hashing the first page of the text section.
- return HashElfTextSection(base, identifier);
-}
-
-// static
-void FileID::ConvertIdentifierToString(const uint8_t identifier[kMDGUIDSize],
- char* buffer, int buffer_length) {
- uint8_t identifier_swapped[kMDGUIDSize];
-
- // Endian-ness swap to match dump processor expectation.
- memcpy(identifier_swapped, identifier, kMDGUIDSize);
- uint32_t* data1 = reinterpret_cast<uint32_t*>(identifier_swapped);
- *data1 = htonl(*data1);
- uint16_t* data2 = reinterpret_cast<uint16_t*>(identifier_swapped + 4);
- *data2 = htons(*data2);
- uint16_t* data3 = reinterpret_cast<uint16_t*>(identifier_swapped + 6);
- *data3 = htons(*data3);
-
- int buffer_idx = 0;
- for (unsigned int idx = 0;
- (buffer_idx < buffer_length) && (idx < kMDGUIDSize);
- ++idx) {
- int hi = (identifier_swapped[idx] >> 4) & 0x0F;
- int lo = (identifier_swapped[idx]) & 0x0F;
-
- if (idx == 4 || idx == 6 || idx == 8 || idx == 10)
- buffer[buffer_idx++] = '-';
-
- buffer[buffer_idx++] = (hi >= 10) ? 'A' + hi - 10 : '0' + hi;
- buffer[buffer_idx++] = (lo >= 10) ? 'A' + lo - 10 : '0' + lo;
- }
-
- // NULL terminate
- buffer[(buffer_idx < buffer_length) ? buffer_idx : buffer_idx - 1] = 0;
-}
-
-} // namespace lul
diff --git a/tools/profiler/lul/LulMain.cpp b/tools/profiler/lul/LulMain.cpp
deleted file mode 100644
index 2e78f03ec..000000000
--- a/tools/profiler/lul/LulMain.cpp
+++ /dev/null
@@ -1,1963 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "LulMain.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <algorithm> // std::sort
-#include <string>
-
-#include "mozilla/Assertions.h"
-#include "mozilla/ArrayUtils.h"
-#include "mozilla/CheckedInt.h"
-#include "mozilla/DebugOnly.h"
-#include "mozilla/MemoryChecking.h"
-#include "mozilla/Sprintf.h"
-
-#include "LulCommonExt.h"
-#include "LulElfExt.h"
-
-#include "LulMainInt.h"
-
-#include "platform-linux-lul.h" // for gettid()
-
-// Set this to 1 for verbose logging
-#define DEBUG_MAIN 0
-
-namespace lul {
-
-using std::string;
-using std::vector;
-using std::pair;
-using mozilla::CheckedInt;
-using mozilla::DebugOnly;
-
-
-// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-//
-// Some functions in this file are marked RUNS IN NO-MALLOC CONTEXT.
-// Any such function -- and, hence, the transitive closure of those
-// reachable from it -- must not do any dynamic memory allocation.
-// Doing so risks deadlock. There is exactly one root function for
-// the transitive closure: Lul::Unwind.
-//
-// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-
-
-////////////////////////////////////////////////////////////////
-// RuleSet //
-////////////////////////////////////////////////////////////////
-
-static const char*
-NameOf_DW_REG(int16_t aReg)
-{
- switch (aReg) {
- case DW_REG_CFA: return "cfa";
-#if defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
- case DW_REG_INTEL_XBP: return "xbp";
- case DW_REG_INTEL_XSP: return "xsp";
- case DW_REG_INTEL_XIP: return "xip";
-#elif defined(LUL_ARCH_arm)
- case DW_REG_ARM_R7: return "r7";
- case DW_REG_ARM_R11: return "r11";
- case DW_REG_ARM_R12: return "r12";
- case DW_REG_ARM_R13: return "r13";
- case DW_REG_ARM_R14: return "r14";
- case DW_REG_ARM_R15: return "r15";
-#else
-# error "Unsupported arch"
-#endif
- default: return "???";
- }
-}
-
-string
-LExpr::ShowRule(const char* aNewReg) const
-{
- char buf[64];
- string res = string(aNewReg) + "=";
- switch (mHow) {
- case UNKNOWN:
- res += "Unknown";
- break;
- case NODEREF:
- SprintfLiteral(buf, "%s+%d",
- NameOf_DW_REG(mReg), (int)mOffset);
- res += buf;
- break;
- case DEREF:
- SprintfLiteral(buf, "*(%s+%d)",
- NameOf_DW_REG(mReg), (int)mOffset);
- res += buf;
- break;
- case PFXEXPR:
- SprintfLiteral(buf, "PfxExpr-at-%d", (int)mOffset);
- res += buf;
- break;
- default:
- res += "???";
- break;
- }
- return res;
-}
-
-void
-RuleSet::Print(void(*aLog)(const char*)) const
-{
- char buf[96];
- SprintfLiteral(buf, "[%llx .. %llx]: let ",
- (unsigned long long int)mAddr,
- (unsigned long long int)(mAddr + mLen - 1));
- string res = string(buf);
- res += mCfaExpr.ShowRule("cfa");
- res += " in";
- // For each reg we care about, print the recovery expression.
-#if defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
- res += mXipExpr.ShowRule(" RA");
- res += mXspExpr.ShowRule(" SP");
- res += mXbpExpr.ShowRule(" BP");
-#elif defined(LUL_ARCH_arm)
- res += mR15expr.ShowRule(" R15");
- res += mR7expr .ShowRule(" R7" );
- res += mR11expr.ShowRule(" R11");
- res += mR12expr.ShowRule(" R12");
- res += mR13expr.ShowRule(" R13");
- res += mR14expr.ShowRule(" R14");
-#else
-# error "Unsupported arch"
-#endif
- aLog(res.c_str());
-}
-
-LExpr*
-RuleSet::ExprForRegno(DW_REG_NUMBER aRegno) {
- switch (aRegno) {
- case DW_REG_CFA: return &mCfaExpr;
-# if defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
- case DW_REG_INTEL_XIP: return &mXipExpr;
- case DW_REG_INTEL_XSP: return &mXspExpr;
- case DW_REG_INTEL_XBP: return &mXbpExpr;
-# elif defined(LUL_ARCH_arm)
- case DW_REG_ARM_R15: return &mR15expr;
- case DW_REG_ARM_R14: return &mR14expr;
- case DW_REG_ARM_R13: return &mR13expr;
- case DW_REG_ARM_R12: return &mR12expr;
- case DW_REG_ARM_R11: return &mR11expr;
- case DW_REG_ARM_R7: return &mR7expr;
-# else
-# error "Unknown arch"
-# endif
- default: return nullptr;
- }
-}
-
-RuleSet::RuleSet()
-{
- mAddr = 0;
- mLen = 0;
- // The only other fields are of type LExpr and those are initialised
- // by LExpr::LExpr().
-}
-
-
-////////////////////////////////////////////////////////////////
-// SecMap //
-////////////////////////////////////////////////////////////////
-
-// See header file LulMainInt.h for comments about invariants.
-
-SecMap::SecMap(void(*aLog)(const char*))
- : mSummaryMinAddr(1)
- , mSummaryMaxAddr(0)
- , mUsable(true)
- , mLog(aLog)
-{}
-
-SecMap::~SecMap() {
- mRuleSets.clear();
-}
-
-// RUNS IN NO-MALLOC CONTEXT
-RuleSet*
-SecMap::FindRuleSet(uintptr_t ia) {
- // Binary search mRuleSets to find one that brackets |ia|.
- // lo and hi need to be signed, else the loop termination tests
- // don't work properly. Note that this works correctly even when
- // mRuleSets.size() == 0.
-
- // Can't do this until the array has been sorted and preened.
- MOZ_ASSERT(mUsable);
-
- long int lo = 0;
- long int hi = (long int)mRuleSets.size() - 1;
- while (true) {
- // current unsearched space is from lo to hi, inclusive.
- if (lo > hi) {
- // not found
- return nullptr;
- }
- long int mid = lo + ((hi - lo) / 2);
- RuleSet* mid_ruleSet = &mRuleSets[mid];
- uintptr_t mid_minAddr = mid_ruleSet->mAddr;
- uintptr_t mid_maxAddr = mid_minAddr + mid_ruleSet->mLen - 1;
- if (ia < mid_minAddr) { hi = mid-1; continue; }
- if (ia > mid_maxAddr) { lo = mid+1; continue; }
- MOZ_ASSERT(mid_minAddr <= ia && ia <= mid_maxAddr);
- return mid_ruleSet;
- }
- // NOTREACHED
-}
-
-// Add a RuleSet to the collection. The rule is copied in. Calling
-// this makes the map non-searchable.
-void
-SecMap::AddRuleSet(const RuleSet* rs) {
- mUsable = false;
- mRuleSets.push_back(*rs);
-}
-
-// Add a PfxInstr to the vector of such instrs, and return the index
-// in the vector. Calling this makes the map non-searchable.
-uint32_t
-SecMap::AddPfxInstr(PfxInstr pfxi) {
- mUsable = false;
- mPfxInstrs.push_back(pfxi);
- return mPfxInstrs.size() - 1;
-}
-
-
-static bool
-CmpRuleSetsByAddrLE(const RuleSet& rs1, const RuleSet& rs2) {
- return rs1.mAddr < rs2.mAddr;
-}
-
-// Prepare the map for searching. Completely remove any which don't
-// fall inside the specified range [start, +len).
-void
-SecMap::PrepareRuleSets(uintptr_t aStart, size_t aLen)
-{
- if (mRuleSets.empty()) {
- return;
- }
-
- MOZ_ASSERT(aLen > 0);
- if (aLen == 0) {
- // This should never happen.
- mRuleSets.clear();
- return;
- }
-
- // Sort by start addresses.
- std::sort(mRuleSets.begin(), mRuleSets.end(), CmpRuleSetsByAddrLE);
-
- // Detect any entry not completely contained within [start, +len).
- // Set its length to zero, so that the next pass will remove it.
- for (size_t i = 0; i < mRuleSets.size(); ++i) {
- RuleSet* rs = &mRuleSets[i];
- if (rs->mLen > 0 &&
- (rs->mAddr < aStart || rs->mAddr + rs->mLen > aStart + aLen)) {
- rs->mLen = 0;
- }
- }
-
- // Iteratively truncate any overlaps and remove any zero length
- // entries that might result, or that may have been present
- // initially. Unless the input is seriously screwy, this is
- // expected to iterate only once.
- while (true) {
- size_t i;
- size_t n = mRuleSets.size();
- size_t nZeroLen = 0;
-
- if (n == 0) {
- break;
- }
-
- for (i = 1; i < n; ++i) {
- RuleSet* prev = &mRuleSets[i-1];
- RuleSet* here = &mRuleSets[i];
- MOZ_ASSERT(prev->mAddr <= here->mAddr);
- if (prev->mAddr + prev->mLen > here->mAddr) {
- prev->mLen = here->mAddr - prev->mAddr;
- }
- if (prev->mLen == 0)
- nZeroLen++;
- }
-
- if (mRuleSets[n-1].mLen == 0) {
- nZeroLen++;
- }
-
- // At this point, the entries are in-order and non-overlapping.
- // If none of them are zero-length, we are done.
- if (nZeroLen == 0) {
- break;
- }
-
- // Slide back the entries to remove the zero length ones.
- size_t j = 0; // The write-point.
- for (i = 0; i < n; ++i) {
- if (mRuleSets[i].mLen == 0) {
- continue;
- }
- if (j != i) mRuleSets[j] = mRuleSets[i];
- ++j;
- }
- MOZ_ASSERT(i == n);
- MOZ_ASSERT(nZeroLen <= n);
- MOZ_ASSERT(j == n - nZeroLen);
- while (nZeroLen > 0) {
- mRuleSets.pop_back();
- nZeroLen--;
- }
-
- MOZ_ASSERT(mRuleSets.size() == j);
- }
-
- size_t n = mRuleSets.size();
-
-#ifdef DEBUG
- // Do a final check on the rules: their address ranges must be
- // ascending, non overlapping, non zero sized.
- if (n > 0) {
- MOZ_ASSERT(mRuleSets[0].mLen > 0);
- for (size_t i = 1; i < n; ++i) {
- RuleSet* prev = &mRuleSets[i-1];
- RuleSet* here = &mRuleSets[i];
- MOZ_ASSERT(prev->mAddr < here->mAddr);
- MOZ_ASSERT(here->mLen > 0);
- MOZ_ASSERT(prev->mAddr + prev->mLen <= here->mAddr);
- }
- }
-#endif
-
- // Set the summary min and max address values.
- if (n == 0) {
- // Use the values defined in comments in the class declaration.
- mSummaryMinAddr = 1;
- mSummaryMaxAddr = 0;
- } else {
- mSummaryMinAddr = mRuleSets[0].mAddr;
- mSummaryMaxAddr = mRuleSets[n-1].mAddr + mRuleSets[n-1].mLen - 1;
- }
- char buf[150];
- SprintfLiteral(buf,
- "PrepareRuleSets: %d entries, smin/smax 0x%llx, 0x%llx\n",
- (int)n, (unsigned long long int)mSummaryMinAddr,
- (unsigned long long int)mSummaryMaxAddr);
- buf[sizeof(buf)-1] = 0;
- mLog(buf);
-
- // Is now usable for binary search.
- mUsable = true;
-
- if (0) {
- mLog("\nRulesets after preening\n");
- for (size_t i = 0; i < mRuleSets.size(); ++i) {
- mRuleSets[i].Print(mLog);
- mLog("\n");
- }
- mLog("\n");
- }
-}
-
-bool SecMap::IsEmpty() {
- return mRuleSets.empty();
-}
-
-
-////////////////////////////////////////////////////////////////
-// SegArray //
-////////////////////////////////////////////////////////////////
-
-// A SegArray holds a set of address ranges that together exactly
-// cover an address range, with no overlaps or holes. Each range has
-// an associated value, which in this case has been specialised to be
-// a simple boolean. The representation is kept to minimal canonical
-// form in which adjacent ranges with the same associated value are
-// merged together. Each range is represented by a |struct Seg|.
-//
-// SegArrays are used to keep track of which parts of the address
-// space are known to contain instructions.
-class SegArray {
-
- public:
- void add(uintptr_t lo, uintptr_t hi, bool val) {
- if (lo > hi) {
- return;
- }
- split_at(lo);
- if (hi < UINTPTR_MAX) {
- split_at(hi+1);
- }
- std::vector<Seg>::size_type iLo, iHi, i;
- iLo = find(lo);
- iHi = find(hi);
- for (i = iLo; i <= iHi; ++i) {
- mSegs[i].val = val;
- }
- preen();
- }
-
- // RUNS IN NO-MALLOC CONTEXT
- bool getBoundingCodeSegment(/*OUT*/uintptr_t* rx_min,
- /*OUT*/uintptr_t* rx_max, uintptr_t addr) {
- std::vector<Seg>::size_type i = find(addr);
- if (!mSegs[i].val) {
- return false;
- }
- *rx_min = mSegs[i].lo;
- *rx_max = mSegs[i].hi;
- return true;
- }
-
- SegArray() {
- Seg s(0, UINTPTR_MAX, false);
- mSegs.push_back(s);
- }
-
- private:
- struct Seg {
- Seg(uintptr_t lo, uintptr_t hi, bool val) : lo(lo), hi(hi), val(val) {}
- uintptr_t lo;
- uintptr_t hi;
- bool val;
- };
-
- void preen() {
- for (std::vector<Seg>::iterator iter = mSegs.begin();
- iter < mSegs.end()-1;
- ++iter) {
- if (iter[0].val != iter[1].val) {
- continue;
- }
- iter[0].hi = iter[1].hi;
- mSegs.erase(iter+1);
- // Back up one, so as not to miss an opportunity to merge
- // with the entry after this one.
- --iter;
- }
- }
-
- // RUNS IN NO-MALLOC CONTEXT
- std::vector<Seg>::size_type find(uintptr_t a) {
- long int lo = 0;
- long int hi = (long int)mSegs.size();
- while (true) {
- // The unsearched space is lo .. hi inclusive.
- if (lo > hi) {
- // Not found. This can't happen.
- return (std::vector<Seg>::size_type)(-1);
- }
- long int mid = lo + ((hi - lo) / 2);
- uintptr_t mid_lo = mSegs[mid].lo;
- uintptr_t mid_hi = mSegs[mid].hi;
- if (a < mid_lo) { hi = mid-1; continue; }
- if (a > mid_hi) { lo = mid+1; continue; }
- return (std::vector<Seg>::size_type)mid;
- }
- }
-
- void split_at(uintptr_t a) {
- std::vector<Seg>::size_type i = find(a);
- if (mSegs[i].lo == a) {
- return;
- }
- mSegs.insert( mSegs.begin()+i+1, mSegs[i] );
- mSegs[i].hi = a-1;
- mSegs[i+1].lo = a;
- }
-
- void show() {
- printf("<< %d entries:\n", (int)mSegs.size());
- for (std::vector<Seg>::iterator iter = mSegs.begin();
- iter < mSegs.end();
- ++iter) {
- printf(" %016llx %016llx %s\n",
- (unsigned long long int)(*iter).lo,
- (unsigned long long int)(*iter).hi,
- (*iter).val ? "true" : "false");
- }
- printf(">>\n");
- }
-
- std::vector<Seg> mSegs;
-};
-
-
-////////////////////////////////////////////////////////////////
-// PriMap //
-////////////////////////////////////////////////////////////////
-
-class PriMap {
- public:
- explicit PriMap(void (*aLog)(const char*))
- : mLog(aLog)
- {}
-
- ~PriMap() {
- for (std::vector<SecMap*>::iterator iter = mSecMaps.begin();
- iter != mSecMaps.end();
- ++iter) {
- delete *iter;
- }
- mSecMaps.clear();
- }
-
- // RUNS IN NO-MALLOC CONTEXT
- pair<const RuleSet*, const vector<PfxInstr>*>
- Lookup(uintptr_t ia)
- {
- SecMap* sm = FindSecMap(ia);
- return pair<const RuleSet*, const vector<PfxInstr>*>
- (sm ? sm->FindRuleSet(ia) : nullptr,
- sm ? sm->GetPfxInstrs() : nullptr);
- }
-
- // Add a secondary map. No overlaps allowed w.r.t. existing
- // secondary maps.
- void AddSecMap(SecMap* aSecMap) {
- // We can't add an empty SecMap to the PriMap. But that's OK
- // since we'd never be able to find anything in it anyway.
- if (aSecMap->IsEmpty()) {
- return;
- }
-
- // Iterate through the SecMaps and find the right place for this
- // one. At the same time, ensure that the in-order
- // non-overlapping invariant is preserved (and, generally, holds).
- // FIXME: this gives a cost that is O(N^2) in the total number of
- // shared objects in the system. ToDo: better.
- MOZ_ASSERT(aSecMap->mSummaryMinAddr <= aSecMap->mSummaryMaxAddr);
-
- size_t num_secMaps = mSecMaps.size();
- uintptr_t i;
- for (i = 0; i < num_secMaps; ++i) {
- SecMap* sm_i = mSecMaps[i];
- MOZ_ASSERT(sm_i->mSummaryMinAddr <= sm_i->mSummaryMaxAddr);
- if (aSecMap->mSummaryMinAddr < sm_i->mSummaryMaxAddr) {
- // |aSecMap| needs to be inserted immediately before mSecMaps[i].
- break;
- }
- }
- MOZ_ASSERT(i <= num_secMaps);
- if (i == num_secMaps) {
- // It goes at the end.
- mSecMaps.push_back(aSecMap);
- } else {
- std::vector<SecMap*>::iterator iter = mSecMaps.begin() + i;
- mSecMaps.insert(iter, aSecMap);
- }
- char buf[100];
- SprintfLiteral(buf, "AddSecMap: now have %d SecMaps\n",
- (int)mSecMaps.size());
- buf[sizeof(buf)-1] = 0;
- mLog(buf);
- }
-
- // Remove and delete any SecMaps in the mapping, that intersect
- // with the specified address range.
- void RemoveSecMapsInRange(uintptr_t avma_min, uintptr_t avma_max) {
- MOZ_ASSERT(avma_min <= avma_max);
- size_t num_secMaps = mSecMaps.size();
- if (num_secMaps > 0) {
- intptr_t i;
- // Iterate from end to start over the vector, so as to ensure
- // that the special case where |avma_min| and |avma_max| denote
- // the entire address space, can be completed in time proportional
- // to the number of elements in the map.
- for (i = (intptr_t)num_secMaps-1; i >= 0; i--) {
- SecMap* sm_i = mSecMaps[i];
- if (sm_i->mSummaryMaxAddr < avma_min ||
- avma_max < sm_i->mSummaryMinAddr) {
- // There's no overlap. Move on.
- continue;
- }
- // We need to remove mSecMaps[i] and slide all those above it
- // downwards to cover the hole.
- mSecMaps.erase(mSecMaps.begin() + i);
- delete sm_i;
- }
- }
- }
-
- // Return the number of currently contained SecMaps.
- size_t CountSecMaps() {
- return mSecMaps.size();
- }
-
- // Assess heuristically whether the given address is an instruction
- // immediately following a call instruction.
- // RUNS IN NO-MALLOC CONTEXT
- bool MaybeIsReturnPoint(TaggedUWord aInstrAddr, SegArray* aSegArray) {
- if (!aInstrAddr.Valid()) {
- return false;
- }
-
- uintptr_t ia = aInstrAddr.Value();
-
- // Assume that nobody would be crazy enough to put code in the
- // first or last page.
- if (ia < 4096 || ((uintptr_t)(-ia)) < 4096) {
- return false;
- }
-
- // See if it falls inside a known r-x mapped area. Poking around
- // outside such places risks segfaulting.
- uintptr_t insns_min, insns_max;
- bool b = aSegArray->getBoundingCodeSegment(&insns_min, &insns_max, ia);
- if (!b) {
- // no code (that we know about) at this address
- return false;
- }
-
- // |ia| falls within an r-x range. So we can
- // safely poke around in [insns_min, insns_max].
-
-#if defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
- // Is the previous instruction recognisably a CALL? This is
- // common for the 32- and 64-bit versions, except for the
- // simm32(%rip) case, which is 64-bit only.
- //
- // For all other cases, the 64 bit versions are either identical
- // to the 32 bit versions, or have an optional extra leading REX.W
- // byte (0x41). Since the extra 0x41 is optional we have to
- // ignore it, with the convenient result that the same matching
- // logic works for both 32- and 64-bit cases.
-
- uint8_t* p = (uint8_t*)ia;
-# if defined(LUL_ARCH_x64)
- // CALL simm32(%rip) == FF15 simm32
- if (ia - 6 >= insns_min && p[-6] == 0xFF && p[-5] == 0x15) {
- return true;
- }
-# endif
- // CALL rel32 == E8 rel32 (both 32- and 64-bit)
- if (ia - 5 >= insns_min && p[-5] == 0xE8) {
- return true;
- }
- // CALL *%eax .. CALL *%edi == FFD0 .. FFD7 (32-bit)
- // CALL *%rax .. CALL *%rdi == FFD0 .. FFD7 (64-bit)
- // CALL *%r8 .. CALL *%r15 == 41FFD0 .. 41FFD7 (64-bit)
- if (ia - 2 >= insns_min &&
- p[-2] == 0xFF && p[-1] >= 0xD0 && p[-1] <= 0xD7) {
- return true;
- }
- // Almost all of the remaining cases that occur in practice are
- // of the form CALL *simm8(reg) or CALL *simm32(reg).
- //
- // 64 bit cases:
- //
- // call *simm8(%rax) FF50 simm8
- // call *simm8(%rcx) FF51 simm8
- // call *simm8(%rdx) FF52 simm8
- // call *simm8(%rbx) FF53 simm8
- // call *simm8(%rsp) FF5424 simm8
- // call *simm8(%rbp) FF55 simm8
- // call *simm8(%rsi) FF56 simm8
- // call *simm8(%rdi) FF57 simm8
- //
- // call *simm8(%r8) 41FF50 simm8
- // call *simm8(%r9) 41FF51 simm8
- // call *simm8(%r10) 41FF52 simm8
- // call *simm8(%r11) 41FF53 simm8
- // call *simm8(%r12) 41FF5424 simm8
- // call *simm8(%r13) 41FF55 simm8
- // call *simm8(%r14) 41FF56 simm8
- // call *simm8(%r15) 41FF57 simm8
- //
- // call *simm32(%rax) FF90 simm32
- // call *simm32(%rcx) FF91 simm32
- // call *simm32(%rdx) FF92 simm32
- // call *simm32(%rbx) FF93 simm32
- // call *simm32(%rsp) FF9424 simm32
- // call *simm32(%rbp) FF95 simm32
- // call *simm32(%rsi) FF96 simm32
- // call *simm32(%rdi) FF97 simm32
- //
- // call *simm32(%r8) 41FF90 simm32
- // call *simm32(%r9) 41FF91 simm32
- // call *simm32(%r10) 41FF92 simm32
- // call *simm32(%r11) 41FF93 simm32
- // call *simm32(%r12) 41FF9424 simm32
- // call *simm32(%r13) 41FF95 simm32
- // call *simm32(%r14) 41FF96 simm32
- // call *simm32(%r15) 41FF97 simm32
- //
- // 32 bit cases:
- //
- // call *simm8(%eax) FF50 simm8
- // call *simm8(%ecx) FF51 simm8
- // call *simm8(%edx) FF52 simm8
- // call *simm8(%ebx) FF53 simm8
- // call *simm8(%esp) FF5424 simm8
- // call *simm8(%ebp) FF55 simm8
- // call *simm8(%esi) FF56 simm8
- // call *simm8(%edi) FF57 simm8
- //
- // call *simm32(%eax) FF90 simm32
- // call *simm32(%ecx) FF91 simm32
- // call *simm32(%edx) FF92 simm32
- // call *simm32(%ebx) FF93 simm32
- // call *simm32(%esp) FF9424 simm32
- // call *simm32(%ebp) FF95 simm32
- // call *simm32(%esi) FF96 simm32
- // call *simm32(%edi) FF97 simm32
- if (ia - 3 >= insns_min &&
- p[-3] == 0xFF &&
- (p[-2] >= 0x50 && p[-2] <= 0x57 && p[-2] != 0x54)) {
- // imm8 case, not including %esp/%rsp
- return true;
- }
- if (ia - 4 >= insns_min &&
- p[-4] == 0xFF && p[-3] == 0x54 && p[-2] == 0x24) {
- // imm8 case for %esp/%rsp
- return true;
- }
- if (ia - 6 >= insns_min &&
- p[-6] == 0xFF &&
- (p[-5] >= 0x90 && p[-5] <= 0x97 && p[-5] != 0x94)) {
- // imm32 case, not including %esp/%rsp
- return true;
- }
- if (ia - 7 >= insns_min &&
- p[-7] == 0xFF && p[-6] == 0x94 && p[-5] == 0x24) {
- // imm32 case for %esp/%rsp
- return true;
- }
-
-#elif defined(LUL_ARCH_arm)
- if (ia & 1) {
- uint16_t w0 = 0, w1 = 0;
- // The return address has its lowest bit set, indicating a return
- // to Thumb code.
- ia &= ~(uintptr_t)1;
- if (ia - 2 >= insns_min && ia - 1 <= insns_max) {
- w1 = *(uint16_t*)(ia - 2);
- }
- if (ia - 4 >= insns_min && ia - 1 <= insns_max) {
- w0 = *(uint16_t*)(ia - 4);
- }
- // Is it a 32-bit Thumb call insn?
- // BL simm26 (Encoding T1)
- if ((w0 & 0xF800) == 0xF000 && (w1 & 0xC000) == 0xC000) {
- return true;
- }
- // BLX simm26 (Encoding T2)
- if ((w0 & 0xF800) == 0xF000 && (w1 & 0xC000) == 0xC000) {
- return true;
- }
- // Other possible cases:
- // (BLX Rm, Encoding T1).
- // BLX Rm (encoding T1, 16 bit, inspect w1 and ignore w0.)
- // 0100 0111 1 Rm 000
- } else {
- // Returning to ARM code.
- uint32_t a0 = 0;
- if ((ia & 3) == 0 && ia - 4 >= insns_min && ia - 1 <= insns_max) {
- a0 = *(uint32_t*)(ia - 4);
- }
- // Leading E forces unconditional only -- fix. It could be
- // anything except F, which is the deprecated NV code.
- // BL simm26 (Encoding A1)
- if ((a0 & 0xFF000000) == 0xEB000000) {
- return true;
- }
- // Other possible cases:
- // BLX simm26 (Encoding A2)
- //if ((a0 & 0xFE000000) == 0xFA000000)
- // return true;
- // BLX (register) (A1): BLX <c> <Rm>
- // cond 0001 0010 1111 1111 1111 0011 Rm
- // again, cond can be anything except NV (0xF)
- }
-
-#else
-# error "Unsupported arch"
-#endif
-
- // Not an insn we recognise.
- return false;
- }
-
- private:
- // RUNS IN NO-MALLOC CONTEXT
- SecMap* FindSecMap(uintptr_t ia) {
- // Binary search mSecMaps to find one that brackets |ia|.
- // lo and hi need to be signed, else the loop termination tests
- // don't work properly.
- long int lo = 0;
- long int hi = (long int)mSecMaps.size() - 1;
- while (true) {
- // current unsearched space is from lo to hi, inclusive.
- if (lo > hi) {
- // not found
- return nullptr;
- }
- long int mid = lo + ((hi - lo) / 2);
- SecMap* mid_secMap = mSecMaps[mid];
- uintptr_t mid_minAddr = mid_secMap->mSummaryMinAddr;
- uintptr_t mid_maxAddr = mid_secMap->mSummaryMaxAddr;
- if (ia < mid_minAddr) { hi = mid-1; continue; }
- if (ia > mid_maxAddr) { lo = mid+1; continue; }
- MOZ_ASSERT(mid_minAddr <= ia && ia <= mid_maxAddr);
- return mid_secMap;
- }
- // NOTREACHED
- }
-
- private:
- // sorted array of per-object ranges, non overlapping, non empty
- std::vector<SecMap*> mSecMaps;
-
- // a logging sink, for debugging.
- void (*mLog)(const char*);
-};
-
-
-////////////////////////////////////////////////////////////////
-// LUL //
-////////////////////////////////////////////////////////////////
-
-#define LUL_LOG(_str) \
- do { \
- char buf[200]; \
- SprintfLiteral(buf, \
- "LUL: pid %d tid %d lul-obj %p: %s", \
- getpid(), gettid(), this, (_str)); \
- buf[sizeof(buf)-1] = 0; \
- mLog(buf); \
- } while (0)
-
-LUL::LUL(void (*aLog)(const char*))
- : mLog(aLog)
- , mAdminMode(true)
- , mAdminThreadId(gettid())
- , mPriMap(new PriMap(aLog))
- , mSegArray(new SegArray())
- , mUSU(new UniqueStringUniverse())
-{
- LUL_LOG("LUL::LUL: Created object");
-}
-
-
-LUL::~LUL()
-{
- LUL_LOG("LUL::~LUL: Destroyed object");
- delete mPriMap;
- delete mSegArray;
- mLog = nullptr;
- delete mUSU;
-}
-
-
-void
-LUL::MaybeShowStats()
-{
- // This is racey in the sense that it can't guarantee that
- // n_new == n_new_Context + n_new_CFI + n_new_Scanned
- // if it should happen that mStats is updated by some other thread
- // in between computation of n_new and n_new_{Context,CFI,Scanned}.
- // But it's just stats printing, so we don't really care.
- uint32_t n_new = mStats - mStatsPrevious;
- if (n_new >= 5000) {
- uint32_t n_new_Context = mStats.mContext - mStatsPrevious.mContext;
- uint32_t n_new_CFI = mStats.mCFI - mStatsPrevious.mCFI;
- uint32_t n_new_Scanned = mStats.mScanned - mStatsPrevious.mScanned;
- mStatsPrevious = mStats;
- char buf[200];
- SprintfLiteral(buf,
- "LUL frame stats: TOTAL %5u"
- " CTX %4u CFI %4u SCAN %4u",
- n_new, n_new_Context, n_new_CFI, n_new_Scanned);
- buf[sizeof(buf)-1] = 0;
- mLog(buf);
- }
-}
-
-
-void
-LUL::EnableUnwinding()
-{
- LUL_LOG("LUL::EnableUnwinding");
- // Don't assert for Admin mode here. That is, tolerate a call here
- // if we are already in Unwinding mode.
- MOZ_ASSERT(gettid() == mAdminThreadId);
-
- mAdminMode = false;
-}
-
-
-void
-LUL::NotifyAfterMap(uintptr_t aRXavma, size_t aSize,
- const char* aFileName, const void* aMappedImage)
-{
- MOZ_ASSERT(mAdminMode);
- MOZ_ASSERT(gettid() == mAdminThreadId);
-
- mLog(":\n");
- char buf[200];
- SprintfLiteral(buf, "NotifyMap %llx %llu %s\n",
- (unsigned long long int)aRXavma, (unsigned long long int)aSize,
- aFileName);
- buf[sizeof(buf)-1] = 0;
- mLog(buf);
-
- // Ignore obviously-stupid notifications.
- if (aSize > 0) {
-
- // Here's a new mapping, for this object.
- SecMap* smap = new SecMap(mLog);
-
- // Read CFI or EXIDX unwind data into |smap|.
- if (!aMappedImage) {
- (void)lul::ReadSymbolData(
- string(aFileName), std::vector<string>(), smap,
- (void*)aRXavma, aSize, mUSU, mLog);
- } else {
- (void)lul::ReadSymbolDataInternal(
- (const uint8_t*)aMappedImage,
- string(aFileName), std::vector<string>(), smap,
- (void*)aRXavma, aSize, mUSU, mLog);
- }
-
- mLog("NotifyMap .. preparing entries\n");
-
- smap->PrepareRuleSets(aRXavma, aSize);
-
- SprintfLiteral(buf,
- "NotifyMap got %lld entries\n", (long long int)smap->Size());
- buf[sizeof(buf)-1] = 0;
- mLog(buf);
-
- // Add it to the primary map (the top level set of mapped objects).
- mPriMap->AddSecMap(smap);
-
- // Tell the segment array about the mapping, so that the stack
- // scan and __kernel_syscall mechanisms know where valid code is.
- mSegArray->add(aRXavma, aRXavma + aSize - 1, true);
- }
-}
-
-
-void
-LUL::NotifyExecutableArea(uintptr_t aRXavma, size_t aSize)
-{
- MOZ_ASSERT(mAdminMode);
- MOZ_ASSERT(gettid() == mAdminThreadId);
-
- mLog(":\n");
- char buf[200];
- SprintfLiteral(buf, "NotifyExecutableArea %llx %llu\n",
- (unsigned long long int)aRXavma, (unsigned long long int)aSize);
- buf[sizeof(buf)-1] = 0;
- mLog(buf);
-
- // Ignore obviously-stupid notifications.
- if (aSize > 0) {
- // Tell the segment array about the mapping, so that the stack
- // scan and __kernel_syscall mechanisms know where valid code is.
- mSegArray->add(aRXavma, aRXavma + aSize - 1, true);
- }
-}
-
-
-void
-LUL::NotifyBeforeUnmap(uintptr_t aRXavmaMin, uintptr_t aRXavmaMax)
-{
- MOZ_ASSERT(mAdminMode);
- MOZ_ASSERT(gettid() == mAdminThreadId);
-
- mLog(":\n");
- char buf[100];
- SprintfLiteral(buf, "NotifyUnmap %016llx-%016llx\n",
- (unsigned long long int)aRXavmaMin,
- (unsigned long long int)aRXavmaMax);
- buf[sizeof(buf)-1] = 0;
- mLog(buf);
-
- MOZ_ASSERT(aRXavmaMin <= aRXavmaMax);
-
- // Remove from the primary map, any secondary maps that intersect
- // with the address range. Also delete the secondary maps.
- mPriMap->RemoveSecMapsInRange(aRXavmaMin, aRXavmaMax);
-
- // Tell the segment array that the address range no longer
- // contains valid code.
- mSegArray->add(aRXavmaMin, aRXavmaMax, false);
-
- SprintfLiteral(buf, "NotifyUnmap: now have %d SecMaps\n",
- (int)mPriMap->CountSecMaps());
- buf[sizeof(buf)-1] = 0;
- mLog(buf);
-}
-
-
-size_t
-LUL::CountMappings()
-{
- MOZ_ASSERT(mAdminMode);
- MOZ_ASSERT(gettid() == mAdminThreadId);
-
- return mPriMap->CountSecMaps();
-}
-
-
-// RUNS IN NO-MALLOC CONTEXT
-static
-TaggedUWord DerefTUW(TaggedUWord aAddr, const StackImage* aStackImg)
-{
- if (!aAddr.Valid()) {
- return TaggedUWord();
- }
-
- // Lower limit check. |aAddr.Value()| is the lowest requested address
- // and |aStackImg->mStartAvma| is the lowest address we actually have,
- // so the comparison is straightforward.
- if (aAddr.Value() < aStackImg->mStartAvma) {
- return TaggedUWord();
- }
-
- // Upper limit check. We must compute the highest requested address
- // and the highest address we actually have, but being careful to
- // avoid overflow. In particular if |aAddr| is 0xFFF...FFF or the
- // 3/7 values below that, then we will get overflow. See bug #1245477.
- typedef CheckedInt<uintptr_t> CheckedUWord;
- CheckedUWord highest_requested_plus_one
- = CheckedUWord(aAddr.Value()) + CheckedUWord(sizeof(uintptr_t));
- CheckedUWord highest_available_plus_one
- = CheckedUWord(aStackImg->mStartAvma) + CheckedUWord(aStackImg->mLen);
- if (!highest_requested_plus_one.isValid() // overflow?
- || !highest_available_plus_one.isValid() // overflow?
- || (highest_requested_plus_one.value()
- > highest_available_plus_one.value())) { // in range?
- return TaggedUWord();
- }
-
- return TaggedUWord(*(uintptr_t*)(aStackImg->mContents + aAddr.Value()
- - aStackImg->mStartAvma));
-}
-
-// RUNS IN NO-MALLOC CONTEXT
-static
-TaggedUWord EvaluateReg(int16_t aReg, const UnwindRegs* aOldRegs,
- TaggedUWord aCFA)
-{
- switch (aReg) {
- case DW_REG_CFA: return aCFA;
-#if defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
- case DW_REG_INTEL_XBP: return aOldRegs->xbp;
- case DW_REG_INTEL_XSP: return aOldRegs->xsp;
- case DW_REG_INTEL_XIP: return aOldRegs->xip;
-#elif defined(LUL_ARCH_arm)
- case DW_REG_ARM_R7: return aOldRegs->r7;
- case DW_REG_ARM_R11: return aOldRegs->r11;
- case DW_REG_ARM_R12: return aOldRegs->r12;
- case DW_REG_ARM_R13: return aOldRegs->r13;
- case DW_REG_ARM_R14: return aOldRegs->r14;
- case DW_REG_ARM_R15: return aOldRegs->r15;
-#else
-# error "Unsupported arch"
-#endif
- default: MOZ_ASSERT(0); return TaggedUWord();
- }
-}
-
-// RUNS IN NO-MALLOC CONTEXT
-// See prototype for comment.
-TaggedUWord EvaluatePfxExpr(int32_t start,
- const UnwindRegs* aOldRegs,
- TaggedUWord aCFA, const StackImage* aStackImg,
- const vector<PfxInstr>& aPfxInstrs)
-{
- // A small evaluation stack, and a stack pointer, which points to
- // the highest numbered in-use element.
- const int N_STACK = 10;
- TaggedUWord stack[N_STACK];
- int stackPointer = -1;
- for (int i = 0; i < N_STACK; i++)
- stack[i] = TaggedUWord();
-
-# define PUSH(_tuw) \
- do { \
- if (stackPointer >= N_STACK-1) goto fail; /* overflow */ \
- stack[++stackPointer] = (_tuw); \
- } while (0)
-
-# define POP(_lval) \
- do { \
- if (stackPointer < 0) goto fail; /* underflow */ \
- _lval = stack[stackPointer--]; \
- } while (0)
-
- // Cursor in the instruction sequence.
- size_t curr = start + 1;
-
- // Check the start point is sane.
- size_t nInstrs = aPfxInstrs.size();
- if (start < 0 || (size_t)start >= nInstrs)
- goto fail;
-
- {
- // The instruction sequence must start with PX_Start. If not,
- // something is seriously wrong.
- PfxInstr first = aPfxInstrs[start];
- if (first.mOpcode != PX_Start)
- goto fail;
-
- // Push the CFA on the stack to start with (or not), as required by
- // the original DW_OP_*expression* CFI.
- if (first.mOperand != 0)
- PUSH(aCFA);
- }
-
- while (true) {
- if (curr >= nInstrs)
- goto fail; // ran off the end of the sequence
-
- PfxInstr pfxi = aPfxInstrs[curr++];
- if (pfxi.mOpcode == PX_End)
- break; // we're done
-
- switch (pfxi.mOpcode) {
- case PX_Start:
- // This should appear only at the start of the sequence.
- goto fail;
- case PX_End:
- // We just took care of that, so we shouldn't see it again.
- MOZ_ASSERT(0);
- goto fail;
- case PX_SImm32:
- PUSH(TaggedUWord((intptr_t)pfxi.mOperand));
- break;
- case PX_DwReg: {
- DW_REG_NUMBER reg = (DW_REG_NUMBER)pfxi.mOperand;
- MOZ_ASSERT(reg != DW_REG_CFA);
- PUSH(EvaluateReg(reg, aOldRegs, aCFA));
- break;
- }
- case PX_Deref: {
- TaggedUWord addr;
- POP(addr);
- PUSH(DerefTUW(addr, aStackImg));
- break;
- }
- case PX_Add: {
- TaggedUWord x, y;
- POP(x); POP(y); PUSH(y + x);
- break;
- }
- case PX_Sub: {
- TaggedUWord x, y;
- POP(x); POP(y); PUSH(y - x);
- break;
- }
- case PX_And: {
- TaggedUWord x, y;
- POP(x); POP(y); PUSH(y & x);
- break;
- }
- case PX_Or: {
- TaggedUWord x, y;
- POP(x); POP(y); PUSH(y | x);
- break;
- }
- case PX_CmpGES: {
- TaggedUWord x, y;
- POP(x); POP(y); PUSH(y.CmpGEs(x));
- break;
- }
- case PX_Shl: {
- TaggedUWord x, y;
- POP(x); POP(y); PUSH(y << x);
- break;
- }
- default:
- MOZ_ASSERT(0);
- goto fail;
- }
- } // while (true)
-
- // Evaluation finished. The top value on the stack is the result.
- if (stackPointer >= 0) {
- return stack[stackPointer];
- }
- // Else fall through
-
- fail:
- return TaggedUWord();
-
-# undef PUSH
-# undef POP
-}
-
-// RUNS IN NO-MALLOC CONTEXT
-TaggedUWord LExpr::EvaluateExpr(const UnwindRegs* aOldRegs,
- TaggedUWord aCFA, const StackImage* aStackImg,
- const vector<PfxInstr>* aPfxInstrs) const
-{
- switch (mHow) {
- case UNKNOWN:
- return TaggedUWord();
- case NODEREF: {
- TaggedUWord tuw = EvaluateReg(mReg, aOldRegs, aCFA);
- tuw = tuw + TaggedUWord((intptr_t)mOffset);
- return tuw;
- }
- case DEREF: {
- TaggedUWord tuw = EvaluateReg(mReg, aOldRegs, aCFA);
- tuw = tuw + TaggedUWord((intptr_t)mOffset);
- return DerefTUW(tuw, aStackImg);
- }
- case PFXEXPR: {
- MOZ_ASSERT(aPfxInstrs);
- if (!aPfxInstrs) {
- return TaggedUWord();
- }
- return EvaluatePfxExpr(mOffset, aOldRegs, aCFA, aStackImg, *aPfxInstrs);
- }
- default:
- MOZ_ASSERT(0);
- return TaggedUWord();
- }
-}
-
-// RUNS IN NO-MALLOC CONTEXT
-static
-void UseRuleSet(/*MOD*/UnwindRegs* aRegs,
- const StackImage* aStackImg, const RuleSet* aRS,
- const vector<PfxInstr>* aPfxInstrs)
-{
- // Take a copy of regs, since we'll need to refer to the old values
- // whilst computing the new ones.
- UnwindRegs old_regs = *aRegs;
-
- // Mark all the current register values as invalid, so that the
- // caller can see, on our return, which ones have been computed
- // anew. If we don't even manage to compute a new PC value, then
- // the caller will have to abandon the unwind.
- // FIXME: Create and use instead: aRegs->SetAllInvalid();
-#if defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
- aRegs->xbp = TaggedUWord();
- aRegs->xsp = TaggedUWord();
- aRegs->xip = TaggedUWord();
-#elif defined(LUL_ARCH_arm)
- aRegs->r7 = TaggedUWord();
- aRegs->r11 = TaggedUWord();
- aRegs->r12 = TaggedUWord();
- aRegs->r13 = TaggedUWord();
- aRegs->r14 = TaggedUWord();
- aRegs->r15 = TaggedUWord();
-#else
-# error "Unsupported arch"
-#endif
-
- // This is generally useful.
- const TaggedUWord inval = TaggedUWord();
-
- // First, compute the CFA.
- TaggedUWord cfa
- = aRS->mCfaExpr.EvaluateExpr(&old_regs,
- inval/*old cfa*/, aStackImg, aPfxInstrs);
-
- // If we didn't manage to compute the CFA, well .. that's ungood,
- // but keep going anyway. It'll be OK provided none of the register
- // value rules mention the CFA. In any case, compute the new values
- // for each register that we're tracking.
-
-#if defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
- aRegs->xbp
- = aRS->mXbpExpr.EvaluateExpr(&old_regs, cfa, aStackImg, aPfxInstrs);
- aRegs->xsp
- = aRS->mXspExpr.EvaluateExpr(&old_regs, cfa, aStackImg, aPfxInstrs);
- aRegs->xip
- = aRS->mXipExpr.EvaluateExpr(&old_regs, cfa, aStackImg, aPfxInstrs);
-#elif defined(LUL_ARCH_arm)
- aRegs->r7
- = aRS->mR7expr .EvaluateExpr(&old_regs, cfa, aStackImg, aPfxInstrs);
- aRegs->r11
- = aRS->mR11expr.EvaluateExpr(&old_regs, cfa, aStackImg, aPfxInstrs);
- aRegs->r12
- = aRS->mR12expr.EvaluateExpr(&old_regs, cfa, aStackImg, aPfxInstrs);
- aRegs->r13
- = aRS->mR13expr.EvaluateExpr(&old_regs, cfa, aStackImg, aPfxInstrs);
- aRegs->r14
- = aRS->mR14expr.EvaluateExpr(&old_regs, cfa, aStackImg, aPfxInstrs);
- aRegs->r15
- = aRS->mR15expr.EvaluateExpr(&old_regs, cfa, aStackImg, aPfxInstrs);
-#else
-# error "Unsupported arch"
-#endif
-
- // We're done. Any regs for which we didn't manage to compute a
- // new value will now be marked as invalid.
-}
-
-// RUNS IN NO-MALLOC CONTEXT
-void
-LUL::Unwind(/*OUT*/uintptr_t* aFramePCs,
- /*OUT*/uintptr_t* aFrameSPs,
- /*OUT*/size_t* aFramesUsed,
- /*OUT*/size_t* aScannedFramesAcquired,
- size_t aFramesAvail,
- size_t aScannedFramesAllowed,
- UnwindRegs* aStartRegs, StackImage* aStackImg)
-{
- MOZ_ASSERT(!mAdminMode);
-
- /////////////////////////////////////////////////////////
- // BEGIN UNWIND
-
- *aFramesUsed = 0;
-
- UnwindRegs regs = *aStartRegs;
- TaggedUWord last_valid_sp = TaggedUWord();
-
- // Stack-scan control
- unsigned int n_scanned_frames = 0; // # s-s frames recovered so far
- static const int NUM_SCANNED_WORDS = 50; // max allowed scan length
-
- while (true) {
-
- if (DEBUG_MAIN) {
- char buf[300];
- mLog("\n");
-#if defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
- SprintfLiteral(buf,
- "LoopTop: rip %d/%llx rsp %d/%llx rbp %d/%llx\n",
- (int)regs.xip.Valid(), (unsigned long long int)regs.xip.Value(),
- (int)regs.xsp.Valid(), (unsigned long long int)regs.xsp.Value(),
- (int)regs.xbp.Valid(), (unsigned long long int)regs.xbp.Value());
- buf[sizeof(buf)-1] = 0;
- mLog(buf);
-#elif defined(LUL_ARCH_arm)
- SprintfLiteral(buf,
- "LoopTop: r15 %d/%llx r7 %d/%llx r11 %d/%llx"
- " r12 %d/%llx r13 %d/%llx r14 %d/%llx\n",
- (int)regs.r15.Valid(), (unsigned long long int)regs.r15.Value(),
- (int)regs.r7.Valid(), (unsigned long long int)regs.r7.Value(),
- (int)regs.r11.Valid(), (unsigned long long int)regs.r11.Value(),
- (int)regs.r12.Valid(), (unsigned long long int)regs.r12.Value(),
- (int)regs.r13.Valid(), (unsigned long long int)regs.r13.Value(),
- (int)regs.r14.Valid(), (unsigned long long int)regs.r14.Value());
- buf[sizeof(buf)-1] = 0;
- mLog(buf);
-#else
-# error "Unsupported arch"
-#endif
- }
-
-#if defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
- TaggedUWord ia = regs.xip;
- TaggedUWord sp = regs.xsp;
-#elif defined(LUL_ARCH_arm)
- TaggedUWord ia = (*aFramesUsed == 0 ? regs.r15 : regs.r14);
- TaggedUWord sp = regs.r13;
-#else
-# error "Unsupported arch"
-#endif
-
- if (*aFramesUsed >= aFramesAvail) {
- break;
- }
-
- // If we don't have a valid value for the PC, give up.
- if (!ia.Valid()) {
- break;
- }
-
- // If this is the innermost frame, record the SP value, which
- // presumably is valid. If this isn't the innermost frame, and we
- // have a valid SP value, check that its SP value isn't less that
- // the one we've seen so far, so as to catch potential SP value
- // cycles.
- if (*aFramesUsed == 0) {
- last_valid_sp = sp;
- } else {
- MOZ_ASSERT(last_valid_sp.Valid());
- if (sp.Valid()) {
- if (sp.Value() < last_valid_sp.Value()) {
- // Hmm, SP going in the wrong direction. Let's stop.
- break;
- }
- // Remember where we got to.
- last_valid_sp = sp;
- }
- }
-
- // For the innermost frame, the IA value is what we need. For all
- // other frames, it's actually the return address, so back up one
- // byte so as to get it into the calling instruction.
- aFramePCs[*aFramesUsed] = ia.Value() - (*aFramesUsed == 0 ? 0 : 1);
- aFrameSPs[*aFramesUsed] = sp.Valid() ? sp.Value() : 0;
- (*aFramesUsed)++;
-
- // Find the RuleSet for the current IA, if any. This will also
- // query the backing (secondary) maps if it isn't found in the
- // thread-local cache.
-
- // If this isn't the innermost frame, back up into the calling insn.
- if (*aFramesUsed > 1) {
- ia = ia + TaggedUWord((uintptr_t)(-1));
- }
-
- pair<const RuleSet*, const vector<PfxInstr>*> ruleset_and_pfxinstrs
- = mPriMap->Lookup(ia.Value());
- const RuleSet* ruleset = ruleset_and_pfxinstrs.first;
- const vector<PfxInstr>* pfxinstrs = ruleset_and_pfxinstrs.second;
-
- if (DEBUG_MAIN) {
- char buf[100];
- SprintfLiteral(buf, "ruleset for 0x%llx = %p\n",
- (unsigned long long int)ia.Value(), ruleset);
- buf[sizeof(buf)-1] = 0;
- mLog(buf);
- }
-
- /////////////////////////////////////////////
- ////
- // On 32 bit x86-linux, syscalls are often done via the VDSO
- // function __kernel_vsyscall, which doesn't have a corresponding
- // object that we can read debuginfo from. That effectively kills
- // off all stack traces for threads blocked in syscalls. Hence
- // special-case by looking at the code surrounding the program
- // counter.
- //
- // 0xf7757420 <__kernel_vsyscall+0>: push %ecx
- // 0xf7757421 <__kernel_vsyscall+1>: push %edx
- // 0xf7757422 <__kernel_vsyscall+2>: push %ebp
- // 0xf7757423 <__kernel_vsyscall+3>: mov %esp,%ebp
- // 0xf7757425 <__kernel_vsyscall+5>: sysenter
- // 0xf7757427 <__kernel_vsyscall+7>: nop
- // 0xf7757428 <__kernel_vsyscall+8>: nop
- // 0xf7757429 <__kernel_vsyscall+9>: nop
- // 0xf775742a <__kernel_vsyscall+10>: nop
- // 0xf775742b <__kernel_vsyscall+11>: nop
- // 0xf775742c <__kernel_vsyscall+12>: nop
- // 0xf775742d <__kernel_vsyscall+13>: nop
- // 0xf775742e <__kernel_vsyscall+14>: int $0x80
- // 0xf7757430 <__kernel_vsyscall+16>: pop %ebp
- // 0xf7757431 <__kernel_vsyscall+17>: pop %edx
- // 0xf7757432 <__kernel_vsyscall+18>: pop %ecx
- // 0xf7757433 <__kernel_vsyscall+19>: ret
- //
- // In cases where the sampled thread is blocked in a syscall, its
- // program counter will point at "pop %ebp". Hence we look for
- // the sequence "int $0x80; pop %ebp; pop %edx; pop %ecx; ret", and
- // the corresponding register-recovery actions are:
- // new_ebp = *(old_esp + 0)
- // new eip = *(old_esp + 12)
- // new_esp = old_esp + 16
- //
- // It may also be the case that the program counter points two
- // nops before the "int $0x80", viz, is __kernel_vsyscall+12, in
- // the case where the syscall has been restarted but the thread
- // hasn't been rescheduled. The code below doesn't handle that;
- // it could easily be made to.
- //
-#if defined(LUL_PLAT_x86_android) || defined(LUL_PLAT_x86_linux)
- if (!ruleset && *aFramesUsed == 1 && ia.Valid() && sp.Valid()) {
- uintptr_t insns_min, insns_max;
- uintptr_t eip = ia.Value();
- bool b = mSegArray->getBoundingCodeSegment(&insns_min, &insns_max, eip);
- if (b && eip - 2 >= insns_min && eip + 3 <= insns_max) {
- uint8_t* eipC = (uint8_t*)eip;
- if (eipC[-2] == 0xCD && eipC[-1] == 0x80 && eipC[0] == 0x5D &&
- eipC[1] == 0x5A && eipC[2] == 0x59 && eipC[3] == 0xC3) {
- TaggedUWord sp_plus_0 = sp;
- TaggedUWord sp_plus_12 = sp;
- TaggedUWord sp_plus_16 = sp;
- sp_plus_12 = sp_plus_12 + TaggedUWord(12);
- sp_plus_16 = sp_plus_16 + TaggedUWord(16);
- TaggedUWord new_ebp = DerefTUW(sp_plus_0, aStackImg);
- TaggedUWord new_eip = DerefTUW(sp_plus_12, aStackImg);
- TaggedUWord new_esp = sp_plus_16;
- if (new_ebp.Valid() && new_eip.Valid() && new_esp.Valid()) {
- regs.xbp = new_ebp;
- regs.xip = new_eip;
- regs.xsp = new_esp;
- continue;
- }
- }
- }
- }
-#endif
- ////
- /////////////////////////////////////////////
-
- // So, do we have a ruleset for this address? If so, use it now.
- if (ruleset) {
-
- if (DEBUG_MAIN) {
- ruleset->Print(mLog); mLog("\n");
- }
- // Use the RuleSet to compute the registers for the previous
- // frame. |regs| is modified in-place.
- UseRuleSet(&regs, aStackImg, ruleset, pfxinstrs);
-
- } else {
-
- // There's no RuleSet for the specified address, so see if
- // it's possible to get anywhere by stack-scanning.
-
- // Use stack scanning frugally.
- if (n_scanned_frames++ >= aScannedFramesAllowed) {
- break;
- }
-
- // We can't scan the stack without a valid, aligned stack pointer.
- if (!sp.IsAligned()) {
- break;
- }
-
- bool scan_succeeded = false;
- for (int i = 0; i < NUM_SCANNED_WORDS; ++i) {
- TaggedUWord aWord = DerefTUW(sp, aStackImg);
- // aWord is something we fished off the stack. It should be
- // valid, unless we overran the stack bounds.
- if (!aWord.Valid()) {
- break;
- }
-
- // Now, does aWord point inside a text section and immediately
- // after something that looks like a call instruction?
- if (mPriMap->MaybeIsReturnPoint(aWord, mSegArray)) {
- // Yes it does. Update the unwound registers heuristically,
- // using the same schemes as Breakpad does.
- scan_succeeded = true;
- (*aScannedFramesAcquired)++;
-
-#if defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
- // The same logic applies for the 32- and 64-bit cases.
- // Register names of the form xsp etc refer to (eg) esp in
- // the 32-bit case and rsp in the 64-bit case.
-# if defined(LUL_ARCH_x64)
- const int wordSize = 8;
-# else
- const int wordSize = 4;
-# endif
- // The return address -- at XSP -- will have been pushed by
- // the CALL instruction. So the caller's XSP value
- // immediately before and after that CALL instruction is the
- // word above XSP.
- regs.xsp = sp + TaggedUWord(wordSize);
-
- // aWord points at the return point, so back up one byte
- // to put it in the calling instruction.
- regs.xip = aWord + TaggedUWord((uintptr_t)(-1));
-
- // Computing a new value from the frame pointer is more tricky.
- if (regs.xbp.Valid() &&
- sp.Valid() && regs.xbp.Value() == sp.Value() - wordSize) {
- // One possibility is that the callee begins with the standard
- // preamble "push %xbp; mov %xsp, %xbp". In which case, the
- // (1) caller's XBP value will be at the word below XSP, and
- // (2) the current (callee's) XBP will point at that word:
- regs.xbp = DerefTUW(regs.xbp, aStackImg);
- } else if (regs.xbp.Valid() &&
- sp.Valid() && regs.xbp.Value() >= sp.Value() + wordSize) {
- // If that didn't work out, maybe the callee didn't change
- // XBP, so it still holds the caller's value. For that to
- // be plausible, XBP will need to have a value at least
- // higher than XSP since that holds the purported return
- // address. In which case do nothing, since XBP already
- // holds the "right" value.
- } else {
- // Mark XBP as invalid, so that subsequent unwind iterations
- // don't assume it holds valid data.
- regs.xbp = TaggedUWord();
- }
-
- // Move on to the next word up the stack
- sp = sp + TaggedUWord(wordSize);
-
-#elif defined(LUL_ARCH_arm)
- // Set all registers to be undefined, except for SP(R13) and
- // PC(R15).
-
- // aWord points either at the return point, if returning to
- // ARM code, or one insn past the return point if returning
- // to Thumb code. In both cases, aWord-2 is guaranteed to
- // fall within the calling instruction.
- regs.r15 = aWord + TaggedUWord((uintptr_t)(-2));
-
- // Make SP be the word above the location where the return
- // address was found.
- regs.r13 = sp + TaggedUWord(4);
-
- // All other regs are undefined.
- regs.r7 = regs.r11 = regs.r12 = regs.r14 = TaggedUWord();
-
- // Move on to the next word up the stack
- sp = sp + TaggedUWord(4);
-
-#else
-# error "Unknown plat"
-#endif
-
- break;
- }
-
- } // for (int i = 0; i < NUM_SCANNED_WORDS; i++)
-
- // We tried to make progress by scanning the stack, but failed.
- // So give up -- fall out of the top level unwind loop.
- if (!scan_succeeded) {
- break;
- }
- }
-
- } // top level unwind loop
-
- // END UNWIND
- /////////////////////////////////////////////////////////
-}
-
-
-////////////////////////////////////////////////////////////////
-// LUL Unit Testing //
-////////////////////////////////////////////////////////////////
-
-static const int LUL_UNIT_TEST_STACK_SIZE = 16384;
-
-// This function is innermost in the test call sequence. It uses LUL
-// to unwind, and compares the result with the sequence specified in
-// the director string. These need to agree in order for the test to
-// pass. In order not to screw up the results, this function needs
-// to have a not-very big stack frame, since we're only presenting
-// the innermost LUL_UNIT_TEST_STACK_SIZE bytes of stack to LUL, and
-// that chunk unavoidably includes the frame for this function.
-//
-// This function must not be inlined into its callers. Doing so will
-// cause the expected-vs-actual backtrace consistency checking to
-// fail. Prints summary results to |aLUL|'s logging sink and also
-// returns a boolean indicating whether or not the test passed.
-static __attribute__((noinline))
-bool GetAndCheckStackTrace(LUL* aLUL, const char* dstring)
-{
- // Get hold of the current unwind-start registers.
- UnwindRegs startRegs;
- memset(&startRegs, 0, sizeof(startRegs));
-#if defined(LUL_PLAT_x64_linux)
- volatile uintptr_t block[3];
- MOZ_ASSERT(sizeof(block) == 24);
- __asm__ __volatile__(
- "leaq 0(%%rip), %%r15" "\n\t"
- "movq %%r15, 0(%0)" "\n\t"
- "movq %%rsp, 8(%0)" "\n\t"
- "movq %%rbp, 16(%0)" "\n"
- : : "r"(&block[0]) : "memory", "r15"
- );
- startRegs.xip = TaggedUWord(block[0]);
- startRegs.xsp = TaggedUWord(block[1]);
- startRegs.xbp = TaggedUWord(block[2]);
- const uintptr_t REDZONE_SIZE = 128;
- uintptr_t start = block[1] - REDZONE_SIZE;
-#elif defined(LUL_PLAT_x86_linux) || defined(LUL_PLAT_x86_android)
- volatile uintptr_t block[3];
- MOZ_ASSERT(sizeof(block) == 12);
- __asm__ __volatile__(
- ".byte 0xE8,0x00,0x00,0x00,0x00"/*call next insn*/ "\n\t"
- "popl %%edi" "\n\t"
- "movl %%edi, 0(%0)" "\n\t"
- "movl %%esp, 4(%0)" "\n\t"
- "movl %%ebp, 8(%0)" "\n"
- : : "r"(&block[0]) : "memory", "edi"
- );
- startRegs.xip = TaggedUWord(block[0]);
- startRegs.xsp = TaggedUWord(block[1]);
- startRegs.xbp = TaggedUWord(block[2]);
- const uintptr_t REDZONE_SIZE = 0;
- uintptr_t start = block[1] - REDZONE_SIZE;
-#elif defined(LUL_PLAT_arm_android)
- volatile uintptr_t block[6];
- MOZ_ASSERT(sizeof(block) == 24);
- __asm__ __volatile__(
- "mov r0, r15" "\n\t"
- "str r0, [%0, #0]" "\n\t"
- "str r14, [%0, #4]" "\n\t"
- "str r13, [%0, #8]" "\n\t"
- "str r12, [%0, #12]" "\n\t"
- "str r11, [%0, #16]" "\n\t"
- "str r7, [%0, #20]" "\n"
- : : "r"(&block[0]) : "memory", "r0"
- );
- startRegs.r15 = TaggedUWord(block[0]);
- startRegs.r14 = TaggedUWord(block[1]);
- startRegs.r13 = TaggedUWord(block[2]);
- startRegs.r12 = TaggedUWord(block[3]);
- startRegs.r11 = TaggedUWord(block[4]);
- startRegs.r7 = TaggedUWord(block[5]);
- const uintptr_t REDZONE_SIZE = 0;
- uintptr_t start = block[1] - REDZONE_SIZE;
-#else
-# error "Unsupported platform"
-#endif
-
- // Get hold of the innermost LUL_UNIT_TEST_STACK_SIZE bytes of the
- // stack.
- uintptr_t end = start + LUL_UNIT_TEST_STACK_SIZE;
- uintptr_t ws = sizeof(void*);
- start &= ~(ws-1);
- end &= ~(ws-1);
- uintptr_t nToCopy = end - start;
- if (nToCopy > lul::N_STACK_BYTES) {
- nToCopy = lul::N_STACK_BYTES;
- }
- MOZ_ASSERT(nToCopy <= lul::N_STACK_BYTES);
- StackImage* stackImg = new StackImage();
- stackImg->mLen = nToCopy;
- stackImg->mStartAvma = start;
- if (nToCopy > 0) {
- MOZ_MAKE_MEM_DEFINED((void*)start, nToCopy);
- memcpy(&stackImg->mContents[0], (void*)start, nToCopy);
- }
-
- // Unwind it.
- const int MAX_TEST_FRAMES = 64;
- uintptr_t framePCs[MAX_TEST_FRAMES];
- uintptr_t frameSPs[MAX_TEST_FRAMES];
- size_t framesAvail = mozilla::ArrayLength(framePCs);
- size_t framesUsed = 0;
- size_t scannedFramesAllowed = 0;
- size_t scannedFramesAcquired = 0;
- aLUL->Unwind( &framePCs[0], &frameSPs[0],
- &framesUsed, &scannedFramesAcquired,
- framesAvail, scannedFramesAllowed,
- &startRegs, stackImg );
-
- delete stackImg;
-
- //if (0) {
- // // Show what we have.
- // fprintf(stderr, "Got %d frames:\n", (int)framesUsed);
- // for (size_t i = 0; i < framesUsed; i++) {
- // fprintf(stderr, " [%2d] SP %p PC %p\n",
- // (int)i, (void*)frameSPs[i], (void*)framePCs[i]);
- // }
- // fprintf(stderr, "\n");
- //}
-
- // Check to see if there's a consistent binding between digits in
- // the director string ('1' .. '8') and the PC values acquired by
- // the unwind. If there isn't, the unwinding has failed somehow.
- uintptr_t binding[8]; // binding for '1' .. binding for '8'
- memset((void*)binding, 0, sizeof(binding));
-
- // The general plan is to work backwards along the director string
- // and forwards along the framePCs array. Doing so corresponds to
- // working outwards from the innermost frame of the recursive test set.
- const char* cursor = dstring;
-
- // Find the end. This leaves |cursor| two bytes past the first
- // character we want to look at -- see comment below.
- while (*cursor) cursor++;
-
- // Counts the number of consistent frames.
- size_t nConsistent = 0;
-
- // Iterate back to the start of the director string. The starting
- // points are a bit complex. We can't use framePCs[0] because that
- // contains the PC in this frame (above). We can't use framePCs[1]
- // because that will contain the PC at return point in the recursive
- // test group (TestFn[1-8]) for their call "out" to this function,
- // GetAndCheckStackTrace. Although LUL will compute a correct
- // return address, that will not be the same return address as for a
- // recursive call out of the the function to another function in the
- // group. Hence we can only start consistency checking at
- // framePCs[2].
- //
- // To be consistent, then, we must ignore the last element in the
- // director string as that corresponds to framePCs[1]. Hence the
- // start points are: framePCs[2] and the director string 2 bytes
- // before the terminating zero.
- //
- // Also as a result of this, the number of consistent frames counted
- // will always be one less than the length of the director string
- // (not including its terminating zero).
- size_t frameIx;
- for (cursor = cursor-2, frameIx = 2;
- cursor >= dstring && frameIx < framesUsed;
- cursor--, frameIx++) {
- char c = *cursor;
- uintptr_t pc = framePCs[frameIx];
- // If this doesn't hold, the director string is ill-formed.
- MOZ_ASSERT(c >= '1' && c <= '8');
- int n = ((int)c) - ((int)'1');
- if (binding[n] == 0) {
- // There's no binding for |c| yet, so install |pc| and carry on.
- binding[n] = pc;
- nConsistent++;
- continue;
- }
- // There's a pre-existing binding for |c|. Check it's consistent.
- if (binding[n] != pc) {
- // Not consistent. Give up now.
- break;
- }
- // Consistent. Keep going.
- nConsistent++;
- }
-
- // So, did we succeed?
- bool passed = nConsistent+1 == strlen(dstring);
-
- // Show the results.
- char buf[200];
- SprintfLiteral(buf, "LULUnitTest: dstring = %s\n", dstring);
- buf[sizeof(buf)-1] = 0;
- aLUL->mLog(buf);
- SprintfLiteral(buf,
- "LULUnitTest: %d consistent, %d in dstring: %s\n",
- (int)nConsistent, (int)strlen(dstring),
- passed ? "PASS" : "FAIL");
- buf[sizeof(buf)-1] = 0;
- aLUL->mLog(buf);
-
- return passed;
-}
-
-
-// Macro magic to create a set of 8 mutually recursive functions with
-// varying frame sizes. These will recurse amongst themselves as
-// specified by |strP|, the directory string, and call
-// GetAndCheckStackTrace when the string becomes empty, passing it the
-// original value of the string. This checks the result, printing
-// results on |aLUL|'s logging sink, and also returns a boolean
-// indicating whether or not the results are acceptable (correct).
-
-#define DECL_TEST_FN(NAME) \
- bool NAME(LUL* aLUL, const char* strPorig, const char* strP);
-
-#define GEN_TEST_FN(NAME, FRAMESIZE) \
- bool NAME(LUL* aLUL, const char* strPorig, const char* strP) { \
- volatile char space[FRAMESIZE]; \
- memset((char*)&space[0], 0, sizeof(space)); \
- if (*strP == '\0') { \
- /* We've come to the end of the director string. */ \
- /* Take a stack snapshot. */ \
- return GetAndCheckStackTrace(aLUL, strPorig); \
- } else { \
- /* Recurse onwards. This is a bit subtle. The obvious */ \
- /* thing to do here is call onwards directly, from within the */ \
- /* arms of the case statement. That gives a problem in that */ \
- /* there will be multiple return points inside each function when */ \
- /* unwinding, so it will be difficult to check for consistency */ \
- /* against the director string. Instead, we make an indirect */ \
- /* call, so as to guarantee that there is only one call site */ \
- /* within each function. This does assume that the compiler */ \
- /* won't transform it back to the simple direct-call form. */ \
- /* To discourage it from doing so, the call is bracketed with */ \
- /* __asm__ __volatile__ sections so as to make it not-movable. */ \
- bool (*nextFn)(LUL*, const char*, const char*) = NULL; \
- switch (*strP) { \
- case '1': nextFn = TestFn1; break; \
- case '2': nextFn = TestFn2; break; \
- case '3': nextFn = TestFn3; break; \
- case '4': nextFn = TestFn4; break; \
- case '5': nextFn = TestFn5; break; \
- case '6': nextFn = TestFn6; break; \
- case '7': nextFn = TestFn7; break; \
- case '8': nextFn = TestFn8; break; \
- default: nextFn = TestFn8; break; \
- } \
- __asm__ __volatile__("":::"cc","memory"); \
- bool passed = nextFn(aLUL, strPorig, strP+1); \
- __asm__ __volatile__("":::"cc","memory"); \
- return passed; \
- } \
- }
-
-// The test functions are mutually recursive, so it is necessary to
-// declare them before defining them.
-DECL_TEST_FN(TestFn1)
-DECL_TEST_FN(TestFn2)
-DECL_TEST_FN(TestFn3)
-DECL_TEST_FN(TestFn4)
-DECL_TEST_FN(TestFn5)
-DECL_TEST_FN(TestFn6)
-DECL_TEST_FN(TestFn7)
-DECL_TEST_FN(TestFn8)
-
-GEN_TEST_FN(TestFn1, 123)
-GEN_TEST_FN(TestFn2, 456)
-GEN_TEST_FN(TestFn3, 789)
-GEN_TEST_FN(TestFn4, 23)
-GEN_TEST_FN(TestFn5, 47)
-GEN_TEST_FN(TestFn6, 117)
-GEN_TEST_FN(TestFn7, 1)
-GEN_TEST_FN(TestFn8, 99)
-
-
-// This starts the test sequence going. Call here to generate a
-// sequence of calls as directed by the string |dstring|. The call
-// sequence will, from its innermost frame, finish by calling
-// GetAndCheckStackTrace() and passing it |dstring|.
-// GetAndCheckStackTrace() will unwind the stack, check consistency
-// of those results against |dstring|, and print a pass/fail message
-// to aLUL's logging sink. It also updates the counters in *aNTests
-// and aNTestsPassed.
-__attribute__((noinline)) void
-TestUnw(/*OUT*/int* aNTests, /*OUT*/int*aNTestsPassed,
- LUL* aLUL, const char* dstring)
-{
- // Ensure that the stack has at least this much space on it. This
- // makes it safe to saw off the top LUL_UNIT_TEST_STACK_SIZE bytes
- // and hand it to LUL. Safe in the sense that no segfault can
- // happen because the stack is at least this big. This is all
- // somewhat dubious in the sense that a sufficiently clever compiler
- // (clang, for one) can figure out that space[] is unused and delete
- // it from the frame. Hence the somewhat elaborate hoop jumping to
- // fill it up before the call and to at least appear to use the
- // value afterwards.
- int i;
- volatile char space[LUL_UNIT_TEST_STACK_SIZE];
- for (i = 0; i < LUL_UNIT_TEST_STACK_SIZE; i++) {
- space[i] = (char)(i & 0x7F);
- }
-
- // Really run the test.
- bool passed = TestFn1(aLUL, dstring, dstring);
-
- // Appear to use space[], by visiting the value to compute some kind
- // of checksum, and then (apparently) using the checksum.
- int sum = 0;
- for (i = 0; i < LUL_UNIT_TEST_STACK_SIZE; i++) {
- // If this doesn't fool LLVM, I don't know what will.
- sum += space[i] - 3*i;
- }
- __asm__ __volatile__("" : : "r"(sum));
-
- // Update the counters.
- (*aNTests)++;
- if (passed) {
- (*aNTestsPassed)++;
- }
-}
-
-
-void
-RunLulUnitTests(/*OUT*/int* aNTests, /*OUT*/int*aNTestsPassed, LUL* aLUL)
-{
- aLUL->mLog(":\n");
- aLUL->mLog("LULUnitTest: BEGIN\n");
- *aNTests = *aNTestsPassed = 0;
- TestUnw(aNTests, aNTestsPassed, aLUL, "11111111");
- TestUnw(aNTests, aNTestsPassed, aLUL, "11222211");
- TestUnw(aNTests, aNTestsPassed, aLUL, "111222333");
- TestUnw(aNTests, aNTestsPassed, aLUL, "1212121231212331212121212121212");
- TestUnw(aNTests, aNTestsPassed, aLUL, "31415827271828325332173258");
- TestUnw(aNTests, aNTestsPassed, aLUL,
- "123456781122334455667788777777777777777777777");
- aLUL->mLog("LULUnitTest: END\n");
- aLUL->mLog(":\n");
-}
-
-
-} // namespace lul
diff --git a/tools/profiler/lul/LulMain.h b/tools/profiler/lul/LulMain.h
deleted file mode 100644
index 0916d1b26..000000000
--- a/tools/profiler/lul/LulMain.h
+++ /dev/null
@@ -1,397 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef LulMain_h
-#define LulMain_h
-
-#include "LulPlatformMacros.h"
-#include "mozilla/Atomics.h"
-
-// LUL: A Lightweight Unwind Library.
-// This file provides the end-user (external) interface for LUL.
-
-// Some comments about naming in the implementation. These are safe
-// to ignore if you are merely using LUL, but are important if you
-// hack on its internals.
-//
-// Debuginfo readers in general have tended to use the word "address"
-// to mean several different things. This sometimes makes them
-// difficult to understand and maintain. LUL tries hard to avoid
-// using the word "address" and instead uses the following more
-// precise terms:
-//
-// * SVMA ("Stated Virtual Memory Address"): this is an address of a
-// symbol (etc) as it is stated in the symbol table, or other
-// metadata, of an object. Such values are typically small and
-// start from zero or thereabouts, unless the object has been
-// prelinked.
-//
-// * AVMA ("Actual Virtual Memory Address"): this is the address of a
-// symbol (etc) in a running process, that is, once the associated
-// object has been mapped into a process. Such values are typically
-// much larger than SVMAs, since objects can get mapped arbitrarily
-// far along the address space.
-//
-// * "Bias": the difference between AVMA and SVMA for a given symbol
-// (specifically, AVMA - SVMA). The bias is always an integral
-// number of pages. Once we know the bias for a given object's
-// text section (for example), we can compute the AVMAs of all of
-// its text symbols by adding the bias to their SVMAs.
-//
-// * "Image address": typically, to read debuginfo from an object we
-// will temporarily mmap in the file so as to read symbol tables
-// etc. Addresses in this temporary mapping are called "Image
-// addresses". Note that the temporary mapping is entirely
-// unrelated to the mappings of the file that the dynamic linker
-// must perform merely in order to get the program to run. Hence
-// image addresses are unrelated to either SVMAs or AVMAs.
-
-
-namespace lul {
-
-// A machine word plus validity tag.
-class TaggedUWord {
-public:
- // RUNS IN NO-MALLOC CONTEXT
- // Construct a valid one.
- explicit TaggedUWord(uintptr_t w)
- : mValue(w)
- , mValid(true)
- {}
-
- // RUNS IN NO-MALLOC CONTEXT
- // Construct an invalid one.
- TaggedUWord()
- : mValue(0)
- , mValid(false)
- {}
-
- // RUNS IN NO-MALLOC CONTEXT
- TaggedUWord operator+(TaggedUWord rhs) const {
- return (Valid() && rhs.Valid()) ? TaggedUWord(Value() + rhs.Value())
- : TaggedUWord();
- }
-
- // RUNS IN NO-MALLOC CONTEXT
- TaggedUWord operator-(TaggedUWord rhs) const {
- return (Valid() && rhs.Valid()) ? TaggedUWord(Value() - rhs.Value())
- : TaggedUWord();
- }
-
- // RUNS IN NO-MALLOC CONTEXT
- TaggedUWord operator&(TaggedUWord rhs) const {
- return (Valid() && rhs.Valid()) ? TaggedUWord(Value() & rhs.Value())
- : TaggedUWord();
- }
-
- // RUNS IN NO-MALLOC CONTEXT
- TaggedUWord operator|(TaggedUWord rhs) const {
- return (Valid() && rhs.Valid()) ? TaggedUWord(Value() | rhs.Value())
- : TaggedUWord();
- }
-
- // RUNS IN NO-MALLOC CONTEXT
- TaggedUWord CmpGEs(TaggedUWord rhs) const {
- if (Valid() && rhs.Valid()) {
- intptr_t s1 = (intptr_t)Value();
- intptr_t s2 = (intptr_t)rhs.Value();
- return TaggedUWord(s1 >= s2 ? 1 : 0);
- }
- return TaggedUWord();
- }
-
- // RUNS IN NO-MALLOC CONTEXT
- TaggedUWord operator<<(TaggedUWord rhs) const {
- if (Valid() && rhs.Valid()) {
- uintptr_t shift = rhs.Value();
- if (shift < 8 * sizeof(uintptr_t))
- return TaggedUWord(Value() << shift);
- }
- return TaggedUWord();
- }
-
- // RUNS IN NO-MALLOC CONTEXT
- // Is equal? Note: non-validity on either side gives non-equality.
- bool operator==(TaggedUWord other) const {
- return (mValid && other.Valid()) ? (mValue == other.Value()) : false;
- }
-
- // RUNS IN NO-MALLOC CONTEXT
- // Is it word-aligned?
- bool IsAligned() const {
- return mValid && (mValue & (sizeof(uintptr_t)-1)) == 0;
- }
-
- // RUNS IN NO-MALLOC CONTEXT
- uintptr_t Value() const { return mValue; }
-
- // RUNS IN NO-MALLOC CONTEXT
- bool Valid() const { return mValid; }
-
-private:
- uintptr_t mValue;
- bool mValid;
-};
-
-
-// The registers, with validity tags, that will be unwound.
-
-struct UnwindRegs {
-#if defined(LUL_ARCH_arm)
- TaggedUWord r7;
- TaggedUWord r11;
- TaggedUWord r12;
- TaggedUWord r13;
- TaggedUWord r14;
- TaggedUWord r15;
-#elif defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
- TaggedUWord xbp;
- TaggedUWord xsp;
- TaggedUWord xip;
-#else
-# error "Unknown plat"
-#endif
-};
-
-
-// The maximum number of bytes in a stack snapshot. This can be
-// increased if necessary, but larger values cost performance, since a
-// stack snapshot needs to be copied between sampling and worker
-// threads for each snapshot. In practice 32k seems to be enough
-// to get good backtraces.
-static const size_t N_STACK_BYTES = 32768;
-
-// The stack chunk image that will be unwound.
-struct StackImage {
- // [start_avma, +len) specify the address range in the buffer.
- // Obviously we require 0 <= len <= N_STACK_BYTES.
- uintptr_t mStartAvma;
- size_t mLen;
- uint8_t mContents[N_STACK_BYTES];
-};
-
-
-// Statistics collection for the unwinder.
-template<typename T>
-class LULStats {
-public:
- LULStats()
- : mContext(0)
- , mCFI(0)
- , mScanned(0)
- {}
-
- template <typename S>
- explicit LULStats(const LULStats<S>& aOther)
- : mContext(aOther.mContext)
- , mCFI(aOther.mCFI)
- , mScanned(aOther.mScanned)
- {}
-
- template <typename S>
- LULStats<T>& operator=(const LULStats<S>& aOther)
- {
- mContext = aOther.mContext;
- mCFI = aOther.mCFI;
- mScanned = aOther.mScanned;
- return *this;
- }
-
- template <typename S>
- uint32_t operator-(const LULStats<S>& aOther) {
- return (mContext - aOther.mContext) +
- (mCFI - aOther.mCFI) + (mScanned - aOther.mScanned);
- }
-
- T mContext; // Number of context frames
- T mCFI; // Number of CFI/EXIDX frames
- T mScanned; // Number of scanned frames
-};
-
-
-// The core unwinder library class. Just one of these is needed, and
-// it can be shared by multiple unwinder threads.
-//
-// The library operates in one of two modes.
-//
-// * Admin mode. The library is this state after creation. In Admin
-// mode, no unwinding may be performed. It is however allowable to
-// perform administrative tasks -- primarily, loading of unwind info
-// -- in this mode. In particular, it is safe for the library to
-// perform dynamic memory allocation in this mode. Safe in the
-// sense that there is no risk of deadlock against unwinding threads
-// that might -- because of where they have been sampled -- hold the
-// system's malloc lock.
-//
-// * Unwind mode. In this mode, calls to ::Unwind may be made, but
-// nothing else. ::Unwind guarantees not to make any dynamic memory
-// requests, so as to guarantee that the calling thread won't
-// deadlock in the case where it already holds the system's malloc lock.
-//
-// The library is created in Admin mode. After debuginfo is loaded,
-// the caller must switch it into Unwind mode by calling
-// ::EnableUnwinding. There is no way to switch it back to Admin mode
-// after that. To safely switch back to Admin mode would require the
-// caller (or other external agent) to guarantee that there are no
-// pending ::Unwind calls.
-
-class PriMap;
-class SegArray;
-class UniqueStringUniverse;
-
-class LUL {
-public:
- // Create; supply a logging sink. Sets the object in Admin mode.
- explicit LUL(void (*aLog)(const char*));
-
- // Destroy. Caller is responsible for ensuring that no other
- // threads are in Unwind calls. All resources are freed and all
- // registered unwinder threads are deregistered. Can be called
- // either in Admin or Unwind mode.
- ~LUL();
-
- // Notify the library that unwinding is now allowed and so
- // admin-mode calls are no longer allowed. The object is initially
- // created in admin mode. The only possible transition is
- // admin->unwinding, therefore.
- void EnableUnwinding();
-
- // Notify of a new r-x mapping, and load the associated unwind info.
- // The filename is strdup'd and used for debug printing. If
- // aMappedImage is NULL, this function will mmap/munmap the file
- // itself, so as to be able to read the unwind info. If
- // aMappedImage is non-NULL then it is assumed to point to a
- // called-supplied and caller-managed mapped image of the file.
- // May only be called in Admin mode.
- void NotifyAfterMap(uintptr_t aRXavma, size_t aSize,
- const char* aFileName, const void* aMappedImage);
-
- // In rare cases we know an executable area exists but don't know
- // what the associated file is. This call notifies LUL of such
- // areas. This is important for correct functioning of stack
- // scanning and of the x86-{linux,android} special-case
- // __kernel_syscall function handling.
- // This must be called only after the code area in
- // question really has been mapped.
- // May only be called in Admin mode.
- void NotifyExecutableArea(uintptr_t aRXavma, size_t aSize);
-
- // Notify that a mapped area has been unmapped; discard any
- // associated unwind info. Acquires mRWlock for writing. Note that
- // to avoid segfaulting the stack-scan unwinder, which inspects code
- // areas, this must be called before the code area in question is
- // really unmapped. Note that, unlike NotifyAfterMap(), this
- // function takes the start and end addresses of the range to be
- // unmapped, rather than a start and a length parameter. This is so
- // as to make it possible to notify an unmap for the entire address
- // space using a single call.
- // May only be called in Admin mode.
- void NotifyBeforeUnmap(uintptr_t aAvmaMin, uintptr_t aAvmaMax);
-
- // Apply NotifyBeforeUnmap to the entire address space. This causes
- // LUL to discard all unwind and executable-area information for the
- // entire address space.
- // May only be called in Admin mode.
- void NotifyBeforeUnmapAll() {
- NotifyBeforeUnmap(0, UINTPTR_MAX);
- }
-
- // Returns the number of mappings currently registered.
- // May only be called in Admin mode.
- size_t CountMappings();
-
- // Unwind |aStackImg| starting with the context in |aStartRegs|.
- // Write the number of frames recovered in *aFramesUsed. Put
- // the PC values in aFramePCs[0 .. *aFramesUsed-1] and
- // the SP values in aFrameSPs[0 .. *aFramesUsed-1].
- // |aFramesAvail| is the size of the two output arrays and hence the
- // largest possible value of *aFramesUsed. PC values are always
- // valid, and the unwind will stop when the PC becomes invalid, but
- // the SP values might be invalid, in which case the value zero will
- // be written in the relevant frameSPs[] slot.
- //
- // Unwinding may optionally use stack scanning. The maximum number
- // of frames that may be recovered by stack scanning is
- // |aScannedFramesAllowed| and the actual number recovered is
- // written into *aScannedFramesAcquired. |aScannedFramesAllowed|
- // must be less than or equal to |aFramesAvail|.
- //
- // This function assumes that the SP values increase as it unwinds
- // away from the innermost frame -- that is, that the stack grows
- // down. It monitors SP values as it unwinds to check they
- // decrease, so as to avoid looping on corrupted stacks.
- //
- // May only be called in Unwind mode. Multiple threads may unwind
- // at once. LUL user is responsible for ensuring that no thread makes
- // any Admin calls whilst in Unwind mode.
- // MOZ_CRASHes if the calling thread is not registered for unwinding.
- //
- // Up to aScannedFramesAllowed stack-scanned frames may be recovered.
- //
- // The calling thread must previously have been registered via a call to
- // RegisterSampledThread.
- void Unwind(/*OUT*/uintptr_t* aFramePCs,
- /*OUT*/uintptr_t* aFrameSPs,
- /*OUT*/size_t* aFramesUsed,
- /*OUT*/size_t* aScannedFramesAcquired,
- size_t aFramesAvail,
- size_t aScannedFramesAllowed,
- UnwindRegs* aStartRegs, StackImage* aStackImg);
-
- // The logging sink. Call to send debug strings to the caller-
- // specified destination. Can only be called by the Admin thread.
- void (*mLog)(const char*);
-
- // Statistics relating to unwinding. These have to be atomic since
- // unwinding can occur on different threads simultaneously.
- LULStats<mozilla::Atomic<uint32_t>> mStats;
-
- // Possibly show the statistics. This may not be called from any
- // registered sampling thread, since it involves I/O.
- void MaybeShowStats();
-
-private:
- // The statistics counters at the point where they were last printed.
- LULStats<uint32_t> mStatsPrevious;
-
- // Are we in admin mode? Initially |true| but changes to |false|
- // once unwinding begins.
- bool mAdminMode;
-
- // The thread ID associated with admin mode. This is the only thread
- // that is allowed do perform non-Unwind calls on this object. Conversely,
- // no registered Unwinding thread may be the admin thread. This is so
- // as to clearly partition the one thread that may do dynamic memory
- // allocation from the threads that are being sampled, since the latter
- // absolutely may not do dynamic memory allocation.
- int mAdminThreadId;
-
- // The top level mapping from code address ranges to postprocessed
- // unwind info. Basically a sorted array of (addr, len, info)
- // records. This field is updated by NotifyAfterMap and NotifyBeforeUnmap.
- PriMap* mPriMap;
-
- // An auxiliary structure that records which address ranges are
- // mapped r-x, for the benefit of the stack scanner.
- SegArray* mSegArray;
-
- // A UniqueStringUniverse that holds all the strdup'd strings created
- // whilst reading unwind information. This is included so as to make
- // it possible to free them in ~LUL.
- UniqueStringUniverse* mUSU;
-};
-
-
-// Run unit tests on an initialised, loaded-up LUL instance, and print
-// summary results on |aLUL|'s logging sink. Also return the number
-// of tests run in *aNTests and the number that passed in
-// *aNTestsPassed.
-void
-RunLulUnitTests(/*OUT*/int* aNTests, /*OUT*/int*aNTestsPassed, LUL* aLUL);
-
-} // namespace lul
-
-#endif // LulMain_h
diff --git a/tools/profiler/lul/platform-linux-lul.cpp b/tools/profiler/lul/platform-linux-lul.cpp
deleted file mode 100644
index da764f3cf..000000000
--- a/tools/profiler/lul/platform-linux-lul.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <stdio.h>
-#include <signal.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-
-#include "platform.h"
-#include "PlatformMacros.h"
-#include "LulMain.h"
-#include "shared-libraries.h"
-#include "AutoObjectMapper.h"
-
-// Contains miscellaneous helpers that are used to connect SPS and LUL.
-
-
-// Find out, in a platform-dependent way, where the code modules got
-// mapped in the process' virtual address space, and get |aLUL| to
-// load unwind info for them.
-void
-read_procmaps(lul::LUL* aLUL)
-{
- MOZ_ASSERT(aLUL->CountMappings() == 0);
-
-# if defined(SPS_OS_linux) || defined(SPS_OS_android) || defined(SPS_OS_darwin)
- SharedLibraryInfo info = SharedLibraryInfo::GetInfoForSelf();
-
- for (size_t i = 0; i < info.GetSize(); i++) {
- const SharedLibrary& lib = info.GetEntry(i);
-
-# if defined(SPS_OS_android)
- // We're using faulty.lib. Use a special-case object mapper.
- AutoObjectMapperFaultyLib mapper(aLUL->mLog);
-# else
- // We can use the standard POSIX-based mapper.
- AutoObjectMapperPOSIX mapper(aLUL->mLog);
-# endif
-
- // Ask |mapper| to map the object. Then hand its mapped address
- // to NotifyAfterMap().
- void* image = nullptr;
- size_t size = 0;
- bool ok = mapper.Map(&image, &size, lib.GetName());
- if (ok && image && size > 0) {
- aLUL->NotifyAfterMap(lib.GetStart(), lib.GetEnd()-lib.GetStart(),
- lib.GetName().c_str(), image);
- } else if (!ok && lib.GetName() == "") {
- // The object has no name and (as a consequence) the mapper
- // failed to map it. This happens on Linux, where
- // GetInfoForSelf() produces two such mappings: one for the
- // executable and one for the VDSO. The executable one isn't a
- // big deal since there's not much interesting code in there,
- // but the VDSO one is a problem on x86-{linux,android} because
- // lack of knowledge about the mapped area inhibits LUL's
- // special __kernel_syscall handling. Hence notify |aLUL| at
- // least of the mapping, even though it can't read any unwind
- // information for the area.
- aLUL->NotifyExecutableArea(lib.GetStart(), lib.GetEnd()-lib.GetStart());
- }
-
- // |mapper| goes out of scope at this point and so its destructor
- // unmaps the object.
- }
-
-# else
-# error "Unknown platform"
-# endif
-}
-
-
-// LUL needs a callback for its logging sink.
-void
-logging_sink_for_LUL(const char* str) {
- // Ignore any trailing \n, since LOG will add one anyway.
- size_t n = strlen(str);
- if (n > 0 && str[n-1] == '\n') {
- char* tmp = strdup(str);
- tmp[n-1] = 0;
- LOG(tmp);
- free(tmp);
- } else {
- LOG(str);
- }
-}
diff --git a/tools/profiler/lul/platform-linux-lul.h b/tools/profiler/lul/platform-linux-lul.h
deleted file mode 100644
index 4698cd388..000000000
--- a/tools/profiler/lul/platform-linux-lul.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef MOZ_PLATFORM_LINUX_LUL_H
-#define MOZ_PLATFORM_LINUX_LUL_H
-
-#include "platform.h"
-
-// Find out, in a platform-dependent way, where the code modules got
-// mapped in the process' virtual address space, and get |aLUL| to
-// load unwind info for them.
-void
-read_procmaps(lul::LUL* aLUL);
-
-// LUL needs a callback for its logging sink.
-void
-logging_sink_for_LUL(const char* str);
-
-// A singleton instance of the library.
-extern lul::LUL* sLUL;
-
-#endif /* ndef MOZ_PLATFORM_LINUX_LUL_H */
diff --git a/tools/profiler/moz.build b/tools/profiler/moz.build
index 57a74cefc..465d01630 100644
--- a/tools/profiler/moz.build
+++ b/tools/profiler/moz.build
@@ -4,112 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
- XPIDL_MODULE = 'profiler'
- XPIDL_SOURCES += [
- 'gecko/nsIProfiler.idl',
- 'gecko/nsIProfileSaveEvent.idl',
- ]
- EXPORTS += [
- 'public/GeckoProfilerFunc.h',
- 'public/GeckoProfilerImpl.h',
- 'public/ProfilerBacktrace.h',
- 'public/ProfilerMarkers.h',
- 'public/PseudoStack.h',
- 'public/shared-libraries.h',
- ]
- EXPORTS.mozilla += [
- 'public/ProfileGatherer.h',
- ]
- EXTRA_JS_MODULES += [
- 'gecko/Profiler.jsm',
- ]
- UNIFIED_SOURCES += [
- 'core/GeckoSampler.cpp',
- 'core/platform.cpp',
- 'core/ProfileBuffer.cpp',
- 'core/ProfileEntry.cpp',
- 'core/ProfileJSONWriter.cpp',
- 'core/ProfilerBacktrace.cpp',
- 'core/ProfilerMarkers.cpp',
- 'core/StackTop.cpp',
- 'core/SyncProfile.cpp',
- 'core/ThreadInfo.cpp',
- 'core/ThreadProfile.cpp',
- 'gecko/nsProfiler.cpp',
- 'gecko/nsProfilerFactory.cpp',
- 'gecko/nsProfilerStartParams.cpp',
- 'gecko/ProfileGatherer.cpp',
- 'gecko/ProfilerIOInterposeObserver.cpp',
- 'gecko/SaveProfileTask.cpp',
- 'gecko/ThreadResponsiveness.cpp',
- ]
-
- if CONFIG['OS_TARGET'] in ('Android', 'Linux'):
- UNIFIED_SOURCES += [
- 'lul/AutoObjectMapper.cpp',
- 'lul/LulCommon.cpp',
- 'lul/LulDwarf.cpp',
- 'lul/LulDwarfSummariser.cpp',
- 'lul/LulElf.cpp',
- 'lul/LulMain.cpp',
- 'lul/platform-linux-lul.cpp',
- ]
- # These files cannot be built in unified mode because of name clashes with mozglue headers on Android.
- SOURCES += [
- 'core/platform-linux.cc',
- 'core/shared-libraries-linux.cc',
- ]
- SOURCES += [
- '/toolkit/crashreporter/google-breakpad/src/common/linux/elfutils.cc',
- '/toolkit/crashreporter/google-breakpad/src/common/linux/file_id.cc',
- '/toolkit/crashreporter/google-breakpad/src/common/linux/guid_creator.cc',
- '/toolkit/crashreporter/google-breakpad/src/common/linux/linux_libc_support.cc',
- '/toolkit/crashreporter/google-breakpad/src/common/linux/memory_mapped_file.cc',
- ]
- if CONFIG['CPU_ARCH'] == 'arm':
- SOURCES += [
- 'core/EHABIStackWalk.cpp',
- ]
- elif CONFIG['OS_TARGET'] == 'Darwin':
- UNIFIED_SOURCES += [
- 'core/platform-macos.cc',
- 'core/shared-libraries-macos.cc',
- ]
- elif CONFIG['OS_TARGET'] == 'WINNT':
- SOURCES += [
- 'core/IntelPowerGadget.cpp',
- 'core/platform-win32.cc',
- 'core/shared-libraries-win32.cc',
- ]
-
- LOCAL_INCLUDES += [
- '/docshell/base',
- '/ipc/chromium/src',
- '/mozglue/linker',
- '/toolkit/crashreporter/google-breakpad/src',
- '/tools/profiler/core/',
- '/tools/profiler/gecko/',
- '/xpcom/base',
- ]
-
- if CONFIG['OS_TARGET'] == 'Android':
- LOCAL_INCLUDES += [
- # We need access to Breakpad's getcontext(3) which is suitable for Android
- '/toolkit/crashreporter/google-breakpad/src/common/android/include',
- ]
-
- if CONFIG['OS_TARGET'] == 'Android':
- SOURCES += ['/toolkit/crashreporter/google-breakpad/src/common/android/breakpad_getcontext.S']
-
- if CONFIG['ANDROID_CPU_ARCH'] == 'armeabi':
- DEFINES['ARCH_ARMV6'] = True
-
- if CONFIG['ENABLE_TESTS']:
- DIRS += ['tests/gtest']
-
- FINAL_LIBRARY = 'xul'
-
IPDL_SOURCES += [
'gecko/ProfilerTypes.ipdlh',
]
diff --git a/tools/profiler/public/GeckoProfiler.h b/tools/profiler/public/GeckoProfiler.h
index bef017d11..92fc6e052 100644
--- a/tools/profiler/public/GeckoProfiler.h
+++ b/tools/profiler/public/GeckoProfiler.h
@@ -79,8 +79,6 @@ enum TracingMetadata {
TRACING_TIMESTAMP
};
-#if !defined(MOZ_ENABLE_PROFILER_SPS)
-
#include <stdint.h>
#include <stdarg.h>
@@ -248,12 +246,6 @@ static inline bool profiler_in_privacy_mode() { return false; }
static inline void profiler_log(const char *str) {}
static inline void profiler_log(const char *fmt, va_list args) {}
-#else
-
-#include "GeckoProfilerImpl.h"
-
-#endif
-
class MOZ_RAII GeckoProfilerInitRAII {
public:
explicit GeckoProfilerInitRAII(void* stackTop) {
diff --git a/tools/profiler/public/GeckoProfilerFunc.h b/tools/profiler/public/GeckoProfilerFunc.h
deleted file mode 100644
index e0d27f593..000000000
--- a/tools/profiler/public/GeckoProfilerFunc.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef PROFILER_FUNCS_H
-#define PROFILER_FUNCS_H
-
-#ifndef SPS_STANDALONE
-#include "js/TypeDecls.h"
-#endif
-#include "js/ProfilingStack.h"
-#include "mozilla/UniquePtr.h"
-#include "mozilla/Vector.h"
-#include <stdint.h>
-
-class nsISupports;
-
-namespace mozilla {
-class TimeStamp;
-
-namespace dom {
-class Promise;
-} // namespace dom
-
-} // namespace mozilla
-
-class ProfilerBacktrace;
-class ProfilerMarkerPayload;
-
-// Returns a handle to pass on exit. This can check that we are popping the
-// correct callstack.
-inline void* mozilla_sampler_call_enter(const char *aInfo, js::ProfileEntry::Category aCategory,
- void *aFrameAddress = nullptr, bool aCopy = false,
- uint32_t line = 0);
-
-inline void mozilla_sampler_call_exit(void* handle);
-
-void mozilla_sampler_add_marker(const char *aInfo,
- ProfilerMarkerPayload *aPayload = nullptr);
-
-void mozilla_sampler_start(int aEntries, double aInterval,
- const char** aFeatures, uint32_t aFeatureCount,
- const char** aThreadNameFilters, uint32_t aFilterCount);
-
-void mozilla_sampler_stop();
-
-bool mozilla_sampler_is_paused();
-void mozilla_sampler_pause();
-void mozilla_sampler_resume();
-
-ProfilerBacktrace* mozilla_sampler_get_backtrace();
-void mozilla_sampler_free_backtrace(ProfilerBacktrace* aBacktrace);
-void mozilla_sampler_get_backtrace_noalloc(char *output, size_t outputSize);
-
-bool mozilla_sampler_is_active();
-
-bool mozilla_sampler_feature_active(const char* aName);
-
-void mozilla_sampler_responsiveness(const mozilla::TimeStamp& time);
-
-void mozilla_sampler_frame_number(int frameNumber);
-
-const double* mozilla_sampler_get_responsiveness();
-
-void mozilla_sampler_save();
-
-mozilla::UniquePtr<char[]> mozilla_sampler_get_profile(double aSinceTime);
-
-#ifndef SPS_STANDALONE
-JSObject *mozilla_sampler_get_profile_data(JSContext* aCx, double aSinceTime);
-void mozilla_sampler_get_profile_data_async(double aSinceTime,
- mozilla::dom::Promise* aPromise);
-void mozilla_sampler_get_profiler_start_params(int* aEntrySize,
- double* aInterval,
- mozilla::Vector<const char*>* aFilters,
- mozilla::Vector<const char*>* aFeatures);
-void mozilla_sampler_get_gatherer(nsISupports** aRetVal);
-#endif
-
-// Make this function easily callable from a debugger in a build without
-// debugging information (work around http://llvm.org/bugs/show_bug.cgi?id=22211)
-extern "C" {
- void mozilla_sampler_save_profile_to_file(const char* aFilename);
-}
-
-const char** mozilla_sampler_get_features();
-
-void mozilla_sampler_get_buffer_info(uint32_t *aCurrentPosition, uint32_t *aTotalSize,
- uint32_t *aGeneration);
-
-void mozilla_sampler_init(void* stackTop);
-
-void mozilla_sampler_shutdown();
-
-// Lock the profiler. When locked the profiler is (1) stopped,
-// (2) profile data is cleared, (3) profiler-locked is fired.
-// This is used to lock down the profiler during private browsing
-void mozilla_sampler_lock();
-
-// Unlock the profiler, leaving it stopped and fires profiler-unlocked.
-void mozilla_sampler_unlock();
-
-// Register/unregister threads with the profiler
-bool mozilla_sampler_register_thread(const char* name, void* stackTop);
-void mozilla_sampler_unregister_thread();
-
-void mozilla_sampler_sleep_start();
-void mozilla_sampler_sleep_end();
-bool mozilla_sampler_is_sleeping();
-
-double mozilla_sampler_time();
-double mozilla_sampler_time(const mozilla::TimeStamp& aTime);
-
-void mozilla_sampler_tracing(const char* aCategory, const char* aInfo,
- TracingMetadata aMetaData);
-
-void mozilla_sampler_tracing(const char* aCategory, const char* aInfo,
- ProfilerBacktrace* aCause,
- TracingMetadata aMetaData);
-
-void mozilla_sampler_log(const char *fmt, va_list args);
-
-#endif
-
diff --git a/tools/profiler/public/GeckoProfilerImpl.h b/tools/profiler/public/GeckoProfilerImpl.h
deleted file mode 100644
index 7011e5cdb..000000000
--- a/tools/profiler/public/GeckoProfilerImpl.h
+++ /dev/null
@@ -1,515 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-// IWYU pragma: private, include "GeckoProfiler.h"
-
-#ifndef TOOLS_SPS_SAMPLER_H_
-#define TOOLS_SPS_SAMPLER_H_
-
-#include <stdlib.h>
-#include <signal.h>
-#include <stdarg.h>
-#include "mozilla/Assertions.h"
-#include "mozilla/GuardObjects.h"
-#include "mozilla/Sprintf.h"
-#include "mozilla/ThreadLocal.h"
-#include "mozilla/UniquePtr.h"
-#ifndef SPS_STANDALONE
-#include "nscore.h"
-#include "nsISupports.h"
-#endif
-#include "GeckoProfilerFunc.h"
-#include "PseudoStack.h"
-#include "ProfilerBacktrace.h"
-
-// Make sure that we can use std::min here without the Windows headers messing with us.
-#ifdef min
-#undef min
-#endif
-
-class GeckoSampler;
-
-namespace mozilla {
-class TimeStamp;
-} // namespace mozilla
-
-extern MOZ_THREAD_LOCAL(PseudoStack *) tlsPseudoStack;
-extern MOZ_THREAD_LOCAL(GeckoSampler *) tlsTicker;
-extern MOZ_THREAD_LOCAL(void *) tlsStackTop;
-extern bool stack_key_initialized;
-
-#ifndef SAMPLE_FUNCTION_NAME
-# ifdef __GNUC__
-# define SAMPLE_FUNCTION_NAME __FUNCTION__
-# elif defined(_MSC_VER)
-# define SAMPLE_FUNCTION_NAME __FUNCTION__
-# else
-# define SAMPLE_FUNCTION_NAME __func__ // defined in C99, supported in various C++ compilers. Just raw function name.
-# endif
-#endif
-
-static inline
-void profiler_init(void* stackTop)
-{
- mozilla_sampler_init(stackTop);
-}
-
-static inline
-void profiler_shutdown()
-{
- mozilla_sampler_shutdown();
-}
-
-static inline
-void profiler_start(int aProfileEntries, double aInterval,
- const char** aFeatures, uint32_t aFeatureCount,
- const char** aThreadNameFilters, uint32_t aFilterCount)
-{
- mozilla_sampler_start(aProfileEntries, aInterval, aFeatures, aFeatureCount, aThreadNameFilters, aFilterCount);
-}
-
-static inline
-void profiler_stop()
-{
- mozilla_sampler_stop();
-}
-
-static inline
-bool profiler_is_paused()
-{
- return mozilla_sampler_is_paused();
-}
-
-static inline
-void profiler_pause()
-{
- mozilla_sampler_pause();
-}
-
-static inline
-void profiler_resume()
-{
- mozilla_sampler_resume();
-}
-
-static inline
-ProfilerBacktrace* profiler_get_backtrace()
-{
- return mozilla_sampler_get_backtrace();
-}
-
-static inline
-void profiler_free_backtrace(ProfilerBacktrace* aBacktrace)
-{
- mozilla_sampler_free_backtrace(aBacktrace);
-}
-
-static inline
-void profiler_get_backtrace_noalloc(char *output, size_t outputSize)
-{
- return mozilla_sampler_get_backtrace_noalloc(output, outputSize);
-}
-
-static inline
-bool profiler_is_active()
-{
- return mozilla_sampler_is_active();
-}
-
-static inline
-bool profiler_feature_active(const char* aName)
-{
- return mozilla_sampler_feature_active(aName);
-}
-
-static inline
-void profiler_responsiveness(const mozilla::TimeStamp& aTime)
-{
- mozilla_sampler_responsiveness(aTime);
-}
-
-static inline
-void profiler_set_frame_number(int frameNumber)
-{
- return mozilla_sampler_frame_number(frameNumber);
-}
-
-static inline
-mozilla::UniquePtr<char[]> profiler_get_profile(double aSinceTime = 0)
-{
- return mozilla_sampler_get_profile(aSinceTime);
-}
-
-#ifndef SPS_STANDALONE
-static inline
-JSObject* profiler_get_profile_jsobject(JSContext* aCx, double aSinceTime = 0)
-{
- return mozilla_sampler_get_profile_data(aCx, aSinceTime);
-}
-
-static inline
-void profiler_get_profile_jsobject_async(double aSinceTime = 0,
- mozilla::dom::Promise* aPromise = 0)
-{
- mozilla_sampler_get_profile_data_async(aSinceTime, aPromise);
-}
-
-static inline
-void profiler_get_start_params(int* aEntrySize,
- double* aInterval,
- mozilla::Vector<const char*>* aFilters,
- mozilla::Vector<const char*>* aFeatures)
-{
- mozilla_sampler_get_profiler_start_params(aEntrySize, aInterval, aFilters, aFeatures);
-}
-
-static inline
-void profiler_get_gatherer(nsISupports** aRetVal)
-{
- mozilla_sampler_get_gatherer(aRetVal);
-}
-
-#endif
-
-static inline
-void profiler_save_profile_to_file(const char* aFilename)
-{
- return mozilla_sampler_save_profile_to_file(aFilename);
-}
-
-static inline
-const char** profiler_get_features()
-{
- return mozilla_sampler_get_features();
-}
-
-static inline
-void profiler_get_buffer_info(uint32_t *aCurrentPosition, uint32_t *aTotalSize,
- uint32_t *aGeneration)
-{
- return mozilla_sampler_get_buffer_info(aCurrentPosition, aTotalSize, aGeneration);
-}
-
-static inline
-void profiler_lock()
-{
- return mozilla_sampler_lock();
-}
-
-static inline
-void profiler_unlock()
-{
- return mozilla_sampler_unlock();
-}
-
-static inline
-void profiler_register_thread(const char* name, void* guessStackTop)
-{
- mozilla_sampler_register_thread(name, guessStackTop);
-}
-
-static inline
-void profiler_unregister_thread()
-{
- mozilla_sampler_unregister_thread();
-}
-
-static inline
-void profiler_sleep_start()
-{
- mozilla_sampler_sleep_start();
-}
-
-static inline
-void profiler_sleep_end()
-{
- mozilla_sampler_sleep_end();
-}
-
-static inline
-bool profiler_is_sleeping()
-{
- return mozilla_sampler_is_sleeping();
-}
-
-#ifndef SPS_STANDALONE
-static inline
-void profiler_js_operation_callback()
-{
- PseudoStack *stack = tlsPseudoStack.get();
- if (!stack) {
- return;
- }
-
- stack->jsOperationCallback();
-}
-#endif
-
-static inline
-double profiler_time()
-{
- return mozilla_sampler_time();
-}
-
-static inline
-double profiler_time(const mozilla::TimeStamp& aTime)
-{
- return mozilla_sampler_time(aTime);
-}
-
-static inline
-bool profiler_in_privacy_mode()
-{
- PseudoStack *stack = tlsPseudoStack.get();
- if (!stack) {
- return false;
- }
- return stack->mPrivacyMode;
-}
-
-static inline void profiler_tracing(const char* aCategory, const char* aInfo,
- ProfilerBacktrace* aCause,
- TracingMetadata aMetaData = TRACING_DEFAULT)
-{
- // Don't insert a marker if we're not profiling to avoid
- // the heap copy (malloc).
- if (!stack_key_initialized || !profiler_is_active()) {
- delete aCause;
- return;
- }
-
- mozilla_sampler_tracing(aCategory, aInfo, aCause, aMetaData);
-}
-
-static inline void profiler_tracing(const char* aCategory, const char* aInfo,
- TracingMetadata aMetaData = TRACING_DEFAULT)
-{
- if (!stack_key_initialized)
- return;
-
- // Don't insert a marker if we're not profiling to avoid
- // the heap copy (malloc).
- if (!profiler_is_active()) {
- return;
- }
-
- mozilla_sampler_tracing(aCategory, aInfo, aMetaData);
-}
-
-#define SAMPLER_APPEND_LINE_NUMBER_PASTE(id, line) id ## line
-#define SAMPLER_APPEND_LINE_NUMBER_EXPAND(id, line) SAMPLER_APPEND_LINE_NUMBER_PASTE(id, line)
-#define SAMPLER_APPEND_LINE_NUMBER(id) SAMPLER_APPEND_LINE_NUMBER_EXPAND(id, __LINE__)
-
-// Uncomment this to turn on systrace or build with
-// ac_add_options --enable-systace
-//#define MOZ_USE_SYSTRACE
-#ifdef MOZ_USE_SYSTRACE
-#ifndef ATRACE_TAG
-# define ATRACE_TAG ATRACE_TAG_ALWAYS
-#endif
-// We need HAVE_ANDROID_OS to be defined for Trace.h.
-// If its not set we will set it temporary and remove it.
-# ifndef HAVE_ANDROID_OS
-# define HAVE_ANDROID_OS
-# define REMOVE_HAVE_ANDROID_OS
-# endif
-// Android source code will include <cutils/trace.h> before this. There is no
-// HAVE_ANDROID_OS defined in Firefox OS build at that time. Enabled it globally
-// will cause other build break. So atrace_begin and atrace_end are not defined.
-// It will cause a build-break when we include <utils/Trace.h>. Use undef
-// _LIBS_CUTILS_TRACE_H will force <cutils/trace.h> to define atrace_begin and
-// atrace_end with defined HAVE_ANDROID_OS again. Then there is no build-break.
-# undef _LIBS_CUTILS_TRACE_H
-# include <utils/Trace.h>
-# define MOZ_PLATFORM_TRACING(name) android::ScopedTrace SAMPLER_APPEND_LINE_NUMBER(scopedTrace)(ATRACE_TAG, name);
-# ifdef REMOVE_HAVE_ANDROID_OS
-# undef HAVE_ANDROID_OS
-# undef REMOVE_HAVE_ANDROID_OS
-# endif
-#else
-# define MOZ_PLATFORM_TRACING(name)
-#endif
-
-// we want the class and function name but can't easily get that using preprocessor macros
-// __func__ doesn't have the class name and __PRETTY_FUNCTION__ has the parameters
-
-#define PROFILER_LABEL(name_space, info, category) MOZ_PLATFORM_TRACING(name_space "::" info) mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, category, __LINE__)
-#define PROFILER_LABEL_FUNC(category) MOZ_PLATFORM_TRACING(SAMPLE_FUNCTION_NAME) mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(SAMPLE_FUNCTION_NAME, category, __LINE__)
-#define PROFILER_LABEL_PRINTF(name_space, info, category, ...) MOZ_PLATFORM_TRACING(name_space "::" info) mozilla::SamplerStackFramePrintfRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, category, __LINE__, __VA_ARGS__)
-
-#define PROFILER_MARKER(info) mozilla_sampler_add_marker(info)
-#define PROFILER_MARKER_PAYLOAD(info, payload) mozilla_sampler_add_marker(info, payload)
-#define PROFILER_MAIN_THREAD_MARKER(info) MOZ_ASSERT(NS_IsMainThread(), "This can only be called on the main thread"); mozilla_sampler_add_marker(info)
-
-#define PROFILER_MAIN_THREAD_LABEL(name_space, info, category) MOZ_ASSERT(NS_IsMainThread(), "This can only be called on the main thread"); mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, category, __LINE__)
-#define PROFILER_MAIN_THREAD_LABEL_PRINTF(name_space, info, category, ...) MOZ_ASSERT(NS_IsMainThread(), "This can only be called on the main thread"); mozilla::SamplerStackFramePrintfRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, category, __LINE__, __VA_ARGS__)
-
-
-#if !defined(PLATFORM_LIKELY_MEMORY_CONSTRAINED) && !defined(ARCH_ARMV6)
-# define PROFILE_DEFAULT_ENTRY 1000000
-#else
-# define PROFILE_DEFAULT_ENTRY 100000
-#endif
-
-// In the case of profiler_get_backtrace we know that we only need enough space
-// for a single backtrace.
-#define GET_BACKTRACE_DEFAULT_ENTRY 1000
-
-#if defined(PLATFORM_LIKELY_MEMORY_CONSTRAINED)
-/* A 1ms sampling interval has been shown to be a large perf hit
- * (10fps) on memory-contrained (low-end) platforms, and additionally
- * to yield different results from the profiler. Where this is the
- * important case, b2g, there are also many gecko processes which
- * magnify these effects. */
-# define PROFILE_DEFAULT_INTERVAL 10
-#elif defined(ANDROID)
-// We use a lower frequency on Android, in order to make things work
-// more smoothly on phones. This value can be adjusted later with
-// some libunwind optimizations.
-// In one sample measurement on Galaxy Nexus, out of about 700 backtraces,
-// 60 of them took more than 25ms, and the average and standard deviation
-// were 6.17ms and 9.71ms respectively.
-
-// For now since we don't support stackwalking let's use 1ms since it's fast
-// enough.
-#define PROFILE_DEFAULT_INTERVAL 1
-#else
-#define PROFILE_DEFAULT_INTERVAL 1
-#endif
-#define PROFILE_DEFAULT_FEATURES NULL
-#define PROFILE_DEFAULT_FEATURE_COUNT 0
-
-namespace mozilla {
-
-class MOZ_RAII GeckoProfilerTracingRAII {
-public:
- GeckoProfilerTracingRAII(const char* aCategory, const char* aInfo,
- mozilla::UniquePtr<ProfilerBacktrace> aBacktrace
- MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
- : mCategory(aCategory)
- , mInfo(aInfo)
- {
- MOZ_GUARD_OBJECT_NOTIFIER_INIT;
- profiler_tracing(mCategory, mInfo, aBacktrace.release(), TRACING_INTERVAL_START);
- }
-
- ~GeckoProfilerTracingRAII() {
- profiler_tracing(mCategory, mInfo, TRACING_INTERVAL_END);
- }
-
-protected:
- MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
- const char* mCategory;
- const char* mInfo;
-};
-
-class MOZ_RAII SamplerStackFrameRAII {
-public:
- // we only copy the strings at save time, so to take multiple parameters we'd need to copy them then.
- SamplerStackFrameRAII(const char *aInfo,
- js::ProfileEntry::Category aCategory, uint32_t line
- MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
- {
- MOZ_GUARD_OBJECT_NOTIFIER_INIT;
- mHandle = mozilla_sampler_call_enter(aInfo, aCategory, this, false, line);
- }
- ~SamplerStackFrameRAII() {
- mozilla_sampler_call_exit(mHandle);
- }
-private:
- MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
- void* mHandle;
-};
-
-static const int SAMPLER_MAX_STRING = 128;
-class MOZ_RAII SamplerStackFramePrintfRAII {
-public:
- // we only copy the strings at save time, so to take multiple parameters we'd need to copy them then.
- SamplerStackFramePrintfRAII(const char *aInfo,
- js::ProfileEntry::Category aCategory, uint32_t line, const char *aFormat, ...)
- : mHandle(nullptr)
- {
- if (profiler_is_active() && !profiler_in_privacy_mode()) {
- va_list args;
- va_start(args, aFormat);
- char buff[SAMPLER_MAX_STRING];
-
- // We have to use seperate printf's because we're using
- // the vargs.
- VsprintfLiteral(buff, aFormat, args);
- SprintfLiteral(mDest, "%s %s", aInfo, buff);
-
- mHandle = mozilla_sampler_call_enter(mDest, aCategory, this, true, line);
- va_end(args);
- } else {
- mHandle = mozilla_sampler_call_enter(aInfo, aCategory, this, false, line);
- }
- }
- ~SamplerStackFramePrintfRAII() {
- mozilla_sampler_call_exit(mHandle);
- }
-private:
- char mDest[SAMPLER_MAX_STRING];
- void* mHandle;
-};
-
-} // namespace mozilla
-
-inline PseudoStack* mozilla_get_pseudo_stack(void)
-{
- if (!stack_key_initialized)
- return nullptr;
- return tlsPseudoStack.get();
-}
-
-inline void* mozilla_sampler_call_enter(const char *aInfo,
- js::ProfileEntry::Category aCategory, void *aFrameAddress, bool aCopy, uint32_t line)
-{
- // check if we've been initialized to avoid calling pthread_getspecific
- // with a null tlsStack which will return undefined results.
- if (!stack_key_initialized)
- return nullptr;
-
- PseudoStack *stack = tlsPseudoStack.get();
- // we can't infer whether 'stack' has been initialized
- // based on the value of stack_key_intiailized because
- // 'stack' is only intialized when a thread is being
- // profiled.
- if (!stack) {
- return stack;
- }
- stack->push(aInfo, aCategory, aFrameAddress, aCopy, line);
-
- // The handle is meant to support future changes
- // but for now it is simply use to save a call to
- // pthread_getspecific on exit. It also supports the
- // case where the sampler is initialized between
- // enter and exit.
- return stack;
-}
-
-inline void mozilla_sampler_call_exit(void *aHandle)
-{
- if (!aHandle)
- return;
-
- PseudoStack *stack = (PseudoStack*)aHandle;
- stack->popAndMaybeDelete();
-}
-
-void mozilla_sampler_add_marker(const char *aMarker, ProfilerMarkerPayload *aPayload);
-
-static inline
-void profiler_log(const char *str)
-{
- profiler_tracing("log", str, TRACING_EVENT);
-}
-
-static inline
-void profiler_log(const char *fmt, va_list args)
-{
- mozilla_sampler_log(fmt, args);
-}
-
-#endif /* ndef TOOLS_SPS_SAMPLER_H_ */
diff --git a/tools/profiler/public/ProfileGatherer.h b/tools/profiler/public/ProfileGatherer.h
deleted file mode 100644
index 4e39a4f5c..000000000
--- a/tools/profiler/public/ProfileGatherer.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef MOZ_PROFILE_GATHERER_H
-#define MOZ_PROFILE_GATHERER_H
-
-#include "mozilla/dom/Promise.h"
-
-class GeckoSampler;
-
-namespace mozilla {
-
-class ProfileGatherer final : public nsIObserver
-{
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIOBSERVER
-
- explicit ProfileGatherer(GeckoSampler* aTicker);
- void WillGatherOOPProfile();
- void GatheredOOPProfile();
- void Start(double aSinceTime, mozilla::dom::Promise* aPromise);
- void Cancel();
- void OOPExitProfile(const nsCString& aProfile);
-
-private:
- ~ProfileGatherer() {};
- void Finish();
- void Reset();
-
- nsTArray<nsCString> mExitProfiles;
- RefPtr<mozilla::dom::Promise> mPromise;
- GeckoSampler* mTicker;
- double mSinceTime;
- uint32_t mPendingProfiles;
- bool mGathering;
-};
-
-} // namespace mozilla
-
-#endif
diff --git a/tools/profiler/public/ProfilerBacktrace.h b/tools/profiler/public/ProfilerBacktrace.h
deleted file mode 100644
index bcaab3563..000000000
--- a/tools/profiler/public/ProfilerBacktrace.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef __PROFILER_BACKTRACE_H
-#define __PROFILER_BACKTRACE_H
-
-class SyncProfile;
-class SpliceableJSONWriter;
-class UniqueStacks;
-
-class ProfilerBacktrace
-{
-public:
- explicit ProfilerBacktrace(SyncProfile* aProfile);
- ~ProfilerBacktrace();
-
- // ProfilerBacktraces' stacks are deduplicated in the context of the
- // profile that contains the backtrace as a marker payload.
- //
- // That is, markers that contain backtraces should not need their own stack,
- // frame, and string tables. They should instead reuse their parent
- // profile's tables.
- void StreamJSON(SpliceableJSONWriter& aWriter, UniqueStacks& aUniqueStacks);
-
-private:
- ProfilerBacktrace(const ProfilerBacktrace&);
- ProfilerBacktrace& operator=(const ProfilerBacktrace&);
-
- SyncProfile* mProfile;
-};
-
-#endif // __PROFILER_BACKTRACE_H
-
diff --git a/tools/profiler/public/ProfilerMarkers.h b/tools/profiler/public/ProfilerMarkers.h
deleted file mode 100644
index 29711f210..000000000
--- a/tools/profiler/public/ProfilerMarkers.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef PROFILER_MARKERS_H
-#define PROFILER_MARKERS_H
-
-#include "mozilla/TimeStamp.h"
-#include "mozilla/Attributes.h"
-
-namespace mozilla {
-namespace layers {
-class Layer;
-} // namespace layers
-} // namespace mozilla
-
-class SpliceableJSONWriter;
-class UniqueStacks;
-
-/**
- * This is an abstract object that can be implied to supply
- * data to be attached with a profiler marker. Most data inserted
- * into a profile is stored in a circular buffer. This buffer
- * typically wraps around and overwrites most entries. Because
- * of this, this structure is designed to defer the work of
- * prepare the payload only when 'preparePayload' is called.
- *
- * Note when implementing that this object is typically constructed
- * on a particular thread but 'preparePayload' and the destructor
- * is called from the main thread.
- */
-class ProfilerMarkerPayload
-{
-public:
- /**
- * ProfilerMarkerPayload takes ownership of aStack
- */
- explicit ProfilerMarkerPayload(ProfilerBacktrace* aStack = nullptr);
- ProfilerMarkerPayload(const mozilla::TimeStamp& aStartTime,
- const mozilla::TimeStamp& aEndTime,
- ProfilerBacktrace* aStack = nullptr);
-
- /**
- * Called from the main thread
- */
- virtual ~ProfilerMarkerPayload();
-
- /**
- * Called from the main thread
- */
- virtual void StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks) = 0;
-
- mozilla::TimeStamp GetStartTime() const { return mStartTime; }
-
-protected:
- /**
- * Called from the main thread
- */
- void streamCommonProps(const char* aMarkerType, SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks);
-
- void SetStack(ProfilerBacktrace* aStack) { mStack = aStack; }
-
-private:
- mozilla::TimeStamp mStartTime;
- mozilla::TimeStamp mEndTime;
- ProfilerBacktrace* mStack;
-};
-
-class ProfilerMarkerTracing : public ProfilerMarkerPayload
-{
-public:
- ProfilerMarkerTracing(const char* aCategory, TracingMetadata aMetaData);
- ProfilerMarkerTracing(const char* aCategory, TracingMetadata aMetaData, ProfilerBacktrace* aCause);
-
- const char *GetCategory() const { return mCategory; }
- TracingMetadata GetMetaData() const { return mMetaData; }
-
- virtual void StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks) override;
-
-private:
- const char *mCategory;
- TracingMetadata mMetaData;
-};
-
-
-#ifndef SPS_STANDALONE
-#include "gfxASurface.h"
-class ProfilerMarkerImagePayload : public ProfilerMarkerPayload
-{
-public:
- explicit ProfilerMarkerImagePayload(gfxASurface *aImg);
-
- virtual void StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks) override;
-
-private:
- RefPtr<gfxASurface> mImg;
-};
-
-class IOMarkerPayload : public ProfilerMarkerPayload
-{
-public:
- IOMarkerPayload(const char* aSource, const char* aFilename, const mozilla::TimeStamp& aStartTime,
- const mozilla::TimeStamp& aEndTime,
- ProfilerBacktrace* aStack);
- ~IOMarkerPayload();
-
- virtual void StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks) override;
-
-private:
- const char* mSource;
- char* mFilename;
-};
-
-/**
- * Contains the translation applied to a 2d layer so we can
- * track the layer position at each frame.
- */
-class LayerTranslationPayload : public ProfilerMarkerPayload
-{
-public:
- LayerTranslationPayload(mozilla::layers::Layer* aLayer,
- mozilla::gfx::Point aPoint);
-
- virtual void StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks) override;
-
-private:
- mozilla::layers::Layer* mLayer;
- mozilla::gfx::Point mPoint;
-};
-
-#include "Units.h" // For ScreenIntPoint
-
-/**
- * Tracks when touch events are processed by gecko, not when
- * the touch actually occured in gonk/android.
- */
-class TouchDataPayload : public ProfilerMarkerPayload
-{
-public:
- explicit TouchDataPayload(const mozilla::ScreenIntPoint& aPoint);
- virtual ~TouchDataPayload() {}
-
- virtual void StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks) override;
-
-private:
- mozilla::ScreenIntPoint mPoint;
-};
-
-/**
- * Tracks when a vsync occurs according to the HardwareComposer.
- */
-class VsyncPayload : public ProfilerMarkerPayload
-{
-public:
- explicit VsyncPayload(mozilla::TimeStamp aVsyncTimestamp);
- virtual ~VsyncPayload() {}
-
- virtual void StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks) override;
-
-private:
- mozilla::TimeStamp mVsyncTimestamp;
-};
-
-class GPUMarkerPayload : public ProfilerMarkerPayload
-{
-public:
- GPUMarkerPayload(const mozilla::TimeStamp& aCpuTimeStart,
- const mozilla::TimeStamp& aCpuTimeEnd,
- uint64_t aGpuTimeStart,
- uint64_t aGpuTimeEnd);
- ~GPUMarkerPayload() {}
-
- virtual void StreamPayload(SpliceableJSONWriter& aWriter,
- UniqueStacks& aUniqueStacks) override;
-
-private:
- mozilla::TimeStamp mCpuTimeStart;
- mozilla::TimeStamp mCpuTimeEnd;
- uint64_t mGpuTimeStart;
- uint64_t mGpuTimeEnd;
-};
-#endif
-
-#endif // PROFILER_MARKERS_H
diff --git a/tools/profiler/public/PseudoStack.h b/tools/profiler/public/PseudoStack.h
deleted file mode 100644
index f9e3836ea..000000000
--- a/tools/profiler/public/PseudoStack.h
+++ /dev/null
@@ -1,469 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef PROFILER_PSEUDO_STACK_H_
-#define PROFILER_PSEUDO_STACK_H_
-
-#include "mozilla/ArrayUtils.h"
-#include <stdint.h>
-#include "js/ProfilingStack.h"
-#include <stdlib.h>
-#include "mozilla/Atomics.h"
-#ifndef SPS_STANDALONE
-#include "nsISupportsImpl.h"
-#endif
-
-/* we duplicate this code here to avoid header dependencies
- * which make it more difficult to include in other places */
-#if defined(_M_X64) || defined(__x86_64__)
-#define V8_HOST_ARCH_X64 1
-#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
-#define V8_HOST_ARCH_IA32 1
-#elif defined(__ARMEL__)
-#define V8_HOST_ARCH_ARM 1
-#else
-#warning Please add support for your architecture in chromium_types.h
-#endif
-
-// STORE_SEQUENCER: Because signals can interrupt our profile modification
-// we need to make stores are not re-ordered by the compiler
-// or hardware to make sure the profile is consistent at
-// every point the signal can fire.
-#ifdef V8_HOST_ARCH_ARM
-// TODO Is there something cheaper that will prevent
-// memory stores from being reordered
-
-typedef void (*LinuxKernelMemoryBarrierFunc)(void);
-LinuxKernelMemoryBarrierFunc pLinuxKernelMemoryBarrier __attribute__((weak)) =
- (LinuxKernelMemoryBarrierFunc) 0xffff0fa0;
-
-# define STORE_SEQUENCER() pLinuxKernelMemoryBarrier()
-#elif defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_X64)
-# if defined(_MSC_VER)
-# include <intrin.h>
-# define STORE_SEQUENCER() _ReadWriteBarrier();
-# elif defined(__INTEL_COMPILER)
-# define STORE_SEQUENCER() __memory_barrier();
-# elif __GNUC__
-# define STORE_SEQUENCER() asm volatile("" ::: "memory");
-# else
-# error "Memory clobber not supported for your compiler."
-# endif
-#else
-# error "Memory clobber not supported for your platform."
-#endif
-
-// We can't include <algorithm> because it causes issues on OS X, so we use
-// our own min function.
-static inline uint32_t sMin(uint32_t l, uint32_t r) {
- return l < r ? l : r;
-}
-
-// A stack entry exists to allow the JS engine to inform SPS of the current
-// backtrace, but also to instrument particular points in C++ in case stack
-// walking is not available on the platform we are running on.
-//
-// Each entry has a descriptive string, a relevant stack address, and some extra
-// information the JS engine might want to inform SPS of. This class inherits
-// from the JS engine's version of the entry to ensure that the size and layout
-// of the two representations are consistent.
-class StackEntry : public js::ProfileEntry
-{
-};
-
-class ProfilerMarkerPayload;
-template<typename T>
-class ProfilerLinkedList;
-class SpliceableJSONWriter;
-class UniqueStacks;
-
-class ProfilerMarker {
- friend class ProfilerLinkedList<ProfilerMarker>;
-public:
- explicit ProfilerMarker(const char* aMarkerName,
- ProfilerMarkerPayload* aPayload = nullptr,
- double aTime = 0);
-
- ~ProfilerMarker();
-
- const char* GetMarkerName() const {
- return mMarkerName;
- }
-
- void StreamJSON(SpliceableJSONWriter& aWriter, UniqueStacks& aUniqueStacks) const;
-
- void SetGeneration(uint32_t aGenID);
-
- bool HasExpired(uint32_t aGenID) const {
- return mGenID + 2 <= aGenID;
- }
-
- double GetTime() const;
-
-private:
- char* mMarkerName;
- ProfilerMarkerPayload* mPayload;
- ProfilerMarker* mNext;
- double mTime;
- uint32_t mGenID;
-};
-
-template<typename T>
-class ProfilerLinkedList {
-public:
- ProfilerLinkedList()
- : mHead(nullptr)
- , mTail(nullptr)
- {}
-
- void insert(T* elem)
- {
- if (!mTail) {
- mHead = elem;
- mTail = elem;
- } else {
- mTail->mNext = elem;
- mTail = elem;
- }
- elem->mNext = nullptr;
- }
-
- T* popHead()
- {
- if (!mHead) {
- MOZ_ASSERT(false);
- return nullptr;
- }
-
- T* head = mHead;
-
- mHead = head->mNext;
- if (!mHead) {
- mTail = nullptr;
- }
-
- return head;
- }
-
- const T* peek() {
- return mHead;
- }
-
-private:
- T* mHead;
- T* mTail;
-};
-
-typedef ProfilerLinkedList<ProfilerMarker> ProfilerMarkerLinkedList;
-
-template<typename T>
-class ProfilerSignalSafeLinkedList {
-public:
- ProfilerSignalSafeLinkedList()
- : mSignalLock(false)
- {}
-
- ~ProfilerSignalSafeLinkedList()
- {
- if (mSignalLock) {
- // Some thread is modifying the list. We should only be released on that
- // thread.
- abort();
- }
-
- while (mList.peek()) {
- delete mList.popHead();
- }
- }
-
- // Insert an item into the list.
- // Must only be called from the owning thread.
- // Must not be called while the list from accessList() is being accessed.
- // In the profiler, we ensure that by interrupting the profiled thread
- // (which is the one that owns this list and calls insert() on it) until
- // we're done reading the list from the signal handler.
- void insert(T* aElement) {
- MOZ_ASSERT(aElement);
-
- mSignalLock = true;
- STORE_SEQUENCER();
-
- mList.insert(aElement);
-
- STORE_SEQUENCER();
- mSignalLock = false;
- }
-
- // Called within signal, from any thread, possibly while insert() is in the
- // middle of modifying the list (on the owning thread). Will return null if
- // that is the case.
- // Function must be reentrant.
- ProfilerLinkedList<T>* accessList()
- {
- if (mSignalLock) {
- return nullptr;
- }
- return &mList;
- }
-
-private:
- ProfilerLinkedList<T> mList;
-
- // If this is set, then it's not safe to read the list because its contents
- // are being changed.
- volatile bool mSignalLock;
-};
-
-// Stub eventMarker function for js-engine event generation.
-void ProfilerJSEventMarker(const char *event);
-
-// the PseudoStack members are read by signal
-// handlers, so the mutation of them needs to be signal-safe.
-struct PseudoStack
-{
-public:
- // Create a new PseudoStack and acquire a reference to it.
- static PseudoStack *create()
- {
- return new PseudoStack();
- }
-
- // This is called on every profiler restart. Put things that should happen at that time here.
- void reinitializeOnResume() {
- // This is needed to cause an initial sample to be taken from sleeping threads. Otherwise sleeping
- // threads would not have any samples to copy forward while sleeping.
- mSleepId++;
- }
-
- void addMarker(const char* aMarkerStr, ProfilerMarkerPayload* aPayload, double aTime)
- {
- ProfilerMarker* marker = new ProfilerMarker(aMarkerStr, aPayload, aTime);
- mPendingMarkers.insert(marker);
- }
-
- // called within signal. Function must be reentrant
- ProfilerMarkerLinkedList* getPendingMarkers()
- {
- // The profiled thread is interrupted, so we can access the list safely.
- // Unless the profiled thread was in the middle of changing the list when
- // we interrupted it - in that case, accessList() will return null.
- return mPendingMarkers.accessList();
- }
-
- void push(const char *aName, js::ProfileEntry::Category aCategory, uint32_t line)
- {
- push(aName, aCategory, nullptr, false, line);
- }
-
- void push(const char *aName, js::ProfileEntry::Category aCategory,
- void *aStackAddress, bool aCopy, uint32_t line)
- {
- if (size_t(mStackPointer) >= mozilla::ArrayLength(mStack)) {
- mStackPointer++;
- return;
- }
-
- // In order to ensure this object is kept alive while it is
- // active, we acquire a reference at the outermost push. This is
- // released by the corresponding pop.
- if (mStackPointer == 0) {
- ref();
- }
-
- volatile StackEntry &entry = mStack[mStackPointer];
-
- // Make sure we increment the pointer after the name has
- // been written such that mStack is always consistent.
- entry.initCppFrame(aStackAddress, line);
- entry.setLabel(aName);
- MOZ_ASSERT(entry.flags() == js::ProfileEntry::IS_CPP_ENTRY);
- entry.setCategory(aCategory);
-
- // Track if mLabel needs a copy.
- if (aCopy)
- entry.setFlag(js::ProfileEntry::FRAME_LABEL_COPY);
- else
- entry.unsetFlag(js::ProfileEntry::FRAME_LABEL_COPY);
-
- // Prevent the optimizer from re-ordering these instructions
- STORE_SEQUENCER();
- mStackPointer++;
- }
-
- // Pop the stack. If the stack is empty and all other references to
- // this PseudoStack have been dropped, then the PseudoStack is
- // deleted and "false" is returned. Otherwise "true" is returned.
- bool popAndMaybeDelete()
- {
- mStackPointer--;
- if (mStackPointer == 0) {
- // Release our self-owned reference count. See 'push'.
- deref();
- return false;
- } else {
- return true;
- }
- }
- bool isEmpty()
- {
- return mStackPointer == 0;
- }
- uint32_t stackSize() const
- {
- return sMin(mStackPointer, mozilla::sig_safe_t(mozilla::ArrayLength(mStack)));
- }
-
- void sampleContext(JSContext* context) {
-#ifndef SPS_STANDALONE
- if (mContext && !context) {
- // On JS shut down, flush the current buffer as stringifying JIT samples
- // requires a live JSContext.
- flushSamplerOnJSShutdown();
- }
-
- mContext = context;
-
- if (!context) {
- return;
- }
-
- static_assert(sizeof(mStack[0]) == sizeof(js::ProfileEntry),
- "mStack must be binary compatible with js::ProfileEntry.");
- js::SetContextProfilingStack(context,
- (js::ProfileEntry*) mStack,
- (uint32_t*) &mStackPointer,
- (uint32_t) mozilla::ArrayLength(mStack));
- if (mStartJSSampling)
- enableJSSampling();
-#endif
- }
-#ifndef SPS_STANDALONE
- void enableJSSampling() {
- if (mContext) {
- js::EnableContextProfilingStack(mContext, true);
- js::RegisterContextProfilingEventMarker(mContext, &ProfilerJSEventMarker);
- mStartJSSampling = false;
- } else {
- mStartJSSampling = true;
- }
- }
- void jsOperationCallback() {
- if (mStartJSSampling)
- enableJSSampling();
- }
- void disableJSSampling() {
- mStartJSSampling = false;
- if (mContext)
- js::EnableContextProfilingStack(mContext, false);
- }
-#endif
-
- // Keep a list of active checkpoints
- StackEntry volatile mStack[1024];
- private:
-
- // A PseudoStack can only be created via the "create" method.
- PseudoStack()
- : mStackPointer(0)
- , mSleepId(0)
- , mSleepIdObserved(0)
- , mSleeping(false)
- , mRefCnt(1)
-#ifndef SPS_STANDALONE
- , mContext(nullptr)
-#endif
- , mStartJSSampling(false)
- , mPrivacyMode(false)
- {
- MOZ_COUNT_CTOR(PseudoStack);
- }
-
- // A PseudoStack can only be deleted via deref.
- ~PseudoStack() {
- MOZ_COUNT_DTOR(PseudoStack);
- if (mStackPointer != 0) {
- // We're releasing the pseudostack while it's still in use.
- // The label macros keep a non ref counted reference to the
- // stack to avoid a TLS. If these are not all cleared we will
- // get a use-after-free so better to crash now.
- abort();
- }
- }
-
- // No copying.
- PseudoStack(const PseudoStack&) = delete;
- void operator=(const PseudoStack&) = delete;
-
- void flushSamplerOnJSShutdown();
-
- // Keep a list of pending markers that must be moved
- // to the circular buffer
- ProfilerSignalSafeLinkedList<ProfilerMarker> mPendingMarkers;
- // This may exceed the length of mStack, so instead use the stackSize() method
- // to determine the number of valid samples in mStack
- mozilla::sig_safe_t mStackPointer;
- // Incremented at every sleep/wake up of the thread
- int mSleepId;
- // Previous id observed. If this is not the same as mSleepId, this thread is not sleeping in the same place any more
- mozilla::Atomic<int> mSleepIdObserved;
- // Keeps tack of whether the thread is sleeping or not (1 when sleeping 0 when awake)
- mozilla::Atomic<int> mSleeping;
- // This class is reference counted because it must be kept alive by
- // the ThreadInfo, by the reference from tlsPseudoStack, and by the
- // current thread when callbacks are in progress.
- mozilla::Atomic<int> mRefCnt;
-
- public:
-#ifndef SPS_STANDALONE
- // The context which is being sampled
- JSContext *mContext;
-#endif
- // Start JS Profiling when possible
- bool mStartJSSampling;
- bool mPrivacyMode;
-
- enum SleepState {NOT_SLEEPING, SLEEPING_FIRST, SLEEPING_AGAIN};
-
- // The first time this is called per sleep cycle we return SLEEPING_FIRST
- // and any other subsequent call within the same sleep cycle we return SLEEPING_AGAIN
- SleepState observeSleeping() {
- if (mSleeping != 0) {
- if (mSleepIdObserved == mSleepId) {
- return SLEEPING_AGAIN;
- } else {
- mSleepIdObserved = mSleepId;
- return SLEEPING_FIRST;
- }
- } else {
- return NOT_SLEEPING;
- }
- }
-
-
- // Call this whenever the current thread sleeps or wakes up
- // Calling setSleeping with the same value twice in a row is an error
- void setSleeping(int sleeping) {
- MOZ_ASSERT(mSleeping != sleeping);
- mSleepId++;
- mSleeping = sleeping;
- }
-
- bool isSleeping() {
- return !!mSleeping;
- }
-
- void ref() {
- ++mRefCnt;
- }
-
- void deref() {
- int newValue = --mRefCnt;
- if (newValue == 0) {
- delete this;
- }
- }
-};
-
-#endif
diff --git a/tools/profiler/public/shared-libraries.h b/tools/profiler/public/shared-libraries.h
deleted file mode 100644
index b02a1fb08..000000000
--- a/tools/profiler/public/shared-libraries.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et cindent: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef SHARED_LIBRARIES_H_
-#define SHARED_LIBRARIES_H_
-
-#ifndef MOZ_ENABLE_PROFILER_SPS
-#error This header does not have a useful implementation on your platform!
-#endif
-
-#include <algorithm>
-#include <vector>
-#include <string>
-#include <stdlib.h>
-#include <stdint.h>
-#ifndef SPS_STANDALONE
-#include <nsID.h>
-#endif
-
-class SharedLibrary {
-public:
-
- SharedLibrary(uintptr_t aStart,
- uintptr_t aEnd,
- uintptr_t aOffset,
- const std::string& aBreakpadId,
- const std::string& aName)
- : mStart(aStart)
- , mEnd(aEnd)
- , mOffset(aOffset)
- , mBreakpadId(aBreakpadId)
- , mName(aName)
- {}
-
- SharedLibrary(const SharedLibrary& aEntry)
- : mStart(aEntry.mStart)
- , mEnd(aEntry.mEnd)
- , mOffset(aEntry.mOffset)
- , mBreakpadId(aEntry.mBreakpadId)
- , mName(aEntry.mName)
- {}
-
- SharedLibrary& operator=(const SharedLibrary& aEntry)
- {
- // Gracefully handle self assignment
- if (this == &aEntry) return *this;
-
- mStart = aEntry.mStart;
- mEnd = aEntry.mEnd;
- mOffset = aEntry.mOffset;
- mBreakpadId = aEntry.mBreakpadId;
- mName = aEntry.mName;
- return *this;
- }
-
- bool operator==(const SharedLibrary& other) const
- {
- return (mStart == other.mStart) &&
- (mEnd == other.mEnd) &&
- (mOffset == other.mOffset) &&
- (mName == other.mName) &&
- (mBreakpadId == other.mBreakpadId);
- }
-
- uintptr_t GetStart() const { return mStart; }
- uintptr_t GetEnd() const { return mEnd; }
- uintptr_t GetOffset() const { return mOffset; }
- const std::string &GetBreakpadId() const { return mBreakpadId; }
- const std::string &GetName() const { return mName; }
-
-private:
- SharedLibrary() {}
-
- uintptr_t mStart;
- uintptr_t mEnd;
- uintptr_t mOffset;
- std::string mBreakpadId;
- std::string mName;
-};
-
-static bool
-CompareAddresses(const SharedLibrary& first, const SharedLibrary& second)
-{
- return first.GetStart() < second.GetStart();
-}
-
-class SharedLibraryInfo {
-public:
- static SharedLibraryInfo GetInfoForSelf();
- SharedLibraryInfo() {}
-
- void AddSharedLibrary(SharedLibrary entry)
- {
- mEntries.push_back(entry);
- }
-
- const SharedLibrary& GetEntry(size_t i) const
- {
- return mEntries[i];
- }
-
- // Removes items in the range [first, last)
- // i.e. element at the "last" index is not removed
- void RemoveEntries(size_t first, size_t last)
- {
- mEntries.erase(mEntries.begin() + first, mEntries.begin() + last);
- }
-
- bool Contains(const SharedLibrary& searchItem) const
- {
- return (mEntries.end() !=
- std::find(mEntries.begin(), mEntries.end(), searchItem));
- }
-
- size_t GetSize() const
- {
- return mEntries.size();
- }
-
- void SortByAddress()
- {
- std::sort(mEntries.begin(), mEntries.end(), CompareAddresses);
- }
-
- void Clear()
- {
- mEntries.clear();
- }
-
-private:
- std::vector<SharedLibrary> mEntries;
-};
-
-#endif
diff --git a/tools/profiler/tests/gtest/LulTest.cpp b/tools/profiler/tests/gtest/LulTest.cpp
deleted file mode 100644
index 8a165ab34..000000000
--- a/tools/profiler/tests/gtest/LulTest.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "gtest/gtest.h"
-#include "mozilla/Atomics.h"
-#include "LulMain.h"
-#include "GeckoProfiler.h" // for TracingMetadata
-#include "platform-linux-lul.h" // for read_procmaps
-
-// Set this to 0 to make LUL be completely silent during tests.
-// Set it to 1 to get logging output from LUL, presumably for
-// the purpose of debugging it.
-#define DEBUG_LUL_TEST 0
-
-// LUL needs a callback for its logging sink.
-static void
-gtest_logging_sink_for_LulIntegration(const char* str) {
- if (DEBUG_LUL_TEST == 0) {
- return;
- }
- // Ignore any trailing \n, since LOG will add one anyway.
- size_t n = strlen(str);
- if (n > 0 && str[n-1] == '\n') {
- char* tmp = strdup(str);
- tmp[n-1] = 0;
- fprintf(stderr, "LUL-in-gtest: %s\n", tmp);
- free(tmp);
- } else {
- fprintf(stderr, "LUL-in-gtest: %s\n", str);
- }
-}
-
-TEST(LulIntegration, unwind_consistency) {
- // Set up LUL and get it to read unwind info for libxul.so, which is
- // all we care about here, plus (incidentally) practically every
- // other object in the process too.
- lul::LUL* lul = new lul::LUL(gtest_logging_sink_for_LulIntegration);
- read_procmaps(lul);
-
- // Run unwind tests and receive information about how many there
- // were and how many were successful.
- lul->EnableUnwinding();
- int nTests = 0, nTestsPassed = 0;
- RunLulUnitTests(&nTests, &nTestsPassed, lul);
- EXPECT_TRUE(nTests == 6) << "Unexpected number of tests";
- EXPECT_TRUE(nTestsPassed == nTests) << "Not all tests passed";
-
- delete lul;
-}
diff --git a/tools/profiler/tests/gtest/LulTestDwarf.cpp b/tools/profiler/tests/gtest/LulTestDwarf.cpp
deleted file mode 100644
index 5cfd71fd4..000000000
--- a/tools/profiler/tests/gtest/LulTestDwarf.cpp
+++ /dev/null
@@ -1,2597 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "gtest/gtest.h"
-#include "gmock/gmock.h"
-#include "LulCommonExt.h"
-#include "LulDwarfExt.h"
-#include "LulDwarfInt.h"
-#include "LulTestInfrastructure.h"
-
-using testing::Test;
-using testing::Return;
-using testing::Sequence;
-using testing::InSequence;
-using testing::_;
-using lul_test::CFISection;
-using lul_test::test_assembler::kBigEndian;
-using lul_test::test_assembler::kLittleEndian;
-using lul_test::test_assembler::Label;
-
-#define PERHAPS_WRITE_DEBUG_FRAME_FILE(name, section) /**/
-#define PERHAPS_WRITE_EH_FRAME_FILE(name, section) /**/
-
-// Set this to 0 to make LUL be completely silent during tests.
-// Set it to 1 to get logging output from LUL, presumably for
-// the purpose of debugging it.
-#define DEBUG_LUL_TEST_DWARF 0
-
-// LUL needs a callback for its logging sink.
-static void
-gtest_logging_sink_for_LulTestDwarf(const char* str) {
- if (DEBUG_LUL_TEST_DWARF == 0) {
- return;
- }
- // Ignore any trailing \n, since LOG will add one anyway.
- size_t n = strlen(str);
- if (n > 0 && str[n-1] == '\n') {
- char* tmp = strdup(str);
- tmp[n-1] = 0;
- fprintf(stderr, "LUL-in-gtest: %s\n", tmp);
- free(tmp);
- } else {
- fprintf(stderr, "LUL-in-gtest: %s\n", str);
- }
-}
-
-namespace lul {
-
-class MockCallFrameInfoHandler : public CallFrameInfo::Handler {
- public:
- MOCK_METHOD6(Entry, bool(size_t offset, uint64 address, uint64 length,
- uint8 version, const std::string &augmentation,
- unsigned return_address));
- MOCK_METHOD2(UndefinedRule, bool(uint64 address, int reg));
- MOCK_METHOD2(SameValueRule, bool(uint64 address, int reg));
- MOCK_METHOD4(OffsetRule, bool(uint64 address, int reg, int base_register,
- long offset));
- MOCK_METHOD4(ValOffsetRule, bool(uint64 address, int reg, int base_register,
- long offset));
- MOCK_METHOD3(RegisterRule, bool(uint64 address, int reg, int base_register));
- MOCK_METHOD3(ExpressionRule, bool(uint64 address, int reg,
- const std::string &expression));
- MOCK_METHOD3(ValExpressionRule, bool(uint64 address, int reg,
- const std::string &expression));
- MOCK_METHOD0(End, bool());
- MOCK_METHOD2(PersonalityRoutine, bool(uint64 address, bool indirect));
- MOCK_METHOD2(LanguageSpecificDataArea, bool(uint64 address, bool indirect));
- MOCK_METHOD0(SignalHandler, bool());
-};
-
-class MockCallFrameErrorReporter : public CallFrameInfo::Reporter {
- public:
- MockCallFrameErrorReporter()
- : Reporter(gtest_logging_sink_for_LulTestDwarf,
- "mock filename", "mock section")
- { }
- MOCK_METHOD2(Incomplete, void(uint64, CallFrameInfo::EntryKind));
- MOCK_METHOD1(EarlyEHTerminator, void(uint64));
- MOCK_METHOD2(CIEPointerOutOfRange, void(uint64, uint64));
- MOCK_METHOD2(BadCIEId, void(uint64, uint64));
- MOCK_METHOD2(UnrecognizedVersion, void(uint64, int version));
- MOCK_METHOD2(UnrecognizedAugmentation, void(uint64, const string &));
- MOCK_METHOD2(InvalidPointerEncoding, void(uint64, uint8));
- MOCK_METHOD2(UnusablePointerEncoding, void(uint64, uint8));
- MOCK_METHOD2(RestoreInCIE, void(uint64, uint64));
- MOCK_METHOD3(BadInstruction, void(uint64, CallFrameInfo::EntryKind, uint64));
- MOCK_METHOD3(NoCFARule, void(uint64, CallFrameInfo::EntryKind, uint64));
- MOCK_METHOD3(EmptyStateStack, void(uint64, CallFrameInfo::EntryKind, uint64));
- MOCK_METHOD3(ClearingCFARule, void(uint64, CallFrameInfo::EntryKind, uint64));
-};
-
-struct CFIFixture {
-
- enum { kCFARegister = CallFrameInfo::Handler::kCFARegister };
-
- CFIFixture() {
- // Default expectations for the data handler.
- //
- // - Leave Entry and End without expectations, as it's probably a
- // good idea to set those explicitly in each test.
- //
- // - Expect the *Rule functions to not be called,
- // so that each test can simply list the calls they expect.
- //
- // I gather I could use StrictMock for this, but the manual seems
- // to suggest using that only as a last resort, and this isn't so
- // bad.
- EXPECT_CALL(handler, UndefinedRule(_, _)).Times(0);
- EXPECT_CALL(handler, SameValueRule(_, _)).Times(0);
- EXPECT_CALL(handler, OffsetRule(_, _, _, _)).Times(0);
- EXPECT_CALL(handler, ValOffsetRule(_, _, _, _)).Times(0);
- EXPECT_CALL(handler, RegisterRule(_, _, _)).Times(0);
- EXPECT_CALL(handler, ExpressionRule(_, _, _)).Times(0);
- EXPECT_CALL(handler, ValExpressionRule(_, _, _)).Times(0);
- EXPECT_CALL(handler, PersonalityRoutine(_, _)).Times(0);
- EXPECT_CALL(handler, LanguageSpecificDataArea(_, _)).Times(0);
- EXPECT_CALL(handler, SignalHandler()).Times(0);
-
- // Default expectations for the error/warning reporer.
- EXPECT_CALL(reporter, Incomplete(_, _)).Times(0);
- EXPECT_CALL(reporter, EarlyEHTerminator(_)).Times(0);
- EXPECT_CALL(reporter, CIEPointerOutOfRange(_, _)).Times(0);
- EXPECT_CALL(reporter, BadCIEId(_, _)).Times(0);
- EXPECT_CALL(reporter, UnrecognizedVersion(_, _)).Times(0);
- EXPECT_CALL(reporter, UnrecognizedAugmentation(_, _)).Times(0);
- EXPECT_CALL(reporter, InvalidPointerEncoding(_, _)).Times(0);
- EXPECT_CALL(reporter, UnusablePointerEncoding(_, _)).Times(0);
- EXPECT_CALL(reporter, RestoreInCIE(_, _)).Times(0);
- EXPECT_CALL(reporter, BadInstruction(_, _, _)).Times(0);
- EXPECT_CALL(reporter, NoCFARule(_, _, _)).Times(0);
- EXPECT_CALL(reporter, EmptyStateStack(_, _, _)).Times(0);
- EXPECT_CALL(reporter, ClearingCFARule(_, _, _)).Times(0);
- }
-
- MockCallFrameInfoHandler handler;
- MockCallFrameErrorReporter reporter;
-};
-
-class LulDwarfCFI: public CFIFixture, public Test { };
-
-TEST_F(LulDwarfCFI, EmptyRegion) {
- EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0);
- EXPECT_CALL(handler, End()).Times(0);
- static const char data[1] = { 42 };
-
- ByteReader reader(ENDIANNESS_BIG);
- CallFrameInfo parser(data, 0, &reader, &handler, &reporter);
- EXPECT_TRUE(parser.Start());
-}
-
-TEST_F(LulDwarfCFI, IncompleteLength32) {
- CFISection section(kBigEndian, 8);
- section
- // Not even long enough for an initial length.
- .D16(0xa0f)
- // Padding to keep valgrind happy. We subtract these off when we
- // construct the parser.
- .D16(0);
-
- EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0);
- EXPECT_CALL(handler, End()).Times(0);
-
- EXPECT_CALL(reporter, Incomplete(_, CallFrameInfo::kUnknown))
- .WillOnce(Return());
-
- string contents;
- ASSERT_TRUE(section.GetContents(&contents));
-
- ByteReader reader(ENDIANNESS_BIG);
- reader.SetAddressSize(8);
- CallFrameInfo parser(contents.data(), contents.size() - 2,
- &reader, &handler, &reporter);
- EXPECT_FALSE(parser.Start());
-}
-
-TEST_F(LulDwarfCFI, IncompleteLength64) {
- CFISection section(kLittleEndian, 4);
- section
- // An incomplete 64-bit DWARF initial length.
- .D32(0xffffffff).D32(0x71fbaec2)
- // Padding to keep valgrind happy. We subtract these off when we
- // construct the parser.
- .D32(0);
-
- EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0);
- EXPECT_CALL(handler, End()).Times(0);
-
- EXPECT_CALL(reporter, Incomplete(_, CallFrameInfo::kUnknown))
- .WillOnce(Return());
-
- string contents;
- ASSERT_TRUE(section.GetContents(&contents));
-
- ByteReader reader(ENDIANNESS_LITTLE);
- reader.SetAddressSize(4);
- CallFrameInfo parser(contents.data(), contents.size() - 4,
- &reader, &handler, &reporter);
- EXPECT_FALSE(parser.Start());
-}
-
-TEST_F(LulDwarfCFI, IncompleteId32) {
- CFISection section(kBigEndian, 8);
- section
- .D32(3) // Initial length, not long enough for id
- .D8(0xd7).D8(0xe5).D8(0xf1) // incomplete id
- .CIEHeader(8727, 3983, 8889, 3, "")
- .FinishEntry();
-
- EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0);
- EXPECT_CALL(handler, End()).Times(0);
-
- EXPECT_CALL(reporter, Incomplete(_, CallFrameInfo::kUnknown))
- .WillOnce(Return());
-
- string contents;
- ASSERT_TRUE(section.GetContents(&contents));
-
- ByteReader reader(ENDIANNESS_BIG);
- reader.SetAddressSize(8);
- CallFrameInfo parser(contents.data(), contents.size(),
- &reader, &handler, &reporter);
- EXPECT_FALSE(parser.Start());
-}
-
-TEST_F(LulDwarfCFI, BadId32) {
- CFISection section(kBigEndian, 8);
- section
- .D32(0x100) // Initial length
- .D32(0xe802fade) // bogus ID
- .Append(0x100 - 4, 0x42); // make the length true
- section
- .CIEHeader(1672, 9872, 8529, 3, "")
- .FinishEntry();
-
- EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0);
- EXPECT_CALL(handler, End()).Times(0);
-
- EXPECT_CALL(reporter, CIEPointerOutOfRange(_, 0xe802fade))
- .WillOnce(Return());
-
- string contents;
- ASSERT_TRUE(section.GetContents(&contents));
-
- ByteReader reader(ENDIANNESS_BIG);
- reader.SetAddressSize(8);
- CallFrameInfo parser(contents.data(), contents.size(),
- &reader, &handler, &reporter);
- EXPECT_FALSE(parser.Start());
-}
-
-// A lone CIE shouldn't cause any handler calls.
-TEST_F(LulDwarfCFI, SingleCIE) {
- CFISection section(kLittleEndian, 4);
- section.CIEHeader(0xffe799a8, 0x3398dcdd, 0x6e9683de, 3, "");
- section.Append(10, lul::DW_CFA_nop);
- section.FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("SingleCIE", section);
-
- EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0);
- EXPECT_CALL(handler, End()).Times(0);
-
- string contents;
- EXPECT_TRUE(section.GetContents(&contents));
- ByteReader reader(ENDIANNESS_LITTLE);
- reader.SetAddressSize(4);
- CallFrameInfo parser(contents.data(), contents.size(),
- &reader, &handler, &reporter);
- EXPECT_TRUE(parser.Start());
-}
-
-// One FDE, one CIE.
-TEST_F(LulDwarfCFI, OneFDE) {
- CFISection section(kBigEndian, 4);
- Label cie;
- section
- .Mark(&cie)
- .CIEHeader(0x4be22f75, 0x2492236e, 0x6b6efb87, 3, "")
- .FinishEntry()
- .FDEHeader(cie, 0x7714740d, 0x3d5a10cd)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("OneFDE", section);
-
- {
- InSequence s;
- EXPECT_CALL(handler,
- Entry(_, 0x7714740d, 0x3d5a10cd, 3, "", 0x6b6efb87))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
- }
-
- string contents;
- EXPECT_TRUE(section.GetContents(&contents));
- ByteReader reader(ENDIANNESS_BIG);
- reader.SetAddressSize(4);
- CallFrameInfo parser(contents.data(), contents.size(),
- &reader, &handler, &reporter);
- EXPECT_TRUE(parser.Start());
-}
-
-// Two FDEs share a CIE.
-TEST_F(LulDwarfCFI, TwoFDEsOneCIE) {
- CFISection section(kBigEndian, 4);
- Label cie;
- section
- // First FDE. readelf complains about this one because it makes
- // a forward reference to its CIE.
- .FDEHeader(cie, 0xa42744df, 0xa3b42121)
- .FinishEntry()
- // CIE.
- .Mark(&cie)
- .CIEHeader(0x04f7dc7b, 0x3d00c05f, 0xbd43cb59, 3, "")
- .FinishEntry()
- // Second FDE.
- .FDEHeader(cie, 0x6057d391, 0x700f608d)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("TwoFDEsOneCIE", section);
-
- {
- InSequence s;
- EXPECT_CALL(handler,
- Entry(_, 0xa42744df, 0xa3b42121, 3, "", 0xbd43cb59))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
- }
- {
- InSequence s;
- EXPECT_CALL(handler,
- Entry(_, 0x6057d391, 0x700f608d, 3, "", 0xbd43cb59))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
- }
-
- string contents;
- EXPECT_TRUE(section.GetContents(&contents));
- ByteReader reader(ENDIANNESS_BIG);
- reader.SetAddressSize(4);
- CallFrameInfo parser(contents.data(), contents.size(),
- &reader, &handler, &reporter);
- EXPECT_TRUE(parser.Start());
-}
-
-// Two FDEs, two CIEs.
-TEST_F(LulDwarfCFI, TwoFDEsTwoCIEs) {
- CFISection section(kLittleEndian, 8);
- Label cie1, cie2;
- section
- // First CIE.
- .Mark(&cie1)
- .CIEHeader(0x694d5d45, 0x4233221b, 0xbf45e65a, 3, "")
- .FinishEntry()
- // First FDE which cites second CIE. readelf complains about
- // this one because it makes a forward reference to its CIE.
- .FDEHeader(cie2, 0x778b27dfe5871f05ULL, 0x324ace3448070926ULL)
- .FinishEntry()
- // Second FDE, which cites first CIE.
- .FDEHeader(cie1, 0xf6054ca18b10bf5fULL, 0x45fdb970d8bca342ULL)
- .FinishEntry()
- // Second CIE.
- .Mark(&cie2)
- .CIEHeader(0xfba3fad7, 0x6287e1fd, 0x61d2c581, 2, "")
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("TwoFDEsTwoCIEs", section);
-
- {
- InSequence s;
- EXPECT_CALL(handler,
- Entry(_, 0x778b27dfe5871f05ULL, 0x324ace3448070926ULL, 2,
- "", 0x61d2c581))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
- }
- {
- InSequence s;
- EXPECT_CALL(handler,
- Entry(_, 0xf6054ca18b10bf5fULL, 0x45fdb970d8bca342ULL, 3,
- "", 0xbf45e65a))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
- }
-
- string contents;
- EXPECT_TRUE(section.GetContents(&contents));
- ByteReader reader(ENDIANNESS_LITTLE);
- reader.SetAddressSize(8);
- CallFrameInfo parser(contents.data(), contents.size(),
- &reader, &handler, &reporter);
- EXPECT_TRUE(parser.Start());
-}
-
-// An FDE whose CIE specifies a version we don't recognize.
-TEST_F(LulDwarfCFI, BadVersion) {
- CFISection section(kBigEndian, 4);
- Label cie1, cie2;
- section
- .Mark(&cie1)
- .CIEHeader(0xca878cf0, 0x7698ec04, 0x7b616f54, 0x52, "")
- .FinishEntry()
- // We should skip this entry, as its CIE specifies a version we
- // don't recognize.
- .FDEHeader(cie1, 0x08852292, 0x2204004a)
- .FinishEntry()
- // Despite the above, we should visit this entry.
- .Mark(&cie2)
- .CIEHeader(0x7c3ae7c9, 0xb9b9a512, 0x96cb3264, 3, "")
- .FinishEntry()
- .FDEHeader(cie2, 0x2094735a, 0x6e875501)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("BadVersion", section);
-
- EXPECT_CALL(reporter, UnrecognizedVersion(_, 0x52))
- .WillOnce(Return());
-
- {
- InSequence s;
- // We should see no mention of the first FDE, but we should get
- // a call to Entry for the second.
- EXPECT_CALL(handler, Entry(_, 0x2094735a, 0x6e875501, 3, "",
- 0x96cb3264))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End())
- .WillOnce(Return(true));
- }
-
- string contents;
- EXPECT_TRUE(section.GetContents(&contents));
- ByteReader reader(ENDIANNESS_BIG);
- reader.SetAddressSize(4);
- CallFrameInfo parser(contents.data(), contents.size(),
- &reader, &handler, &reporter);
- EXPECT_FALSE(parser.Start());
-}
-
-// An FDE whose CIE specifies an augmentation we don't recognize.
-TEST_F(LulDwarfCFI, BadAugmentation) {
- CFISection section(kBigEndian, 4);
- Label cie1, cie2;
- section
- .Mark(&cie1)
- .CIEHeader(0x4be22f75, 0x2492236e, 0x6b6efb87, 3, "spaniels!")
- .FinishEntry()
- // We should skip this entry, as its CIE specifies an
- // augmentation we don't recognize.
- .FDEHeader(cie1, 0x7714740d, 0x3d5a10cd)
- .FinishEntry()
- // Despite the above, we should visit this entry.
- .Mark(&cie2)
- .CIEHeader(0xf8bc4399, 0x8cf09931, 0xf2f519b2, 3, "")
- .FinishEntry()
- .FDEHeader(cie2, 0x7bf0fda0, 0xcbcd28d8)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("BadAugmentation", section);
-
- EXPECT_CALL(reporter, UnrecognizedAugmentation(_, "spaniels!"))
- .WillOnce(Return());
-
- {
- InSequence s;
- // We should see no mention of the first FDE, but we should get
- // a call to Entry for the second.
- EXPECT_CALL(handler, Entry(_, 0x7bf0fda0, 0xcbcd28d8, 3, "",
- 0xf2f519b2))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End())
- .WillOnce(Return(true));
- }
-
- string contents;
- EXPECT_TRUE(section.GetContents(&contents));
- ByteReader reader(ENDIANNESS_BIG);
- reader.SetAddressSize(4);
- CallFrameInfo parser(contents.data(), contents.size(),
- &reader, &handler, &reporter);
- EXPECT_FALSE(parser.Start());
-}
-
-// The return address column field is a byte in CFI version 1
-// (DWARF2), but a ULEB128 value in version 3 (DWARF3).
-TEST_F(LulDwarfCFI, CIEVersion1ReturnColumn) {
- CFISection section(kBigEndian, 4);
- Label cie;
- section
- // CIE, using the version 1 format: return column is a ubyte.
- .Mark(&cie)
- // Use a value for the return column that is parsed differently
- // as a ubyte and as a ULEB128.
- .CIEHeader(0xbcdea24f, 0x5be28286, 0x9f, 1, "")
- .FinishEntry()
- // FDE, citing that CIE.
- .FDEHeader(cie, 0xb8d347b5, 0x825e55dc)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("CIEVersion1ReturnColumn", section);
-
- {
- InSequence s;
- EXPECT_CALL(handler, Entry(_, 0xb8d347b5, 0x825e55dc, 1, "", 0x9f))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
- }
-
- string contents;
- EXPECT_TRUE(section.GetContents(&contents));
- ByteReader reader(ENDIANNESS_BIG);
- reader.SetAddressSize(4);
- CallFrameInfo parser(contents.data(), contents.size(),
- &reader, &handler, &reporter);
- EXPECT_TRUE(parser.Start());
-}
-
-// The return address column field is a byte in CFI version 1
-// (DWARF2), but a ULEB128 value in version 3 (DWARF3).
-TEST_F(LulDwarfCFI, CIEVersion3ReturnColumn) {
- CFISection section(kBigEndian, 4);
- Label cie;
- section
- // CIE, using the version 3 format: return column is a ULEB128.
- .Mark(&cie)
- // Use a value for the return column that is parsed differently
- // as a ubyte and as a ULEB128.
- .CIEHeader(0x0ab4758d, 0xc010fdf7, 0x89, 3, "")
- .FinishEntry()
- // FDE, citing that CIE.
- .FDEHeader(cie, 0x86763f2b, 0x2a66dc23)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("CIEVersion3ReturnColumn", section);
-
- {
- InSequence s;
- EXPECT_CALL(handler, Entry(_, 0x86763f2b, 0x2a66dc23, 3, "", 0x89))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
- }
-
- string contents;
- EXPECT_TRUE(section.GetContents(&contents));
- ByteReader reader(ENDIANNESS_BIG);
- reader.SetAddressSize(4);
- CallFrameInfo parser(contents.data(), contents.size(),
- &reader, &handler, &reporter);
- EXPECT_TRUE(parser.Start());
-}
-
-struct CFIInsnFixture: public CFIFixture {
- CFIInsnFixture() : CFIFixture() {
- data_factor = 0xb6f;
- return_register = 0x9be1ed9f;
- version = 3;
- cfa_base_register = 0x383a3aa;
- cfa_offset = 0xf748;
- }
-
- // Prepare SECTION to receive FDE instructions.
- //
- // - Append a stock CIE header that establishes the fixture's
- // code_factor, data_factor, return_register, version, and
- // augmentation values.
- // - Have the CIE set up a CFA rule using cfa_base_register and
- // cfa_offset.
- // - Append a stock FDE header, referring to the above CIE, for the
- // fde_size bytes at fde_start. Choose fde_start and fde_size
- // appropriately for the section's address size.
- // - Set appropriate expectations on handler in sequence s for the
- // frame description entry and the CIE's CFA rule.
- //
- // On return, SECTION is ready to have FDE instructions appended to
- // it, and its FinishEntry member called.
- void StockCIEAndFDE(CFISection *section) {
- // Choose appropriate constants for our address size.
- if (section->AddressSize() == 4) {
- fde_start = 0xc628ecfbU;
- fde_size = 0x5dee04a2;
- code_factor = 0x60b;
- } else {
- assert(section->AddressSize() == 8);
- fde_start = 0x0005c57ce7806bd3ULL;
- fde_size = 0x2699521b5e333100ULL;
- code_factor = 0x01008e32855274a8ULL;
- }
-
- // Create the CIE.
- (*section)
- .Mark(&cie_label)
- .CIEHeader(code_factor, data_factor, return_register, version,
- "")
- .D8(lul::DW_CFA_def_cfa)
- .ULEB128(cfa_base_register)
- .ULEB128(cfa_offset)
- .FinishEntry();
-
- // Create the FDE.
- section->FDEHeader(cie_label, fde_start, fde_size);
-
- // Expect an Entry call for the FDE and a ValOffsetRule call for the
- // CIE's CFA rule.
- EXPECT_CALL(handler, Entry(_, fde_start, fde_size, version, "",
- return_register))
- .InSequence(s)
- .WillOnce(Return(true));
- EXPECT_CALL(handler, ValOffsetRule(fde_start, kCFARegister,
- cfa_base_register, cfa_offset))
- .InSequence(s)
- .WillOnce(Return(true));
- }
-
- // Run the contents of SECTION through a CallFrameInfo parser,
- // expecting parser.Start to return SUCCEEDS. Caller may optionally
- // supply, via READER, its own ByteReader. If that's absent, a
- // local one is used.
- void ParseSection(CFISection *section,
- bool succeeds = true, ByteReader* reader = nullptr) {
- string contents;
- EXPECT_TRUE(section->GetContents(&contents));
- lul::Endianness endianness;
- if (section->endianness() == kBigEndian)
- endianness = ENDIANNESS_BIG;
- else {
- assert(section->endianness() == kLittleEndian);
- endianness = ENDIANNESS_LITTLE;
- }
- ByteReader local_reader(endianness);
- ByteReader* reader_to_use = reader ? reader : &local_reader;
- reader_to_use->SetAddressSize(section->AddressSize());
- CallFrameInfo parser(contents.data(), contents.size(),
- reader_to_use, &handler, &reporter);
- if (succeeds)
- EXPECT_TRUE(parser.Start());
- else
- EXPECT_FALSE(parser.Start());
- }
-
- Label cie_label;
- Sequence s;
- uint64 code_factor;
- int data_factor;
- unsigned return_register;
- unsigned version;
- unsigned cfa_base_register;
- int cfa_offset;
- uint64 fde_start, fde_size;
-};
-
-class LulDwarfCFIInsn: public CFIInsnFixture, public Test { };
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_set_loc) {
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_set_loc).D32(0xb1ee3e7a)
- // Use DW_CFA_def_cfa to force a handler call that we can use to
- // check the effect of the DW_CFA_set_loc.
- .D8(lul::DW_CFA_def_cfa).ULEB128(0x4defb431).ULEB128(0x6d17b0ee)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_set_loc", section);
-
- EXPECT_CALL(handler,
- ValOffsetRule(0xb1ee3e7a, kCFARegister, 0x4defb431, 0x6d17b0ee))
- .InSequence(s)
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_advance_loc) {
- CFISection section(kBigEndian, 8);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_advance_loc | 0x2a)
- // Use DW_CFA_def_cfa to force a handler call that we can use to
- // check the effect of the DW_CFA_advance_loc.
- .D8(lul::DW_CFA_def_cfa).ULEB128(0x5bbb3715).ULEB128(0x0186c7bf)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_advance_loc", section);
-
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start + 0x2a * code_factor,
- kCFARegister, 0x5bbb3715, 0x0186c7bf))
- .InSequence(s)
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_advance_loc1) {
- CFISection section(kLittleEndian, 8);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_advance_loc1).D8(0xd8)
- .D8(lul::DW_CFA_def_cfa).ULEB128(0x69d5696a).ULEB128(0x1eb7fc93)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_advance_loc1", section);
-
- EXPECT_CALL(handler,
- ValOffsetRule((fde_start + 0xd8 * code_factor),
- kCFARegister, 0x69d5696a, 0x1eb7fc93))
- .InSequence(s)
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_advance_loc2) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_advance_loc2).D16(0x3adb)
- .D8(lul::DW_CFA_def_cfa).ULEB128(0x3a368bed).ULEB128(0x3194ee37)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_advance_loc2", section);
-
- EXPECT_CALL(handler,
- ValOffsetRule((fde_start + 0x3adb * code_factor),
- kCFARegister, 0x3a368bed, 0x3194ee37))
- .InSequence(s)
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_advance_loc4) {
- CFISection section(kBigEndian, 8);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_advance_loc4).D32(0x15813c88)
- .D8(lul::DW_CFA_def_cfa).ULEB128(0x135270c5).ULEB128(0x24bad7cb)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_advance_loc4", section);
-
- EXPECT_CALL(handler,
- ValOffsetRule((fde_start + 0x15813c88ULL * code_factor),
- kCFARegister, 0x135270c5, 0x24bad7cb))
- .InSequence(s)
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_MIPS_advance_loc8) {
- code_factor = 0x2d;
- CFISection section(kBigEndian, 8);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_MIPS_advance_loc8).D64(0x3c4f3945b92c14ULL)
- .D8(lul::DW_CFA_def_cfa).ULEB128(0xe17ed602).ULEB128(0x3d162e7f)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_advance_loc8", section);
-
- EXPECT_CALL(handler,
- ValOffsetRule((fde_start + 0x3c4f3945b92c14ULL * code_factor),
- kCFARegister, 0xe17ed602, 0x3d162e7f))
- .InSequence(s)
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_def_cfa) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_def_cfa).ULEB128(0x4e363a85).ULEB128(0x815f9aa7)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_def_cfa", section);
-
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, kCFARegister, 0x4e363a85, 0x815f9aa7))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_def_cfa_sf) {
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_def_cfa_sf).ULEB128(0x8ccb32b7).LEB128(0x9ea)
- .D8(lul::DW_CFA_def_cfa_sf).ULEB128(0x9b40f5da).LEB128(-0x40a2)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, kCFARegister, 0x8ccb32b7,
- 0x9ea * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, kCFARegister, 0x9b40f5da,
- -0x40a2 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_def_cfa_register) {
- CFISection section(kLittleEndian, 8);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_def_cfa_register).ULEB128(0x3e7e9363)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, kCFARegister, 0x3e7e9363, cfa_offset))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-// DW_CFA_def_cfa_register should have no effect when applied to a
-// non-base/offset rule.
-TEST_F(LulDwarfCFIInsn, DW_CFA_def_cfa_registerBadRule) {
- ByteReader reader(ENDIANNESS_BIG);
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_def_cfa_expression).Block("needle in a haystack")
- .D8(lul::DW_CFA_def_cfa_register).ULEB128(0xf1b49e49)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- ValExpressionRule(fde_start, kCFARegister,
- "needle in a haystack"))
- .WillRepeatedly(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section, true, &reader);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_def_cfa_offset) {
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_def_cfa_offset).ULEB128(0x1e8e3b9b)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, kCFARegister, cfa_base_register,
- 0x1e8e3b9b))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_def_cfa_offset_sf) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_def_cfa_offset_sf).LEB128(0x970)
- .D8(lul::DW_CFA_def_cfa_offset_sf).LEB128(-0x2cd)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, kCFARegister, cfa_base_register,
- 0x970 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, kCFARegister, cfa_base_register,
- -0x2cd * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-// DW_CFA_def_cfa_offset should have no effect when applied to a
-// non-base/offset rule.
-TEST_F(LulDwarfCFIInsn, DW_CFA_def_cfa_offsetBadRule) {
- ByteReader reader(ENDIANNESS_BIG);
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_def_cfa_expression).Block("six ways to Sunday")
- .D8(lul::DW_CFA_def_cfa_offset).ULEB128(0x1e8e3b9b)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- ValExpressionRule(fde_start, kCFARegister,
- "six ways to Sunday"))
- .WillRepeatedly(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section, true, &reader);
-}
-
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_def_cfa_expression) {
- ByteReader reader(ENDIANNESS_LITTLE);
- CFISection section(kLittleEndian, 8);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_def_cfa_expression).Block("eating crow")
- .FinishEntry();
-
- EXPECT_CALL(handler, ValExpressionRule(fde_start, kCFARegister,
- "eating crow"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section, true, &reader);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_undefined) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_undefined).ULEB128(0x300ce45d)
- .FinishEntry();
-
- EXPECT_CALL(handler, UndefinedRule(fde_start, 0x300ce45d))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_same_value) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_same_value).ULEB128(0x3865a760)
- .FinishEntry();
-
- EXPECT_CALL(handler, SameValueRule(fde_start, 0x3865a760))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_offset) {
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_offset | 0x2c).ULEB128(0x9f6)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- OffsetRule(fde_start, 0x2c, kCFARegister, 0x9f6 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_offset_extended) {
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_offset_extended).ULEB128(0x402b).ULEB128(0xb48)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- OffsetRule(fde_start,
- 0x402b, kCFARegister, 0xb48 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_offset_extended_sf) {
- CFISection section(kBigEndian, 8);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_offset_extended_sf)
- .ULEB128(0x997c23ee).LEB128(0x2d00)
- .D8(lul::DW_CFA_offset_extended_sf)
- .ULEB128(0x9519eb82).LEB128(-0xa77)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- OffsetRule(fde_start, 0x997c23ee,
- kCFARegister, 0x2d00 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler,
- OffsetRule(fde_start, 0x9519eb82,
- kCFARegister, -0xa77 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_val_offset) {
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_val_offset).ULEB128(0x623562fe).ULEB128(0x673)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, 0x623562fe,
- kCFARegister, 0x673 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_val_offset_sf) {
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_val_offset_sf).ULEB128(0x6f4f).LEB128(0xaab)
- .D8(lul::DW_CFA_val_offset_sf).ULEB128(0x2483).LEB128(-0x8a2)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, 0x6f4f,
- kCFARegister, 0xaab * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, 0x2483,
- kCFARegister, -0x8a2 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_register) {
- CFISection section(kLittleEndian, 8);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_register).ULEB128(0x278d18f9).ULEB128(0x1a684414)
- .FinishEntry();
-
- EXPECT_CALL(handler, RegisterRule(fde_start, 0x278d18f9, 0x1a684414))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_expression) {
- ByteReader reader(ENDIANNESS_BIG);
- CFISection section(kBigEndian, 8);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_expression).ULEB128(0xa1619fb2)
- .Block("plus ça change, plus c'est la même chose")
- .FinishEntry();
-
- EXPECT_CALL(handler,
- ExpressionRule(fde_start, 0xa1619fb2,
- "plus ça change, plus c'est la même chose"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section, true, &reader);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_val_expression) {
- ByteReader reader(ENDIANNESS_BIG);
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_val_expression).ULEB128(0xc5e4a9e3)
- .Block("he who has the gold makes the rules")
- .FinishEntry();
-
- EXPECT_CALL(handler,
- ValExpressionRule(fde_start, 0xc5e4a9e3,
- "he who has the gold makes the rules"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section, true, &reader);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_restore) {
- CFISection section(kLittleEndian, 8);
- code_factor = 0x01bd188a9b1fa083ULL;
- data_factor = -0x1ac8;
- return_register = 0x8c35b049;
- version = 2;
- fde_start = 0x2d70fe998298bbb1ULL;
- fde_size = 0x46ccc2e63cf0b108ULL;
- Label cie;
- section
- .Mark(&cie)
- .CIEHeader(code_factor, data_factor, return_register, version,
- "")
- // Provide a CFA rule, because register rules require them.
- .D8(lul::DW_CFA_def_cfa).ULEB128(0x6ca1d50e).ULEB128(0x372e38e8)
- // Provide an offset(N) rule for register 0x3c.
- .D8(lul::DW_CFA_offset | 0x3c).ULEB128(0xb348)
- .FinishEntry()
- // In the FDE...
- .FDEHeader(cie, fde_start, fde_size)
- // At a second address, provide a new offset(N) rule for register 0x3c.
- .D8(lul::DW_CFA_advance_loc | 0x13)
- .D8(lul::DW_CFA_offset | 0x3c).ULEB128(0x9a50)
- // At a third address, restore the original rule for register 0x3c.
- .D8(lul::DW_CFA_advance_loc | 0x01)
- .D8(lul::DW_CFA_restore | 0x3c)
- .FinishEntry();
-
- {
- InSequence s;
- EXPECT_CALL(handler,
- Entry(_, fde_start, fde_size, version, "", return_register))
- .WillOnce(Return(true));
- // CIE's CFA rule.
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start,
- kCFARegister, 0x6ca1d50e, 0x372e38e8))
- .WillOnce(Return(true));
- // CIE's rule for register 0x3c.
- EXPECT_CALL(handler,
- OffsetRule(fde_start, 0x3c,
- kCFARegister, 0xb348 * data_factor))
- .WillOnce(Return(true));
- // FDE's rule for register 0x3c.
- EXPECT_CALL(handler,
- OffsetRule(fde_start + 0x13 * code_factor, 0x3c,
- kCFARegister, 0x9a50 * data_factor))
- .WillOnce(Return(true));
- // Restore CIE's rule for register 0x3c.
- EXPECT_CALL(handler,
- OffsetRule(fde_start + (0x13 + 0x01) * code_factor, 0x3c,
- kCFARegister, 0xb348 * data_factor))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
- }
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_restoreNoRule) {
- CFISection section(kBigEndian, 4);
- code_factor = 0x005f78143c1c3b82ULL;
- data_factor = 0x25d0;
- return_register = 0xe8;
- version = 1;
- fde_start = 0x4062e30f;
- fde_size = 0x5302a389;
- Label cie;
- section
- .Mark(&cie)
- .CIEHeader(code_factor, data_factor, return_register, version, "")
- // Provide a CFA rule, because register rules require them.
- .D8(lul::DW_CFA_def_cfa).ULEB128(0x470aa334).ULEB128(0x099ef127)
- .FinishEntry()
- // In the FDE...
- .FDEHeader(cie, fde_start, fde_size)
- // At a second address, provide an offset(N) rule for register 0x2c.
- .D8(lul::DW_CFA_advance_loc | 0x7)
- .D8(lul::DW_CFA_offset | 0x2c).ULEB128(0x1f47)
- // At a third address, restore the (missing) CIE rule for register 0x2c.
- .D8(lul::DW_CFA_advance_loc | 0xb)
- .D8(lul::DW_CFA_restore | 0x2c)
- .FinishEntry();
-
- {
- InSequence s;
- EXPECT_CALL(handler,
- Entry(_, fde_start, fde_size, version, "", return_register))
- .WillOnce(Return(true));
- // CIE's CFA rule.
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start,
- kCFARegister, 0x470aa334, 0x099ef127))
- .WillOnce(Return(true));
- // FDE's rule for register 0x2c.
- EXPECT_CALL(handler,
- OffsetRule(fde_start + 0x7 * code_factor, 0x2c,
- kCFARegister, 0x1f47 * data_factor))
- .WillOnce(Return(true));
- // Restore CIE's (missing) rule for register 0x2c.
- EXPECT_CALL(handler,
- SameValueRule(fde_start + (0x7 + 0xb) * code_factor, 0x2c))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
- }
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_restore_extended) {
- CFISection section(kBigEndian, 4);
- code_factor = 0x126e;
- data_factor = -0xd8b;
- return_register = 0x77711787;
- version = 3;
- fde_start = 0x01f55a45;
- fde_size = 0x452adb80;
- Label cie;
- section
- .Mark(&cie)
- .CIEHeader(code_factor, data_factor, return_register, version,
- "", true /* dwarf64 */ )
- // Provide a CFA rule, because register rules require them.
- .D8(lul::DW_CFA_def_cfa).ULEB128(0x56fa0edd).ULEB128(0x097f78a5)
- // Provide an offset(N) rule for register 0x0f9b8a1c.
- .D8(lul::DW_CFA_offset_extended)
- .ULEB128(0x0f9b8a1c).ULEB128(0xc979)
- .FinishEntry()
- // In the FDE...
- .FDEHeader(cie, fde_start, fde_size)
- // At a second address, provide a new offset(N) rule for reg 0x0f9b8a1c.
- .D8(lul::DW_CFA_advance_loc | 0x3)
- .D8(lul::DW_CFA_offset_extended)
- .ULEB128(0x0f9b8a1c).ULEB128(0x3b7b)
- // At a third address, restore the original rule for register 0x0f9b8a1c.
- .D8(lul::DW_CFA_advance_loc | 0x04)
- .D8(lul::DW_CFA_restore_extended).ULEB128(0x0f9b8a1c)
- .FinishEntry();
-
- {
- InSequence s;
- EXPECT_CALL(handler,
- Entry(_, fde_start, fde_size, version, "", return_register))
- .WillOnce(Return(true));
- // CIE's CFA rule.
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, kCFARegister, 0x56fa0edd, 0x097f78a5))
- .WillOnce(Return(true));
- // CIE's rule for register 0x0f9b8a1c.
- EXPECT_CALL(handler,
- OffsetRule(fde_start, 0x0f9b8a1c, kCFARegister,
- 0xc979 * data_factor))
- .WillOnce(Return(true));
- // FDE's rule for register 0x0f9b8a1c.
- EXPECT_CALL(handler,
- OffsetRule(fde_start + 0x3 * code_factor, 0x0f9b8a1c,
- kCFARegister, 0x3b7b * data_factor))
- .WillOnce(Return(true));
- // Restore CIE's rule for register 0x0f9b8a1c.
- EXPECT_CALL(handler,
- OffsetRule(fde_start + (0x3 + 0x4) * code_factor, 0x0f9b8a1c,
- kCFARegister, 0xc979 * data_factor))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
- }
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_remember_and_restore_state) {
- CFISection section(kLittleEndian, 8);
- StockCIEAndFDE(&section);
-
- // We create a state, save it, modify it, and then restore. We
- // refer to the state that is overridden the restore as the
- // "outgoing" state, and the restored state the "incoming" state.
- //
- // Register outgoing incoming expect
- // 1 offset(N) no rule new "same value" rule
- // 2 register(R) offset(N) report changed rule
- // 3 offset(N) offset(M) report changed offset
- // 4 offset(N) offset(N) no report
- // 5 offset(N) no rule new "same value" rule
- section
- // Create the "incoming" state, which we will save and later restore.
- .D8(lul::DW_CFA_offset | 2).ULEB128(0x9806)
- .D8(lul::DW_CFA_offset | 3).ULEB128(0x995d)
- .D8(lul::DW_CFA_offset | 4).ULEB128(0x7055)
- .D8(lul::DW_CFA_remember_state)
- // Advance to a new instruction; an implementation could legitimately
- // ignore all but the final rule for a given register at a given address.
- .D8(lul::DW_CFA_advance_loc | 1)
- // Create the "outgoing" state, which we will discard.
- .D8(lul::DW_CFA_offset | 1).ULEB128(0xea1a)
- .D8(lul::DW_CFA_register).ULEB128(2).ULEB128(0x1d2a3767)
- .D8(lul::DW_CFA_offset | 3).ULEB128(0xdd29)
- .D8(lul::DW_CFA_offset | 5).ULEB128(0xf1ce)
- // At a third address, restore the incoming state.
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- uint64 addr = fde_start;
-
- // Expect the incoming rules to be reported.
- EXPECT_CALL(handler, OffsetRule(addr, 2, kCFARegister, 0x9806 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, OffsetRule(addr, 3, kCFARegister, 0x995d * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, OffsetRule(addr, 4, kCFARegister, 0x7055 * data_factor))
- .InSequence(s).WillOnce(Return(true));
-
- addr += code_factor;
-
- // After the save, we establish the outgoing rule set.
- EXPECT_CALL(handler, OffsetRule(addr, 1, kCFARegister, 0xea1a * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, RegisterRule(addr, 2, 0x1d2a3767))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, OffsetRule(addr, 3, kCFARegister, 0xdd29 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, OffsetRule(addr, 5, kCFARegister, 0xf1ce * data_factor))
- .InSequence(s).WillOnce(Return(true));
-
- addr += code_factor;
-
- // Finally, after the restore, expect to see the differences from
- // the outgoing to the incoming rules reported.
- EXPECT_CALL(handler, SameValueRule(addr, 1))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, OffsetRule(addr, 2, kCFARegister, 0x9806 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, OffsetRule(addr, 3, kCFARegister, 0x995d * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, SameValueRule(addr, 5))
- .InSequence(s).WillOnce(Return(true));
-
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-// Check that restoring a rule set reports changes to the CFA rule.
-TEST_F(LulDwarfCFIInsn, DW_CFA_remember_and_restore_stateCFA) {
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
-
- section
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_def_cfa_offset).ULEB128(0x90481102)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, ValOffsetRule(fde_start + code_factor, kCFARegister,
- cfa_base_register, 0x90481102))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, ValOffsetRule(fde_start + code_factor * 2, kCFARegister,
- cfa_base_register, cfa_offset))
- .InSequence(s).WillOnce(Return(true));
-
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_nop) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_nop)
- .D8(lul::DW_CFA_def_cfa).ULEB128(0x3fb8d4f1).ULEB128(0x078dc67b)
- .D8(lul::DW_CFA_nop)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- ValOffsetRule(fde_start, kCFARegister, 0x3fb8d4f1, 0x078dc67b))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_GNU_window_save) {
- CFISection section(kBigEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_GNU_window_save)
- .FinishEntry();
-
- // Don't include all the rules in any particular sequence.
-
- // The caller's %o0-%o7 have become the callee's %i0-%i7. This is
- // the GCC register numbering.
- for (int i = 8; i < 16; i++)
- EXPECT_CALL(handler, RegisterRule(fde_start, i, i + 16))
- .WillOnce(Return(true));
- // The caller's %l0-%l7 and %i0-%i7 have been saved at the top of
- // its frame.
- for (int i = 16; i < 32; i++)
- EXPECT_CALL(handler, OffsetRule(fde_start, i, kCFARegister, (i-16) * 4))
- .WillOnce(Return(true));
-
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_GNU_args_size) {
- CFISection section(kLittleEndian, 8);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_GNU_args_size).ULEB128(0xeddfa520)
- // Verify that we see this, meaning we parsed the above properly.
- .D8(lul::DW_CFA_offset | 0x23).ULEB128(0x269)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- OffsetRule(fde_start, 0x23, kCFARegister, 0x269 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIInsn, DW_CFA_GNU_negative_offset_extended) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_GNU_negative_offset_extended)
- .ULEB128(0x430cc87a).ULEB128(0x613)
- .FinishEntry();
-
- EXPECT_CALL(handler,
- OffsetRule(fde_start, 0x430cc87a,
- kCFARegister, -0x613 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-// Three FDEs: skip the second
-TEST_F(LulDwarfCFIInsn, SkipFDE) {
- CFISection section(kBigEndian, 4);
- Label cie;
- section
- // CIE, used by all FDEs.
- .Mark(&cie)
- .CIEHeader(0x010269f2, 0x9177, 0xedca5849, 2, "")
- .D8(lul::DW_CFA_def_cfa).ULEB128(0x42ed390b).ULEB128(0x98f43aad)
- .FinishEntry()
- // First FDE.
- .FDEHeader(cie, 0xa870ebdd, 0x60f6aa4)
- .D8(lul::DW_CFA_register).ULEB128(0x3a860351).ULEB128(0x6c9a6bcf)
- .FinishEntry()
- // Second FDE.
- .FDEHeader(cie, 0xc534f7c0, 0xf6552e9, true /* dwarf64 */)
- .D8(lul::DW_CFA_register).ULEB128(0x1b62c234).ULEB128(0x26586b18)
- .FinishEntry()
- // Third FDE.
- .FDEHeader(cie, 0xf681cfc8, 0x7e4594e)
- .D8(lul::DW_CFA_register).ULEB128(0x26c53934).ULEB128(0x18eeb8a4)
- .FinishEntry();
-
- {
- InSequence s;
-
- // Process the first FDE.
- EXPECT_CALL(handler, Entry(_, 0xa870ebdd, 0x60f6aa4, 2, "", 0xedca5849))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, ValOffsetRule(0xa870ebdd, kCFARegister,
- 0x42ed390b, 0x98f43aad))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, RegisterRule(0xa870ebdd, 0x3a860351, 0x6c9a6bcf))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End())
- .WillOnce(Return(true));
-
- // Skip the second FDE.
- EXPECT_CALL(handler, Entry(_, 0xc534f7c0, 0xf6552e9, 2, "", 0xedca5849))
- .WillOnce(Return(false));
-
- // Process the third FDE.
- EXPECT_CALL(handler, Entry(_, 0xf681cfc8, 0x7e4594e, 2, "", 0xedca5849))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, ValOffsetRule(0xf681cfc8, kCFARegister,
- 0x42ed390b, 0x98f43aad))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, RegisterRule(0xf681cfc8, 0x26c53934, 0x18eeb8a4))
- .WillOnce(Return(true));
- EXPECT_CALL(handler, End())
- .WillOnce(Return(true));
- }
-
- ParseSection(&section);
-}
-
-// Quit processing in the middle of an entry's instructions.
-TEST_F(LulDwarfCFIInsn, QuitMidentry) {
- CFISection section(kLittleEndian, 8);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_register).ULEB128(0xe0cf850d).ULEB128(0x15aab431)
- .D8(lul::DW_CFA_expression).ULEB128(0x46750aa5).Block("meat")
- .FinishEntry();
-
- EXPECT_CALL(handler, RegisterRule(fde_start, 0xe0cf850d, 0x15aab431))
- .InSequence(s).WillOnce(Return(false));
- EXPECT_CALL(handler, End())
- .InSequence(s).WillOnce(Return(true));
-
- ParseSection(&section, false);
-}
-
-class LulDwarfCFIRestore: public CFIInsnFixture, public Test { };
-
-TEST_F(LulDwarfCFIRestore, RestoreUndefinedRuleUnchanged) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_undefined).ULEB128(0x0bac878e)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, UndefinedRule(fde_start, 0x0bac878e))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreUndefinedRuleChanged) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_undefined).ULEB128(0x7dedff5f)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_same_value).ULEB128(0x7dedff5f)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, UndefinedRule(fde_start, 0x7dedff5f))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, SameValueRule(fde_start + code_factor, 0x7dedff5f))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, UndefinedRule(fde_start + 2 * code_factor, 0x7dedff5f))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreSameValueRuleUnchanged) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_same_value).ULEB128(0xadbc9b3a)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, SameValueRule(fde_start, 0xadbc9b3a))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreSameValueRuleChanged) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_same_value).ULEB128(0x3d90dcb5)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_undefined).ULEB128(0x3d90dcb5)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, SameValueRule(fde_start, 0x3d90dcb5))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0x3d90dcb5))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, SameValueRule(fde_start + 2 * code_factor, 0x3d90dcb5))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreOffsetRuleUnchanged) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_offset | 0x14).ULEB128(0xb6f)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, OffsetRule(fde_start, 0x14,
- kCFARegister, 0xb6f * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreOffsetRuleChanged) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_offset | 0x21).ULEB128(0xeb7)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_undefined).ULEB128(0x21)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, OffsetRule(fde_start, 0x21,
- kCFARegister, 0xeb7 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0x21))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, OffsetRule(fde_start + 2 * code_factor, 0x21,
- kCFARegister, 0xeb7 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreOffsetRuleChangedOffset) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_offset | 0x21).ULEB128(0x134)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_offset | 0x21).ULEB128(0xf4f)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, OffsetRule(fde_start, 0x21,
- kCFARegister, 0x134 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, OffsetRule(fde_start + code_factor, 0x21,
- kCFARegister, 0xf4f * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, OffsetRule(fde_start + 2 * code_factor, 0x21,
- kCFARegister, 0x134 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreValOffsetRuleUnchanged) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_val_offset).ULEB128(0x829caee6).ULEB128(0xe4c)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, ValOffsetRule(fde_start, 0x829caee6,
- kCFARegister, 0xe4c * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreValOffsetRuleChanged) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_val_offset).ULEB128(0xf17c36d6).ULEB128(0xeb7)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_undefined).ULEB128(0xf17c36d6)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, ValOffsetRule(fde_start, 0xf17c36d6,
- kCFARegister, 0xeb7 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0xf17c36d6))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, ValOffsetRule(fde_start + 2 * code_factor, 0xf17c36d6,
- kCFARegister, 0xeb7 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreValOffsetRuleChangedValOffset) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_val_offset).ULEB128(0x2cf0ab1b).ULEB128(0x562)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_val_offset).ULEB128(0x2cf0ab1b).ULEB128(0xe88)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, ValOffsetRule(fde_start, 0x2cf0ab1b,
- kCFARegister, 0x562 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, ValOffsetRule(fde_start + code_factor, 0x2cf0ab1b,
- kCFARegister, 0xe88 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, ValOffsetRule(fde_start + 2 * code_factor, 0x2cf0ab1b,
- kCFARegister, 0x562 * data_factor))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreRegisterRuleUnchanged) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_register).ULEB128(0x77514acc).ULEB128(0x464de4ce)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, RegisterRule(fde_start, 0x77514acc, 0x464de4ce))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreRegisterRuleChanged) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_register).ULEB128(0xe39acce5).ULEB128(0x095f1559)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_undefined).ULEB128(0xe39acce5)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, RegisterRule(fde_start, 0xe39acce5, 0x095f1559))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0xe39acce5))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, RegisterRule(fde_start + 2 * code_factor, 0xe39acce5,
- 0x095f1559))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreRegisterRuleChangedRegister) {
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_register).ULEB128(0xd40e21b1).ULEB128(0x16607d6a)
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_register).ULEB128(0xd40e21b1).ULEB128(0xbabb4742)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, RegisterRule(fde_start, 0xd40e21b1, 0x16607d6a))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, RegisterRule(fde_start + code_factor, 0xd40e21b1,
- 0xbabb4742))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, RegisterRule(fde_start + 2 * code_factor, 0xd40e21b1,
- 0x16607d6a))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreExpressionRuleUnchanged) {
- ByteReader reader(ENDIANNESS_LITTLE);
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_expression).ULEB128(0x666ae152).Block("dwarf")
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, ExpressionRule(fde_start, 0x666ae152, "dwarf"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section, true, &reader);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreExpressionRuleChanged) {
- ByteReader reader(ENDIANNESS_LITTLE);
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_expression).ULEB128(0xb5ca5c46).Block("elf")
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_undefined).ULEB128(0xb5ca5c46)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, ExpressionRule(fde_start, 0xb5ca5c46, "elf"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0xb5ca5c46))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, ExpressionRule(fde_start + 2 * code_factor, 0xb5ca5c46,
- "elf"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section, true, &reader);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreExpressionRuleChangedExpression) {
- ByteReader reader(ENDIANNESS_LITTLE);
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_expression).ULEB128(0x500f5739).Block("smurf")
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_expression).ULEB128(0x500f5739).Block("orc")
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, ExpressionRule(fde_start, 0x500f5739, "smurf"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, ExpressionRule(fde_start + code_factor, 0x500f5739,
- "orc"))
- .InSequence(s).WillOnce(Return(true));
- // Expectations are not wishes.
- EXPECT_CALL(handler, ExpressionRule(fde_start + 2 * code_factor, 0x500f5739,
- "smurf"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section, true, &reader);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreValExpressionRuleUnchanged) {
- ByteReader reader(ENDIANNESS_LITTLE);
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_val_expression).ULEB128(0x666ae152)
- .Block("hideous")
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- EXPECT_CALL(handler, ValExpressionRule(fde_start, 0x666ae152, "hideous"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section, true, &reader);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreValExpressionRuleChanged) {
- ByteReader reader(ENDIANNESS_LITTLE);
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_val_expression).ULEB128(0xb5ca5c46)
- .Block("revolting")
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_undefined).ULEB128(0xb5ca5c46)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("RestoreValExpressionRuleChanged", section);
-
- EXPECT_CALL(handler, ValExpressionRule(fde_start, 0xb5ca5c46, "revolting"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0xb5ca5c46))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, ValExpressionRule(fde_start + 2 * code_factor, 0xb5ca5c46,
- "revolting"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section, true, &reader);
-}
-
-TEST_F(LulDwarfCFIRestore, RestoreValExpressionRuleChangedValExpression) {
- ByteReader reader(ENDIANNESS_LITTLE);
- CFISection section(kLittleEndian, 4);
- StockCIEAndFDE(&section);
- section
- .D8(lul::DW_CFA_val_expression).ULEB128(0x500f5739)
- .Block("repulsive")
- .D8(lul::DW_CFA_remember_state)
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_val_expression).ULEB128(0x500f5739)
- .Block("nauseous")
- .D8(lul::DW_CFA_advance_loc | 1)
- .D8(lul::DW_CFA_restore_state)
- .FinishEntry();
-
- PERHAPS_WRITE_DEBUG_FRAME_FILE("RestoreValExpressionRuleChangedValExpression",
- section);
-
- EXPECT_CALL(handler, ValExpressionRule(fde_start, 0x500f5739, "repulsive"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, ValExpressionRule(fde_start + code_factor, 0x500f5739,
- "nauseous"))
- .InSequence(s).WillOnce(Return(true));
- // Expectations are not wishes.
- EXPECT_CALL(handler, ValExpressionRule(fde_start + 2 * code_factor, 0x500f5739,
- "repulsive"))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End()).WillOnce(Return(true));
-
- ParseSection(&section, true, &reader);
-}
-
-struct EHFrameFixture: public CFIInsnFixture {
- EHFrameFixture()
- : CFIInsnFixture(), section(kBigEndian, 4, true) {
- encoded_pointer_bases.cfi = 0x7f496cb2;
- encoded_pointer_bases.text = 0x540f67b6;
- encoded_pointer_bases.data = 0xe3eab768;
- section.SetEncodedPointerBases(encoded_pointer_bases);
- }
- CFISection section;
- CFISection::EncodedPointerBases encoded_pointer_bases;
-
- // Parse CFIInsnFixture::ParseSection, but parse the section as
- // .eh_frame data, supplying stock base addresses.
- void ParseEHFrameSection(CFISection *section, bool succeeds = true) {
- EXPECT_TRUE(section->ContainsEHFrame());
- string contents;
- EXPECT_TRUE(section->GetContents(&contents));
- lul::Endianness endianness;
- if (section->endianness() == kBigEndian)
- endianness = ENDIANNESS_BIG;
- else {
- assert(section->endianness() == kLittleEndian);
- endianness = ENDIANNESS_LITTLE;
- }
- ByteReader reader(endianness);
- reader.SetAddressSize(section->AddressSize());
- reader.SetCFIDataBase(encoded_pointer_bases.cfi, contents.data());
- reader.SetTextBase(encoded_pointer_bases.text);
- reader.SetDataBase(encoded_pointer_bases.data);
- CallFrameInfo parser(contents.data(), contents.size(),
- &reader, &handler, &reporter, true);
- if (succeeds)
- EXPECT_TRUE(parser.Start());
- else
- EXPECT_FALSE(parser.Start());
- }
-
-};
-
-class LulDwarfEHFrame: public EHFrameFixture, public Test { };
-
-// A simple CIE, an FDE, and a terminator.
-TEST_F(LulDwarfEHFrame, Terminator) {
- Label cie;
- section
- .Mark(&cie)
- .CIEHeader(9968, 2466, 67, 1, "")
- .D8(lul::DW_CFA_def_cfa).ULEB128(3772).ULEB128(1372)
- .FinishEntry()
- .FDEHeader(cie, 0x848037a1, 0x7b30475e)
- .D8(lul::DW_CFA_set_loc).D32(0x17713850)
- .D8(lul::DW_CFA_undefined).ULEB128(5721)
- .FinishEntry()
- .D32(0) // Terminate the sequence.
- // This FDE should be ignored.
- .FDEHeader(cie, 0xf19629fe, 0x439fb09b)
- .FinishEntry();
-
- PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.Terminator", section);
-
- EXPECT_CALL(handler, Entry(_, 0x848037a1, 0x7b30475e, 1, "", 67))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, ValOffsetRule(0x848037a1, kCFARegister, 3772, 1372))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, UndefinedRule(0x17713850, 5721))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End())
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(reporter, EarlyEHTerminator(_))
- .InSequence(s).WillOnce(Return());
-
- ParseEHFrameSection(&section);
-}
-
-// The parser should recognize the Linux Standards Base 'z' augmentations.
-TEST_F(LulDwarfEHFrame, SimpleFDE) {
- lul::DwarfPointerEncoding lsda_encoding =
- lul::DwarfPointerEncoding(lul::DW_EH_PE_indirect
- | lul::DW_EH_PE_datarel
- | lul::DW_EH_PE_sdata2);
- lul::DwarfPointerEncoding fde_encoding =
- lul::DwarfPointerEncoding(lul::DW_EH_PE_textrel
- | lul::DW_EH_PE_udata2);
-
- section.SetPointerEncoding(fde_encoding);
- section.SetEncodedPointerBases(encoded_pointer_bases);
- Label cie;
- section
- .Mark(&cie)
- .CIEHeader(4873, 7012, 100, 1, "zSLPR")
- .ULEB128(7) // Augmentation data length
- .D8(lsda_encoding) // LSDA pointer format
- .D8(lul::DW_EH_PE_pcrel) // personality pointer format
- .EncodedPointer(0x97baa00, lul::DW_EH_PE_pcrel) // and value
- .D8(fde_encoding) // FDE pointer format
- .D8(lul::DW_CFA_def_cfa).ULEB128(6706).ULEB128(31)
- .FinishEntry()
- .FDEHeader(cie, 0x540f6b56, 0xf686)
- .ULEB128(2) // Augmentation data length
- .EncodedPointer(0xe3eab475, lsda_encoding) // LSDA pointer, signed
- .D8(lul::DW_CFA_set_loc)
- .EncodedPointer(0x540fa4ce, fde_encoding)
- .D8(lul::DW_CFA_undefined).ULEB128(0x675e)
- .FinishEntry()
- .D32(0); // terminator
-
- PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.SimpleFDE", section);
-
- EXPECT_CALL(handler, Entry(_, 0x540f6b56, 0xf686, 1, "zSLPR", 100))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, PersonalityRoutine(0x97baa00, false))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, LanguageSpecificDataArea(0xe3eab475, true))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, SignalHandler())
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, ValOffsetRule(0x540f6b56, kCFARegister, 6706, 31))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, UndefinedRule(0x540fa4ce, 0x675e))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End())
- .InSequence(s).WillOnce(Return(true));
-
- ParseEHFrameSection(&section);
-}
-
-// Check that we can handle an empty 'z' augmentation.
-TEST_F(LulDwarfEHFrame, EmptyZ) {
- Label cie;
- section
- .Mark(&cie)
- .CIEHeader(5955, 5805, 228, 1, "z")
- .ULEB128(0) // Augmentation data length
- .D8(lul::DW_CFA_def_cfa).ULEB128(3629).ULEB128(247)
- .FinishEntry()
- .FDEHeader(cie, 0xda007738, 0xfb55c641)
- .ULEB128(0) // Augmentation data length
- .D8(lul::DW_CFA_advance_loc1).D8(11)
- .D8(lul::DW_CFA_undefined).ULEB128(3769)
- .FinishEntry();
-
- PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.EmptyZ", section);
-
- EXPECT_CALL(handler, Entry(_, 0xda007738, 0xfb55c641, 1, "z", 228))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, ValOffsetRule(0xda007738, kCFARegister, 3629, 247))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, UndefinedRule(0xda007738 + 11 * 5955, 3769))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End())
- .InSequence(s).WillOnce(Return(true));
-
- ParseEHFrameSection(&section);
-}
-
-// Check that we recognize bad 'z' augmentation characters.
-TEST_F(LulDwarfEHFrame, BadZ) {
- Label cie;
- section
- .Mark(&cie)
- .CIEHeader(6937, 1045, 142, 1, "zQ")
- .ULEB128(0) // Augmentation data length
- .D8(lul::DW_CFA_def_cfa).ULEB128(9006).ULEB128(7725)
- .FinishEntry()
- .FDEHeader(cie, 0x1293efa8, 0x236f53f2)
- .ULEB128(0) // Augmentation data length
- .D8(lul::DW_CFA_advance_loc | 12)
- .D8(lul::DW_CFA_register).ULEB128(5667).ULEB128(3462)
- .FinishEntry();
-
- PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.BadZ", section);
-
- EXPECT_CALL(reporter, UnrecognizedAugmentation(_, "zQ"))
- .WillOnce(Return());
-
- ParseEHFrameSection(&section, false);
-}
-
-TEST_F(LulDwarfEHFrame, zL) {
- Label cie;
- lul::DwarfPointerEncoding lsda_encoding =
- lul::DwarfPointerEncoding(lul::DW_EH_PE_funcrel | lul::DW_EH_PE_udata2);
- section
- .Mark(&cie)
- .CIEHeader(9285, 9959, 54, 1, "zL")
- .ULEB128(1) // Augmentation data length
- .D8(lsda_encoding) // encoding for LSDA pointer in FDE
-
- .FinishEntry()
- .FDEHeader(cie, 0xd40091aa, 0x9aa6e746)
- .ULEB128(2) // Augmentation data length
- .EncodedPointer(0xd40099cd, lsda_encoding) // LSDA pointer
- .FinishEntry()
- .D32(0); // terminator
-
- PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.zL", section);
-
- EXPECT_CALL(handler, Entry(_, 0xd40091aa, 0x9aa6e746, 1, "zL", 54))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, LanguageSpecificDataArea(0xd40099cd, false))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End())
- .InSequence(s).WillOnce(Return(true));
-
- ParseEHFrameSection(&section);
-}
-
-TEST_F(LulDwarfEHFrame, zP) {
- Label cie;
- lul::DwarfPointerEncoding personality_encoding =
- lul::DwarfPointerEncoding(lul::DW_EH_PE_datarel | lul::DW_EH_PE_udata2);
- section
- .Mark(&cie)
- .CIEHeader(1097, 6313, 17, 1, "zP")
- .ULEB128(3) // Augmentation data length
- .D8(personality_encoding) // encoding for personality routine
- .EncodedPointer(0xe3eaccac, personality_encoding) // value
- .FinishEntry()
- .FDEHeader(cie, 0x0c8350c9, 0xbef11087)
- .ULEB128(0) // Augmentation data length
- .FinishEntry()
- .D32(0); // terminator
-
- PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.zP", section);
-
- EXPECT_CALL(handler, Entry(_, 0x0c8350c9, 0xbef11087, 1, "zP", 17))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, PersonalityRoutine(0xe3eaccac, false))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End())
- .InSequence(s).WillOnce(Return(true));
-
- ParseEHFrameSection(&section);
-}
-
-TEST_F(LulDwarfEHFrame, zR) {
- Label cie;
- lul::DwarfPointerEncoding pointer_encoding =
- lul::DwarfPointerEncoding(lul::DW_EH_PE_textrel | lul::DW_EH_PE_sdata2);
- section.SetPointerEncoding(pointer_encoding);
- section
- .Mark(&cie)
- .CIEHeader(8011, 5496, 75, 1, "zR")
- .ULEB128(1) // Augmentation data length
- .D8(pointer_encoding) // encoding for FDE addresses
- .FinishEntry()
- .FDEHeader(cie, 0x540f9431, 0xbd0)
- .ULEB128(0) // Augmentation data length
- .FinishEntry()
- .D32(0); // terminator
-
- PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.zR", section);
-
- EXPECT_CALL(handler, Entry(_, 0x540f9431, 0xbd0, 1, "zR", 75))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End())
- .InSequence(s).WillOnce(Return(true));
-
- ParseEHFrameSection(&section);
-}
-
-TEST_F(LulDwarfEHFrame, zS) {
- Label cie;
- section
- .Mark(&cie)
- .CIEHeader(9217, 7694, 57, 1, "zS")
- .ULEB128(0) // Augmentation data length
- .FinishEntry()
- .FDEHeader(cie, 0xd40091aa, 0x9aa6e746)
- .ULEB128(0) // Augmentation data length
- .FinishEntry()
- .D32(0); // terminator
-
- PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.zS", section);
-
- EXPECT_CALL(handler, Entry(_, 0xd40091aa, 0x9aa6e746, 1, "zS", 57))
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, SignalHandler())
- .InSequence(s).WillOnce(Return(true));
- EXPECT_CALL(handler, End())
- .InSequence(s).WillOnce(Return(true));
-
- ParseEHFrameSection(&section);
-}
-
-// These tests require manual inspection of the test output.
-struct CFIReporterFixture {
- CFIReporterFixture() : reporter(gtest_logging_sink_for_LulTestDwarf,
- "test file name", "test section name") { }
- CallFrameInfo::Reporter reporter;
-};
-
-class LulDwarfCFIReporter: public CFIReporterFixture, public Test { };
-
-TEST_F(LulDwarfCFIReporter, Incomplete) {
- reporter.Incomplete(0x0102030405060708ULL, CallFrameInfo::kUnknown);
-}
-
-TEST_F(LulDwarfCFIReporter, EarlyEHTerminator) {
- reporter.EarlyEHTerminator(0x0102030405060708ULL);
-}
-
-TEST_F(LulDwarfCFIReporter, CIEPointerOutOfRange) {
- reporter.CIEPointerOutOfRange(0x0123456789abcdefULL, 0xfedcba9876543210ULL);
-}
-
-TEST_F(LulDwarfCFIReporter, BadCIEId) {
- reporter.BadCIEId(0x0123456789abcdefULL, 0xfedcba9876543210ULL);
-}
-
-TEST_F(LulDwarfCFIReporter, UnrecognizedVersion) {
- reporter.UnrecognizedVersion(0x0123456789abcdefULL, 43);
-}
-
-TEST_F(LulDwarfCFIReporter, UnrecognizedAugmentation) {
- reporter.UnrecognizedAugmentation(0x0123456789abcdefULL, "poodles");
-}
-
-TEST_F(LulDwarfCFIReporter, InvalidPointerEncoding) {
- reporter.InvalidPointerEncoding(0x0123456789abcdefULL, 0x42);
-}
-
-TEST_F(LulDwarfCFIReporter, UnusablePointerEncoding) {
- reporter.UnusablePointerEncoding(0x0123456789abcdefULL, 0x42);
-}
-
-TEST_F(LulDwarfCFIReporter, RestoreInCIE) {
- reporter.RestoreInCIE(0x0123456789abcdefULL, 0xfedcba9876543210ULL);
-}
-
-TEST_F(LulDwarfCFIReporter, BadInstruction) {
- reporter.BadInstruction(0x0123456789abcdefULL, CallFrameInfo::kFDE,
- 0xfedcba9876543210ULL);
-}
-
-TEST_F(LulDwarfCFIReporter, NoCFARule) {
- reporter.NoCFARule(0x0123456789abcdefULL, CallFrameInfo::kCIE,
- 0xfedcba9876543210ULL);
-}
-
-TEST_F(LulDwarfCFIReporter, EmptyStateStack) {
- reporter.EmptyStateStack(0x0123456789abcdefULL, CallFrameInfo::kTerminator,
- 0xfedcba9876543210ULL);
-}
-
-TEST_F(LulDwarfCFIReporter, ClearingCFARule) {
- reporter.ClearingCFARule(0x0123456789abcdefULL, CallFrameInfo::kFDE,
- 0xfedcba9876543210ULL);
-}
-class LulDwarfExpr : public Test { };
-
-class MockSummariser : public Summariser {
-public:
- MockSummariser() : Summariser(nullptr, 0, nullptr) {}
- MOCK_METHOD2(Entry, void(uintptr_t, uintptr_t));
- MOCK_METHOD0(End, void());
- MOCK_METHOD5(Rule, void(uintptr_t, int, LExprHow, int16_t, int64_t));
- MOCK_METHOD1(AddPfxInstr, uint32_t(PfxInstr));
-};
-
-TEST_F(LulDwarfExpr, SimpleTransliteration) {
- MockSummariser summ;
- ByteReader reader(ENDIANNESS_LITTLE);
-
- CFISection section(kLittleEndian, 8);
- section
- .D8(DW_OP_lit0)
- .D8(DW_OP_lit31)
- .D8(DW_OP_breg0 + 17).LEB128(-1234)
- .D8(DW_OP_const4s).D32(0xFEDC9876)
- .D8(DW_OP_deref)
- .D8(DW_OP_and)
- .D8(DW_OP_plus)
- .D8(DW_OP_minus)
- .D8(DW_OP_shl)
- .D8(DW_OP_ge);
- string expr;
- bool ok = section.GetContents(&expr);
- EXPECT_TRUE(ok);
-
- {
- InSequence s;
- // required start marker
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_Start, 0)));
- // DW_OP_lit0
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_SImm32, 0)));
- // DW_OP_lit31
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_SImm32, 31)));
- // DW_OP_breg17 -1234
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_DwReg, 17)));
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_SImm32, -1234)));
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_Add)));
- // DW_OP_const4s 0xFEDC9876
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_SImm32, 0xFEDC9876)));
- // DW_OP_deref
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_Deref)));
- // DW_OP_and
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_And)));
- // DW_OP_plus
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_Add)));
- // DW_OP_minus
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_Sub)));
- // DW_OP_shl
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_Shl)));
- // DW_OP_ge
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_CmpGES)));
- // required end marker
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_End)));
- }
-
- int32_t ix = parseDwarfExpr(&summ, &reader, expr, false, false, false);
- EXPECT_TRUE(ix >= 0);
-}
-
-TEST_F(LulDwarfExpr, UnknownOpcode) {
- MockSummariser summ;
- ByteReader reader(ENDIANNESS_LITTLE);
-
- CFISection section(kLittleEndian, 8);
- section
- .D8(DW_OP_lo_user - 1);
- string expr;
- bool ok = section.GetContents(&expr);
- EXPECT_TRUE(ok);
-
- {
- InSequence s;
- // required start marker
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_Start, 0)));
- }
-
- int32_t ix = parseDwarfExpr(&summ, &reader, expr, false, false, false);
- EXPECT_TRUE(ix == -1);
-}
-
-TEST_F(LulDwarfExpr, ExpressionOverrun) {
- MockSummariser summ;
- ByteReader reader(ENDIANNESS_LITTLE);
-
- CFISection section(kLittleEndian, 8);
- section
- .D8(DW_OP_const4s).D8(0x12).D8(0x34).D8(0x56);
- string expr;
- bool ok = section.GetContents(&expr);
- EXPECT_TRUE(ok);
-
- {
- InSequence s;
- // required start marker
- EXPECT_CALL(summ, AddPfxInstr(PfxInstr(PX_Start, 0)));
- // DW_OP_const4s followed by 3 (a.k.a. not enough) bytes
- // We expect PfxInstr(PX_Simm32, not-known-for-sure-32-bit-immediate)
- // Hence must use _ as the argument.
- EXPECT_CALL(summ, AddPfxInstr(_));
- }
-
- int32_t ix = parseDwarfExpr(&summ, &reader, expr, false, false, false);
- EXPECT_TRUE(ix == -1);
-}
-
-// We'll need to mention specific Dwarf registers in the EvaluatePfxExpr tests,
-// and those names are arch-specific, so a bit of macro magic is helpful.
-#if defined(LUL_ARCH_arm)
-# define TESTED_REG_STRUCT_NAME r11
-# define TESTED_REG_DWARF_NAME DW_REG_ARM_R11
-#elif defined(LUL_ARCH_x64) || defined(LUL_ARCH_x86)
-# define TESTED_REG_STRUCT_NAME xbp
-# define TESTED_REG_DWARF_NAME DW_REG_INTEL_XBP
-#else
-# error "Unknown plat"
-#endif
-
-struct EvaluatePfxExprFixture {
- // Creates:
- // initial stack, AVMA 0x12345678, at offset 4 bytes = 0xdeadbeef
- // initial regs, with XBP = 0x14141356
- // initial CFA = 0x5432ABCD
- EvaluatePfxExprFixture() {
- // The test stack.
- si.mStartAvma = 0x12345678;
- si.mLen = 0;
-# define XX(_byte) do { si.mContents[si.mLen++] = (_byte); } while (0)
- XX(0x55); XX(0x55); XX(0x55); XX(0x55);
- if (sizeof(void*) == 8) {
- // le64
- XX(0xEF); XX(0xBE); XX(0xAD); XX(0xDE); XX(0); XX(0); XX(0); XX(0);
- } else {
- // le32
- XX(0xEF); XX(0xBE); XX(0xAD); XX(0xDE);
- }
- XX(0xAA); XX(0xAA); XX(0xAA); XX(0xAA);
-# undef XX
- // The initial CFA.
- initialCFA = TaggedUWord(0x5432ABCD);
- // The initial register state.
- memset(&regs, 0, sizeof(regs));
- regs.TESTED_REG_STRUCT_NAME = TaggedUWord(0x14141356);
- }
-
- StackImage si;
- TaggedUWord initialCFA;
- UnwindRegs regs;
-};
-
-class LulDwarfEvaluatePfxExpr : public EvaluatePfxExprFixture, public Test { };
-
-TEST_F(LulDwarfEvaluatePfxExpr, NormalEvaluation) {
- vector<PfxInstr> instrs;
- // Put some junk at the start of the insn sequence.
- instrs.push_back(PfxInstr(PX_End));
- instrs.push_back(PfxInstr(PX_End));
-
- // Now the real sequence
- // stack is empty
- instrs.push_back(PfxInstr(PX_Start, 1));
- // 0x5432ABCD
- instrs.push_back(PfxInstr(PX_SImm32, 0x31415927));
- // 0x5432ABCD 0x31415927
- instrs.push_back(PfxInstr(PX_DwReg, TESTED_REG_DWARF_NAME));
- // 0x5432ABCD 0x31415927 0x14141356
- instrs.push_back(PfxInstr(PX_SImm32, 42));
- // 0x5432ABCD 0x31415927 0x14141356 42
- instrs.push_back(PfxInstr(PX_Sub));
- // 0x5432ABCD 0x31415927 0x1414132c
- instrs.push_back(PfxInstr(PX_Add));
- // 0x5432ABCD 0x45556c53
- instrs.push_back(PfxInstr(PX_SImm32, si.mStartAvma + 4));
- // 0x5432ABCD 0x45556c53 0x1234567c
- instrs.push_back(PfxInstr(PX_Deref));
- // 0x5432ABCD 0x45556c53 0xdeadbeef
- instrs.push_back(PfxInstr(PX_SImm32, 0xFE01DC23));
- // 0x5432ABCD 0x45556c53 0xdeadbeef 0xFE01DC23
- instrs.push_back(PfxInstr(PX_And));
- // 0x5432ABCD 0x45556c53 0xde019c23
- instrs.push_back(PfxInstr(PX_SImm32, 7));
- // 0x5432ABCD 0x45556c53 0xde019c23 7
- instrs.push_back(PfxInstr(PX_Shl));
- // 0x5432ABCD 0x45556c53 0x6f00ce1180
- instrs.push_back(PfxInstr(PX_SImm32, 0x7fffffff));
- // 0x5432ABCD 0x45556c53 0x6f00ce1180 7fffffff
- instrs.push_back(PfxInstr(PX_And));
- // 0x5432ABCD 0x45556c53 0x00ce1180
- instrs.push_back(PfxInstr(PX_Add));
- // 0x5432ABCD 0x46237dd3
- instrs.push_back(PfxInstr(PX_Sub));
- // 0xe0f2dfa
-
- instrs.push_back(PfxInstr(PX_End));
-
- TaggedUWord res = EvaluatePfxExpr(2/*offset of start insn*/,
- &regs, initialCFA, &si, instrs);
- EXPECT_TRUE(res.Valid());
- EXPECT_TRUE(res.Value() == 0xe0f2dfa);
-}
-
-TEST_F(LulDwarfEvaluatePfxExpr, EmptySequence) {
- vector<PfxInstr> instrs;
- TaggedUWord res = EvaluatePfxExpr(0, &regs, initialCFA, &si, instrs);
- EXPECT_FALSE(res.Valid());
-}
-
-TEST_F(LulDwarfEvaluatePfxExpr, BogusStartPoint) {
- vector<PfxInstr> instrs;
- instrs.push_back(PfxInstr(PX_SImm32, 42));
- instrs.push_back(PfxInstr(PX_SImm32, 24));
- instrs.push_back(PfxInstr(PX_SImm32, 4224));
- TaggedUWord res = EvaluatePfxExpr(1, &regs, initialCFA, &si, instrs);
- EXPECT_FALSE(res.Valid());
-}
-
-TEST_F(LulDwarfEvaluatePfxExpr, MissingEndMarker) {
- vector<PfxInstr> instrs;
- instrs.push_back(PfxInstr(PX_Start, 0));
- instrs.push_back(PfxInstr(PX_SImm32, 24));
- TaggedUWord res = EvaluatePfxExpr(0, &regs, initialCFA, &si, instrs);
- EXPECT_FALSE(res.Valid());
-}
-
-TEST_F(LulDwarfEvaluatePfxExpr, StackUnderflow) {
- vector<PfxInstr> instrs;
- instrs.push_back(PfxInstr(PX_Start, 0));
- instrs.push_back(PfxInstr(PX_End));
- TaggedUWord res = EvaluatePfxExpr(0, &regs, initialCFA, &si, instrs);
- EXPECT_FALSE(res.Valid());
-}
-
-TEST_F(LulDwarfEvaluatePfxExpr, StackNoUnderflow) {
- vector<PfxInstr> instrs;
- instrs.push_back(PfxInstr(PX_Start, 1/*push the initial CFA*/));
- instrs.push_back(PfxInstr(PX_End));
- TaggedUWord res = EvaluatePfxExpr(0, &regs, initialCFA, &si, instrs);
- EXPECT_TRUE(res.Valid());
- EXPECT_TRUE(res == initialCFA);
-}
-
-TEST_F(LulDwarfEvaluatePfxExpr, StackOverflow) {
- vector<PfxInstr> instrs;
- instrs.push_back(PfxInstr(PX_Start, 0));
- for (int i = 0; i < 10+1; i++) {
- instrs.push_back(PfxInstr(PX_SImm32, i + 100));
- }
- instrs.push_back(PfxInstr(PX_End));
- TaggedUWord res = EvaluatePfxExpr(0, &regs, initialCFA, &si, instrs);
- EXPECT_FALSE(res.Valid());
-}
-
-TEST_F(LulDwarfEvaluatePfxExpr, StackNoOverflow) {
- vector<PfxInstr> instrs;
- instrs.push_back(PfxInstr(PX_Start, 0));
- for (int i = 0; i < 10+0; i++) {
- instrs.push_back(PfxInstr(PX_SImm32, i + 100));
- }
- instrs.push_back(PfxInstr(PX_End));
- TaggedUWord res = EvaluatePfxExpr(0, &regs, initialCFA, &si, instrs);
- EXPECT_TRUE(res.Valid());
- EXPECT_TRUE(res == TaggedUWord(109));
-}
-
-TEST_F(LulDwarfEvaluatePfxExpr, OutOfRangeShl) {
- vector<PfxInstr> instrs;
- instrs.push_back(PfxInstr(PX_Start, 0));
- instrs.push_back(PfxInstr(PX_SImm32, 1234));
- instrs.push_back(PfxInstr(PX_SImm32, 5678));
- instrs.push_back(PfxInstr(PX_Shl));
- TaggedUWord res = EvaluatePfxExpr(0, &regs, initialCFA, &si, instrs);
- EXPECT_TRUE(!res.Valid());
-}
-
-TEST_F(LulDwarfEvaluatePfxExpr, TestCmpGES) {
- const int32_t argsL[6] = { 0, 0, 1, -2, -1, -2 };
- const int32_t argsR[6] = { 0, 1, 0, -2, -2, -1 };
- // expecting: t f t t t f = 101110 = 0x2E
- vector<PfxInstr> instrs;
- instrs.push_back(PfxInstr(PX_Start, 0));
- // The "running total"
- instrs.push_back(PfxInstr(PX_SImm32, 0));
- for (unsigned int i = 0; i < sizeof(argsL)/sizeof(argsL[0]); i++) {
- // Shift the "running total" at the bottom of the stack left by one bit
- instrs.push_back(PfxInstr(PX_SImm32, 1));
- instrs.push_back(PfxInstr(PX_Shl));
- // Push both test args and do the comparison
- instrs.push_back(PfxInstr(PX_SImm32, argsL[i]));
- instrs.push_back(PfxInstr(PX_SImm32, argsR[i]));
- instrs.push_back(PfxInstr(PX_CmpGES));
- // Or the result into the running total
- instrs.push_back(PfxInstr(PX_Or));
- }
- instrs.push_back(PfxInstr(PX_End));
- TaggedUWord res = EvaluatePfxExpr(0, &regs, initialCFA, &si, instrs);
- EXPECT_TRUE(res.Valid());
- EXPECT_TRUE(res == TaggedUWord(0x2E));
-}
-
-} // namespace lul
diff --git a/tools/profiler/tests/gtest/LulTestInfrastructure.cpp b/tools/profiler/tests/gtest/LulTestInfrastructure.cpp
deleted file mode 100644
index ba8e2e41e..000000000
--- a/tools/profiler/tests/gtest/LulTestInfrastructure.cpp
+++ /dev/null
@@ -1,491 +0,0 @@
-// Copyright (c) 2010, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Original author: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com>
-
-// Derived from:
-// test_assembler.cc: Implementation of google_breakpad::TestAssembler.
-// See test_assembler.h for details.
-
-// Derived from:
-// cfi_assembler.cc: Implementation of google_breakpad::CFISection class.
-// See cfi_assembler.h for details.
-
-#include "LulTestInfrastructure.h"
-
-namespace lul_test {
-namespace test_assembler {
-
-using std::back_insert_iterator;
-
-Label::Label() : value_(new Binding()) { }
-Label::Label(uint64_t value) : value_(new Binding(value)) { }
-Label::Label(const Label &label) {
- value_ = label.value_;
- value_->Acquire();
-}
-Label::~Label() {
- if (value_->Release()) delete value_;
-}
-
-Label &Label::operator=(uint64_t value) {
- value_->Set(NULL, value);
- return *this;
-}
-
-Label &Label::operator=(const Label &label) {
- value_->Set(label.value_, 0);
- return *this;
-}
-
-Label Label::operator+(uint64_t addend) const {
- Label l;
- l.value_->Set(this->value_, addend);
- return l;
-}
-
-Label Label::operator-(uint64_t subtrahend) const {
- Label l;
- l.value_->Set(this->value_, -subtrahend);
- return l;
-}
-
-// When NDEBUG is #defined, assert doesn't evaluate its argument. This
-// means you can't simply use assert to check the return value of a
-// function with necessary side effects.
-//
-// ALWAYS_EVALUATE_AND_ASSERT(x) evaluates x regardless of whether
-// NDEBUG is #defined; when NDEBUG is not #defined, it further asserts
-// that x is true.
-#ifdef NDEBUG
-#define ALWAYS_EVALUATE_AND_ASSERT(x) x
-#else
-#define ALWAYS_EVALUATE_AND_ASSERT(x) assert(x)
-#endif
-
-uint64_t Label::operator-(const Label &label) const {
- uint64_t offset;
- ALWAYS_EVALUATE_AND_ASSERT(IsKnownOffsetFrom(label, &offset));
- return offset;
-}
-
-bool Label::IsKnownConstant(uint64_t *value_p) const {
- Binding *base;
- uint64_t addend;
- value_->Get(&base, &addend);
- if (base != NULL) return false;
- if (value_p) *value_p = addend;
- return true;
-}
-
-bool Label::IsKnownOffsetFrom(const Label &label, uint64_t *offset_p) const
-{
- Binding *label_base, *this_base;
- uint64_t label_addend, this_addend;
- label.value_->Get(&label_base, &label_addend);
- value_->Get(&this_base, &this_addend);
- // If this and label are related, Get will find their final
- // common ancestor, regardless of how indirect the relation is. This
- // comparison also handles the constant vs. constant case.
- if (this_base != label_base) return false;
- if (offset_p) *offset_p = this_addend - label_addend;
- return true;
-}
-
-Label::Binding::Binding() : base_(this), addend_(), reference_count_(1) { }
-
-Label::Binding::Binding(uint64_t addend)
- : base_(NULL), addend_(addend), reference_count_(1) { }
-
-Label::Binding::~Binding() {
- assert(reference_count_ == 0);
- if (base_ && base_ != this && base_->Release())
- delete base_;
-}
-
-void Label::Binding::Set(Binding *binding, uint64_t addend) {
- if (!base_ && !binding) {
- // We're equating two constants. This could be okay.
- assert(addend_ == addend);
- } else if (!base_) {
- // We are a known constant, but BINDING may not be, so turn the
- // tables and try to set BINDING's value instead.
- binding->Set(NULL, addend_ - addend);
- } else {
- if (binding) {
- // Find binding's final value. Since the final value is always either
- // completely unconstrained or a constant, never a reference to
- // another variable (otherwise, it wouldn't be final), this
- // guarantees we won't create cycles here, even for code like this:
- // l = m, m = n, n = l;
- uint64_t binding_addend;
- binding->Get(&binding, &binding_addend);
- addend += binding_addend;
- }
-
- // It seems likely that setting a binding to itself is a bug
- // (although I can imagine this might turn out to be helpful to
- // permit).
- assert(binding != this);
-
- if (base_ != this) {
- // Set the other bindings on our chain as well. Note that this
- // is sufficient even though binding relationships form trees:
- // All binding operations traverse their chains to the end, and
- // all bindings related to us share some tail of our chain, so
- // they will see the changes we make here.
- base_->Set(binding, addend - addend_);
- // We're not going to use base_ any more.
- if (base_->Release()) delete base_;
- }
-
- // Adopt BINDING as our base. Note that it should be correct to
- // acquire here, after the release above, even though the usual
- // reference-counting rules call for acquiring first, and then
- // releasing: the self-reference assertion above should have
- // complained if BINDING were 'this' or anywhere along our chain,
- // so we didn't release BINDING.
- if (binding) binding->Acquire();
- base_ = binding;
- addend_ = addend;
- }
-}
-
-void Label::Binding::Get(Binding **base, uint64_t *addend) {
- if (base_ && base_ != this) {
- // Recurse to find the end of our reference chain (the root of our
- // tree), and then rewrite every binding along the chain to refer
- // to it directly, adjusting addends appropriately. (This is why
- // this member function isn't this-const.)
- Binding *final_base;
- uint64_t final_addend;
- base_->Get(&final_base, &final_addend);
- if (final_base) final_base->Acquire();
- if (base_->Release()) delete base_;
- base_ = final_base;
- addend_ += final_addend;
- }
- *base = base_;
- *addend = addend_;
-}
-
-template<typename Inserter>
-static inline void InsertEndian(test_assembler::Endianness endianness,
- size_t size, uint64_t number, Inserter dest) {
- assert(size > 0);
- if (endianness == kLittleEndian) {
- for (size_t i = 0; i < size; i++) {
- *dest++ = (char) (number & 0xff);
- number >>= 8;
- }
- } else {
- assert(endianness == kBigEndian);
- // The loop condition is odd, but it's correct for size_t.
- for (size_t i = size - 1; i < size; i--)
- *dest++ = (char) ((number >> (i * 8)) & 0xff);
- }
-}
-
-Section &Section::Append(Endianness endianness, size_t size, uint64_t number) {
- InsertEndian(endianness, size, number,
- back_insert_iterator<string>(contents_));
- return *this;
-}
-
-Section &Section::Append(Endianness endianness, size_t size,
- const Label &label) {
- // If this label's value is known, there's no reason to waste an
- // entry in references_ on it.
- uint64_t value;
- if (label.IsKnownConstant(&value))
- return Append(endianness, size, value);
-
- // This will get caught when the references are resolved, but it's
- // nicer to find out earlier.
- assert(endianness != kUnsetEndian);
-
- references_.push_back(Reference(contents_.size(), endianness, size, label));
- contents_.append(size, 0);
- return *this;
-}
-
-#define ENDIANNESS_L kLittleEndian
-#define ENDIANNESS_B kBigEndian
-#define ENDIANNESS(e) ENDIANNESS_ ## e
-
-#define DEFINE_SHORT_APPEND_NUMBER_ENDIAN(e, bits) \
- Section &Section::e ## bits(uint ## bits ## _t v) { \
- InsertEndian(ENDIANNESS(e), bits / 8, v, \
- back_insert_iterator<string>(contents_)); \
- return *this; \
- }
-
-#define DEFINE_SHORT_APPEND_LABEL_ENDIAN(e, bits) \
- Section &Section::e ## bits(const Label &v) { \
- return Append(ENDIANNESS(e), bits / 8, v); \
- }
-
-// Define L16, B32, and friends.
-#define DEFINE_SHORT_APPEND_ENDIAN(e, bits) \
- DEFINE_SHORT_APPEND_NUMBER_ENDIAN(e, bits) \
- DEFINE_SHORT_APPEND_LABEL_ENDIAN(e, bits)
-
-DEFINE_SHORT_APPEND_LABEL_ENDIAN(L, 8);
-DEFINE_SHORT_APPEND_LABEL_ENDIAN(B, 8);
-DEFINE_SHORT_APPEND_ENDIAN(L, 16);
-DEFINE_SHORT_APPEND_ENDIAN(L, 32);
-DEFINE_SHORT_APPEND_ENDIAN(L, 64);
-DEFINE_SHORT_APPEND_ENDIAN(B, 16);
-DEFINE_SHORT_APPEND_ENDIAN(B, 32);
-DEFINE_SHORT_APPEND_ENDIAN(B, 64);
-
-#define DEFINE_SHORT_APPEND_NUMBER_DEFAULT(bits) \
- Section &Section::D ## bits(uint ## bits ## _t v) { \
- InsertEndian(endianness_, bits / 8, v, \
- back_insert_iterator<string>(contents_)); \
- return *this; \
- }
-#define DEFINE_SHORT_APPEND_LABEL_DEFAULT(bits) \
- Section &Section::D ## bits(const Label &v) { \
- return Append(endianness_, bits / 8, v); \
- }
-#define DEFINE_SHORT_APPEND_DEFAULT(bits) \
- DEFINE_SHORT_APPEND_NUMBER_DEFAULT(bits) \
- DEFINE_SHORT_APPEND_LABEL_DEFAULT(bits)
-
-DEFINE_SHORT_APPEND_LABEL_DEFAULT(8)
-DEFINE_SHORT_APPEND_DEFAULT(16);
-DEFINE_SHORT_APPEND_DEFAULT(32);
-DEFINE_SHORT_APPEND_DEFAULT(64);
-
-Section &Section::LEB128(long long value) {
- while (value < -0x40 || 0x3f < value) {
- contents_ += (value & 0x7f) | 0x80;
- if (value < 0)
- value = (value >> 7) | ~(((unsigned long long) -1) >> 7);
- else
- value = (value >> 7);
- }
- contents_ += value & 0x7f;
- return *this;
-}
-
-Section &Section::ULEB128(uint64_t value) {
- while (value > 0x7f) {
- contents_ += (value & 0x7f) | 0x80;
- value = (value >> 7);
- }
- contents_ += value;
- return *this;
-}
-
-Section &Section::Align(size_t alignment, uint8_t pad_byte) {
- // ALIGNMENT must be a power of two.
- assert(((alignment - 1) & alignment) == 0);
- size_t new_size = (contents_.size() + alignment - 1) & ~(alignment - 1);
- contents_.append(new_size - contents_.size(), pad_byte);
- assert((contents_.size() & (alignment - 1)) == 0);
- return *this;
-}
-
-bool Section::GetContents(string *contents) {
- // For each label reference, find the label's value, and patch it into
- // the section's contents.
- for (size_t i = 0; i < references_.size(); i++) {
- Reference &r = references_[i];
- uint64_t value;
- if (!r.label.IsKnownConstant(&value)) {
- fprintf(stderr, "Undefined label #%zu at offset 0x%zx\n", i, r.offset);
- return false;
- }
- assert(r.offset < contents_.size());
- assert(contents_.size() - r.offset >= r.size);
- InsertEndian(r.endianness, r.size, value, contents_.begin() + r.offset);
- }
- contents->clear();
- std::swap(contents_, *contents);
- references_.clear();
- return true;
-}
-
-} // namespace test_assembler
-} // namespace lul_test
-
-
-namespace lul_test {
-
-CFISection &CFISection::CIEHeader(uint64_t code_alignment_factor,
- int data_alignment_factor,
- unsigned return_address_register,
- uint8_t version,
- const string &augmentation,
- bool dwarf64) {
- assert(!entry_length_);
- entry_length_ = new PendingLength();
- in_fde_ = false;
-
- if (dwarf64) {
- D32(kDwarf64InitialLengthMarker);
- D64(entry_length_->length);
- entry_length_->start = Here();
- D64(eh_frame_ ? kEHFrame64CIEIdentifier : kDwarf64CIEIdentifier);
- } else {
- D32(entry_length_->length);
- entry_length_->start = Here();
- D32(eh_frame_ ? kEHFrame32CIEIdentifier : kDwarf32CIEIdentifier);
- }
- D8(version);
- AppendCString(augmentation);
- ULEB128(code_alignment_factor);
- LEB128(data_alignment_factor);
- if (version == 1)
- D8(return_address_register);
- else
- ULEB128(return_address_register);
- return *this;
-}
-
-CFISection &CFISection::FDEHeader(Label cie_pointer,
- uint64_t initial_location,
- uint64_t address_range,
- bool dwarf64) {
- assert(!entry_length_);
- entry_length_ = new PendingLength();
- in_fde_ = true;
- fde_start_address_ = initial_location;
-
- if (dwarf64) {
- D32(0xffffffff);
- D64(entry_length_->length);
- entry_length_->start = Here();
- if (eh_frame_)
- D64(Here() - cie_pointer);
- else
- D64(cie_pointer);
- } else {
- D32(entry_length_->length);
- entry_length_->start = Here();
- if (eh_frame_)
- D32(Here() - cie_pointer);
- else
- D32(cie_pointer);
- }
- EncodedPointer(initial_location);
- // The FDE length in an .eh_frame section uses the same encoding as the
- // initial location, but ignores the base address (selected by the upper
- // nybble of the encoding), as it's a length, not an address that can be
- // made relative.
- EncodedPointer(address_range,
- DwarfPointerEncoding(pointer_encoding_ & 0x0f));
- return *this;
-}
-
-CFISection &CFISection::FinishEntry() {
- assert(entry_length_);
- Align(address_size_, lul::DW_CFA_nop);
- entry_length_->length = Here() - entry_length_->start;
- delete entry_length_;
- entry_length_ = NULL;
- in_fde_ = false;
- return *this;
-}
-
-CFISection &CFISection::EncodedPointer(uint64_t address,
- DwarfPointerEncoding encoding,
- const EncodedPointerBases &bases) {
- // Omitted data is extremely easy to emit.
- if (encoding == lul::DW_EH_PE_omit)
- return *this;
-
- // If (encoding & lul::DW_EH_PE_indirect) != 0, then we assume
- // that ADDRESS is the address at which the pointer is stored --- in
- // other words, that bit has no effect on how we write the pointer.
- encoding = DwarfPointerEncoding(encoding & ~lul::DW_EH_PE_indirect);
-
- // Find the base address to which this pointer is relative. The upper
- // nybble of the encoding specifies this.
- uint64_t base;
- switch (encoding & 0xf0) {
- case lul::DW_EH_PE_absptr: base = 0; break;
- case lul::DW_EH_PE_pcrel: base = bases.cfi + Size(); break;
- case lul::DW_EH_PE_textrel: base = bases.text; break;
- case lul::DW_EH_PE_datarel: base = bases.data; break;
- case lul::DW_EH_PE_funcrel: base = fde_start_address_; break;
- case lul::DW_EH_PE_aligned: base = 0; break;
- default: abort();
- };
-
- // Make ADDRESS relative. Yes, this is appropriate even for "absptr"
- // values; see gcc/unwind-pe.h.
- address -= base;
-
- // Align the pointer, if required.
- if ((encoding & 0xf0) == lul::DW_EH_PE_aligned)
- Align(AddressSize());
-
- // Append ADDRESS to this section in the appropriate form. For the
- // fixed-width forms, we don't need to differentiate between signed and
- // unsigned encodings, because ADDRESS has already been extended to 64
- // bits before it was passed to us.
- switch (encoding & 0x0f) {
- case lul::DW_EH_PE_absptr:
- Address(address);
- break;
-
- case lul::DW_EH_PE_uleb128:
- ULEB128(address);
- break;
-
- case lul::DW_EH_PE_sleb128:
- LEB128(address);
- break;
-
- case lul::DW_EH_PE_udata2:
- case lul::DW_EH_PE_sdata2:
- D16(address);
- break;
-
- case lul::DW_EH_PE_udata4:
- case lul::DW_EH_PE_sdata4:
- D32(address);
- break;
-
- case lul::DW_EH_PE_udata8:
- case lul::DW_EH_PE_sdata8:
- D64(address);
- break;
-
- default:
- abort();
- }
-
- return *this;
-};
-
-} // namespace lul_test
diff --git a/tools/profiler/tests/gtest/LulTestInfrastructure.h b/tools/profiler/tests/gtest/LulTestInfrastructure.h
deleted file mode 100644
index 37b1b7d49..000000000
--- a/tools/profiler/tests/gtest/LulTestInfrastructure.h
+++ /dev/null
@@ -1,666 +0,0 @@
-// -*- mode: C++ -*-
-
-// Copyright (c) 2010, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Original author: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com>
-
-// Derived from:
-// cfi_assembler.h: Define CFISection, a class for creating properly
-// (and improperly) formatted DWARF CFI data for unit tests.
-
-// Derived from:
-// test-assembler.h: interface to class for building complex binary streams.
-
-// To test the Breakpad symbol dumper and processor thoroughly, for
-// all combinations of host system and minidump processor
-// architecture, we need to be able to easily generate complex test
-// data like debugging information and minidump files.
-//
-// For example, if we want our unit tests to provide full code
-// coverage for stack walking, it may be difficult to persuade the
-// compiler to generate every possible sort of stack walking
-// information that we want to support; there are probably DWARF CFI
-// opcodes that GCC never emits. Similarly, if we want to test our
-// error handling, we will need to generate damaged minidumps or
-// debugging information that (we hope) the client or compiler will
-// never produce on its own.
-//
-// google_breakpad::TestAssembler provides a predictable and
-// (relatively) simple way to generate complex formatted data streams
-// like minidumps and CFI. Furthermore, because TestAssembler is
-// portable, developers without access to (say) Visual Studio or a
-// SPARC assembler can still work on test data for those targets.
-
-#ifndef LUL_TEST_INFRASTRUCTURE_H
-#define LUL_TEST_INFRASTRUCTURE_H
-
-#include <string>
-#include <vector>
-
-using std::string;
-using std::vector;
-
-namespace lul_test {
-namespace test_assembler {
-
-// A Label represents a value not yet known that we need to store in a
-// section. As long as all the labels a section refers to are defined
-// by the time we retrieve its contents as bytes, we can use undefined
-// labels freely in that section's construction.
-//
-// A label can be in one of three states:
-// - undefined,
-// - defined as the sum of some other label and a constant, or
-// - a constant.
-//
-// A label's value never changes, but it can accumulate constraints.
-// Adding labels and integers is permitted, and yields a label.
-// Subtracting a constant from a label is permitted, and also yields a
-// label. Subtracting two labels that have some relationship to each
-// other is permitted, and yields a constant.
-//
-// For example:
-//
-// Label a; // a's value is undefined
-// Label b; // b's value is undefined
-// {
-// Label c = a + 4; // okay, even though a's value is unknown
-// b = c + 4; // also okay; b is now a+8
-// }
-// Label d = b - 2; // okay; d == a+6, even though c is gone
-// d.Value(); // error: d's value is not yet known
-// d - a; // is 6, even though their values are not known
-// a = 12; // now b == 20, and d == 18
-// d.Value(); // 18: no longer an error
-// b.Value(); // 20
-// d = 10; // error: d is already defined.
-//
-// Label objects' lifetimes are unconstrained: notice that, in the
-// above example, even though a and b are only related through c, and
-// c goes out of scope, the assignment to a sets b's value as well. In
-// particular, it's not necessary to ensure that a Label lives beyond
-// Sections that refer to it.
-class Label {
- public:
- Label(); // An undefined label.
- explicit Label(uint64_t value); // A label with a fixed value
- Label(const Label &value); // A label equal to another.
- ~Label();
-
- Label &operator=(uint64_t value);
- Label &operator=(const Label &value);
- Label operator+(uint64_t addend) const;
- Label operator-(uint64_t subtrahend) const;
- uint64_t operator-(const Label &subtrahend) const;
-
- // We could also provide == and != that work on undefined, but
- // related, labels.
-
- // Return true if this label's value is known. If VALUE_P is given,
- // set *VALUE_P to the known value if returning true.
- bool IsKnownConstant(uint64_t *value_p = NULL) const;
-
- // Return true if the offset from LABEL to this label is known. If
- // OFFSET_P is given, set *OFFSET_P to the offset when returning true.
- //
- // You can think of l.KnownOffsetFrom(m, &d) as being like 'd = l-m',
- // except that it also returns a value indicating whether the
- // subtraction is possible given what we currently know of l and m.
- // It can be possible even if we don't know l and m's values. For
- // example:
- //
- // Label l, m;
- // m = l + 10;
- // l.IsKnownConstant(); // false
- // m.IsKnownConstant(); // false
- // uint64_t d;
- // l.IsKnownOffsetFrom(m, &d); // true, and sets d to -10.
- // l-m // -10
- // m-l // 10
- // m.Value() // error: m's value is not known
- bool IsKnownOffsetFrom(const Label &label, uint64_t *offset_p = NULL) const;
-
- private:
- // A label's value, or if that is not yet known, how the value is
- // related to other labels' values. A binding may be:
- // - a known constant,
- // - constrained to be equal to some other binding plus a constant, or
- // - unconstrained, and free to take on any value.
- //
- // Many labels may point to a single binding, and each binding may
- // refer to another, so bindings and labels form trees whose leaves
- // are labels, whose interior nodes (and roots) are bindings, and
- // where links point from children to parents. Bindings are
- // reference counted, allowing labels to be lightweight, copyable,
- // assignable, placed in containers, and so on.
- class Binding {
- public:
- Binding();
- explicit Binding(uint64_t addend);
- ~Binding();
-
- // Increment our reference count.
- void Acquire() { reference_count_++; };
- // Decrement our reference count, and return true if it is zero.
- bool Release() { return --reference_count_ == 0; }
-
- // Set this binding to be equal to BINDING + ADDEND. If BINDING is
- // NULL, then set this binding to the known constant ADDEND.
- // Update every binding on this binding's chain to point directly
- // to BINDING, or to be a constant, with addends adjusted
- // appropriately.
- void Set(Binding *binding, uint64_t value);
-
- // Return what we know about the value of this binding.
- // - If this binding's value is a known constant, set BASE to
- // NULL, and set ADDEND to its value.
- // - If this binding is not a known constant but related to other
- // bindings, set BASE to the binding at the end of the relation
- // chain (which will always be unconstrained), and set ADDEND to the
- // value to add to that binding's value to get this binding's
- // value.
- // - If this binding is unconstrained, set BASE to this, and leave
- // ADDEND unchanged.
- void Get(Binding **base, uint64_t *addend);
-
- private:
- // There are three cases:
- //
- // - A binding representing a known constant value has base_ NULL,
- // and addend_ equal to the value.
- //
- // - A binding representing a completely unconstrained value has
- // base_ pointing to this; addend_ is unused.
- //
- // - A binding whose value is related to some other binding's
- // value has base_ pointing to that other binding, and addend_
- // set to the amount to add to that binding's value to get this
- // binding's value. We only represent relationships of the form
- // x = y+c.
- //
- // Thus, the bind_ links form a chain terminating in either a
- // known constant value or a completely unconstrained value. Most
- // operations on bindings do path compression: they change every
- // binding on the chain to point directly to the final value,
- // adjusting addends as appropriate.
- Binding *base_;
- uint64_t addend_;
-
- // The number of Labels and Bindings pointing to this binding.
- // (When a binding points to itself, indicating a completely
- // unconstrained binding, that doesn't count as a reference.)
- int reference_count_;
- };
-
- // This label's value.
- Binding *value_;
-};
-
-// Conventions for representing larger numbers as sequences of bytes.
-enum Endianness {
- kBigEndian, // Big-endian: the most significant byte comes first.
- kLittleEndian, // Little-endian: the least significant byte comes first.
- kUnsetEndian, // used internally
-};
-
-// A section is a sequence of bytes, constructed by appending bytes
-// to the end. Sections have a convenient and flexible set of member
-// functions for appending data in various formats: big-endian and
-// little-endian signed and unsigned values of different sizes;
-// LEB128 and ULEB128 values (see below), and raw blocks of bytes.
-//
-// If you need to append a value to a section that is not convenient
-// to compute immediately, you can create a label, append the
-// label's value to the section, and then set the label's value
-// later, when it's convenient to do so. Once a label's value is
-// known, the section class takes care of updating all previously
-// appended references to it.
-//
-// Once all the labels to which a section refers have had their
-// values determined, you can get a copy of the section's contents
-// as a string.
-//
-// Note that there is no specified "start of section" label. This is
-// because there are typically several different meanings for "the
-// start of a section": the offset of the section within an object
-// file, the address in memory at which the section's content appear,
-// and so on. It's up to the code that uses the Section class to
-// keep track of these explicitly, as they depend on the application.
-class Section {
- public:
- explicit Section(Endianness endianness = kUnsetEndian)
- : endianness_(endianness) { };
-
- // A base class destructor should be either public and virtual,
- // or protected and nonvirtual.
- virtual ~Section() { };
-
- // Return the default endianness of this section.
- Endianness endianness() const { return endianness_; }
-
- // Append the SIZE bytes at DATA to the end of this section. Return
- // a reference to this section.
- Section &Append(const string &data) {
- contents_.append(data);
- return *this;
- };
-
- // Append SIZE copies of BYTE to the end of this section. Return a
- // reference to this section.
- Section &Append(size_t size, uint8_t byte) {
- contents_.append(size, (char) byte);
- return *this;
- }
-
- // Append NUMBER to this section. ENDIANNESS is the endianness to
- // use to write the number. SIZE is the length of the number in
- // bytes. Return a reference to this section.
- Section &Append(Endianness endianness, size_t size, uint64_t number);
- Section &Append(Endianness endianness, size_t size, const Label &label);
-
- // Append SECTION to the end of this section. The labels SECTION
- // refers to need not be defined yet.
- //
- // Note that this has no effect on any Labels' values, or on
- // SECTION. If placing SECTION within 'this' provides new
- // constraints on existing labels' values, then it's up to the
- // caller to fiddle with those labels as needed.
- Section &Append(const Section &section);
-
- // Append the contents of DATA as a series of bytes terminated by
- // a NULL character.
- Section &AppendCString(const string &data) {
- Append(data);
- contents_ += '\0';
- return *this;
- }
-
- // Append VALUE or LABEL to this section, with the given bit width and
- // endianness. Return a reference to this section.
- //
- // The names of these functions have the form <ENDIANNESS><BITWIDTH>:
- // <ENDIANNESS> is either 'L' (little-endian, least significant byte first),
- // 'B' (big-endian, most significant byte first), or
- // 'D' (default, the section's default endianness)
- // <BITWIDTH> is 8, 16, 32, or 64.
- //
- // Since endianness doesn't matter for a single byte, all the
- // <BITWIDTH>=8 functions are equivalent.
- //
- // These can be used to write both signed and unsigned values, as
- // the compiler will properly sign-extend a signed value before
- // passing it to the function, at which point the function's
- // behavior is the same either way.
- Section &L8(uint8_t value) { contents_ += value; return *this; }
- Section &B8(uint8_t value) { contents_ += value; return *this; }
- Section &D8(uint8_t value) { contents_ += value; return *this; }
- Section &L16(uint16_t), &L32(uint32_t), &L64(uint64_t),
- &B16(uint16_t), &B32(uint32_t), &B64(uint64_t),
- &D16(uint16_t), &D32(uint32_t), &D64(uint64_t);
- Section &L8(const Label &label), &L16(const Label &label),
- &L32(const Label &label), &L64(const Label &label),
- &B8(const Label &label), &B16(const Label &label),
- &B32(const Label &label), &B64(const Label &label),
- &D8(const Label &label), &D16(const Label &label),
- &D32(const Label &label), &D64(const Label &label);
-
- // Append VALUE in a signed LEB128 (Little-Endian Base 128) form.
- //
- // The signed LEB128 representation of an integer N is a variable
- // number of bytes:
- //
- // - If N is between -0x40 and 0x3f, then its signed LEB128
- // representation is a single byte whose value is N.
- //
- // - Otherwise, its signed LEB128 representation is (N & 0x7f) |
- // 0x80, followed by the signed LEB128 representation of N / 128,
- // rounded towards negative infinity.
- //
- // In other words, we break VALUE into groups of seven bits, put
- // them in little-endian order, and then write them as eight-bit
- // bytes with the high bit on all but the last.
- //
- // Note that VALUE cannot be a Label (we would have to implement
- // relaxation).
- Section &LEB128(long long value);
-
- // Append VALUE in unsigned LEB128 (Little-Endian Base 128) form.
- //
- // The unsigned LEB128 representation of an integer N is a variable
- // number of bytes:
- //
- // - If N is between 0 and 0x7f, then its unsigned LEB128
- // representation is a single byte whose value is N.
- //
- // - Otherwise, its unsigned LEB128 representation is (N & 0x7f) |
- // 0x80, followed by the unsigned LEB128 representation of N /
- // 128, rounded towards negative infinity.
- //
- // Note that VALUE cannot be a Label (we would have to implement
- // relaxation).
- Section &ULEB128(uint64_t value);
-
- // Jump to the next location aligned on an ALIGNMENT-byte boundary,
- // relative to the start of the section. Fill the gap with PAD_BYTE.
- // ALIGNMENT must be a power of two. Return a reference to this
- // section.
- Section &Align(size_t alignment, uint8_t pad_byte = 0);
-
- // Return the current size of the section.
- size_t Size() const { return contents_.size(); }
-
- // Return a label representing the start of the section.
- //
- // It is up to the user whether this label represents the section's
- // position in an object file, the section's address in memory, or
- // what have you; some applications may need both, in which case
- // this simple-minded interface won't be enough. This class only
- // provides a single start label, for use with the Here and Mark
- // member functions.
- //
- // Ideally, we'd provide this in a subclass that actually knows more
- // about the application at hand and can provide an appropriate
- // collection of start labels. But then the appending member
- // functions like Append and D32 would return a reference to the
- // base class, not the derived class, and the chaining won't work.
- // Since the only value here is in pretty notation, that's a fatal
- // flaw.
- Label start() const { return start_; }
-
- // Return a label representing the point at which the next Appended
- // item will appear in the section, relative to start().
- Label Here() const { return start_ + Size(); }
-
- // Set *LABEL to Here, and return a reference to this section.
- Section &Mark(Label *label) { *label = Here(); return *this; }
-
- // If there are no undefined label references left in this
- // section, set CONTENTS to the contents of this section, as a
- // string, and clear this section. Return true on success, or false
- // if there were still undefined labels.
- bool GetContents(string *contents);
-
- private:
- // Used internally. A reference to a label's value.
- struct Reference {
- Reference(size_t set_offset, Endianness set_endianness, size_t set_size,
- const Label &set_label)
- : offset(set_offset), endianness(set_endianness), size(set_size),
- label(set_label) { }
-
- // The offset of the reference within the section.
- size_t offset;
-
- // The endianness of the reference.
- Endianness endianness;
-
- // The size of the reference.
- size_t size;
-
- // The label to which this is a reference.
- Label label;
- };
-
- // The default endianness of this section.
- Endianness endianness_;
-
- // The contents of the section.
- string contents_;
-
- // References to labels within those contents.
- vector<Reference> references_;
-
- // A label referring to the beginning of the section.
- Label start_;
-};
-
-} // namespace test_assembler
-} // namespace lul_test
-
-
-namespace lul_test {
-
-using lul::DwarfPointerEncoding;
-using lul_test::test_assembler::Endianness;
-using lul_test::test_assembler::Label;
-using lul_test::test_assembler::Section;
-
-class CFISection: public Section {
- public:
-
- // CFI augmentation strings beginning with 'z', defined by the
- // Linux/IA-64 C++ ABI, can specify interesting encodings for
- // addresses appearing in FDE headers and call frame instructions (and
- // for additional fields whose presence the augmentation string
- // specifies). In particular, pointers can be specified to be relative
- // to various base address: the start of the .text section, the
- // location holding the address itself, and so on. These allow the
- // frame data to be position-independent even when they live in
- // write-protected pages. These variants are specified at the
- // following two URLs:
- //
- // http://refspecs.linux-foundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/dwarfext.html
- // http://refspecs.linux-foundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
- //
- // CFISection leaves the production of well-formed 'z'-augmented CIEs and
- // FDEs to the user, but does provide EncodedPointer, to emit
- // properly-encoded addresses for a given pointer encoding.
- // EncodedPointer uses an instance of this structure to find the base
- // addresses it should use; you can establish a default for all encoded
- // pointers appended to this section with SetEncodedPointerBases.
- struct EncodedPointerBases {
- EncodedPointerBases() : cfi(), text(), data() { }
-
- // The starting address of this CFI section in memory, for
- // DW_EH_PE_pcrel. DW_EH_PE_pcrel pointers may only be used in data
- // that has is loaded into the program's address space.
- uint64_t cfi;
-
- // The starting address of this file's .text section, for DW_EH_PE_textrel.
- uint64_t text;
-
- // The starting address of this file's .got or .eh_frame_hdr section,
- // for DW_EH_PE_datarel.
- uint64_t data;
- };
-
- // Create a CFISection whose endianness is ENDIANNESS, and where
- // machine addresses are ADDRESS_SIZE bytes long. If EH_FRAME is
- // true, use the .eh_frame format, as described by the Linux
- // Standards Base Core Specification, instead of the DWARF CFI
- // format.
- CFISection(Endianness endianness, size_t address_size,
- bool eh_frame = false)
- : Section(endianness), address_size_(address_size), eh_frame_(eh_frame),
- pointer_encoding_(lul::DW_EH_PE_absptr),
- encoded_pointer_bases_(), entry_length_(NULL), in_fde_(false) {
- // The 'start', 'Here', and 'Mark' members of a CFISection all refer
- // to section offsets.
- start() = 0;
- }
-
- // Return this CFISection's address size.
- size_t AddressSize() const { return address_size_; }
-
- // Return true if this CFISection uses the .eh_frame format, or
- // false if it contains ordinary DWARF CFI data.
- bool ContainsEHFrame() const { return eh_frame_; }
-
- // Use ENCODING for pointers in calls to FDEHeader and EncodedPointer.
- void SetPointerEncoding(DwarfPointerEncoding encoding) {
- pointer_encoding_ = encoding;
- }
-
- // Use the addresses in BASES as the base addresses for encoded
- // pointers in subsequent calls to FDEHeader or EncodedPointer.
- // This function makes a copy of BASES.
- void SetEncodedPointerBases(const EncodedPointerBases &bases) {
- encoded_pointer_bases_ = bases;
- }
-
- // Append a Common Information Entry header to this section with the
- // given values. If dwarf64 is true, use the 64-bit DWARF initial
- // length format for the CIE's initial length. Return a reference to
- // this section. You should call FinishEntry after writing the last
- // instruction for the CIE.
- //
- // Before calling this function, you will typically want to use Mark
- // or Here to make a label to pass to FDEHeader that refers to this
- // CIE's position in the section.
- CFISection &CIEHeader(uint64_t code_alignment_factor,
- int data_alignment_factor,
- unsigned return_address_register,
- uint8_t version = 3,
- const string &augmentation = "",
- bool dwarf64 = false);
-
- // Append a Frame Description Entry header to this section with the
- // given values. If dwarf64 is true, use the 64-bit DWARF initial
- // length format for the CIE's initial length. Return a reference to
- // this section. You should call FinishEntry after writing the last
- // instruction for the CIE.
- //
- // This function doesn't support entries that are longer than
- // 0xffffff00 bytes. (The "initial length" is always a 32-bit
- // value.) Nor does it support .debug_frame sections longer than
- // 0xffffff00 bytes.
- CFISection &FDEHeader(Label cie_pointer,
- uint64_t initial_location,
- uint64_t address_range,
- bool dwarf64 = false);
-
- // Note the current position as the end of the last CIE or FDE we
- // started, after padding with DW_CFA_nops for alignment. This
- // defines the label representing the entry's length, cited in the
- // entry's header. Return a reference to this section.
- CFISection &FinishEntry();
-
- // Append the contents of BLOCK as a DW_FORM_block value: an
- // unsigned LEB128 length, followed by that many bytes of data.
- CFISection &Block(const string &block) {
- ULEB128(block.size());
- Append(block);
- return *this;
- }
-
- // Append ADDRESS to this section, in the appropriate size and
- // endianness. Return a reference to this section.
- CFISection &Address(uint64_t address) {
- Section::Append(endianness(), address_size_, address);
- return *this;
- }
-
- // Append ADDRESS to this section, using ENCODING and BASES. ENCODING
- // defaults to this section's default encoding, established by
- // SetPointerEncoding. BASES defaults to this section's bases, set by
- // SetEncodedPointerBases. If the DW_EH_PE_indirect bit is set in the
- // encoding, assume that ADDRESS is where the true address is stored.
- // Return a reference to this section.
- //
- // (C++ doesn't let me use default arguments here, because I want to
- // refer to members of *this in the default argument expression.)
- CFISection &EncodedPointer(uint64_t address) {
- return EncodedPointer(address, pointer_encoding_, encoded_pointer_bases_);
- }
- CFISection &EncodedPointer(uint64_t address, DwarfPointerEncoding encoding) {
- return EncodedPointer(address, encoding, encoded_pointer_bases_);
- }
- CFISection &EncodedPointer(uint64_t address, DwarfPointerEncoding encoding,
- const EncodedPointerBases &bases);
-
- // Restate some member functions, to keep chaining working nicely.
- CFISection &Mark(Label *label) { Section::Mark(label); return *this; }
- CFISection &D8(uint8_t v) { Section::D8(v); return *this; }
- CFISection &D16(uint16_t v) { Section::D16(v); return *this; }
- CFISection &D16(Label v) { Section::D16(v); return *this; }
- CFISection &D32(uint32_t v) { Section::D32(v); return *this; }
- CFISection &D32(const Label &v) { Section::D32(v); return *this; }
- CFISection &D64(uint64_t v) { Section::D64(v); return *this; }
- CFISection &D64(const Label &v) { Section::D64(v); return *this; }
- CFISection &LEB128(long long v) { Section::LEB128(v); return *this; }
- CFISection &ULEB128(uint64_t v) { Section::ULEB128(v); return *this; }
-
- private:
- // A length value that we've appended to the section, but is not yet
- // known. LENGTH is the appended value; START is a label referring
- // to the start of the data whose length was cited.
- struct PendingLength {
- Label length;
- Label start;
- };
-
- // Constants used in CFI/.eh_frame data:
-
- // If the first four bytes of an "initial length" are this constant, then
- // the data uses the 64-bit DWARF format, and the length itself is the
- // subsequent eight bytes.
- static const uint32_t kDwarf64InitialLengthMarker = 0xffffffffU;
-
- // The CIE identifier for 32- and 64-bit DWARF CFI and .eh_frame data.
- static const uint32_t kDwarf32CIEIdentifier = ~(uint32_t)0;
- static const uint64_t kDwarf64CIEIdentifier = ~(uint64_t)0;
- static const uint32_t kEHFrame32CIEIdentifier = 0;
- static const uint64_t kEHFrame64CIEIdentifier = 0;
-
- // The size of a machine address for the data in this section.
- size_t address_size_;
-
- // If true, we are generating a Linux .eh_frame section, instead of
- // a standard DWARF .debug_frame section.
- bool eh_frame_;
-
- // The encoding to use for FDE pointers.
- DwarfPointerEncoding pointer_encoding_;
-
- // The base addresses to use when emitting encoded pointers.
- EncodedPointerBases encoded_pointer_bases_;
-
- // The length value for the current entry.
- //
- // Oddly, this must be dynamically allocated. Labels never get new
- // values; they only acquire constraints on the value they already
- // have, or assert if you assign them something incompatible. So
- // each header needs truly fresh Label objects to cite in their
- // headers and track their positions. The alternative is explicit
- // destructor invocation and a placement new. Ick.
- PendingLength *entry_length_;
-
- // True if we are currently emitting an FDE --- that is, we have
- // called FDEHeader but have not yet called FinishEntry.
- bool in_fde_;
-
- // If in_fde_ is true, this is its starting address. We use this for
- // emitting DW_EH_PE_funcrel pointers.
- uint64_t fde_start_address_;
-};
-
-} // namespace lul_test
-
-#endif // LUL_TEST_INFRASTRUCTURE_H
diff --git a/tools/profiler/tests/gtest/ThreadProfileTest.cpp b/tools/profiler/tests/gtest/ThreadProfileTest.cpp
deleted file mode 100644
index 4399a5bc2..000000000
--- a/tools/profiler/tests/gtest/ThreadProfileTest.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "gtest/gtest.h"
-
-#include "ProfileEntry.h"
-#include "ThreadProfile.h"
-
-// Make sure we can initialize our ThreadProfile
-TEST(ThreadProfile, Initialization) {
- PseudoStack* stack = PseudoStack::create();
- Thread::tid_t tid = 1000;
- ThreadInfo info("testThread", tid, true, stack, nullptr);
- RefPtr<ProfileBuffer> pb = new ProfileBuffer(10);
- ThreadProfile tp(&info, pb);
-}
-
-// Make sure we can record one tag and read it
-TEST(ThreadProfile, InsertOneTag) {
- PseudoStack* stack = PseudoStack::create();
- Thread::tid_t tid = 1000;
- ThreadInfo info("testThread", tid, true, stack, nullptr);
- RefPtr<ProfileBuffer> pb = new ProfileBuffer(10);
- pb->addTag(ProfileEntry('t', 123.1));
- ASSERT_TRUE(pb->mEntries != nullptr);
- ASSERT_TRUE(pb->mEntries[pb->mReadPos].mTagName == 't');
- ASSERT_TRUE(pb->mEntries[pb->mReadPos].mTagDouble == 123.1);
-}
-
-// See if we can insert some tags
-TEST(ThreadProfile, InsertTagsNoWrap) {
- PseudoStack* stack = PseudoStack::create();
- Thread::tid_t tid = 1000;
- ThreadInfo info("testThread", tid, true, stack, nullptr);
- RefPtr<ProfileBuffer> pb = new ProfileBuffer(100);
- int test_size = 50;
- for (int i = 0; i < test_size; i++) {
- pb->addTag(ProfileEntry('t', i));
- }
- ASSERT_TRUE(pb->mEntries != nullptr);
- int readPos = pb->mReadPos;
- while (readPos != pb->mWritePos) {
- ASSERT_TRUE(pb->mEntries[readPos].mTagName == 't');
- ASSERT_TRUE(pb->mEntries[readPos].mTagInt == readPos);
- readPos = (readPos + 1) % pb->mEntrySize;
- }
-}
-
-// See if wrapping works as it should in the basic case
-TEST(ThreadProfile, InsertTagsWrap) {
- PseudoStack* stack = PseudoStack::create();
- Thread::tid_t tid = 1000;
- // we can fit only 24 tags in this buffer because of the empty slot
- int tags = 24;
- int buffer_size = tags + 1;
- ThreadInfo info("testThread", tid, true, stack, nullptr);
- RefPtr<ProfileBuffer> pb = new ProfileBuffer(buffer_size);
- int test_size = 43;
- for (int i = 0; i < test_size; i++) {
- pb->addTag(ProfileEntry('t', i));
- }
- ASSERT_TRUE(pb->mEntries != nullptr);
- int readPos = pb->mReadPos;
- int ctr = 0;
- while (readPos != pb->mWritePos) {
- ASSERT_TRUE(pb->mEntries[readPos].mTagName == 't');
- // the first few tags were discarded when we wrapped
- ASSERT_TRUE(pb->mEntries[readPos].mTagInt == ctr + (test_size - tags));
- ctr++;
- readPos = (readPos + 1) % pb->mEntrySize;
- }
-}
-
diff --git a/tools/profiler/tests/gtest/moz.build b/tools/profiler/tests/gtest/moz.build
deleted file mode 100644
index 33aded164..000000000
--- a/tools/profiler/tests/gtest/moz.build
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, you can obtain one at http://mozilla.org/MPL/2.0/.
-
-if CONFIG['OS_TARGET'] in ('Android', 'Linux'):
- UNIFIED_SOURCES += [
- 'LulTestDwarf.cpp',
- 'LulTestInfrastructure.cpp',
- ]
- if CONFIG['CPU_ARCH'] != 'x86':
- UNIFIED_SOURCES += [
- 'LulTest.cpp',
- ]
-
-LOCAL_INCLUDES += [
- '/tools/profiler/core',
- '/tools/profiler/gecko',
- '/tools/profiler/lul',
-]
-
-UNIFIED_SOURCES += [
- 'ThreadProfileTest.cpp',
-]
-
-FINAL_LIBRARY = 'xul-gtest'
-
-if CONFIG['GNU_CXX']:
- CXXFLAGS += ['-Wno-error=shadow']
diff --git a/widget/VsyncDispatcher.cpp b/widget/VsyncDispatcher.cpp
index 5979466e8..7bb32b89b 100644
--- a/widget/VsyncDispatcher.cpp
+++ b/widget/VsyncDispatcher.cpp
@@ -11,11 +11,6 @@
#include "mozilla/layers/CompositorBridgeParent.h"
#include "mozilla/layers/CompositorThread.h"
-#ifdef MOZ_ENABLE_PROFILER_SPS
-#include "GeckoProfiler.h"
-#include "ProfilerMarkers.h"
-#endif
-
namespace mozilla {
CompositorVsyncDispatcher::CompositorVsyncDispatcher()
@@ -35,11 +30,6 @@ CompositorVsyncDispatcher::~CompositorVsyncDispatcher()
void
CompositorVsyncDispatcher::NotifyVsync(TimeStamp aVsyncTimestamp)
{
- // In vsync thread
-#ifdef MOZ_ENABLE_PROFILER_SPS
- layers::CompositorBridgeParent::PostInsertVsyncProfilerMarker(aVsyncTimestamp);
-#endif
-
MutexAutoLock lock(mCompositorObserverLock);
if (mCompositorVsyncObserver) {
mCompositorVsyncObserver->NotifyVsync(aVsyncTimestamp);
diff --git a/xpcom/base/nsIMemoryReporter.idl b/xpcom/base/nsIMemoryReporter.idl
index 9617877df..babfa646f 100644
--- a/xpcom/base/nsIMemoryReporter.idl
+++ b/xpcom/base/nsIMemoryReporter.idl
@@ -405,13 +405,6 @@ interface nsIMemoryReporterManager : nsISupports
[infallible] readonly attribute boolean hasMozMallocUsableSize;
/*
- * These attributes indicate DMD's status. "Enabled" means enabled at
- * build-time.
- */
- [infallible] readonly attribute boolean isDMDEnabled;
- [infallible] readonly attribute boolean isDMDRunning;
-
- /*
* Run a series of GC/CC's in an attempt to minimize the application's memory
* usage. When we're finished, we invoke the given runnable if it's not
* null.
@@ -519,23 +512,9 @@ nsresult RegisterNonJSSizeOfTab(NonJSSizeOfTabFn aSizeOfTabFn);
}
-#if defined(MOZ_DMD)
-#if !defined(MOZ_MEMORY)
-#error "MOZ_DMD requires MOZ_MEMORY"
-#endif
-
-#include "DMD.h"
-
-#define MOZ_REPORT(ptr) mozilla::dmd::Report(ptr)
-#define MOZ_REPORT_ON_ALLOC(ptr) mozilla::dmd::ReportOnAlloc(ptr)
-
-#else
-
#define MOZ_REPORT(ptr)
#define MOZ_REPORT_ON_ALLOC(ptr)
-#endif // defined(MOZ_DMD)
-
// Functions generated via this macro should be used by all traversal-based
// memory reporters. Such functions return |moz_malloc_size_of(ptr)|; this
// will always be zero on some obscure platforms.
diff --git a/xpcom/base/nsMemoryInfoDumper.cpp b/xpcom/base/nsMemoryInfoDumper.cpp
index 06453b126..afb18382d 100644
--- a/xpcom/base/nsMemoryInfoDumper.cpp
+++ b/xpcom/base/nsMemoryInfoDumper.cpp
@@ -766,65 +766,3 @@ nsMemoryInfoDumper::DumpMemoryInfoToTempDir(const nsAString& aIdentifier,
aAnonymize, aMinimizeMemoryUsage, identifier);
}
-#ifdef MOZ_DMD
-dmd::DMDFuncs::Singleton dmd::DMDFuncs::sSingleton;
-
-nsresult
-nsMemoryInfoDumper::OpenDMDFile(const nsAString& aIdentifier, int aPid,
- FILE** aOutFile)
-{
- if (!dmd::IsRunning()) {
- *aOutFile = nullptr;
- return NS_OK;
- }
-
- // Create a filename like dmd-<identifier>-<pid>.json.gz, which will be used
- // if DMD is enabled.
- nsCString dmdFilename;
- MakeFilename("dmd", aIdentifier, aPid, "json.gz", dmdFilename);
-
- // Open a new DMD file named |dmdFilename| in NS_OS_TEMP_DIR for writing,
- // and dump DMD output to it. This must occur after the memory reporters
- // have been run (above), but before the memory-reports file has been
- // renamed (so scripts can detect the DMD file, if present).
-
- nsresult rv;
- nsCOMPtr<nsIFile> dmdFile;
- rv = nsDumpUtils::OpenTempFile(dmdFilename,
- getter_AddRefs(dmdFile),
- NS_LITERAL_CSTRING("memory-reports"));
- if (NS_WARN_IF(NS_FAILED(rv))) {
- return rv;
- }
- rv = dmdFile->OpenANSIFileDesc("wb", aOutFile);
- NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "OpenANSIFileDesc failed");
-
- // Print the path, because on some platforms (e.g. Mac) it's not obvious.
- nsCString path;
- rv = dmdFile->GetNativePath(path);
- if (NS_WARN_IF(NS_FAILED(rv))) {
- return rv;
- }
- dmd::StatusMsg("opened %s for writing\n", path.get());
-
- return rv;
-}
-
-nsresult
-nsMemoryInfoDumper::DumpDMDToFile(FILE* aFile)
-{
- RefPtr<nsGZFileWriter> gzWriter = new nsGZFileWriter();
- nsresult rv = gzWriter->InitANSIFileDesc(aFile);
- if (NS_WARN_IF(NS_FAILED(rv))) {
- return rv;
- }
-
- // Dump DMD's memory reports analysis to the file.
- dmd::Analyze(MakeUnique<GZWriterWrapper>(gzWriter));
-
- rv = gzWriter->Finish();
- NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Finish failed");
- return rv;
-}
-#endif // MOZ_DMD
-
diff --git a/xpcom/base/nsMemoryInfoDumper.h b/xpcom/base/nsMemoryInfoDumper.h
index 6bba176f2..281bb3e51 100644
--- a/xpcom/base/nsMemoryInfoDumper.h
+++ b/xpcom/base/nsMemoryInfoDumper.h
@@ -28,15 +28,6 @@ public:
nsMemoryInfoDumper();
static void Initialize();
-
-#ifdef MOZ_DMD
- // Open an appropriately named file for a DMD report. If DMD is
- // disabled, return a null FILE* instead.
- static nsresult OpenDMDFile(const nsAString& aIdentifier, int aPid,
- FILE** aOutFile);
- // Write a DMD report to the given file and close it.
- static nsresult DumpDMDToFile(FILE* aFile);
-#endif
};
#define NS_MEMORY_INFO_DUMPER_CID \
diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
index 7c62e2af5..2d4f3fa9c 100644
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -17,7 +17,7 @@
#include "nsIObserverService.h"
#include "nsIGlobalObject.h"
#include "nsIXPConnect.h"
-#if defined(XP_UNIX) || defined(MOZ_DMD)
+#if defined(XP_UNIX)
#include "nsMemoryInfoDumper.h"
#endif
#include "mozilla/Attributes.h"
@@ -1425,62 +1425,6 @@ NS_IMPL_ISUPPORTS(DeadlockDetectorReporter, nsIMemoryReporter)
#endif
-#ifdef MOZ_DMD
-
-namespace mozilla {
-namespace dmd {
-
-class DMDReporter final : public nsIMemoryReporter
-{
-public:
- NS_DECL_ISUPPORTS
-
- NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
- nsISupports* aData, bool aAnonymize) override
- {
- dmd::Sizes sizes;
- dmd::SizeOf(&sizes);
-
- MOZ_COLLECT_REPORT(
- "explicit/dmd/stack-traces/used", KIND_HEAP, UNITS_BYTES,
- sizes.mStackTracesUsed,
- "Memory used by stack traces which correspond to at least "
- "one heap block DMD is tracking.");
-
- MOZ_COLLECT_REPORT(
- "explicit/dmd/stack-traces/unused", KIND_HEAP, UNITS_BYTES,
- sizes.mStackTracesUnused,
- "Memory used by stack traces which don't correspond to any heap "
- "blocks DMD is currently tracking.");
-
- MOZ_COLLECT_REPORT(
- "explicit/dmd/stack-traces/table", KIND_HEAP, UNITS_BYTES,
- sizes.mStackTraceTable,
- "Memory used by DMD's stack trace table.");
-
- MOZ_COLLECT_REPORT(
- "explicit/dmd/live-block-table", KIND_HEAP, UNITS_BYTES,
- sizes.mLiveBlockTable,
- "Memory used by DMD's live block table.");
-
- MOZ_COLLECT_REPORT(
- "explicit/dmd/dead-block-list", KIND_HEAP, UNITS_BYTES,
- sizes.mDeadBlockTable,
- "Memory used by DMD's dead block list.");
-
- return NS_OK;
- }
-
-private:
- ~DMDReporter() {}
-};
-NS_IMPL_ISUPPORTS(DMDReporter, nsIMemoryReporter)
-
-} // namespace dmd
-} // namespace mozilla
-
-#endif // MOZ_DMD
-
/**
** nsMemoryReporterManager implementation
**/
@@ -1560,10 +1504,6 @@ nsMemoryReporterManager::Init()
RegisterStrongReporter(new DeadlockDetectorReporter());
#endif
-#ifdef MOZ_DMD
- RegisterStrongReporter(new mozilla::dmd::DMDReporter());
-#endif
-
#ifdef XP_WIN
RegisterStrongReporter(new WindowsAddressSpaceReporter());
#endif
@@ -1679,22 +1619,9 @@ nsMemoryReporterManager::StartGettingReports()
PendingProcessesState* s = mPendingProcessesState;
nsresult rv;
- // Get reports for this process.
- FILE* parentDMDFile = nullptr;
-#ifdef MOZ_DMD
- if (!s->mDMDDumpIdent.IsEmpty()) {
- rv = nsMemoryInfoDumper::OpenDMDFile(s->mDMDDumpIdent, getpid(),
- &parentDMDFile);
- if (NS_WARN_IF(NS_FAILED(rv))) {
- // Proceed with the memory report as if DMD were disabled.
- parentDMDFile = nullptr;
- }
- }
-#endif
-
// This is async.
GetReportsForThisProcessExtended(s->mHandleReport, s->mHandleReportData,
- s->mAnonymize, parentDMDFile,
+ s->mAnonymize, nullptr,
s->mFinishReporting, s->mFinishReportingData);
nsTArray<ContentParent*> childWeakRefs;
@@ -1775,16 +1702,6 @@ nsMemoryReporterManager::GetReportsForThisProcessExtended(
return NS_ERROR_IN_PROGRESS;
}
-#ifdef MOZ_DMD
- if (aDMDFile) {
- // Clear DMD's reportedness state before running the memory
- // reporters, to avoid spurious twice-reported warnings.
- dmd::ClearReports();
- }
-#else
- MOZ_ASSERT(!aDMDFile);
-#endif
-
mPendingReportersState = new PendingReportersState(
aFinishReporting, aFinishReportingData, aDMDFile);
@@ -1810,11 +1727,6 @@ NS_IMETHODIMP
nsMemoryReporterManager::EndReport()
{
if (--mPendingReportersState->mReportsPending == 0) {
-#ifdef MOZ_DMD
- if (mPendingReportersState->mDMDFile) {
- nsMemoryInfoDumper::DumpDMDToFile(mPendingReportersState->mDMDFile);
- }
-#endif
if (mPendingProcessesState) {
// This is the parent process.
EndProcessReport(mPendingProcessesState->mGeneration, true);
@@ -1902,24 +1814,8 @@ nsMemoryReporterManager::StartChildReport(mozilla::dom::ContentParent* aChild,
return false;
}
- mozilla::dom::MaybeFileDesc dmdFileDesc = void_t();
-#ifdef MOZ_DMD
- if (!aState->mDMDDumpIdent.IsEmpty()) {
- FILE *dmdFile = nullptr;
- nsresult rv = nsMemoryInfoDumper::OpenDMDFile(aState->mDMDDumpIdent,
- aChild->Pid(), &dmdFile);
- if (NS_WARN_IF(NS_FAILED(rv))) {
- // Proceed with the memory report as if DMD were disabled.
- dmdFile = nullptr;
- }
- if (dmdFile) {
- dmdFileDesc = mozilla::ipc::FILEToFileDescriptor(dmdFile);
- fclose(dmdFile);
- }
- }
-#endif
return aChild->SendPMemoryReportRequestConstructor(
- aState->mGeneration, aState->mAnonymize, aState->mMinimize, dmdFileDesc);
+ aState->mGeneration, aState->mAnonymize, aState->mMinimize, void_t());
}
void
@@ -2452,28 +2348,6 @@ nsMemoryReporterManager::GetHasMozMallocUsableSize(bool* aHas)
return NS_OK;
}
-NS_IMETHODIMP
-nsMemoryReporterManager::GetIsDMDEnabled(bool* aIsEnabled)
-{
-#ifdef MOZ_DMD
- *aIsEnabled = true;
-#else
- *aIsEnabled = false;
-#endif
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMemoryReporterManager::GetIsDMDRunning(bool* aIsRunning)
-{
-#ifdef MOZ_DMD
- *aIsRunning = dmd::IsRunning();
-#else
- *aIsRunning = false;
-#endif
- return NS_OK;
-}
-
namespace {
/**
diff --git a/xpcom/base/nsTraceRefcnt.cpp b/xpcom/base/nsTraceRefcnt.cpp
index 3b415174b..da51305a9 100644
--- a/xpcom/base/nsTraceRefcnt.cpp
+++ b/xpcom/base/nsTraceRefcnt.cpp
@@ -42,11 +42,6 @@
#include <dlfcn.h>
#endif
-#ifdef MOZ_DMD
-#include "base/process_util.h"
-#include "nsMemoryInfoDumper.h"
-#endif
-
////////////////////////////////////////////////////////////////////////////////
#include "plhash.h"
@@ -936,39 +931,6 @@ NS_LogTerm()
mozilla::LogTerm();
}
-#ifdef MOZ_DMD
-// If MOZ_DMD_SHUTDOWN_LOG is set, dump a DMD report to a file.
-// The value of this environment variable is used as the prefix
-// of the file name, so you probably want something like "/tmp/".
-// By default, this is run in all processes, but you can record a
-// log only for a specific process type by setting MOZ_DMD_LOG_PROCESS
-// to the process type you want to log, such as "default" or "tab".
-// This method can't use the higher level XPCOM file utilities
-// because it is run very late in shutdown to avoid recording
-// information about refcount logging entries.
-static void
-LogDMDFile()
-{
- const char* dmdFilePrefix = PR_GetEnv("MOZ_DMD_SHUTDOWN_LOG");
- if (!dmdFilePrefix) {
- return;
- }
-
- const char* logProcessEnv = PR_GetEnv("MOZ_DMD_LOG_PROCESS");
- if (logProcessEnv && !!strcmp(logProcessEnv, XRE_ChildProcessTypeToString(XRE_GetProcessType()))) {
- return;
- }
-
- nsPrintfCString fileName("%sdmd-%d.log.gz", dmdFilePrefix, base::GetCurrentProcId());
- FILE* logFile = fopen(fileName.get(), "w");
- if (NS_WARN_IF(!logFile)) {
- return;
- }
-
- nsMemoryInfoDumper::DumpDMDToFile(logFile);
-}
-#endif // MOZ_DMD
-
namespace mozilla {
void
LogTerm()
@@ -1000,10 +962,6 @@ LogTerm()
nsTraceRefcnt::Shutdown();
nsTraceRefcnt::SetActivityIsLegal(false);
gActivityTLS = BAD_TLS_INDEX;
-
-#ifdef MOZ_DMD
- LogDMDFile();
-#endif
}
}
diff --git a/xpcom/build/XPCOMInit.cpp b/xpcom/build/XPCOMInit.cpp
index 7b220558f..e8ee5828a 100644
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -1037,20 +1037,6 @@ ShutdownXPCOM(nsIServiceManager* aServMgr)
NS_WARNING("Component Manager was never created ...");
}
-#ifdef MOZ_ENABLE_PROFILER_SPS
- // In optimized builds we don't do shutdown collections by default, so
- // uncollected (garbage) objects may keep the nsXPConnect singleton alive,
- // and its XPCJSContext along with it. However, we still destroy various
- // bits of state in JS_ShutDown(), so we need to make sure the profiler
- // can't access them when it shuts down. This call nulls out the
- // JS pseudo-stack's internal reference to the main thread JSContext,
- // duplicating the call in XPCJSContext::~XPCJSContext() in case that
- // never fired.
- if (PseudoStack* stack = mozilla_get_pseudo_stack()) {
- stack->sampleContext(nullptr);
- }
-#endif
-
if (sInitializedJS) {
// Shut down the JS engine.
JS_ShutDown();
diff --git a/xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp b/xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
index e25217223..ac63168d6 100644
--- a/xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
+++ b/xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
@@ -4,9 +4,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-// Avoid DMD-specific parts of MOZ_DEFINE_MALLOC_SIZE_OF
-#undef MOZ_DMD
-
#include "nsIMemoryReporter.h"
#include "mozilla/Mutex.h"
diff --git a/xpcom/threads/HangMonitor.cpp b/xpcom/threads/HangMonitor.cpp
index bd415be50..6def6ed61 100644
--- a/xpcom/threads/HangMonitor.cpp
+++ b/xpcom/threads/HangMonitor.cpp
@@ -26,10 +26,6 @@
#include <windows.h>
#endif
-#if defined(MOZ_ENABLE_PROFILER_SPS) && defined(MOZ_PROFILING) && defined(XP_WIN)
- #define REPORT_CHROME_HANGS
-#endif
-
namespace mozilla {
namespace HangMonitor {
@@ -41,10 +37,6 @@ volatile bool gDebugDisableHangMonitor = false;
const char kHangMonitorPrefName[] = "hangmonitor.timeout";
-#ifdef REPORT_CHROME_HANGS
-const char kTelemetryPrefName[] = "toolkit.telemetry.enabled";
-#endif
-
// Monitor protects gShutdown and gTimeout, but not gTimestamp which rely on
// being atomically set by the processor; synchronization doesn't really matter
// in this use case.
@@ -62,31 +54,11 @@ bool gShutdown;
// we're currently not processing events.
Atomic<PRIntervalTime> gTimestamp(PR_INTERVAL_NO_WAIT);
-#ifdef REPORT_CHROME_HANGS
-// Main thread ID used in reporting chrome hangs under Windows
-static HANDLE winMainThreadHandle = nullptr;
-
-// Default timeout for reporting chrome hangs to Telemetry (5 seconds)
-static const int32_t DEFAULT_CHROME_HANG_INTERVAL = 5;
-
-// Maximum number of PCs to gather from the stack
-static const int32_t MAX_CALL_STACK_PCS = 400;
-#endif
-
// PrefChangedFunc
void
PrefChanged(const char*, void*)
{
int32_t newval = Preferences::GetInt(kHangMonitorPrefName);
-#ifdef REPORT_CHROME_HANGS
- // Monitor chrome hangs on the profiling branch if Telemetry enabled
- if (newval == 0) {
- bool telemetryEnabled = Preferences::GetBool(kTelemetryPrefName);
- if (telemetryEnabled) {
- newval = DEFAULT_CHROME_HANG_INTERVAL;
- }
- }
-#endif
MonitorAutoLock lock(*gMonitor);
if (newval != gTimeout) {
gTimeout = newval;
@@ -110,89 +82,6 @@ Crash()
NS_RUNTIMEABORT("HangMonitor triggered");
}
-#ifdef REPORT_CHROME_HANGS
-
-static void
-ChromeStackWalker(uint32_t aFrameNumber, void* aPC, void* aSP, void* aClosure)
-{
- MOZ_ASSERT(aClosure);
- std::vector<uintptr_t>* stack =
- static_cast<std::vector<uintptr_t>*>(aClosure);
- if (stack->size() == MAX_CALL_STACK_PCS) {
- return;
- }
- MOZ_ASSERT(stack->size() < MAX_CALL_STACK_PCS);
- stack->push_back(reinterpret_cast<uintptr_t>(aPC));
-}
-
-static void
-GetChromeHangReport(Telemetry::ProcessedStack& aStack,
- int32_t& aSystemUptime,
- int32_t& aFirefoxUptime)
-{
- MOZ_ASSERT(winMainThreadHandle);
-
- // The thread we're about to suspend might have the alloc lock
- // so allocate ahead of time
- std::vector<uintptr_t> rawStack;
- rawStack.reserve(MAX_CALL_STACK_PCS);
-
- // Workaround possible deadlock where the main thread is running a
- // long-standing JS job, and happens to be in the JIT allocator when we
- // suspend it. Since, on win 64, this requires holding a process lock that
- // MozStackWalk requires, take this "workaround lock" to avoid deadlock.
-#ifdef _WIN64
- AcquireStackWalkWorkaroundLock();
-#endif
- DWORD ret = ::SuspendThread(winMainThreadHandle);
- bool suspended = false;
- if (ret != -1) {
- // SuspendThread is asynchronous, so the thread may still be running. Use
- // GetThreadContext to ensure it's really suspended.
- // See https://blogs.msdn.microsoft.com/oldnewthing/20150205-00/?p=44743.
- CONTEXT context;
- context.ContextFlags = CONTEXT_CONTROL;
- if (::GetThreadContext(winMainThreadHandle, &context)) {
- suspended = true;
- }
- }
-
-#ifdef _WIN64
- ReleaseStackWalkWorkaroundLock();
-#endif
-
- if (!suspended) {
- if (ret != -1) {
- MOZ_ALWAYS_TRUE(::ResumeThread(winMainThreadHandle) != DWORD(-1));
- }
- return;
- }
-
- MozStackWalk(ChromeStackWalker, /* skipFrames */ 0, /* maxFrames */ 0,
- reinterpret_cast<void*>(&rawStack),
- reinterpret_cast<uintptr_t>(winMainThreadHandle), nullptr);
- ret = ::ResumeThread(winMainThreadHandle);
- if (ret == -1) {
- return;
- }
- aStack = Telemetry::GetStackAndModules(rawStack);
-
- // Record system uptime (in minutes) at the time of the hang
- aSystemUptime = ((GetTickCount() / 1000) - (gTimeout * 2)) / 60;
-
- // Record Firefox uptime (in minutes) at the time of the hang
- bool error;
- TimeStamp processCreation = TimeStamp::ProcessCreation(error);
- if (!error) {
- TimeDuration td = TimeStamp::Now() - processCreation;
- aFirefoxUptime = (static_cast<int32_t>(td.ToSeconds()) - (gTimeout * 2)) / 60;
- } else {
- aFirefoxUptime = -1;
- }
-}
-
-#endif
-
void
ThreadMain(void*)
{
@@ -206,13 +95,6 @@ ThreadMain(void*)
PRIntervalTime lastTimestamp = 0;
int waitCount = 0;
-#ifdef REPORT_CHROME_HANGS
- Telemetry::ProcessedStack stack;
- int32_t systemUptime = -1;
- int32_t firefoxUptime = -1;
- UniquePtr<HangAnnotations> annotations;
-#endif
-
while (true) {
if (gShutdown) {
return; // Exit the thread
@@ -233,14 +115,6 @@ ThreadMain(void*)
timestamp == lastTimestamp &&
gTimeout > 0) {
++waitCount;
-#ifdef REPORT_CHROME_HANGS
- // Capture the chrome-hang stack + Firefox & system uptimes after
- // the minimum hang duration has been reached (not when the hang ends)
- if (waitCount == 2) {
- GetChromeHangReport(stack, systemUptime, firefoxUptime);
- annotations = ChromeHangAnnotatorCallout();
- }
-#else
// This is the crash-on-hang feature.
// See bug 867313 for the quirk in the waitCount comparison
if (waitCount >= 2) {
@@ -251,16 +125,7 @@ ThreadMain(void*)
Crash();
}
}
-#endif
} else {
-#ifdef REPORT_CHROME_HANGS
- if (waitCount >= 2) {
- uint32_t hangDuration = PR_IntervalToSeconds(now - lastTimestamp);
- Telemetry::RecordChromeHang(hangDuration, stack, systemUptime,
- firefoxUptime, Move(annotations));
- stack.Clear();
- }
-#endif
lastTimestamp = timestamp;
waitCount = 0;
}
@@ -289,15 +154,6 @@ Startup()
Preferences::RegisterCallback(PrefChanged, kHangMonitorPrefName, nullptr);
PrefChanged(nullptr, nullptr);
-#ifdef REPORT_CHROME_HANGS
- Preferences::RegisterCallback(PrefChanged, kTelemetryPrefName, nullptr);
- winMainThreadHandle =
- OpenThread(THREAD_ALL_ACCESS, FALSE, GetCurrentThreadId());
- if (!winMainThreadHandle) {
- return;
- }
-#endif
-
// Don't actually start measuring hangs until we hit the main event loop.
// This potentially misses a small class of really early startup hangs,
// but avoids dealing with some xpcshell tests and other situations which
diff --git a/xpcom/threads/ThreadStackHelper.cpp b/xpcom/threads/ThreadStackHelper.cpp
index 1713c9194..2c0e87986 100644
--- a/xpcom/threads/ThreadStackHelper.cpp
+++ b/xpcom/threads/ThreadStackHelper.cpp
@@ -9,9 +9,6 @@
#include "nsJSPrincipals.h"
#include "nsScriptSecurityManager.h"
#include "jsfriendapi.h"
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
-#include "shared-libraries.h"
-#endif
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
@@ -62,17 +59,6 @@
#endif
#endif
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
-#if defined(MOZ_THREADSTACKHELPER_X86) || \
- defined(MOZ_THREADSTACKHELPER_X64) || \
- defined(MOZ_THREADSTACKHELPER_ARM)
-// On these architectures, the stack grows downwards (toward lower addresses).
-#define MOZ_THREADSTACKHELPER_STACK_GROWS_DOWN
-#else
-#error "Unsupported architecture"
-#endif
-#endif // MOZ_THREADSTACKHELPER_NATIVE
-
namespace mozilla {
void
@@ -114,14 +100,6 @@ ThreadStackHelper::Shutdown()
ThreadStackHelper::ThreadStackHelper()
: mStackToFill(nullptr)
-#ifdef MOZ_THREADSTACKHELPER_PSEUDO
- , mPseudoStack(mozilla_get_pseudo_stack())
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
- , mContextToFill(nullptr)
-#endif
- , mMaxStackSize(Stack::sMaxInlineStorage)
- , mMaxBufferSize(512)
-#endif
{
#if defined(XP_LINUX)
MOZ_ALWAYS_TRUE(!::sem_init(&mSem, 0, 0));
@@ -131,18 +109,11 @@ ThreadStackHelper::ThreadStackHelper()
::GetCurrentProcess(), ::GetCurrentThread(),
::GetCurrentProcess(), &mThreadID,
THREAD_SUSPEND_RESUME
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
- | THREAD_GET_CONTEXT | THREAD_QUERY_INFORMATION
-#endif
, FALSE, 0);
MOZ_ASSERT(mInitialized);
#elif defined(XP_MACOSX)
mThreadID = mach_thread_self();
#endif
-
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
- GetThreadStackBase();
-#endif
}
ThreadStackHelper::~ThreadStackHelper()
@@ -156,45 +127,6 @@ ThreadStackHelper::~ThreadStackHelper()
#endif
}
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
-void ThreadStackHelper::GetThreadStackBase()
-{
- mThreadStackBase = 0;
-
-#if defined(XP_LINUX)
- void* stackAddr;
- size_t stackSize;
- ::pthread_t pthr = ::pthread_self();
- ::pthread_attr_t pthr_attr;
- NS_ENSURE_TRUE_VOID(!::pthread_getattr_np(pthr, &pthr_attr));
- if (!::pthread_attr_getstack(&pthr_attr, &stackAddr, &stackSize)) {
-#ifdef MOZ_THREADSTACKHELPER_STACK_GROWS_DOWN
- mThreadStackBase = intptr_t(stackAddr) + stackSize;
-#else
- mThreadStackBase = intptr_t(stackAddr);
-#endif
- }
- MOZ_ALWAYS_TRUE(!::pthread_attr_destroy(&pthr_attr));
-
-#elif defined(XP_WIN)
- ::MEMORY_BASIC_INFORMATION meminfo = {};
- NS_ENSURE_TRUE_VOID(::VirtualQuery(&meminfo, &meminfo, sizeof(meminfo)));
-#ifdef MOZ_THREADSTACKHELPER_STACK_GROWS_DOWN
- mThreadStackBase = intptr_t(meminfo.BaseAddress) + meminfo.RegionSize;
-#else
- mThreadStackBase = intptr_t(meminfo.AllocationBase);
-#endif
-
-#elif defined(XP_MACOSX)
- ::pthread_t pthr = ::pthread_self();
- mThreadStackBase = intptr_t(::pthread_get_stackaddr_np(pthr));
-
-#else
- #error "Unsupported platform"
-#endif // platform
-}
-#endif // MOZ_THREADSTACKHELPER_NATIVE
-
namespace {
template<typename T>
class ScopedSetPtr
@@ -281,53 +213,10 @@ ThreadStackHelper::GetStack(Stack& aStack)
#endif
}
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
-class ThreadStackHelper::ThreadContext final
-{
-public:
- // TODO: provide per-platform definition of Context.
- typedef struct {} Context;
-
- // Limit copied stack to 4kB
- static const size_t kMaxStackSize = 0x1000;
- // Limit unwound stack to 32 frames
- static const unsigned int kMaxStackFrames = 32;
- // Whether this structure contains valid data
- bool mValid;
- // Processor context
- Context mContext;
- // Stack area
- UniquePtr<uint8_t[]> mStack;
- // Start of stack area
- uintptr_t mStackBase;
- // Size of stack area
- size_t mStackSize;
- // End of stack area
- const void* mStackEnd;
-
- ThreadContext()
- : mValid(false)
- , mStackBase(0)
- , mStackSize(0)
- , mStackEnd(nullptr) {}
-};
-#endif // MOZ_THREADSTACKHELPER_NATIVE
-
void
ThreadStackHelper::GetNativeStack(Stack& aStack)
{
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
- ThreadContext context;
- context.mStack = MakeUnique<uint8_t[]>(ThreadContext::kMaxStackSize);
-
- ScopedSetPtr<ThreadContext> contextPtr(mContextToFill, &context);
-
- // Get pseudostack first and fill the thread context.
- GetStack(aStack);
- NS_ENSURE_TRUE_VOID(context.mValid);
-
- // TODO: walk the saved stack frames.
-#endif // MOZ_THREADSTACKHELPER_NATIVE
+ /*** STUB ***/
}
#ifdef XP_LINUX
@@ -353,369 +242,20 @@ ThreadStackHelper::PrepareStackBuffer(Stack& aStack)
{
// Return false to skip getting the stack and return an empty stack
aStack.clear();
-#ifdef MOZ_THREADSTACKHELPER_PSEUDO
- /* Normally, provided the profiler is enabled, it would be an error if we
- don't have a pseudostack here (the thread probably forgot to call
- profiler_register_thread). However, on B2G, profiling secondary threads
- may be disabled despite profiler being enabled. This is by-design and
- is not an error. */
- MOZ_ASSERT(mPseudoStack);
- if (!aStack.reserve(mMaxStackSize) ||
- !aStack.reserve(aStack.capacity()) || // reserve up to the capacity
- !aStack.EnsureBufferCapacity(mMaxBufferSize)) {
- return false;
- }
- return true;
-#else
return false;
-#endif
-}
-
-#ifdef MOZ_THREADSTACKHELPER_PSEUDO
-
-namespace {
-
-bool
-IsChromeJSScript(JSScript* aScript)
-{
- // May be called from another thread or inside a signal handler.
- // We assume querying the script is safe but we must not manipulate it.
-
- nsIScriptSecurityManager* const secman =
- nsScriptSecurityManager::GetScriptSecurityManager();
- NS_ENSURE_TRUE(secman, false);
-
- JSPrincipals* const principals = JS_GetScriptPrincipals(aScript);
- return secman->IsSystemPrincipal(nsJSPrincipals::get(principals));
-}
-
-// Get the full path after the URI scheme, if the URI matches the scheme.
-// For example, GetFullPathForScheme("a://b/c/d/e", "a://") returns "b/c/d/e".
-template <size_t LEN>
-const char*
-GetFullPathForScheme(const char* filename, const char (&scheme)[LEN]) {
- // Account for the null terminator included in LEN.
- if (!strncmp(filename, scheme, LEN - 1)) {
- return filename + LEN - 1;
- }
- return nullptr;
-}
-
-// Get the full path after a URI component, if the URI contains the component.
-// For example, GetPathAfterComponent("a://b/c/d/e", "/c/") returns "d/e".
-template <size_t LEN>
-const char*
-GetPathAfterComponent(const char* filename, const char (&component)[LEN]) {
- const char* found = nullptr;
- const char* next = strstr(filename, component);
- while (next) {
- // Move 'found' to end of the component, after the separator '/'.
- // 'LEN - 1' accounts for the null terminator included in LEN,
- found = next + LEN - 1;
- // Resume searching before the separator '/'.
- next = strstr(found - 1, component);
- }
- return found;
}
-} // namespace
-
-const char*
-ThreadStackHelper::AppendJSEntry(const volatile StackEntry* aEntry,
- intptr_t& aAvailableBufferSize,
- const char* aPrevLabel)
-{
- // May be called from another thread or inside a signal handler.
- // We assume querying the script is safe but we must not manupulate it.
- // Also we must not allocate any memory from heap.
- MOZ_ASSERT(aEntry->isJs());
-
- const char* label;
- JSScript* script = aEntry->script();
- if (!script) {
- label = "(profiling suppressed)";
- } else if (IsChromeJSScript(aEntry->script())) {
- const char* filename = JS_GetScriptFilename(aEntry->script());
- const unsigned lineno = JS_PCToLineNumber(aEntry->script(), aEntry->pc());
- MOZ_ASSERT(filename);
-
- char buffer[128]; // Enough to fit longest js file name from the tree
-
- // Some script names are in the form "foo -> bar -> baz".
- // Here we find the origin of these redirected scripts.
- const char* basename = GetPathAfterComponent(filename, " -> ");
- if (basename) {
- filename = basename;
- }
-
- basename = GetFullPathForScheme(filename, "chrome://");
- if (!basename) {
- basename = GetFullPathForScheme(filename, "resource://");
- }
- if (!basename) {
- // If the (add-on) script is located under the {profile}/extensions
- // directory, extract the path after the /extensions/ part.
- basename = GetPathAfterComponent(filename, "/extensions/");
- }
- if (!basename) {
- // Only keep the file base name for paths outside the above formats.
- basename = strrchr(filename, '/');
- basename = basename ? basename + 1 : filename;
- // Look for Windows path separator as well.
- filename = strrchr(basename, '\\');
- if (filename) {
- basename = filename + 1;
- }
- }
-
- size_t len = SprintfLiteral(buffer, "%s:%u", basename, lineno);
- if (len < sizeof(buffer)) {
- if (mStackToFill->IsSameAsEntry(aPrevLabel, buffer)) {
- return aPrevLabel;
- }
-
- // Keep track of the required buffer size
- aAvailableBufferSize -= (len + 1);
- if (aAvailableBufferSize >= 0) {
- // Buffer is big enough.
- return mStackToFill->InfallibleAppendViaBuffer(buffer, len);
- }
- // Buffer is not big enough; fall through to using static label below.
- }
- // snprintf failed or buffer is not big enough.
- label = "(chrome script)";
- } else {
- label = "(content script)";
- }
-
- if (mStackToFill->IsSameAsEntry(aPrevLabel, label)) {
- return aPrevLabel;
- }
- mStackToFill->infallibleAppend(label);
- return label;
-}
-
-#endif // MOZ_THREADSTACKHELPER_PSEUDO
-
void
ThreadStackHelper::FillStackBuffer()
{
MOZ_ASSERT(mStackToFill->empty());
-
-#ifdef MOZ_THREADSTACKHELPER_PSEUDO
- size_t reservedSize = mStackToFill->capacity();
- size_t reservedBufferSize = mStackToFill->AvailableBufferSize();
- intptr_t availableBufferSize = intptr_t(reservedBufferSize);
-
- // Go from front to back
- const volatile StackEntry* entry = mPseudoStack->mStack;
- const volatile StackEntry* end = entry + mPseudoStack->stackSize();
- // Deduplicate identical, consecutive frames
- const char* prevLabel = nullptr;
- for (; reservedSize-- && entry != end; entry++) {
- /* We only accept non-copy labels, including js::RunScript,
- because we only want static labels in the hang stack. */
- if (entry->isCopyLabel()) {
- continue;
- }
- if (entry->isJs()) {
- prevLabel = AppendJSEntry(entry, availableBufferSize, prevLabel);
- continue;
- }
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
- if (mContextToFill) {
- mContextToFill->mStackEnd = entry->stackAddress();
- }
-#endif
- const char* const label = entry->label();
- if (mStackToFill->IsSameAsEntry(prevLabel, label)) {
- // Avoid duplicate labels to save space in the stack.
- continue;
- }
- mStackToFill->infallibleAppend(label);
- prevLabel = label;
- }
-
- // end != entry if we exited early due to not enough reserved frames.
- // Expand the number of reserved frames for next time.
- mMaxStackSize = mStackToFill->capacity() + (end - entry);
-
- // availableBufferSize < 0 if we needed a larger buffer than we reserved.
- // Calculate a new reserve size for next time.
- if (availableBufferSize < 0) {
- mMaxBufferSize = reservedBufferSize - availableBufferSize;
- }
-#endif
+ /*** STUB ***/
}
MOZ_ASAN_BLACKLIST void
ThreadStackHelper::FillThreadContext(void* aContext)
{
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
- if (!mContextToFill) {
- return;
- }
-
-#if 0 // TODO: remove dependency on Breakpad structs.
-#if defined(XP_LINUX)
- const ucontext_t& context = *reinterpret_cast<ucontext_t*>(aContext);
-#if defined(MOZ_THREADSTACKHELPER_X86)
- mContextToFill->mContext.context_flags = MD_CONTEXT_X86_FULL;
- mContextToFill->mContext.edi = context.uc_mcontext.gregs[REG_EDI];
- mContextToFill->mContext.esi = context.uc_mcontext.gregs[REG_ESI];
- mContextToFill->mContext.ebx = context.uc_mcontext.gregs[REG_EBX];
- mContextToFill->mContext.edx = context.uc_mcontext.gregs[REG_EDX];
- mContextToFill->mContext.ecx = context.uc_mcontext.gregs[REG_ECX];
- mContextToFill->mContext.eax = context.uc_mcontext.gregs[REG_EAX];
- mContextToFill->mContext.ebp = context.uc_mcontext.gregs[REG_EBP];
- mContextToFill->mContext.eip = context.uc_mcontext.gregs[REG_EIP];
- mContextToFill->mContext.eflags = context.uc_mcontext.gregs[REG_EFL];
- mContextToFill->mContext.esp = context.uc_mcontext.gregs[REG_ESP];
-#elif defined(MOZ_THREADSTACKHELPER_X64)
- mContextToFill->mContext.context_flags = MD_CONTEXT_AMD64_FULL;
- mContextToFill->mContext.eflags = uint32_t(context.uc_mcontext.gregs[REG_EFL]);
- mContextToFill->mContext.rax = context.uc_mcontext.gregs[REG_RAX];
- mContextToFill->mContext.rcx = context.uc_mcontext.gregs[REG_RCX];
- mContextToFill->mContext.rdx = context.uc_mcontext.gregs[REG_RDX];
- mContextToFill->mContext.rbx = context.uc_mcontext.gregs[REG_RBX];
- mContextToFill->mContext.rsp = context.uc_mcontext.gregs[REG_RSP];
- mContextToFill->mContext.rbp = context.uc_mcontext.gregs[REG_RBP];
- mContextToFill->mContext.rsi = context.uc_mcontext.gregs[REG_RSI];
- mContextToFill->mContext.rdi = context.uc_mcontext.gregs[REG_RDI];
- memcpy(&mContextToFill->mContext.r8,
- &context.uc_mcontext.gregs[REG_R8], 8 * sizeof(int64_t));
- mContextToFill->mContext.rip = context.uc_mcontext.gregs[REG_RIP];
-#elif defined(MOZ_THREADSTACKHELPER_ARM)
- mContextToFill->mContext.context_flags = MD_CONTEXT_ARM_FULL;
- memcpy(&mContextToFill->mContext.iregs[0],
- &context.uc_mcontext.arm_r0, 17 * sizeof(int32_t));
-#else
- #error "Unsupported architecture"
-#endif // architecture
-
-#elif defined(XP_WIN)
- // Breakpad context struct is based off of the Windows CONTEXT struct,
- // so we assume they are the same; do some sanity checks to make sure.
- static_assert(sizeof(ThreadContext::Context) == sizeof(::CONTEXT),
- "Context struct mismatch");
- static_assert(offsetof(ThreadContext::Context, context_flags) ==
- offsetof(::CONTEXT, ContextFlags),
- "Context struct mismatch");
- mContextToFill->mContext.context_flags = CONTEXT_FULL;
- NS_ENSURE_TRUE_VOID(::GetThreadContext(mThreadID,
- reinterpret_cast<::CONTEXT*>(&mContextToFill->mContext)));
-
-#elif defined(XP_MACOSX)
-#if defined(MOZ_THREADSTACKHELPER_X86)
- const thread_state_flavor_t flavor = x86_THREAD_STATE32;
- x86_thread_state32_t state = {};
- mach_msg_type_number_t count = x86_THREAD_STATE32_COUNT;
-#elif defined(MOZ_THREADSTACKHELPER_X64)
- const thread_state_flavor_t flavor = x86_THREAD_STATE64;
- x86_thread_state64_t state = {};
- mach_msg_type_number_t count = x86_THREAD_STATE64_COUNT;
-#elif defined(MOZ_THREADSTACKHELPER_ARM)
- const thread_state_flavor_t flavor = ARM_THREAD_STATE;
- arm_thread_state_t state = {};
- mach_msg_type_number_t count = ARM_THREAD_STATE_COUNT;
-#endif
- NS_ENSURE_TRUE_VOID(KERN_SUCCESS == ::thread_get_state(
- mThreadID, flavor, reinterpret_cast<thread_state_t>(&state), &count));
-#if __DARWIN_UNIX03
-#define GET_REGISTER(s, r) ((s).__##r)
-#else
-#define GET_REGISTER(s, r) ((s).r)
-#endif
-#if defined(MOZ_THREADSTACKHELPER_X86)
- mContextToFill->mContext.context_flags = MD_CONTEXT_X86_FULL;
- mContextToFill->mContext.edi = GET_REGISTER(state, edi);
- mContextToFill->mContext.esi = GET_REGISTER(state, esi);
- mContextToFill->mContext.ebx = GET_REGISTER(state, ebx);
- mContextToFill->mContext.edx = GET_REGISTER(state, edx);
- mContextToFill->mContext.ecx = GET_REGISTER(state, ecx);
- mContextToFill->mContext.eax = GET_REGISTER(state, eax);
- mContextToFill->mContext.ebp = GET_REGISTER(state, ebp);
- mContextToFill->mContext.eip = GET_REGISTER(state, eip);
- mContextToFill->mContext.eflags = GET_REGISTER(state, eflags);
- mContextToFill->mContext.esp = GET_REGISTER(state, esp);
-#elif defined(MOZ_THREADSTACKHELPER_X64)
- mContextToFill->mContext.context_flags = MD_CONTEXT_AMD64_FULL;
- mContextToFill->mContext.eflags = uint32_t(GET_REGISTER(state, rflags));
- mContextToFill->mContext.rax = GET_REGISTER(state, rax);
- mContextToFill->mContext.rcx = GET_REGISTER(state, rcx);
- mContextToFill->mContext.rdx = GET_REGISTER(state, rdx);
- mContextToFill->mContext.rbx = GET_REGISTER(state, rbx);
- mContextToFill->mContext.rsp = GET_REGISTER(state, rsp);
- mContextToFill->mContext.rbp = GET_REGISTER(state, rbp);
- mContextToFill->mContext.rsi = GET_REGISTER(state, rsi);
- mContextToFill->mContext.rdi = GET_REGISTER(state, rdi);
- memcpy(&mContextToFill->mContext.r8,
- &GET_REGISTER(state, r8), 8 * sizeof(int64_t));
- mContextToFill->mContext.rip = GET_REGISTER(state, rip);
-#elif defined(MOZ_THREADSTACKHELPER_ARM)
- mContextToFill->mContext.context_flags = MD_CONTEXT_ARM_FULL;
- memcpy(mContextToFill->mContext.iregs,
- GET_REGISTER(state, r), 17 * sizeof(int32_t));
-#else
- #error "Unsupported architecture"
-#endif // architecture
-#undef GET_REGISTER
-
-#else
- #error "Unsupported platform"
-#endif // platform
-
- intptr_t sp = 0;
-#if defined(MOZ_THREADSTACKHELPER_X86)
- sp = mContextToFill->mContext.esp;
-#elif defined(MOZ_THREADSTACKHELPER_X64)
- sp = mContextToFill->mContext.rsp;
-#elif defined(MOZ_THREADSTACKHELPER_ARM)
- sp = mContextToFill->mContext.iregs[13];
-#else
- #error "Unsupported architecture"
-#endif // architecture
- NS_ENSURE_TRUE_VOID(sp);
- NS_ENSURE_TRUE_VOID(mThreadStackBase);
-
- size_t stackSize = std::min(intptr_t(ThreadContext::kMaxStackSize),
- std::abs(sp - mThreadStackBase));
-
- if (mContextToFill->mStackEnd) {
- // Limit the start of stack to a certain location if specified.
- stackSize = std::min(intptr_t(stackSize),
- std::abs(sp - intptr_t(mContextToFill->mStackEnd)));
- }
-
-#ifndef MOZ_THREADSTACKHELPER_STACK_GROWS_DOWN
- // If if the stack grows upwards, and we need to recalculate our
- // stack copy's base address. Subtract sizeof(void*) so that the
- // location pointed to by sp is included.
- sp -= stackSize - sizeof(void*);
-#endif
-
-#ifndef MOZ_ASAN
- memcpy(mContextToFill->mStack.get(), reinterpret_cast<void*>(sp), stackSize);
- // Valgrind doesn't care about the access outside the stack frame, but
- // the presence of uninitialised values on the stack does cause it to
- // later report a lot of false errors when Breakpad comes to unwind it.
- // So mark the extracted data as defined.
- MOZ_MAKE_MEM_DEFINED(mContextToFill->mStack.get(), stackSize);
-#else
- // ASan will flag memcpy for access outside of stack frames,
- // so roll our own memcpy here.
- intptr_t* dst = reinterpret_cast<intptr_t*>(&mContextToFill->mStack[0]);
- const intptr_t* src = reinterpret_cast<intptr_t*>(sp);
- for (intptr_t len = stackSize; len > 0; len -= sizeof(*src)) {
- *(dst++) = *(src++);
- }
-#endif
-
- mContextToFill->mStackBase = uintptr_t(sp);
- mContextToFill->mStackSize = stackSize;
- mContextToFill->mValid = true;
-#endif
-#endif // MOZ_THREADSTACKHELPER_NATIVE
+ /*** STUB ***/
}
} // namespace mozilla
diff --git a/xpcom/threads/ThreadStackHelper.h b/xpcom/threads/ThreadStackHelper.h
index 9c40ad5e2..f06e704b4 100644
--- a/xpcom/threads/ThreadStackHelper.h
+++ b/xpcom/threads/ThreadStackHelper.h
@@ -23,27 +23,6 @@
#include <mach/mach.h>
#endif
-// Support pseudostack on these platforms.
-#if defined(XP_LINUX) || defined(XP_WIN) || defined(XP_MACOSX)
-# ifdef MOZ_ENABLE_PROFILER_SPS
-# define MOZ_THREADSTACKHELPER_PSEUDO
-# endif
-#endif
-
-#ifdef MOZ_THREADSTACKHELPER_PSEUDO
-# define MOZ_THREADSTACKHELPER_NATIVE
-# if defined(__i386__) || defined(_M_IX86)
-# define MOZ_THREADSTACKHELPER_X86
-# elif defined(__x86_64__) || defined(_M_X64)
-# define MOZ_THREADSTACKHELPER_X64
-# elif defined(__arm__) || defined(_M_ARM)
-# define MOZ_THREADSTACKHELPER_ARM
-# else
- // Unsupported architecture
-# undef MOZ_THREADSTACKHELPER_NATIVE
-# endif
-#endif
-
namespace mozilla {
/**
@@ -63,29 +42,10 @@ public:
private:
Stack* mStackToFill;
-#ifdef MOZ_THREADSTACKHELPER_PSEUDO
- const PseudoStack* const mPseudoStack;
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
- class ThreadContext;
- // Set to non-null if GetStack should get the thread context.
- ThreadContext* mContextToFill;
- intptr_t mThreadStackBase;
-#endif
- size_t mMaxStackSize;
- size_t mMaxBufferSize;
-#endif
bool PrepareStackBuffer(Stack& aStack);
void FillStackBuffer();
void FillThreadContext(void* aContext = nullptr);
-#ifdef MOZ_THREADSTACKHELPER_PSEUDO
- const char* AppendJSEntry(const volatile StackEntry* aEntry,
- intptr_t& aAvailableBufferSize,
- const char* aPrevLabel);
-#endif
-#ifdef MOZ_THREADSTACKHELPER_NATIVE
- void GetThreadStackBase();
-#endif
public:
/**