Rubidium and rubidium42
39dfb7c27b
Codechange: use size_t for glyph/run counts, remove unneeded glyph count instance variable
2026-02-11 21:44:35 +01:00
Peter Nelson and GitHub
f1e831233a
Codefix: Mark destructors override. ( #14925 )
...
Remove some empty destructors.
2025-12-19 18:14:29 +00:00
Peter Nelson and Peter Nelson
b03347f00c
Revert: "Change: Support side-by-side fallback FontCaches instead of hierarchical. ( #13303 )"
...
This reverts commit 1829f7926d .
2025-12-13 09:09:21 +00:00
Cyprian Klimaszewski and GitHub
99f04f27de
Doc: Update information for receiving a copy of GPL. ( #14869 )
2025-12-07 11:25:08 +00:00
Peter Nelson and GitHub
1829f7926d
Change: Support side-by-side fallback FontCaches instead of hierarchical. ( #13303 )
...
The text layouter system can now support using different fonts for different glyphs, including mixing scalable and sprite glyphs.
2025-12-06 10:47:12 +00:00
Rubidium and rubidium42
f2b48bad79
Codechange: remove last (hidden) users of memset
2025-05-11 06:07:01 +02:00
frosch and frosch
83401ad5e2
Codechange: Use Utf8View::iterator in StringIterator.
2025-04-03 18:43:41 +02:00
Peter Nelson and Peter Nelson
59680867c3
Codechange: Use structured bindings when iterating font_mapping.
2024-12-20 19:05:08 +00:00
Peter Nelson and Peter Nelson
c78e309b16
Codefix: Use snake_case instead of camelCase in layouters.
2024-12-20 19:05:08 +00:00
Peter Nelson and GitHub
fe0afef36f
Codechange: Use unique_ptr instead of raw pointer for string layouts. ( #13128 )
2024-11-27 23:38:57 +00:00
Peter Nelson and Peter Nelson
e2a796dbcd
Codefix: Potential unterminated string returned from convert_to_fs.
...
Converting from UTF-8 to UTF-16 could have resulted in a buffer overflow if the buffer size was exactly the length of the converted string.
Pass string_view/span to convert_from/to_fs instead, and ensure the buffer is terminated. This replaces passing a pointer to the buffer and the buffer size as separate parameters, allowing the compiler to pass both in one parameter.
Removes use of `lengthof()`.
2024-07-10 20:57:02 +01:00
Peter Nelson and GitHub
b56775f576
Codechange: Avoid making copies of intermediate layout runs. ( #12796 )
...
The vector of runs is not used after it is passed to the ParagraphLayout class, so pass with std::move to avoid an unnecessary copy.
2024-06-17 22:58:52 +01:00
Peter Nelson and GitHub
f9f07e9001
Fix #12775 : Text truncated incorrectly on Windows. ( #12782 )
...
Caused by a -1 in the wrong place, which moved glyphs left one pixel.
2024-06-14 16:32:31 +01:00
Peter Nelson and Peter Nelson
5cd81a980e
Codechange: Store both left and right glyph positions in a run.
...
This also allows the end of a run to be known without using an extra position entry.
2024-06-09 09:57:20 +01:00
Peter Nelson and Peter Nelson
bbbf2b5282
Codechange: Return read-only span instead of vector from layout run functions.
2024-06-09 09:57:20 +01:00
Peter Nelson and GitHub
3f5a354f37
Codechange: Use emplace with ICURun and UniscribeRun. ( #12693 )
2024-05-18 09:17:38 +01:00
Peter Nelson and GitHub
a1a01e21cf
Change: Use std::make_unique instead of passing new() ( #12539 )
2024-04-20 11:20:49 +01:00
Peter Nelson and Peter Nelson
ae575a7a5b
Codechange: Store text run positions in vector of points.
...
This simplifies the interlaced vector of x/y positions.
2024-01-19 00:08:31 +00:00
Peter Nelson and Peter Nelson
f7cc88f370
Codechange: Return vector references instead of pointer to first item.
2024-01-19 00:08:31 +00:00
Michael Lutz
6e766a2e81
Change: Allow TrueType fonts to provide our private-use glyphs.
2024-01-14 22:50:56 +01:00
Loïc Guilloux and GitHub
03df70ce8a
Fix #11752 : [Win32] Wrong multi-line text layout due to incorrect partial run handling ( #11761 )
2024-01-12 19:40:08 +01:00
Rubidium and rubidium42
f16399f4c9
Codechange: replace x.size() > 0 with !x.empty()
2023-10-20 23:05:43 +02:00
Rubidium and rubidium42
c9276c2959
Codechange: replace x.size() == 0 with x.empty()
2023-10-20 23:05:43 +02:00
Rubidium and rubidium42
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Rubidium and rubidium42
68ff3fd062
Change: include fmt.h C++ headers in stdafx.h
...
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
2023-05-08 16:49:23 +02:00
Michael Lutz and GitHub
b14c5aff1f
Fix: [Win32] Text line breaking did not properly handle punctuation characters. ( #10775 )
2023-05-06 16:15:40 +00:00
Michael Lutz
908be59699
Fix: [Win32] Wrong multi-line text layout due to incorrect whitespace handling.
2023-05-01 16:31:59 +02:00
Michael Lutz
715234502c
Fix: Typo in variable name.
2023-05-01 16:31:59 +02:00
Peter Nelson and Tyler Trahan
daaa058493
Change: Vertically centre sprite font relative to TrueType font.
2022-12-18 11:46:01 -05:00
glx22 and Loïc Guilloux
15f66329c2
Fix: [MinGW] Silence 2 cast warnings
2021-06-10 23:17:29 +02:00
Michael Lutz
5ad1640984
Codechange: Make OS font handle of the FontCache read-only.
2021-02-13 20:09:14 +01:00
Charles Pigott and GitHub
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
Patric Stout and glx22
4d04009d12
Codechange: remove #ifdef from .cpp files to exclude features
...
With CMake, these files are simply not compiled to start with.
2020-06-05 19:36:05 +02:00
S. D. Cloudt and Charles Pigott
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Michael Lutz and Owen Rudge
de73c8f91c
Codechange: [Win32] Remove a FreeType work-around from Uniscribe if not using FreeType.
2019-05-14 11:21:36 +01:00
Michael Lutz and Owen Rudge
d2ed426077
Codechange: [Win32] Pass a native GDI font description around when we have one, instead of repeatedly guessing the font.
2019-05-14 11:21:36 +01:00
Henry Wilson and Michael Lutz
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
Michael Lutz
baf9229931
Codechange: Replace AutoDeleteSmallVector with direct std::vector use in text layout code.
2019-04-09 22:45:15 +02:00
Michael Lutz
329bb52613
Codechange: Store text layout runs directly as values in a std::vector instead of heap allocated.
...
This reduces memory allocations and heap fragmentation.
2019-04-09 22:45:15 +02:00
Michael Lutz
fbc4cef180
Codechange: Use override specifier for text layout classes.
2019-04-09 22:45:15 +02:00
glx22 and GitHub
66dd7c3879
Fix: MSVC warnings ( #7423 )
2019-03-28 00:09:33 +01:00
Henry Wilson and PeterN
cc62f4163f
Cleanup: Remove unused size template parameters from SmallMap and Auto[Free|Delete]SmallVector
2019-03-26 20:15:57 +00:00
Henry Wilson and PeterN
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
2019-03-26 20:15:57 +00:00
Henry Wilson and PeterN
2bc2de9034
Codechange: Replaced SmallVector::Find() with std::find()
2019-03-26 20:15:57 +00:00
Henry Wilson and PeterN
097328c3d7
Codechange: Replaced SmallVector::Get() const with std alternatives
2019-03-26 20:15:57 +00:00
Henry Wilson and PeterN
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
2019-03-26 20:15:57 +00:00
Michael Lutz
3b8db31a49
Fix: [Win32] Align sprite glyphs to the font baseline when using Uniscribe text layout.
2018-12-01 11:57:14 +01:00
Michael Lutz
eec3f40931
Change: [Win32] Use Uniscribe instead of ICU for text caret handling.
...
This removes the need for the ICU lib on Windows.
2018-06-06 21:37:09 +02:00
Michael Lutz
768a31bfe3
Add: [Win32] Text layout using the native Windows Uniscribe library.
...
Uniscribe is sometimes producing different results compared to ICU, especially
when RTL and LTR content is mixed. Comparing the results to other programs
(like editors or web browsers) leads me to believe that the result are at least
not worse than ICU and possibly better.
2018-06-06 21:37:09 +02:00