Compare commits

...

2 Commits

Author SHA1 Message Date
Francesco Abbate 53c098e5fc Adjust default font size 2021-04-22 16:32:32 +02:00
Francesco Abbate baf944539d Add Fira and Fira Code font and licenses 2021-04-22 13:08:10 +02:00
13 changed files with 208 additions and 12 deletions

View File

@ -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 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 this software and associated documentation files (the "Software"), to deal in

View File

@ -66,11 +66,11 @@ lite_build_package_windows () {
local bindir="$pdir/bin" local bindir="$pdir/bin"
local datadir="$pdir/share/lite-xl" local datadir="$pdir/share/lite-xl"
fi fi
mkdir -p "$bindir" mkdir -p "$bindir" "$datadir"
mkdir -p "$datadir"
for module_name in core plugins colors fonts; do for module_name in core plugins colors fonts; do
copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir" copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir"
done done
copy_directory_from_repo "doc" "$pdir"
for module_name in plugins colors; do for module_name in plugins colors; do
cp -r "$build/third/data/$module_name" "$datadir" cp -r "$build/third/data/$module_name" "$datadir"
done done
@ -97,6 +97,7 @@ lite_build_package_macosx () {
for module_name in core plugins colors fonts; do for module_name in core plugins colors fonts; do
copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir" copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir"
done done
copy_directory_from_repo "doc" "$pdir"
for module_name in plugins colors; do for module_name in plugins colors; do
cp -r "$build/third/data/$module_name" "$datadir" cp -r "$build/third/data/$module_name" "$datadir"
done done
@ -133,11 +134,11 @@ lite_build_package_linux () {
local bindir="$pdir/bin" local bindir="$pdir/bin"
local datadir="$pdir/share/lite-xl" local datadir="$pdir/share/lite-xl"
fi fi
mkdir -p "$bindir" mkdir -p "$bindir" "$datadir"
mkdir -p "$datadir"
for module_name in core plugins colors fonts; do for module_name in core plugins colors fonts; do
copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir" copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir"
done done
copy_directory_from_repo "doc" "$pdir"
for module_name in plugins colors; do for module_name in plugins colors; do
cp -r "$build/third/data/$module_name" "$datadir" cp -r "$build/third/data/$module_name" "$datadir"
done done

View File

@ -271,8 +271,8 @@ local style = require "core.style"
------------------------------- Fonts ---------------------------------------- ------------------------------- Fonts ----------------------------------------
-- customize fonts: -- customize fonts:
-- style.font = renderer.font.load(DATADIR .. "/fonts/font.ttf", 13 * SCALE) -- style.font = renderer.font.load(DATADIR .. "/fonts/FiraSans-Medium.ttf", 13 * SCALE)
-- style.code_font = renderer.font.load(DATADIR .. "/fonts/monospace.ttf", 12 * SCALE) -- style.code_font = renderer.font.load(DATADIR .. "/fonts/FiraCode-Medium.ttf", 12 * SCALE)
-- --
-- font names used by lite: -- font names used by lite:
-- style.font : user interface -- style.font : user interface

View File

@ -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. -- 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. -- The antialiasing grayscale with full hinting is interesting for crisp font rendering.
style.font = renderer.font.load(DATADIR .. "/fonts/font.ttf", 13 * SCALE) style.font = renderer.font.load(DATADIR .. "/fonts/FiraSans-Medium.ttf", 13 * SCALE)
style.big_font = renderer.font.load(DATADIR .. "/fonts/font.ttf", 34 * 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_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.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", 12 * SCALE)
style.background = { common.color "#2e2e32" } style.background = { common.color "#2e2e32" }
style.background2 = { common.color "#252529" } style.background2 = { common.color "#252529" }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -21,8 +21,8 @@ local style = require "core.style"
------------------------------- Fonts ---------------------------------------- ------------------------------- Fonts ----------------------------------------
-- customize fonts: -- customize fonts:
-- style.font = renderer.font.load(DATADIR .. "/fonts/font.ttf", 13 * SCALE) -- style.font = renderer.font.load(DATADIR .. "/fonts/FiraSans-Medium.ttf", 13 * SCALE)
-- style.code_font = renderer.font.load(DATADIR .. "/fonts/monospace.ttf", 12 * SCALE) -- style.code_font = renderer.font.load(DATADIR .. "/fonts/FiraCode-Medium.ttf", 12 * SCALE)
-- --
-- font names used by lite: -- font names used by lite:
-- style.font : user interface -- style.font : user interface

View File

@ -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"

31
doc/contributors.md Normal file
View File

@ -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

126
doc/licenses.md Normal file
View File

@ -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.

View File

@ -19,8 +19,10 @@ sdl_dep = dependency('sdl2', method: 'config-tool')
lite_cargs = [] lite_cargs = []
if get_option('portable') if get_option('portable')
lite_docdir = 'doc'
lite_datadir = 'data' lite_datadir = 'data'
else else
lite_docdir = 'share/doc'
lite_datadir = 'share/lite-xl' lite_datadir = 'share/lite-xl'
endif endif
@ -29,6 +31,10 @@ foreach data_module : ['core', 'fonts', 'plugins', 'colors']
install_subdir('data' / data_module , install_dir : lite_datadir) install_subdir('data' / data_module , install_dir : lite_datadir)
endforeach endforeach
foreach file : ['usage.md', 'licenses.md', 'contributors.md']
install_data('doc' / file, install_dir : lite_docdir)
endforeach
lite_link_args = [] lite_link_args = []
if cc.get_id() == 'gcc' and get_option('buildtype') == 'release' if cc.get_id() == 'gcc' and get_option('buildtype') == 'release'
lite_link_args += ['-static-libgcc', '-static-libstdc++'] lite_link_args += ['-static-libgcc', '-static-libstdc++']