diff --git a/LICENSE b/LICENSE index 39ddd05c..20ca7d69 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2020 rxi +Copyright (c) 2020-2021 Francesco Abbate Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/build-packages.sh b/build-packages.sh index f2a57397..c14cc322 100755 --- a/build-packages.sh +++ b/build-packages.sh @@ -66,11 +66,11 @@ lite_build_package_windows () { local bindir="$pdir/bin" local datadir="$pdir/share/lite-xl" fi - mkdir -p "$bindir" - mkdir -p "$datadir" + mkdir -p "$bindir" "$datadir" for module_name in core plugins colors fonts; do copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir" done + copy_directory_from_repo "doc" "$pdir" for module_name in plugins colors; do cp -r "$build/third/data/$module_name" "$datadir" done @@ -97,6 +97,7 @@ lite_build_package_macosx () { for module_name in core plugins colors fonts; do copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir" done + copy_directory_from_repo "doc" "$pdir" for module_name in plugins colors; do cp -r "$build/third/data/$module_name" "$datadir" done @@ -133,11 +134,11 @@ lite_build_package_linux () { local bindir="$pdir/bin" local datadir="$pdir/share/lite-xl" fi - mkdir -p "$bindir" - mkdir -p "$datadir" + mkdir -p "$bindir" "$datadir" for module_name in core plugins colors fonts; do copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir" done + copy_directory_from_repo "doc" "$pdir" for module_name in plugins colors; do cp -r "$build/third/data/$module_name" "$datadir" done diff --git a/data/core/style.lua b/data/core/style.lua index ab72bde5..65c40d9c 100644 --- a/data/core/style.lua +++ b/data/core/style.lua @@ -21,11 +21,11 @@ style.tab_width = common.round(170 * SCALE) -- -- On High DPI monitor or non RGB monitor you may consider using antialiasing grayscale instead. -- The antialiasing grayscale with full hinting is interesting for crisp font rendering. -style.font = renderer.font.load(DATADIR .. "/fonts/font.ttf", 13 * SCALE) -style.big_font = renderer.font.load(DATADIR .. "/fonts/font.ttf", 34 * SCALE) +style.font = renderer.font.load(DATADIR .. "/fonts/FiraSans-Medium.ttf", 14 * SCALE) +style.big_font = renderer.font.load(DATADIR .. "/fonts/FiraSans-Medium.ttf", 40 * SCALE) style.icon_font = renderer.font.load(DATADIR .. "/fonts/icons.ttf", 14 * SCALE, {antialiasing="grayscale", hinting="full"}) style.icon_big_font = renderer.font.load(DATADIR .. "/fonts/icons.ttf", 20 * SCALE, {antialiasing="grayscale", hinting="full"}) -style.code_font = renderer.font.load(DATADIR .. "/fonts/monospace.ttf", 12 * SCALE) +style.code_font = renderer.font.load(DATADIR .. "/fonts/FiraCode-Medium.ttf", 14 * SCALE) style.background = { common.color "#2e2e32" } style.background2 = { common.color "#252529" } diff --git a/data/fonts/FiraCode-Medium.ttf b/data/fonts/FiraCode-Medium.ttf new file mode 100644 index 00000000..c7966c17 Binary files /dev/null and b/data/fonts/FiraCode-Medium.ttf differ diff --git a/data/fonts/FiraCode-Regular.ttf b/data/fonts/FiraCode-Regular.ttf new file mode 100644 index 00000000..60a02e13 Binary files /dev/null and b/data/fonts/FiraCode-Regular.ttf differ diff --git a/data/fonts/FiraSans-Medium.ttf b/data/fonts/FiraSans-Medium.ttf new file mode 100644 index 00000000..fb9c257c Binary files /dev/null and b/data/fonts/FiraSans-Medium.ttf differ diff --git a/data/fonts/FiraSans-Regular.ttf b/data/fonts/FiraSans-Regular.ttf new file mode 100644 index 00000000..6b288649 Binary files /dev/null and b/data/fonts/FiraSans-Regular.ttf differ diff --git a/dev-utils/notes-keyboard-events.md b/dev-utils/notes-keyboard-events.md new file mode 100644 index 00000000..12bb84ea --- /dev/null +++ b/dev-utils/notes-keyboard-events.md @@ -0,0 +1,32 @@ +core.step + call `system.poll_event` + + Two kind of events related to keyboard input: "textinput" and + "keypressed/released. The event "textediting" is ignored in the lite + application because it is for incomplete text composition. + + If the event is "textinput" and the previous keyboard event was treated + by keymap (within the `core.on_event` function) the event is not + treated. In all other cases ("textinput" or "keypressed/released") the + event is passed to `core.on_event`. + + The logic above seems to be there to prevent treating a "textinput" if a + previous keyboard event was previously treated and recognized as a + command. + + call `core.on_event` + + if type == "textinput": + + call `core.root_view:on_text_input` + + and in turn: + + call `core.active_view:on_text_input` + passed down to the corresponding method of the view + + if type == "keypressed": + + call `keymap.on_key_pressed` + recognize and execute the commands stored in the "keymap" + diff --git a/doc/contributors.md b/doc/contributors.md new file mode 100644 index 00000000..69789fed --- /dev/null +++ b/doc/contributors.md @@ -0,0 +1,31 @@ +## rxi + +Original development of lite editor. + +## Francesco Abbate (franko) + +Creator of lite-xl fork from rxi/lite. + +## Takase (takase1121) + +NagView and X Window database resource query for Xft.dpi setting. + +## Nils Kvist (budRich) + +Popup window replacement with CommandView dialog. + +## liquidev + +Tab style and animations improvements. + +## Mat Mariani (mathewmariani) + +Help for Mac OS port. Some resources taken from mathewmariani/lite-macos. + +## daubaris + +Initial implementation of Xft.dpi query using xrdb command. + +## Robert Štojs (netrobert) + +Continuos integration configuration diff --git a/doc/licenses.md b/doc/licenses.md new file mode 100644 index 00000000..25e132b6 --- /dev/null +++ b/doc/licenses.md @@ -0,0 +1,126 @@ +# Licenses + +## rxi/lite + +Copyright (c) 2020 rxi + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +## Fira Sans + +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +## Fira Code + +Copyright (c) 2014, The Fira Code Project Authors (https://github.com/tonsky/FiraCode) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + + +# SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/meson.build b/meson.build index 1f31b509..194c24e1 100644 --- a/meson.build +++ b/meson.build @@ -19,8 +19,10 @@ sdl_dep = dependency('sdl2', method: 'config-tool') lite_cargs = [] if get_option('portable') + lite_docdir = 'doc' lite_datadir = 'data' else + lite_docdir = 'share/doc' lite_datadir = 'share/lite-xl' endif @@ -29,6 +31,10 @@ foreach data_module : ['core', 'fonts', 'plugins', 'colors'] install_subdir('data' / data_module , install_dir : lite_datadir) endforeach +foreach file : ['usage.md', 'licenses.md', 'contributors.md'] + install_data('doc' / file, install_dir : lite_docdir) +endforeach + lite_link_args = [] if cc.get_id() == 'gcc' and get_option('buildtype') == 'release' lite_link_args += ['-static-libgcc', '-static-libstdc++']