Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pursche/improve UI #41

Merged
merged 11 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion Dependencies/Dependencies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ local dependencies =
"luau/luau.lua",
"quill/quill.lua",
"asio/asio.lua",
"hwloc/hwloc.lua"
"hwloc/hwloc.lua",
"freetype/freetype.lua",
"msdfgen/msdfgen.lua",
"msdf-atlas-gen/msdf-atlas-gen.lua",
}

for k,v in pairs(dependencies) do
Expand Down
85 changes: 85 additions & 0 deletions Dependencies/freetype/freetype.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
local dep = Solution.Util.CreateDepTable("freetype", {})

Solution.Util.CreateStaticLib(dep.Name, Solution.Projects.Current.BinDir, dep.Dependencies, function()
Solution.Util.SetLanguage("C++")
Solution.Util.SetCppDialect(20)

local rootDir = dep.Path .. "/freetype"
local sourceDir = rootDir .. "/src"
local platformDir = rootDir .. "/platform"
local includeDir = rootDir .. "/include"

local defines = { "_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS", "_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS", "_CRT_SECURE_NO_WARNINGS", "FT2_BUILD_LIBRARY" }
local links = {}
local files =
{
sourceDir .. "/autofit/autofit.c",
sourceDir .. "/bdf/bdf.c",
sourceDir .. "/cff/cff.c",
sourceDir .. "/base/ftbase.c",
sourceDir .. "/base/ftbitmap.c",
sourceDir .. "/cache/ftcache.c",
sourceDir .. "/base/ftfstype.c",
sourceDir .. "/base/ftglyph.c",
sourceDir .. "/gzip/ftgzip.c",
sourceDir .. "/base/ftinit.c",
sourceDir .. "/lzw/ftlzw.c",
sourceDir .. "/base/ftstroke.c",
sourceDir .. "/base/ftsystem.c",
sourceDir .. "/smooth/smooth.c",

sourceDir .. "/base/ftbbox.c",
sourceDir .. "/base/ftgxval.c",
sourceDir .. "/base/ftlcdfil.c",
sourceDir .. "/base/ftmm.c",
sourceDir .. "/base/ftotval.c",
sourceDir .. "/base/ftpatent.c",
sourceDir .. "/base/ftpfr.c",
sourceDir .. "/base/ftsynth.c",
sourceDir .. "/base/ftfstype.c",
sourceDir .. "/pcf/pcf.c",
sourceDir .. "/pfr/pfr.c",
sourceDir .. "/psaux/psaux.c",
sourceDir .. "/pshinter/pshinter.c",
sourceDir .. "/psnames/psmodule.c",
sourceDir .. "/raster/raster.c",
sourceDir .. "/sdf/ftbsdf.c",
sourceDir .. "/sdf/ftsdf.c",
sourceDir .. "/sdf/ftsdfcommon.c",
sourceDir .. "/sdf/ftsdfrend.c",
sourceDir .. "/sdf/sdf.c",
sourceDir .. "/sfnt/sfnt.c",
sourceDir .. "/svg/ftsvg.c",
sourceDir .. "/truetype/truetype.c",
sourceDir .. "/type1/type1.c",
sourceDir .. "/cid/type1cid.c",
sourceDir .. "/type42/type42.c",
sourceDir .. "/winfonts/winfnt.c",
}

if os.target() == "windows" then
local platformFiles =
{
platformDir .. "/windows/ftdebug.c", -- TODO: Windows only
}
Solution.Util.MergeIntoTable(files, platformFiles)
Solution.Util.MergeIntoTable(defines, { "WIN32", "WIN32_LEAN_AND_MEAN", "VC_EXTRALEAN" } )
else
-- TODO Linux
end

warnings "Off"

Solution.Util.SetDefines(defines)
Solution.Util.SetLinks(links)
Solution.Util.SetFiles(files)
Solution.Util.SetIncludes(includeDir)
end)

Solution.Util.CreateDep(dep.NameLow, dep.Dependencies, function()

local includeDir = dep.Path .. "/freetype/include"

Solution.Util.SetIncludes(includeDir)
Solution.Util.SetLinks({ dep.Name })
end)
16 changes: 16 additions & 0 deletions Dependencies/freetype/freetype/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
BasedOnStyle: Chromium
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
AlignEscapedNewlines: true
# AlignOperands: Align
AlignTrailingComments: true
AlwaysBreakAfterReturnType: AllDefinitions
BreakBeforeBraces: Allman
ColumnLimit: 80
DerivePointerAlignment: false
IndentCaseLabels: false
PointerAlignment: Left
SpaceBeforeParens: ControlStatements
SpacesInParentheses: true
46 changes: 46 additions & 0 deletions Dependencies/freetype/freetype/LICENSE.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FREETYPE LICENSES
-----------------

The FreeType 2 font engine is copyrighted work and cannot be used
legally without a software license. In order to make this project
usable to a vast majority of developers, we distribute it under two
mutually exclusive open-source licenses.

This means that *you* must choose *one* of the two licenses described
below, then obey all its terms and conditions when using FreeType 2 in
any of your projects or products.

- The FreeType License, found in the file `docs/FTL.TXT`, which is
similar to the original BSD license *with* an advertising clause
that forces you to explicitly cite the FreeType project in your
product's documentation. All details are in the license file.
This license is suited to products which don't use the GNU General
Public License.

Note that this license is compatible to the GNU General Public
License version 3, but not version 2.

- The GNU General Public License version 2, found in
`docs/GPLv2.TXT` (any later version can be used also), for
programs which already use the GPL. Note that the FTL is
incompatible with GPLv2 due to its advertisement clause.

