diff --git a/app/qml/ApplicationSettings.qml b/app/qml/ApplicationSettings.qml index fdaf26a..24f8214 100644 --- a/app/qml/ApplicationSettings.qml +++ b/app/qml/ApplicationSettings.qml @@ -22,7 +22,7 @@ import QtQuick 2.2 import "utils.js" as Utils -Item{ +QtObject{ property string version: "0.9" // GENERAL SETTINGS /////////////////////////////////////////////////// @@ -76,7 +76,6 @@ Item{ property int rasterization: no_rasterization - property alias profiles_list: profileslist property int profiles_index: 0 // FONTS ////////////////////////////////////////////////////////////////// @@ -89,9 +88,7 @@ Item{ signal terminalFontChanged(string fontSource, int pixelSize, int lineSpacing, real screenScaling, real fontWidth) - Loader{ - id: fontManager - + property Loader fontManager: Loader{ states: [ State { when: rasterization == no_rasterization PropertyChanges {target: fontManager; source: "Fonts.qml" } }, @@ -146,11 +143,10 @@ Item{ // FRAMES ///////////////////////////////////////////////////////////////// property bool _frameReflections: false - property bool reflectionsAllowed: framelist.get(frames_index).reflections + property bool reflectionsAllowed: frames_list.get(frames_index).reflections property bool frameReflections: _frameReflections && reflectionsAllowed - ListModel{ - id: framelist + property ListModel frames_list: ListModel{ ListElement{text: "No frame"; source: ""; reflections: false} ListElement{text: "Simple white frame"; source: "./frames/WhiteSimpleFrame.qml"; reflections: true} ListElement{text: "Rough black frame"; source: "./frames/BlackRoughFrame.qml"; reflections: true} @@ -158,11 +154,10 @@ Item{ property string frame_source: frames_list.get(frames_index).source property int frames_index: 1 - property alias frames_list: framelist // DB STORAGE ///////////////////////////////////////////////////////////// - Storage{id: storage} + property Storage storage: Storage{ } function stringify(obj) { var replacer = function(key, val) { @@ -314,8 +309,8 @@ Item{ function composeCustomProfilesString(){ var customProfiles = [] - for(var i=0; i - http://pcaro.es/ +with Reserved Font Name Hermit. + +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/app/qml/fonts/modern-inconsolata/Inconsolata.otf b/app/qml/fonts/modern-inconsolata/Inconsolata.otf new file mode 100644 index 0000000..3488898 Binary files /dev/null and b/app/qml/fonts/modern-inconsolata/Inconsolata.otf differ diff --git a/app/qml/fonts/modern-monaco/README b/app/qml/fonts/modern-monaco/README new file mode 100644 index 0000000..4b839dd --- /dev/null +++ b/app/qml/fonts/modern-monaco/README @@ -0,0 +1,13 @@ +monaco.ttf +========== + +The original monaco.ttf improved: add some special characters (which are from "DejaVu Sans Mono") + +In my work environment, I need connect to Linux system from Windows system remotely using SecureCRT or Putty, and edit files using VIM tools. So I need one beautiful font in SecureCRT / Putty. + +In windows system, there are some original fonts are beautiful, for example "Consolas", but they can't support some special characters, for example: ▸, ↪, ⌴. Because they are original fonts in my Windows, I don't want to modify them. + +I get "Monaco" from web. It is tiny and beautiful. But it also can't support those special characters. + +So I add the characters by myself and share it. + diff --git a/app/qml/fonts/modern-monaco/monaco.ttf b/app/qml/fonts/modern-monaco/monaco.ttf new file mode 100644 index 0000000..f33c9a7 Binary files /dev/null and b/app/qml/fonts/modern-monaco/monaco.ttf differ diff --git a/app/qml/fonts/modern-pro-font-win-tweaked/._LICENSE b/app/qml/fonts/modern-pro-font-win-tweaked/._LICENSE new file mode 100644 index 0000000..89a7054 Binary files /dev/null and b/app/qml/fonts/modern-pro-font-win-tweaked/._LICENSE differ diff --git a/app/qml/fonts/modern-pro-font-win-tweaked/._readme.txt b/app/qml/fonts/modern-pro-font-win-tweaked/._readme.txt new file mode 100644 index 0000000..89a7054 Binary files /dev/null and b/app/qml/fonts/modern-pro-font-win-tweaked/._readme.txt differ diff --git a/app/qml/fonts/modern-pro-font-win-tweaked/Comments for ProFontWindows b/app/qml/fonts/modern-pro-font-win-tweaked/Comments for ProFontWindows new file mode 100644 index 0000000..66ce074 --- /dev/null +++ b/app/qml/fonts/modern-pro-font-win-tweaked/Comments for ProFontWindows @@ -0,0 +1 @@ +dopustz:-480 \ No newline at end of file diff --git a/app/qml/fonts/modern-pro-font-win-tweaked/LICENSE b/app/qml/fonts/modern-pro-font-win-tweaked/LICENSE new file mode 100644 index 0000000..dcc3f12 --- /dev/null +++ b/app/qml/fonts/modern-pro-font-win-tweaked/LICENSE @@ -0,0 +1,22 @@ +ProFont +MIT License + +Copyright (c) 2014 Carl Osterwald, Stephen C. Gilardi, Andrew Welch + +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. \ No newline at end of file diff --git a/app/qml/fonts/modern-pro-font-win-tweaked/ProFontWindows.ttf b/app/qml/fonts/modern-pro-font-win-tweaked/ProFontWindows.ttf new file mode 100644 index 0000000..b3d66b2 Binary files /dev/null and b/app/qml/fonts/modern-pro-font-win-tweaked/ProFontWindows.ttf differ diff --git a/app/qml/fonts/modern-pro-font-win-tweaked/readme.txt b/app/qml/fonts/modern-pro-font-win-tweaked/readme.txt new file mode 100644 index 0000000..76298e0 --- /dev/null +++ b/app/qml/fonts/modern-pro-font-win-tweaked/readme.txt @@ -0,0 +1,31 @@ +WHAT IS THIS? + +This is ProFont TrueType, converted to Windows TrueType format +by Mike Smith, with some tweaks added by "ardu". + +Modifications include: +- A Euro character +- Missing characters from the Latin 1 code page +- Full support for CodePage 850. These are mostly the famous + block/box characters you know from DOS. Very useful if you use + Mightnight Commander through PuTTY. +- Fixed metrics so that point size of 9 works correctly. Until now + you had to select 7 to obtain the native point size of 9. +- Added some quick&dirty hinting for point size of 9. Most characters + now match closely the look of the bitmap version. + Don't expect it to look good on anything else than Windows... + + + +To get the full original Distribution, other ProFont builds +and more information +go to + + +DISCLAIMER +See LICENSE file + + +Tobias Jung +January 2014 +profont@tobiasjung.name diff --git a/app/qml/fonts/modern-proggy-tiny/Licence.txt b/app/qml/fonts/modern-proggy-tiny/Licence.txt new file mode 100644 index 0000000..d67eb33 --- /dev/null +++ b/app/qml/fonts/modern-proggy-tiny/Licence.txt @@ -0,0 +1,7 @@ +Copyright (c) 2004, 2005 Tristan Grimmer + +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. diff --git a/app/qml/fonts/modern-proggy-tiny/ProggyTiny.ttf b/app/qml/fonts/modern-proggy-tiny/ProggyTiny.ttf new file mode 100644 index 0000000..1c4312c Binary files /dev/null and b/app/qml/fonts/modern-proggy-tiny/ProggyTiny.ttf differ diff --git a/app/qml/frames/utils/TerminalFrame.qml b/app/qml/frames/utils/TerminalFrame.qml index 14b7b96..6bd971f 100644 --- a/app/qml/frames/utils/TerminalFrame.qml +++ b/app/qml/frames/utils/TerminalFrame.qml @@ -61,6 +61,7 @@ Item{ sourceItem: frameimage hideSource: true textureSize: Qt.size(parent.width, parent.height) + sourceRect: Qt.rect(-1, -1, frameimage.width + 2, frameimage.height + 2) visible: false } ShaderEffectSource{ @@ -68,6 +69,7 @@ Item{ sourceItem: framenormals hideSource: true textureSize: Qt.size(parent.width, parent.height) + sourceRect: Qt.rect(-1, -1, framenormals.width + 2, framenormals.height + 2) visible: false } @@ -146,7 +148,7 @@ Item{ vec3 normal = normalize(txtNormal.rgb * 2.0 - 1.0); vec2 lightDirection = normalize(vec2(0.5, 0.5) - coords); - float dotProd = dot(normal, vec3(lightDirection, 0.0)) * diffuseComponent; + float dotProd = dot(normal, vec3(lightDirection, 0.0)) * diffuseComponent * txtNormal.a; vec3 darkColor = dotProd * reflectionColor.rgb; gl_FragColor = vec4(mix(darkColor, txtColor.rgb, ambient_light), dotProd); diff --git a/app/qml/main.qml b/app/qml/main.qml index a23d9e2..68ffe0a 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -82,12 +82,12 @@ ApplicationWindow{ Action{ id: copyAction text: qsTr("Copy") - shortcut: "Ctrl+Shift+C" + shortcut: Qt.platform.os === "osx" ? "Ctrl+C" : "Ctrl+Shift+C" } Action{ id: pasteAction text: qsTr("Paste") - shortcut: "Ctrl+Shift+V" + shortcut: Qt.platform.os === "osx" ? "Ctrl+V" : "Ctrl+Shift+V" } Action{ id: zoomIn @@ -115,8 +115,9 @@ ApplicationWindow{ } TerminalContainer{ id: terminalContainer + y: appSettings.showMenubar ? 0 : -2 // Workaroud to hide the margin in the menubar. width: parent.width * appSettings.window_scaling - height: parent.height * appSettings.window_scaling + height: (parent.height + Math.abs(y)) * appSettings.window_scaling transform: Scale { xScale: 1 / appSettings.window_scaling diff --git a/app/qml/resources.qrc b/app/qml/resources.qrc index ad780c5..b521f67 100644 --- a/app/qml/resources.qrc +++ b/app/qml/resources.qrc @@ -28,36 +28,14 @@ main.qml SettingsTerminalTab.qml FontScanlines.qml - fonts/1982-commodore64/C64_Pro_v1.0-STYLE.ttf - fonts/1982-commodore64/license.txt fonts/1982-commodore64/C64_Pro_Mono_v1.0-STYLE.ttf - fonts/1982-commodore64/C64_Elite_Mono_v1.0-STYLE.ttf - fonts/1982-commodore64/C64_User_Mono_v1.0-STYLE.ttf - fonts/1982-commodore64/C64_User_v1.0-STYLE.ttf - fonts/1977-apple2/FreeLicense.txt - fonts/1977-apple2/PRNumber3.ttf fonts/1977-apple2/PrintChar21.ttf - fonts/1971-ibm-3278/README.md - fonts/1971-ibm-3278/LICENSE.txt fonts/1971-ibm-3278/3270Medium.ttf fonts/1985-atari-st/AtariST8x16SystemFont.ttf - fonts/modern-terminus/TerminusTTF-Bold-4.38.2.ttf fonts/modern-terminus/TerminusTTF-4.38.2.ttf - fonts/1977-commodore-pet/FreeLicense.txt - fonts/1977-commodore-pet/COMMODORE_PET_128_2y.ttf fonts/1977-commodore-pet/COMMODORE_PET.ttf - fonts/1977-commodore-pet/COMMODORE_PET_64_2y.ttf - fonts/1977-commodore-pet/COMMODORE_PET_2y.ttf - fonts/1977-commodore-pet/COMMODORE_PET_64.ttf - fonts/1977-commodore-pet/COMMODORE_PET_128.ttf - fonts/1977-commodore-pet/COMMODORE_PET_2x.ttf - fonts/1979-atari-400-800/ReadMe.rtf fonts/1979-atari-400-800/ATARI400800_original.TTF - fonts/1979-atari-400-800/ATARI400800_squared.TTF - fonts/1979-atari-400-800/ATARI400800_rounded.TTF fonts/1985-ibm-pc-vga/Perfect DOS VGA 437 Win.ttf - fonts/1985-ibm-pc-vga/Perfect DOS VGA 437.ttf - fonts/1985-ibm-pc-vga/dos437.txt Storage.qml CRTMainMenuBar.qml SettingsPerformanceTab.qml @@ -65,5 +43,11 @@ images/crt256.png utils.js images/allNoise512.png + fonts/modern-proggy-tiny/ProggyTiny.ttf + fonts/modern-pro-font-win-tweaked/ProFontWindows.ttf + fonts/modern-monaco/monaco.ttf + fonts/modern-hermit/Hermit-medium.otf + fonts/modern-envy-code-r/Envy Code R.ttf + fonts/modern-inconsolata/Inconsolata.otf