summaryrefslogtreecommitdiff
path: root/src/distancefieldgenerator
Commit message (Collapse)AuthorAgeFilesLines
* Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-081-5/+0
| | | | | | Pick-to: 6.5 Change-Id: Ic00df7d45246270d724b3b1d1ef9d13d76dcc136 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Port from container::count() and length() to size()Marc Mutz2022-10-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: I95f6410e57a6a92b1cf91bbedfbe3d517cab6b44 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-251-1/+1
| | | | | | Task-number: QTBUG-105718 Change-Id: I2df3a8aec11f30f301e3143e9960156b6f45e614 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-021-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I41a2c9aa6a933a4e3dda5d5b4c70c461912907b2 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for executablesAlexandru Croitor2022-07-211-1/+1
| | | | | Change-Id: Ibe5d2ed0b632ffff4a8a1e24e95500f80a742191 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-198-215/+16
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I5335388c0472b0ee554234fc7eca60769e504660 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove duplicated .qdocconf file for distancefieldgeneratorKai Köhne2022-01-281-24/+0
| | | | | | | | | | The file got renamed to qtdistancefieldgenerator.qdocconf in commit 598544e1287eaa6f8b. Anyhow, it seems the original file was forgotten to be removed at the same time. Pick-to: 6.3 Change-Id: I2b401134971eb4a3073488cf41e77b3ce6b2574b Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Doc: Remove unsupported customFiltersKai Köhne2021-08-252-6/+0
| | | | | | Task-number: QTBUG-95987 Change-Id: I48402b78c1055919d6db352d5cb31bdaeecc43d5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove QMake project filesJoerg Bornemann2021-02-121-30/+0
| | | | | | | | | | This includes removal of the corresponding .prev_CMakeLists.txt files. Pick-to: 6.1 Task-number: QTBUG-88742 Change-Id: I3f360105a8cd43ad37dec6bfc6509ce95c79ee76 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Use https instead of http when opening docsJarek Kobus2020-11-211-1/+4
| | | | | | Pick-to: 6.0 6.0.0 Change-Id: I10dfbd66b2510ae23ef91a2048f1ead6ddfb588f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Enforce zero documentation warning policyTopi Reinio2020-11-071-0/+2
| | | | | | Task-number: QTBUG-78069 Change-Id: I3809c090fd46fefeefaad003d648f9d9db56f8f5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-011-1/+1
| | | | | | | | Modify special case locations to use the new API as well. Task-number: QTBUG-86815 Change-Id: I84f5fc4eb26f95d81ce5b5b8cc72706bb9185026 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix more compiler warnings from deprecated application attributesVolker Hilsheimer2020-09-161-1/+0
| | | | | Change-Id: I0c5679eb77b1a38348017279e5949c65e4b0cf35 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Regenerate load(qt_app) projectsAlexandru Croitor2020-08-261-4/+5
| | | | | | | | | | These now use the new qt_internal_add_app function. Also the script will output necessary code to set the icons and resource files for each of the apps. Task-number: QTBUG-85757 Change-Id: I1a336243fc53a7f329ca17e6c1e40818dabeae30 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate qttoolsAlexandru Croitor2020-06-291-0/+2
| | | | | Change-Id: I215dd95fe4467b2b2a7c24b1b5be523ef2e83980 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Other tools: Use QList instead of QVectorJarek Kobus2020-06-092-6/+6
| | | | | | Task-number: QTBUG-84469 Change-Id: I3c195691a310226ab0eee76c0f60ffa4751dee62 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAlexandru Croitor2020-04-151-0/+4
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: a bunch of .pro and configure.json file adjustments and some conflicting cherry-picks from dev -> 5.15 that are merged into dev again src/assistant/assistant/main.cpp Change-Id: I174c00b6a300c6d46c4e081bdcb2f15f23ae9ef2
| * Add configure features for remaining qttoolsMitch Curtis2020-03-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | I only need qdoc from qttools, but building the other tools takes up quite a bit of time. qdoc already has a configure feature, so account for the rest of them. Change-Id: I0fc60393a1841229025c42b83d06f01668eb2680 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | CMake: Regenerate projects after mergewip/cmakeAlexandru Croitor2020-03-181-4/+2
| | | | | | | | | | | | | | Plus additional adjustments. Change-Id: I0c2341ef6a5557e18df91b753f9e441c5b1a68e2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-182-1/+2
|\ \ | |/ | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ia86822a3b64be4e17d525f6b055eadfab7215bc8
| * Add missing QPainterPath includeMitch Curtis2020-03-091-0/+1
| | | | | | | | | | | | | | | | ..\distancefieldmodel.h(197): error C2027: use of undefined type 'QPainterPath' Change-Id: I3c97811a14bb82bf5dabc86398ffcfc9cf4ff58d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * distancefieldgenerator: Fix deprecation warningFriedemann Kleint2020-01-021-1/+1
| | | | | | | | | | | | | | | | | | Use insert() for m_glyphsPerUnicodeRange, which is a QMultiHash, fixing: distancefieldmodel.cpp:186:59: warning: 'QHash<K, V>::iterator QHash<K, V>::insertMulti(const Key&, const T&) [with Key = DistanceFieldModel::UnicodeRange; T = unsigned int]' is deprecated: Use QMultiHash for hashes storing multiple values with the same key. [-Wdeprecated-declarations] Change-Id: I58488754c67af3c31574a4b657660ac094b188ec Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Port the rest of QtToolsLeander Beernaert2019-12-121-0/+35
|/ | | | | | Change-Id: I4115bde9af38219682d0e6707bc7aa8fcb8d6bb0 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-081-7/+14
|\ | | | | | | Change-Id: I0015980f763599ca60f28dd3408531d2a532cd6a
| * distancefieldgenerator: Fix performance when selecting unicode rangesEskil Abrahamsen Blomfeldt2019-09-031-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling the QItemSelectionModel::select() function that takes a single index is extremely slow, so for large ranges that span e.g. 20000 glyphs in the font, such as some of the Chinese ideographic ranges can, the application would appear to freeze for many seconds while updating the selections. Instead we use the overload that takes a QList. Metrics: For a specific CJK font, this reduces the time taken when selecting a single unicode range from 30 seconds to 70 ms. [ChangeLog][Distance Field Generator] Improved performance when selecting unicode ranges in large fonts. Task-number: QTBUG-77499 Change-Id: I7ed9bec26b3cbc7e273d305f270a4a6690a81407 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-171-1/+1
|\ \ | |/ | | | | Change-Id: Ibd977a3a67db311434dc5062f23e4f7f270dbbb0
| * distancefieldgenerator: Fix garbled text with large fonts on little endianEskil Abrahamsen Blomfeldt2019-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When writing the texture index of each glyph into the font, we would first do toBigEndian() on an int and then truncate this to quint16, causing the texture index to be 0 for all glyphs on little endian systems. This would cause glyphs that were not located in the first texture to be garbled in the output. [ChangeLog][distancefieldgenerator] Fixed broken text rendering when generating large glyph sets. Task-number: QTBUG-77501 Change-Id: I7c2d31a6e57182f440d7f78bd6305109846ccb75 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Doc: Replace example file lists with links to code.qt.ioTopi Reinio2019-07-091-0/+1
| | | | | | | | | | | | Task-number: QTBUG-74391 Change-Id: Iced8f21af188b249a0ac59f71fa2fb7cb6a52869 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-272-12/+17
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3a828f7cf61510f0bb179b760c8a335629d3c852
| * distancefieldgenerator: Fix failure reading CMAP for some fontsEskil Abrahamsen Blomfeldt2019-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | If all the range offsets in the type 4 subtable in CMAP is equal to 0, there is no need for a glyph ID array, so this array can actually have zero length. We did not account for this, and would fail to read those fonts. Task-number: QTBUG-76188 Change-Id: I11873fba7214d179af1fcd7ccff9a9fd1c72ce10 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * distancefieldgenerator: Fix crash with multiple texturesEskil Abrahamsen Blomfeldt2019-06-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to make sure the allocated area starts at (0,0), since we allocate a texture at [width x height], and this would be too small if it did not also account for possible gaps at the top of the cache. This happens because glyphs may sometimes end up at the edge between two textures, in which case we will reserve space for them in the second of the two even though this is not needed. So this is a deficiency in the cache logic itself, but we need to at least make sure it does not crash. [ChangeLog][distancefieldgenerator] Fixed possible crash when generating large number of glyphs with a small texture size. Task-number: QTBUG-76188 Task-number: QTBUG-76528 Change-Id: I84c87c72985f5b621d120e7526cfe071555fa7f8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * distancefieldgenerator: Remove unused variableEskil Abrahamsen Blomfeldt2019-06-201-2/+0
| | | | | | | | | | | | | | The total allocated area was never used. Change-Id: I1aad1d4349ec94e2ccc521903b304270decd1d0d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * distancefieldgenerator: Avoid exceeding max texture sizeEskil Abrahamsen Blomfeldt2019-06-201-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we use a single area allocator for all textures, a glyph on the edge between two textures, would end up spanning two textures. It would be assigned to the first, and which in turn would be expanded to account for the additional data. The result was that the texture height exceeded the maximum size set. This is actually an inherited problem from Qt Quick, but it happens more frequently with the distancefieldgenerator because you will typically generate a large number of glyphs, and also the default max size set is quite low to be on the safe side. The bandaid in this patch is to pad the texture height by the size of one glyph, which will for the most part get rid of the problem, except for fonts where a majority of glyphs exceed the em square. [ChangeLog][distancefieldgenerator] Fixed a bug where the generated textures might exceed the maximum height. Task-number: QTBUG-76528 Change-Id: I51487bbf7c46556b022bfd45cefc8776d0272de3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * distancefieldgenerator: Fix cmap error for some fontsEskil Abrahamsen Blomfeldt2019-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would accidentally use the raw field from the font without converting its endianness, thus we would sanity check against the wrong length and print out error messages for some perfectly valid cmap subtables. [ChangeLog][distancefieldgenerator] Fixed bug where the tool would fail for valid fonts with the message "end of cmap table reached when parsing subtable". Task-number: QTBUG-76188 Change-Id: I7f84f4e161da705b49423ed3cc16a78cee67c607 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Doc: Clear 'moduleheader' for tool manualsTopi Reinio2019-05-031-0/+1
|/ | | | | | | | | These manuals contain no C++ API documentation, and there is no associated module headers - clearing the moduleheader variable in documentation configuration stops QDoc from warning about them. Change-Id: I71b8ec81800025d9de18b83871a9881c1246f153 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.12.1Liang Qi2019-01-082-0/+15
|\ | | | | | | | | | | | | Conflicts: qttools.pro Change-Id: Ibf247399306794b1d79ebbcd230b853896d0bc87
| * distancefieldgenerator: Add help actionFriedemann Kleint2018-12-102-0/+15
| | | | | | | | | | | | | | Add a help action launching the documentation page. Change-Id: I8c78ca53389faaac9e87ec116969d0002d9f1205 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Bump copyright year to 2019Kai Koehne2018-12-181-1/+1
|/ | | | | | Task-number: QTBUG-72635 Change-Id: If5acb99bff8715101ab338a694b9f2d61e066ea3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* distancefieldgenerator: Use capitalized text for actionsKai Koehne2018-11-292-6/+6
| | | | | | | | | Follow the example of other Qt tools and use capitalized text for all actions. Change-Id: I6417a098d1601a10a73232334e5f5819095187f3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* distancefieldgenerator: Preserve window sizeKai Koehne2018-11-283-1/+11
| | | | | | | | Do not always start app as maximized; instead, save the state between runs. Change-Id: I30fb61e4b46a230ff1eb6fb93ef89df037a6afb0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* distancefieldgenerator: Add command line interfaceKai Koehne2018-11-283-18/+33
| | | | | | Fixes: QTBUG-72052 Change-Id: I52aa7081334b2515e670373c7975a9ec2bb7c00b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* distancefieldgenerator: Fix crash in select actions for empty documentKai Koehne2018-11-281-17/+12
| | | | | | Fixes: QTBUG-72051 Change-Id: Ib3862f8d592bcab54ee72cc87c4e7dbc213f1e87 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* distancefieldgenerator: Add About, About Qt dialogsKai Koehne2018-11-273-1/+39
| | | | | | | | | | This follows the pattern of all other user visible GUI tools we provide. Change-Id: I9dce96bd3b3e65bbf625177eabcc06051bcb0551 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* qdistancefieldgenerator: Properly install toolv5.12.0-beta2Kai Koehne2018-10-121-0/+6
| | | | | | | | Also rename executable to qdistancefieldgenerator Change-Id: I2951c2d83fcff25d65413a548f7a692980c9b3ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Doc: Add an entry to the pro file to include the qdocconfVenugopal Shivashankar2018-10-012-0/+28
| | | | | | | | | | | | Without a QMAKE_DOCS entry in the project file, docs are not built for the qtdistancefieldgenerator tool. Also renamed the qdocconf file to be inline with other qdocconf files in the repo. The qdocconf file name translates to the install directory under $QT_INSTALL_DOCS. Change-Id: I6052039cbecb9dc4e447818421c588ecec675861 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Introduce distancefieldgeneratorEskil Abrahamsen Blomfeldt2018-08-2212-0/+2105
A tool that allows you to pick prepare .qdf files which are pregenerated distance fields in binary form that can be loaded by Qt to improve startup time. We currently only support cmaps subtable formats 0, 4, 6, 10 and 12, as these are either A. the most commonly used (4 and 12) or B. simple to implement. The tool writes a .ttf file which is a copy of the original file, but with the addition of a "qtdf" table that follows sfnt conventions. This way, the file will work as a normal font file, as well, which means that glyphs that are not in the pregenerated cache can easily be generated at runtime. Task-number: QTBUG-69356 Change-Id: Ib99c2d62f65e65973a60da4b1aa632b7ed3b2794 Reviewed-by: Lars Knoll <lars.knoll@qt.io>