The contributed BDF and PCF drivers come with a license similar to
that of the X Window System. It is compatible to the above two
licenses (see files `src/bdf/README` and `src/pcf/README`). The same
holds for the source code files `src/base/fthash.c` and
`include/freetype/internal/fthash.h`; they were part of the BDF driver
in earlier FreeType versions.

The gzip module uses the zlib license (see `src/gzip/zlib.h`) which
too is compatible to the above two licenses.

The files `src/autofit/ft-hb.c` and `src/autofit/ft-hb.h` contain code
taken almost verbatim from the HarfBuzz file `hb-ft.cc`, which uses
the 'Old MIT' license, compatible to the above two licenses.

The MD5 checksum support (only used for debugging in development
builds) is in the public domain.


--- end of LICENSE.TXT ---
107 changes: 107 additions & 0 deletions Dependencies/freetype/freetype/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
FreeType 2.13.3
===============

Homepage: https://www.freetype.org

FreeType is a freely available software library to render fonts.

It is written in C, designed to be small, efficient, highly
customizable, and portable while capable of producing high-quality
output (glyph images) of most vector and bitmap font formats.

Please read the `docs/CHANGES` file, it contains IMPORTANT
INFORMATION.

Read the files `docs/INSTALL*` for installation instructions; see the
file `docs/LICENSE.TXT` for the available licenses.

For using FreeType's git repository instead of a distribution bundle,
please read file `README.git`. Note that you have to actually clone
the repository; using a snapshot will not work (in other words, don't
use gitlab's 'Download' button).

The FreeType 2 API reference is located in directory `docs/reference`;
use the file `index.html` as the top entry point. [Please note that
currently the search function for locally installed documentation
doesn't work due to cross-site scripting issues.]

Additional documentation is available as a separate package from our
sites. Go to

https://download.savannah.gnu.org/releases/freetype/

and download one of the following files.

freetype-doc-2.13.3.tar.xz
freetype-doc-2.13.3.tar.gz
ftdoc2133.zip

To view the documentation online, go to

https://www.freetype.org/freetype2/docs/


Mailing Lists
-------------

The preferred way of communication with the FreeType team is using
e-mail lists.

general use and discussion: [email protected]
engine internals, porting, etc.: [email protected]
announcements: [email protected]
git repository tracker: [email protected]

The lists are moderated; see

https://www.freetype.org/contact.html

how to subscribe.


Bugs
----

Please submit bug reports at

https://gitlab.freedesktop.org/freetype/freetype/-/issues

Alternatively, you might report bugs by e-mail to
`[email protected]`. Don't forget to send a detailed
explanation of the problem -- there is nothing worse than receiving a
terse message that only says 'it doesn't work'.


Patches
-------

For larger changes please provide merge requests at

https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests

Alternatively, you can send patches to the `[email protected]`
mailing list -- and thank you in advance for your work on improving
FreeType!

Details on the process can be found here:

https://www.freetype.org/developer.html#patches


Enjoy!

The FreeType Team

----------------------------------------------------------------------

Copyright (C) 2006-2024 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.


--- end of README ---
102 changes: 102 additions & 0 deletions Dependencies/freetype/freetype/README.git
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
README.git
==========


repository issues
-----------------

FreeType's official repository site is

https://gitlab.freedesktop.org/freetype ,

from which the 'freetype.git' and 'freetype-demos.git' repositories
can be cloned in the usual way.

git clone https://gitlab.freedesktop.org/freetype/freetype.git
git clone https://gitlab.freedesktop.org/freetype/freetype-demos.git

If you want to use the Savannah mirror instead, you have to do a
slightly different incantation because the repository names contain
digit '2' for historical reasons.

git clone \
https://git.savannah.nongnu.org/git/freetype/freetype2.git \
freetype
git clone \
https://git.savannah.nongnu.org/git/freetype/freetype2-demos.git \
freetype-demos


standard builds with `configure`
--------------------------------

The git repository doesn't contain pre-built configuration scripts for
UNIXish platforms. To generate them say

sh autogen.sh

which in turn depends on the following packages:

automake (1.10.1)
libtool (2.2.4)
autoconf (2.62)

The versions given in parentheses are known to work. Newer versions
should work too, of course. Note that `autogen.sh` also sets up
proper file permissions for the `configure` and auxiliary scripts.

The `autogen.sh` script checks whether the versions of the above three
tools match the numbers above. Otherwise it will complain and suggest
either upgrading or using environment variables to point to more
recent versions of the required tools.

Note that `aclocal` is provided by the 'automake' package on Linux,
and that `libtoolize` is called `glibtoolize` on Darwin (OS X).


alternative build methods
-------------------------

For static builds that don't use platform-specific optimizations, no
configure script is necessary at all; saying

make setup ansi
make

should work on all platforms that have GNU `make` (or `makepp`).

A build with `cmake` or `meson` can be done directly from the git
repository. However, if you want to use the `FT_DEBUG_LOGGING` macro
(see file `docs/DEBUG` for more information) it is currently mandatory
to execute `autogen.sh` in advance; this script clones the 'dlg' git
submodule and copies some files into FreeType's source tree.


Code of Conduct
---------------

Please note that this project is released with a Contributor Code of
Conduct (CoC). By participating in this project you agree to abide by
its terms, which you can find in the following link:

https://www.freedesktop.org/wiki/CodeOfConduct

CoC issues may be raised to the project maintainers at the following
address:

[email protected]
[email protected]

----------------------------------------------------------------------

Copyright (C) 2005-2024 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.


--- end of README.git ---
Loading