Commit Graph

47 Commits

Author SHA1 Message Date
arch1t3cht aa68c2e66b Merge branches 'misc' and 'bugfixes' into feature 2024-03-20 14:39:37 +01:00
moi15moi 7543060f1d Rework Windows font collector (arch1t3cht/Aegisub#107)
[src\meson.build] Add DirectWrite has dependency

[src\font_file_lister_gdi] Rework GDI FontCollector to use DirectWrite

This replaces all the logic of using the Windows registry to obtain the font path by using DirectWrite. The goal is simply to improve the quality of the code. This doesn't change any functionality

[src\meson.build] Remove Uniscribe has dependency

Uniscribe was only used for the FontCollector. Since we now use DirectWrite, we don't need it anymore.

[src\dialog_fonts_collector] Catch exceptions that FontCollector may raise

On Windows, the initialization of the FontCollector can raise an exception

[src\font_file_lister] Document the exception that GdiFontFileLister can throw

[src\font_file_lister_gdi] Correct possible memory leak when an error occur

Fix error caused by AddFontResource on Windows 10 or higher

[meson.build] Replace add_project_arguments with conf.set for HAVE_DWRITE_3

[src\dialog_fonts_collector] Update message error and optimisation

[src\font_file_lister_gdi] Correct documentation typo

[src\font_file_lister_gdi] Cosmetic nit - Initialize hfont in one line

[src\font_file_lister_gdi] Cosmetic nit - Remove if statements brace

[src\font_file_lister_gdi] Replace WCHAR param of normalizeFilePathCase to std::wstring

[src\font_file_lister_gdi] Replace WCHAR by std::wstring

[src\font_file_lister_gdi] Use IDWriteFontFace::GetSimulations to detect fake_italic/fake_bold

See this comment: https://github.com/arch1t3cht/Aegisub/pull/107#issuecomment-1975229652

[src\font_file_lister_gdi] If Win7/8 has Win 10 SDK on compile time, correctly verify if font has character(s)

With the Visual Studio 2019 toolchain on Windows 7, it installs the Windows 10 SDK by default. Because of this, ``HAVE_DWRITE_3`` is true, so the ``QueryInterface`` always fails. Now, if the ``QueryInterface`` fails, we try to verify if the font has characters with a Windows Vista SP2 compatible code.

[src\font_file_lister_gdi] Support facename that contains only whitespace AND truncated facename

Problem 1:
Previously, if a user wrote "\fn   ", it would return the font Arial, which is not what we want. This is because when we request EnumFontFamiliesEx with whitespace or an empty lfFaceName, it will enumerate all the installed fonts.

Solution 1:
To resolve this issue, let's implement a solution similar to libass to determine if the selected facename exists: 649a7c2e1f/libass/ass_directwrite.c (L737-L747)

Problem 2:
GDI truncates font names to 31 characters. See: https://github.com/libass/libass/issues/459
However, since I changed the method to determine if a facename exists, I ensured that we still support this "feature".

To test this, I used the font in: https://github.com/libass/libass/issues/710

[src\font_file_lister_gdi] Add a FIXME comment regarding the utilization of std::wstring over WCHAR

[src\font_file_lister_gdi] Add FIXME comment about charset
2024-03-20 14:38:45 +01:00
arch1t3cht 160cf46b98 Merge branch 'bugfixes' into feature 2023-12-02 17:27:55 +01:00
arch1t3cht ce557d98e4 Use crash_writer_minidump on Windows
This was done in Aegisub/Aegisub.
2023-12-02 17:21:11 +01:00
arch1t3cht fac664ad10 Merge branch 'workarounds' into feature 2023-10-27 16:41:40 +02:00
arch1t3cht 6dda04da9f Revert "Parially revert fffb138b8175b4838b6a063863756b7c6b2db547"
This reverts commit c487dd2bdb.

Revert the commit that
partially reverted fffb138b81 ...
It turns out that this very much did break IME input, so reverting
this for now. This does make Aegisub use private symbols in wx again,
but the CI builds build wx from the wrap now. Still, this is why
this is on the workarounds branch. If this breaks for too many
people this could either go behind a meson option or be fixed in
some better magical way that I have yet to find.

Fixes arch1t3cht/Aegisub#90
Fixes arch1t3cht/Aegisub#91
2023-10-27 16:40:21 +02:00
arch1t3cht 57572e5686 Merge branch 'vector_clip_actions' into feature 2023-01-26 23:34:27 +01:00
arch1t3cht a632f5f7ee Revert "Merge branch 'vector_clip_actions' into feature"
This reverts commit bd4e79fdf9, reversing
changes made to 9d4a67b523.
2023-01-26 23:34:14 +01:00
arch1t3cht 36e5275418 visual tools: Add perspective tool 2023-01-25 23:24:11 +01:00
arch1t3cht bd4e79fdf9 Merge branch 'vector_clip_actions' into feature 2022-11-04 00:46:15 +01:00
arch1t3cht b1a9867f16 Visual perspective tool: First functioning version 2022-11-04 00:45:32 +01:00
arch1t3cht ccc5f44a5f Merge branches 'info', 'bugfixes', 'workarounds', 'fixes', 'folding', 'bestsource', 'avisynth' and 'vapoursynth' into feature 2022-09-27 23:37:18 +02:00
arch1t3cht febce3ecdc vapoursynth: Add configurable default script
This default script will be executed to load any file whose file name
extension is not .py or .vpy .

The gui code for setting the default script is still a bit wonky as it
doesn't fit the rest of the preferences pages nicely, but it works for
now.
2022-09-27 23:14:30 +02:00
arch1t3cht 3fedc88641 Include strings.rc as resource file on Windows
This was included here:
6f546951b4/build/Aegisub/Aegisub.vcxproj.filters (L1094)
in the MSVC build.
2022-08-28 01:38:41 +02:00
arch1t3cht e7e87f5584 Merge branch 'xa2-ds' into feature 2022-08-16 21:04:44 +02:00
arch1t3cht 24ac0647ac Merge branch 'vapoursynth' into feature 2022-08-16 19:57:22 +02:00
arch1t3cht ff43f3d601 vapoursynth: Add audio source 2022-08-16 19:22:54 +02:00
arch1t3cht 3f298bf03a Add vapoursynth video provider 2022-08-16 19:22:54 +02:00
arch1t3cht 6af0b41f47 bestsource: Add audio provider 2022-08-16 19:22:54 +02:00
arch1t3cht 33b9a6e395 Add bestsource video provider
Co-authored-by: Asada shinon <joshwoo71@gmail.com>
2022-08-16 19:22:54 +02:00
arch1t3cht 53466be0ca Merge branch 'avisynth' into feature 2022-08-13 23:03:33 +02:00
arch1t3cht fe285678a3 avisynth: Allow compilation on Linux
Co-authored-by: wangqr <wangqr@wangqr.tk>
2022-08-13 01:06:24 +02:00
Ristellise fd28458ed8 Implement wangqr Audio Changes:
- To allow for XAudio2 to work properly, we need to rework how does provider work since they only are used to be able to take in mono audio.
 - Other providers have been dumbed down to accept single channel audio since originally aegisub only accepted 1 channel audio.
 - meson.build has been modified to accommodate for xaudio, as we currently don't accept redistributable forms of xaudio, we need to work around the WinNT version.
 - There has been 1 more fix to res.rc to allow for compiling on non tagged releases.
2022-08-10 21:09:41 +08:00
arch1t3cht 69d79ac0cf Merge branch 'wangqr_time_video' into feature 2022-08-01 22:09:29 +02:00
Charlie Jiang 3dcab8b9bd Merge remote-tracking branch 'origind-dev/master'
Add align to video function
2022-08-01 21:43:15 +02:00
arch1t3cht 11b5a80618 Merge branch 'folding' into feature 2022-07-27 15:27:04 +02:00
arch1t3cht 56cc1a6873 Add line folding
Line folds are managed using metadata of AssDialogue elements, and
saved in the project properties. They only affect the appearance of the
subtitle grid, and have no impact on other line operations.
2022-07-27 15:23:47 +02:00
arch1t3cht fdcb0ee75f meson: Fix compliation with avisynth enabled
Still crashes when loading a video.
2022-07-03 17:49:46 +02:00
Ryan d32ef75cba meson: move executable to the root directory 2021-03-27 09:29:37 -04:00
Ryan 248785d7ad meson: apply manifest on windows 2021-01-30 12:02:34 -05:00
Ryan 36b75b827d meson: fix warnings, cleanup 2021-01-30 12:02:18 -05:00
Ryan 1ac52a24d6 meson: disable gdi_fontselect for now
This one continues to be controversial, so for now the plan will be to report issues upstream that come up as a result of this being removed
2021-01-30 08:58:45 -05:00
Ryan 7d9feca578 meson: add CSRI support 2021-01-30 08:57:39 -05:00
Ryan d8c348e897 meson: standardized config defines to set integer 1 2021-01-30 08:56:01 -05:00
Ryan Lucia c487dd2bdb Parially revert fffb138b81
I haven't checked whether reverting this breaks IME input, and if it doesn't what changed on wx's end. However, this is the commit that uses private symbols, and so reverting it lets us build against upstream wx. Even if this is a loss in functionality, for now it's fine.
2021-01-10 03:14:12 -05:00
Ryan 8cf4100c87 meson: fix resource file compilation
This enables video to load correctly in Windows builds
2021-01-10 03:14:12 -05:00
Ryan 72edb88982 meson: add Avisynth option, compile libass_gdi_fontselect
Sadly, building with Avisynth is still broken.
2021-01-10 03:14:12 -05:00
Ryan Lucia e3826cb17e meson: initial attempt to generate Aegisub.app on macOS 2021-01-10 03:14:12 -05:00
line0 2e613f5476 meson: flag aegisub as a GUI app 2021-01-10 03:14:12 -05:00
line0 bfdcbdefad meson: add missing link dependencies on windows 2021-01-10 03:14:12 -05:00
line0 b6c0f2d544 meson: don't build fontconfig file lister on windows 2021-01-10 03:14:12 -05:00
line0 b8e2cf83fd fix PCHs on VS2019
* separate PCH for C and C++
* acconf.h now included in PCHs on windows, too
* meson now auto-generates companion source files for PCH headers
2021-01-10 03:14:12 -05:00
Ryan Lucia 3b2d770d74 Fix PCH usage
Hopefully this time in a way that doesn't ruin life for Unix folks!
2021-01-10 03:14:12 -05:00
Ryan Lucia 9e284660b1 meson: add DirectSound detection 2021-01-10 03:14:12 -05:00
Ryan Lucia cde5778283 Make spacing around colons consistent 2021-01-10 03:14:12 -05:00
Martin Herkt 97b4dfb7f4 Meson: add install rules 2021-01-10 03:14:12 -05:00
Martin Herkt 8905921a2d Initial port of the build system to Meson
Still some TODOs left. Probably only works on Linux for now.
2021-01-10 03:14:12 -05:00