CoolReader 3 - cross platform open source e-book reader

Related tags

App coolreader
Overview

CoolReader 3 - cross platform open source e-book reader

(c) Vadim Lopatin, 1998-2018

Development is moved to GitHub

    https://github.com/buggins/coolreader

Sourceforge repository will be used as a mirror

    git clone git://crengine.git.sourceforge.net/gitroot/crengine/crengine

Join the chat at https://gitter.im/coolreader/Lobby

LICENSE: All source codes (except thirdparty directory) are provided under the terms of GNU GPL license, version 2

Directories

    crengine   - CREngine (DOM/XML/CSS ebook rendering library) sources
    cr3gui     - CR3 with CR3GUI for e-ink devices sources
    cr3qt      - CR3 with Qt based GUI
    cr3wx      - CR3 with wxWidgets based GUI
    thirdparty - third party libraries, to use if not found in system (zlib, libpng, libjpeg, freetype, etc...)
    thirdparty_repo - repository for third party libraries deployments
    thirdparty_unman - unmanaged third party libraries
    tinydict   - small library for .dict file format support
    tools      - miscellaneous configuration files
    android    - Android frontend

External dependencies

    common: zlib, libpng, libjpeg, freetype, harfbuzz, fribidi, libunibreak, utf8proc, zstd
    cr3gui/xcb: libxcb, fontconfig
    cr3gui/nanoX: libnanoX
    cr3/Qt: fontconfig, qt5-base, qt5-tools
    cr3/wx: fontconfig, wxWidgets 3.0

e.g., for Ubuntu you may use

    $ sudo apt install build-essential git cmake curl pkg-config zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev libunibreak-dev libzstd-dev libutf8proc-dev

To build Qt frontend:

    $ sudo apt install qtbase5-dev qttools5-dev

To build wxWidgets frontend:

    $ sudo apt install libwxgtk3.0-gtk3-dev

Packaging

Debian based packages included to project:

    packages/ubuntu -- debian package for Ubuntu, with Qt frontend
    packages/openinkpot -- debian package for OpenInkpot, with XCB frontend

To build debian package, copy one of package descriptions from packages directory:

    cp -r packages/ubuntu/debian debian
    Then, package can be built using `debuild` command.

Android Build Instructions

  • Deploy/update third party libraries: in terminal call script thirdparty-deploy.sh

In Windows can be used git bash terminal

    $ ./thirdparty-deploy.sh
  • Use Android Studio - open subdirectory "android" as Android Studio project

Ensure that you have Android SDK and NDK installed

CMake Build Instructions (Linux)

In case the installed libraries are outdated, run the thirdparty-deploy.sh script to download libraries sources of the recommended versions. In this case, the build system will build static libraries that were not found in the system.

    $ ./thirdparty-deploy.sh

Building Qt version (qtbase5-dev, qttools5-dev should be installed)

    mkdir qtbuild
    cd qtbuild
    cmake -D GUI=QT5 -D CMAKE_BUILD_TYPE=Release -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1400000 -D CMAKE_INSTALL_PREFIX=/usr ..
    make
    sudo make install

Building Qt version, in DEBUG mode

    mkdir qtbuild
    cd qtbuild
    cmake -D GUI=QT5 -D CMAKE_BUILD_TYPE=Debug -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1400000 -D CMAKE_INSTALL_PREFIX=/usr ..
    make
    sudo make install

Building wxWidgets version (libwxgtk3.0-gtk3-dev should be installed)

    mkdir wxbuild
    cd wxbuild
    cmake -D GUI=WX -D CMAKE_BUILD_TYPE=Release -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1400000 -D CMAKE_INSTALL_PREFIX=/usr ..
    make

Qt Build under Windows (Using MSYS2)

Run "MSYS2 MSYS" from start menu

    $ pacman -Sy
    $ pacman -Su

Run "MSYS2 MSYS" from Start menu again.
Update the rest of the base packages:

    $ pacman -Su
  • Install build tools & dependencies:

Run "MSYS2 MSYS" from start menu.
Using pacman package manager install required packages:

    $ pacman -S --needed base-devel mingw-w64-x86_64-toolchain
    $ pacman -S git curl
    $ pacman -S mingw-w64-x86_64-cmake mingw-w64-x86_64-pkgconf mingw-w64-x86_64-zlib mingw-w64-x86_64-libpng mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-freetype mingw-w64-x86_64-fontconfig mingw-w64-x86_64-harfbuzz mingw-w64-x86_64-fribidi mingw-w64-x86_64-zstd

    To build Qt frontend:

    $ pacman -S mingw-w64-x86_64-qt5
  • Prepare:

Run "MSYS2 MinGW 64-bit" from start menu

    $ git clone https://github.com/buggins/coolreader.git
    $ cd coolreader

Since package libunibreak not exists in MSYS2, we must build static version of this library, to do this, we need to call the script thirdparty-deploy.sh to download sources:

    $ ./thirdparty-deploy.sh

Build system will build static libraries that were not found in the system.

  • Compile:

Now we can build program:

    $ mkdir qtbuild
    $ cd qtbuild
    $ cmake -G "MSYS Makefiles" -D CMAKE_BUILD_TYPE=Release -D GUI=QT5 -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1400000 -D CMAKE_INSTALL_PREFIX=dist ..
    $ make
    $ make install

Now in qtbuild/dist directory we have CoolReader binary & data.
To add Qt runtime libraries, call:

    $ cd dist
    $ windeployqt --compiler-runtime --no-webkit2 --no-angle --no-opengl-sw --no-quick-import .

To add thirdparty runtime libraries, call:

    $ cp -pv /mingw64/bin/{libfontconfig-1.dll,libexpat-1.dll,libfreetype-6.dll,libbz2-1.dll,libbrotlidec.dll,libbrotlicommon.dll,libharfbuzz-0.dll,libglib-2.0-0.dll,libintl-8.dll,libiconv-2.dll,libpcre-1.dll,libgraphite2.dll,libpng16-16.dll,zlib1.dll,libfribidi-0.dll,libjpeg-8.dll,libutf8proc.dll,libzstd.dll,libdouble-conversion.dll,libicuin68.dll,libicuuc68.dll,libicudt68.dll,libpcre2-16-0.dll} .

After updating any library in MSYS 2, this list may need to be corrected. If after that the program does not start with an error about the missing dll, then you need to copy this library from /mingw64/bin/ to qtbuild/dist.

Qt Build under Windows (Using Qt SDK, obsolete)

Using Qt SDK

Environment setup:

  • Download and install Qt SDK, git, cmake, msys
  • Copy contents of git and cmake dirs to QT/mingw/
  • Copy make.exe from msys/bin to QT/mingw/bin

Run Qt SDK / Qt Command Prompt. Execute:

make > make install cmake -D GUI=QT -D CMAKE_BUILD_TYPE=Release -G "Visual Studio 9 2008" -D USE_QT_ZLIB=1 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1500000 -D CMAKE_INSTALL_PREFIX=dist .. cmake -D GUI=QT -D CMAKE_BUILD_TYPE=Release -G "Visual Studio 10" -D USE_QT_ZLIB=1 -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1500000 -D CMAKE_INSTALL_PREFIX=dist ..">
    > sh
    > git clone https://github.com/buggins/coolreader.git
    > cd coolreader
    > mkdir qtbuild
    > cd qtbuild
    > cmake -D GUI=QT -D CMAKE_BUILD_TYPE=Release -G "MSYS Makefiles" -D USE_QT_ZLIB=1 -D CMAKE_INSTALL_PREFIX=dist ..
    > make
    > make install

    cmake -D GUI=QT -D CMAKE_BUILD_TYPE=Release -G "Visual Studio 9 2008" -D USE_QT_ZLIB=1 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1500000 -D CMAKE_INSTALL_PREFIX=dist ..
    cmake -D GUI=QT -D CMAKE_BUILD_TYPE=Release -G "Visual Studio 10" -D USE_QT_ZLIB=1  -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1500000 -D CMAKE_INSTALL_PREFIX=dist ..

to disable console, use /SUBSYSTEM:WINDOWS linker option instead of /SUBSYSTEM:CONSOLE

For Qt5, use GUI=QT5 instead of GUI=QT

For building Qt5 app from QtCreator remove -G (generator) parameter:

Release build:

	-D GUI=QT5 -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dist ..

Debug build:

	-D GUI=QT5 -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=dist ..

It will put built cr3.exe and all necessary distribution files to directory qtbuild/dist.

You need also add following DLLs to this directory in order to get cr3.exe working:

    - mingwm10.dll
    - QtCore4.dll
    - QtGui4.dll
    - libz.dll

CMake Build Instructions (obsolete)

    # Building ARM version on OpenInkpot:
    mkdir armbuild
    cd armbuild
    cmake -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-oi.cmake -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Release -D GUI=CRGUI_XCB -D USE_EXTERNAL_EDICT_DICTIONARY=1 ..
    make

    # Building i386 version, Qt backend V3 simulation:
    mkdir qt-v3
    cd qt-v3
    cmake -D DEVICE_NAME=v3 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Debug -D USE_STATIC_ZLIB=1 -Wdev -D ENABLE_ANTIWORD=1 -D CMAKE_INSTALL_PREFIX=dest -D GUI=CRGUI_QT -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x500000 ..
    make

    # Building i386 version (for OpenInkpot), V3 simulation:
    mkdir xcb-v3
    cd xcb-v3
    cmake -D DEVICE_NAME=v3 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Debug -D USE_STATIC_ZLIB=1 -Wdev -D ENABLE_ANTIWORD=1 -D CMAKE_INSTALL_PREFIX=/usr -D GUI=CRGUI_XCB -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x500000 ..
    make

    # Building i386 version (for OpenInkpot), n516/azbooka simulation:
    mkdir xcb-n516
    cd xcb-n516
    cmake -D DEVICE_NAME=n516 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Debug  -D CMAKE_INSTALL_PREFIX=/usr -D GUI=CRGUI_XCB ..
    make

    # Building Jinke/LBook V3 viewer plugin (libfb2.so):
    mkdir v3build
    cd v3build
    mkdir dest
    cmake -D DEVICE_NAME=v3 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-v3.cmake -D GUI=CRGUI_JINKE_PLUGIN -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest ..
    make

    # Building Jinke/LBook V3 viewer plugin (libfb2.so), new SDK:
    mkdir v3build
    cd v3build
    mkdir dest
    cmake -D DEVICE_NAME=v3 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-linux-gnueabi.cmake -D GUI=CRGUI_JINKE_PLUGIN -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest ..
    make

    # Building Jinke/LBook V3 fb2props plugin for Bookshelf (libfb2props.so) i386:
    mkdir fb2props386
    cd fb2props386
    mkdir dest
    cmake -D GUI=FB2PROPS -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=dest ..
    make

    # Building Jinke/LBook V3 fb2props plugin for Bookshelf (libfb2props.so):
    mkdir v3fb2propsbuild
    cd v3fb2propsbuild
    mkdir dest
    cmake -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-v3.cmake -D GUI=FB2PROPS -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest ..
    make

    # Building Jinke/LBook V3 fb2props plugin for Bookshelf NEW SDK (libfb2props.so):
    mkdir v3newfb2propsbuild
    cd v3newfb2propsbuild
    mkdir dest
    cmake -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-linux-gnueabi.cmake -D GUI=FB2PROPS -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest ..
    make

    # Building Jinke/LBook V3 new SDK viewer app (cr3):
    mkdir v3app
    cd v3app
    #cmake -D DEVICE_NAME=v3 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-linux-gnueabi.cmake -D MAX_IMAGE_SCALE_MUL=2 -D GUI=CRGUI_NANOX -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x500000 -D BIG_PAGE_MARGINS=1 ..
    cmake -D DEVICE_NAME=v3 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-linux-gnueabi.cmake -D MAX_IMAGE_SCALE_MUL=2 -D GUI=CRGUI_NANOX -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x500000 ..
    make

    # Building Jinke/LBook V5 viewer app (cr3):
    mkdir v5build
    cd v5build
    cmake -D DEVICE_NAME=v5 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-v5.cmake -D GUI=CRGUI_NANOX -D GRAY_BACKBUFFER_BITS=3 -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x580000 ..
    #cmake -D DEVICE_NAME=v5 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-v5.cmake -D GUI=CRGUI_NANOX -D GRAY_BACKBUFFER_BITS=3 -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest ..

    make

    # Building Jinke/LBook V3+ viewer app (cr3):
    mkdir v3abuild
    cd v3abuild
    cmake -D DEVICE_NAME=v3a -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-v5.cmake -D GUI=CRGUI_NANOX -D CR3_PNG=1 -D CR3_JPEG=1 -D CR3_FREETYPE=1 -D GRAY_BACKBUFFER_BITS=4 -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest -D RAM_COMPRESSED_BUFFER_ENABLED=0 -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x1000000 ..
    make

    # Building ARM version for PocketBook:
    mkdir pb360
    cd pb360
    cmake -D DEVICE_NAME=pb360 -D CMAKE_INSTALL_PREFIX=/usr/local/pocketbook/mnt/ext1 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-pocketbook.cmake -D CMAKE_CXX_FLAGS_RELEASE:STRING="-fomit-frame-pointer -O1" -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Release -D GUI=CRGUI_PB -D ENABLE_CHM=1 -D ENABLE_ANTIWORD=1 ..
    make

    # Building ARM version for PocketBook Pro
    mkdir pbPro
    cd pbPro
    cmake -D DEVICE_NAME=pb360 -D CMAKE_INSTALL_PREFIX=/usr/local/pocketbook/mnt/ext1 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-gnu-eabi-pocketbook.cmake -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Release -D ENABLE_CHM=1 -D ENABLE_ANTIWORD=1 -D GUI=CRGUI_PB -D POCKETBOOK_PRO=1 ..

    # Building Jinke/LBook V3+ simulator for Win32 (cr3):
    mkdir v3win32
    cd v3win32
    cmake -D DEVICE_NAME=v3a -G "Visual Studio 10" -D MAX_IMAGE_SCALE_MUL=2 -D GUI=CRGUI_WIN32 -D GRAY_BACKBUFFER_BITS=4 -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x800000 ..
    make

Qt Build under Mac OSX (obsolete)

    #configure and make Qt as static libraries
    #Inside Qt source root:
    ./configure -prefix /Developer/Qt -opensource -static -release -arch x86 -arch x86_64 \
    -no-accessibility -no-stl -no-qt3support -qt-zlib -no-gif -no-libtiff -qt-libpng -qt-freetype -no-libmng -qt-libjpeg -no-nis -no-cups -no-iconv -no-pch -no-dbus -no-opengl -no-fontconfig \
    -no-xmlpatterns -no-multimedia -no-phonon -no-phonon-backend -no-audio-backend -no-openssl \
    -no-gtkstyle -no-svg -no-webkit -no-javascript-jit -no-script -no-scripttools -no-declarative 
    #make Core and GUI libraries
    make sub-src
    #make symlinks from `pad` to /Developer/Qt for bin, include, lib, src dirs

    #inside cr3 directory
    #configure using cmake
    mkdir macbuild
    cd macbuild
    cmake -G "Unix Makefiles" -D GUI=QT -D CMAKE_OSX_ARCHITECTURES="i386 x86_64" -D QT_QMAKE_EXECUTABLE=/Developer/Qt/bin/qmake -D CMAKE_BUILD_TYPE=Release -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1400000 -D CMAKE_INSTALL_PREFIX=cr3.app ..
    make
    make install
Comments
  • Font weight

    Font weight

    • When registering fonts, the font weight is determined by the style name. Previously, without this, some font variants were discarded as duplicates.
    • The software one-position embolding of the font in the absence of a bold version is replaced with multi-step change of the font weight. Also implemented compensation for under/over-width characters when setting fake/synthetic font weight. Document property 'PROP_FONT_BASE_WEIGHT' (font.face.base.weight) replaces 'PROP_FONT_WEIGHT_EMBOLDEN' (font.face.weight.embolden). Document command 'DCMD_SET_BASE_FONT_WEIGHT' replaces 'DCMD_TOGGLE_BOLD'.
    • Desktop/Qt5: frontend updated to be able to change font weight in settings.
    • Android: frontend updated to be able to change font weight in settings.

    Screenshots: Font 'Noto Serif' full set of weights: NotoSerif-main-s NotoSerif-weights-s

    Font 'Coming Soon' (only Regular): ComingSoon-main-s ComingSoon-weights-s

    Book view with 'Coming Soon' regular: ComingSoon-rv-Regular

    Book view with 'Coming Soon' ExtraBold (fake/synthetic): ComingSoon-rv-ExtraBold(synth)

    Updated (20200330): added screenshots of synthetic weight for some arabic/hebrew text: NotoSans + NotoSans Arabic UI Regular: NotoSansArabicUI Regular NotoSansArabicUI Regular-2 NotoSans + NotoSans Arabic UI Black (real): NotoSansArabicUI Black (real) NotoSansArabicUI Black (real)-2 NotoSans + NotoSans Arabic UI Black (both synth): NotoSansArabicUI Black (synth) NotoSansArabicUI Black (synth)-2 NotoSans Arabic UI Black (real) in Chromium: NotoSansArabicUI (real, chromium)

    opened by virxkane 137
  • License collision

    License collision

    I recently discovered collision in the license for the CoolReader source code, which seems to violate the project's license. Examining the README.md file, we see that the license is "GPLv2 only". But in most source files, the comment header says:

                    CoolReader Engine
    
            (c) Vadim Lopatin, 2000-2009
    
            This source code is distributed under the terms of
            GNU General Public License.
            See LICENSE file for details.
    

    The LICENSE file was missing and only appeared in PR #205. The LICENSE file contains the text of the GPLv2 license. According to section 9 of GPLv2: "If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation." But the README.md file clearly says "All source codes (except thirdparty directory) are provided under the terms of GNU GPL license, version 2", i.e. "GPLv2 only". The essence of the collision: according by several source files - they can be used under the terms of GPLv1, GPLv2, GPLv3 and, in the future, newer, but the README file limits us to version 2, and in some files there is no information about the license used at all. For CoolReader, this matters because the Android framework libraries are used (which theoretically can be considered as system libraries, which is allowed https://www.gnu.org/licenses/gpl-faq.html#SystemLibraryException) and until recently used the Android JetPack libraries (or rather AndroidX), distributed under the terms of the Apache-2.0 license, which are not GPLv2 compliant but GPLv3 compliant, and if you focus on the README file, then it turns out they cannot be used. The code using the AndroidX library was added in PR #177 and removed in PR #336, but using this approach is unproductive and, in my opinion, unacceptable, instead of implementing some functionality in the most convenient way, we have to look for some workarounds, just not to use the code under the Apache 2.0 license. Reminds me of a fighting with windmills. For the KOReader project, this also matters, since the KOReader license (AGPLv3) is incompatible with the license of the used crengine library (a fork of CoolReader, presumably GPLv2 only), and according to the explanation of a single combined program https://www.gnu.org/licenses/gpl-faq.html#GPLPlugins licenses must be compatible.

    I requested advice from the FSF by sending an email to [email protected], below is the response without any corrections or cuts:

    from: Yoni Rabkin via RT [email protected] Date: 19 июн. 2022 г., 16:47 Subject: [gnu.org #1845021] Re: license question about CoolReader program

    Hello and thank you for writing in.

    Hello! Please give an explanation about the compatibility of licenses.

    There is a CoolReader program, its repository is located at  https://github.com/buggins/coolreader/ , it is present in the Google Play app store, F-Droid directory, in some Linux distributions, for example, Fedora, Gentoo Linux.

    At the moment, the version for Android is quite popular, but, unfortunately, it is not currently being developed.

    According to the README.md file, the GPLv2 license is used. In most source files, the comment header says the following:

    CoolReader Engine

    (c) Vadim Lopatin, 2000-2009

    This source code is distributed under the terms of GNU General Public License. See LICENSE file for details.

    The LICENSE file contains the text of the GPLv2 license.

    As I understood from the clarifications on the gnu.org website, without specifying the license version, any version of your choice is implied, i.e.  and version 2 and version 3. In addition, the license is specified differently in the two header files:

        This program is free software; you can redistribute it and/or modify     it under the terms of the GNU General Public License as published by     the Free Software Foundation; either version 2 of the License, or     (at your option) any later version.

    And some files say nothing at all about the license used.

    Which project file has higher priority when specifying a license, README or source files and, accordingly, what kind of license does this project have "GPLv2 only" or "GPLv2 or later"? (1)

    Ultimately, only the copyright holder can answer as to what they meant when they licensed the work in this way. There may be some reasoning behind it; we can't say.

    The Android version uses the Android framework libraries under the Apache 2.0 license, which is not compatible with GPLv2, but is compatible with GPLv3, GPLv3, in turn, is not compatible with GPLv2. However, I believe that these libraries are system libraries and their use in a program under the GPLv2 license is allowed:  https://www.gnu.org/licenses/gpl-faq.html#SystemLibraryException

    I haven't examined the Android libraries in question and cannot say if they would be considered system libraries. One criteria you can examine is if the libraries in question are normally distributed with the Android system and are used to enable use of the system.

    It is also possible that the CoolReader program has had incompatible licensing all this time.

    One way of working around this particular issue would be for the copyright holder to add an exception for the Apache 2.0 licensed materials: http://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs

    Currently, Android application development usually involves the use of Android JetPack libraries under the Apache 2.0 license (Google developer). Mainly used by AndroidX https://developer.android.com/jetpack/androidx

    At the same time, the AndroidX library is not a system library, therefore, it cannot be used in this project.

    Is it so? (2)

    This may be the case, yes. But as above, it is possible that through carelessness the copyright holders of the work have created a bit of a licensing mess.

    Are there any options for using the CoolReader sources under the GPLv3 license? (3)

    At least partially, yes, but there may be parts which would require work. Those parts that have clear license headers can be upgraded. Those parts which do not specify a GPL version can be upgraded as well.

    Parts that have no licensing information require clarification; we don't know if they are under a free software license of any kind.

    If they are not, then the question arises of changing the license from GPLv2 to GPLv3.

    In this regard, I contacted the main developer of CoolReader Vadim Lopatin < [email protected]> with a request to upgrade the license to GPLv3, to which he asked if agreement with all contributors was required. And it seems, according to the license, it is required. The program is many years old, many developers have ceased their participation, I do not have their contacts, the original developer has also ceased development and is unlikely to be interested in finding former contributors. I am more than sure that some contributors are simply not to be found.

    The main developer can at least give you authorization to upgrade those parts of the work for which they are the copyright holder. This can be as simple as them adding proper copyright notices and GPLv3 license headers to the files for which they hold the rights, and giving you a copy.

    If there is code in the project with unclear provenance, or for which you are unsure of the license, then you cannot distribute that code with any confidence. I would recommend trying to clear up the situation for that code.

    Is it possible to limit the number of developers with whom you need to agree on a license change based on the clarification of a small contribution? (4)

    See https://www.gnu.org/licenses/gpl-faq.ru.html#WhatIfWorkIsShort

    That is a matter of legal advice, and we cannot provide that.

    If in doubt, you would need to remove that code and re-implement it independently.

    How should the procedure for replacing the license of a non-commercial open source application from GPLv2 to GPLv3 go? (5)

    In what form is an agreement from developers required to change a license, in electronic form, in paper form, what type of signature is required? (6)

    If, hypothetically, the consent of all contributors is obtained, is it required to publish any supporting documents before changing the license? Is it enough to point in the README that the contributors have agreed to change the license? (7)

    These developers supposedly sent in patches under GPLv2, and no paperwork signatures were required back then; so none would be needed now. All that is needed is for them to send in a patch of the code for which they hold the copyright with GPLv3 headers instead of GPLv2. Or with GPLv2 headers with a clear "or later" statement.

    Please note that it is not beyond possibility that through carelessness and negligence in licensing the original developers have doomed the project. Hopefully, you can at least salvage some of the software.

    I hope this is of help.

    -- I am not a lawyer, the above is not legal advice

       Regards, Yoni Rabkin

    from: Yoni Rabkin via RT [email protected] Date: Mon, 20 Jun 2022 09:31:31 -0400 Subject: [gnu.org #1845021] Re: license question about CoolReader program

    To do this, I plan to create a discussion (issue) in the project repository on github, can I post your answer?

    Please feel free to post my answer publicly. I only ask that you do so in full and verbatim so that the entire context of my responses is clear.

    It's also not very clear to me what to do with files whose author is the main developer, who indicated the GPL license without a version in the file header

    I understand that you have some contact with the main developer. I would therefore recommend clarifying with the main developer/copyright holder that wherever they had placed a license header without a version, that it should be replaced with a standard GPL license header which includes the version and with the "or later" clause (which is standard practice.)

    You can point out to them that as per section 9 of GPLv2: "If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation."

    But of course doing this in coordination with the copyright holder is always better than doing it independently.

    and which were extended by contributors. Basically, they did not change the file headers in any way, i.e. they did not indicate > their copyright and the author of the edits can only be found in the git history. What should they add to the header of the file?

    If they contributed to a file which was clearly marked as under the GPL (regardless of version) then they could only have license their contribution under the GPL or a GPL-compatible license. Anything else would risk being if violation of the GPL if they were to distribute the GPL'd work with GPL-incompatible modifications. So unless they intended to violate the GPL, their contributions would have to have been under compatible terms.

    However, if nobody recorded their the license or copyright notices then you will have to start reconstructing the licensing of the project in retrospect.

    Each contributor should have a copyright notice. These copyright notices are ideally placed at the top of the file modified. However, they can also be concentrated in a single file, such as an "AUTHORS" file. Each of the copyright notices would take the form of:

    "Copyright (C) 2017, 2019 Man McGent [email protected]"

    An email is optional, but helpful for reasons which should now be obvious to you.

    If they contributed under the GPL, then no change needs to be made for the license header; it will still be the standard GPL license header as shown at the bottom of the GPL license text in the section "How to Apply These Terms to Your New Programs"

    If they contributed under a GPL-compatible license, then you would add that license information:

    "Copyright (C) 2017, 2019 Man McGent under the Expat license, see LICENSE.EXPAT"

    The goal being that each file will contain all of the information needed so that people will be able to know who is the copyright holder of that material, and under which license they can enjoy the work.

    P.S. I am also the maintainer of software which belongs to the GNU project. When I inherited the maintainership of the project, the licensing situation was similar to the one you describe above (which is to say, bad). It took me over a year to contact people, clarify the licensing, and re-write "orphan" parts, but I did it in the end and the project is now alive and well. I say this in order to strengthen your resolve, and to say that I understand the magnitude of the problem.

    -- I am not a lawyer, the above is not legal advice

    Regards, Yoni Rabkin

    If I understand correctly, in order to eliminate this collision and ambiguities about the license used, we need to perform one of the options: 1. check with the main developer what exactly was meant by the phrases «This source code is distributed under the terms of GNU General Public License. See LICENSE file for details» и «All source codes (except thirdparty directory) are provided under the terms of GNU GPL license, version 2», whether inadvertently limited the GPL version to v2 only or is this explicit restriction; 1.1. If the author meant GPLv2 or later, then it is necessary to agree with all copyright holders, i.e. with all co-authors, whether they agree with such an interpretation, i.e. with the fact that their work will be used under the terms of the GPLv3 or later license, since they could be misleading due to a non-standard indication of the license used; 1.2. If the author meant GPLv2 only, then find out from the author whether it is against changing the wording to GPLv2 or later, and also coordinate this change with all copyright holders, since they could be misled due to a non-standard indication of the license used; 1.3. In all cases, if the response from the copyright holder/co-author is not received or it is negative, it is necessary to delete the corresponding code and rewrite it from scratch. 2. Update license statement to GPLv3 or later. This is the cleanest use case for Apache 2.0 licensed code/libraries. It is necessary to agree with all copyright holders/co-authors, if the response from the copyright holder/co-author is not received or it is negative, it is necessary to delete the corresponding code and rewrite it from scratch. 3. (useless option) copyright holders add exception for licensed Apache 2.0 material: http://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs. It is also necessary to agree with all copyright holders/co-authors, if the response from the copyright holder/co-author is not received or it is negative, it is necessary to delete the corresponding code and rewrite it from scratch. In terms of the amount of work, all these options are equal, so the 3rd option is of little use, since it gives very little benefit.

    In addition, we need to do the following: • Identify all copyright holders/co-authors from the git history and patch authors in the previous project repository https://sourceforge.net/projects/crengine/ and create a file with the list of authors; • Since the FSF recommends placing copyright information in the header of source files, reconstruct this licensing information in retrospect.

    I understand that in this case the license is violated absolutely symbolically, not by malicious intent, but as a result of a careless indication of the project license and the violation is rather minor, I believe that the spirit of the license is not violated, it's just a collision. But after discovering this situation, realizing the illegitimacy of the license, the senselessness of working on the project is felt.

    If I am mistaken and CoolReader sources can be used under the terms of the GPLv3 license without taking any additional steps, please clarify it.

    The opinion of the community, including KOReader, is interesting.

    I suggest that all CoolReader co-authors present on github choose an option by leaving a comment: 1. Set project license to clearly GPLv2 or later; 2. Update project license to GPLv3 or later; 3. Add an exception for the Apache 2.0 licensed materials; 4. Do nothing, leave everything as it is. Then try to get opinions from patch authors not present on github, for example, patches posted on sourceforge https://sourceforge.net/p/crengine/patches/search/?q=status%3Awont-fix+or+status%3Aclosed-fixed+or+status%3Aclosed, find out if there were other patch sources (seems impossible), choose the most popular answer. Take further actions based on the results of the vote. Pinging @buggins, @pkb, @avnik, @S-trace, @ourairquality, @EXL, @Frenzie, @poire-z, @pazos.

    Voting results: https://github.com/buggins/coolreader/issues/338#issuecomment-1164266957

    opened by virxkane 60
  • Merged with KOReader fork of crengine

    Merged with KOReader fork of crengine

    This PR should close #91. It includes a lot of enhancements in css processing, thanks to koreader devs and especially to poire-z for work on crengine.

    It wasn't that easy to merge, in case of conflicts I mostly accepted their side. Except for kerning mode setting, We handle it differently - we use a combination of new setting "Text shaping mode" and the old Kerning enable/disable.

    They have added qimagescale from QT, I moved it to thirdpatrty folder. I also added nanosvg library to the thirdparty folder, harfbuzz I updated to 2.6.4 version.

    Note: this change is not yet ready for Android, @virxkane will create a separate request for it.

    opened by pkb 60
  • Distinct list circle and disc characters

    Distinct list circle and disc characters

    The source included commented out distinct list circle and disc characters which this PR enables. It had been using the same characters for both, and a different character. Could this be revisited now so that there are distinct circle and disc list labels available? Was there are lack of support in the fonts, or was it a presentation decision?

    opened by ourairquality 25
  • Request: a build flavor without GMS

    Request: a build flavor without GMS

    Coolreader updates on F-droid are blocked caused by the recent inclusion of Google services. If I understand correctly they were added to support GDrive sync.

    I would like to solve this but I'm not sure if upstream is wishing to spend time on reviewing this. Ideally it would be a couple of folders under android/app/src. Lets call them gplay and fdroid. Within each folder a new class with the same package name and same class name.

    That class would be the one that implements methods that rely on GMS within the program. This for the gplay flavor. The Fdroid flavor would include empty methods. Both classes should contain a boolean method called something like isSupported which returns true on the former and false on the later.

    The changes needed on the common code would be checking that method response and invoke the specific method needed for a functionality. Something like:

    if (gms.isSupported()) {
        gms.doSomething(params)
    }
    

    And include gms as a depency only on gplayimplementation

    The other alternative would be to fork the project and remove GMS in the fork. That would be easier to implement but harder to keep updated. Pinging @virxkane

    opened by pazos 20
  • Updates 2020.08-1

    Updates 2020.08-1

    • Fixed fb2 coverpage drawing in scroll mode (continuous) with enhanced render.
    • Android: use fast (not precise) mode for functions LVDocView::getBookmark() only for page turn & text scroll.
    • Optimized calculation of average animation duration.
    • Android: fixed scrolling of text around start and end of a book in scrolling mode.
    • Improved methods for selecting next/previous sentence when using "***" paragraph separators. In fact, this is a continuation of PR #144, i.e. restoration of old functionality.
    • Legacy rendering mode: display block elements that are inside inline elements as block elements.
    • Trying to update the structure of a database that has been modified by some kind of uncoordinated fork of the program.
    • Forced update the DOM level in database from previous newest to latest newest.

    Updates from KOReader:

    • New HTML parser, libRu and FB2 tweaks https://github.com/koreader/crengine/pull/370
    opened by virxkane 19
  • HTML: emit img alt text in text selections and read-aloud

    HTML: emit img alt text in text selections and read-aloud

    This is adequate to get the text selection returning the img alt text, and that works with the Read-Aloud feature where it can be very useful.

    Seems a bit of a hack, adding a child text element to an img element, but when you consider that the ::before and ::after pseudo elements can be used on the img element and are already added as child elements, and that these are to be emitted around the alt text, this approach is much simpler than having all the users include special cases to emit the alt text out of order with the pseudo elements (I tried that first and it was a big change that I never completed!)

    This PR plays well with a WIP patch to get the pseudo elements emitted in text selection and thus for Read-Aloud.

    If people have other suggestions then help would be appreciated?

    opened by ourairquality 15
  • Blurry font rendering on a high DPI display

    Blurry font rendering on a high DPI display

    With the Qt version of the app on a high DPI display the text in the book's canvas is blurry, not rendered properly. App version: 3.2.57-1 O/S: Manjaro Linux Global scaling factor: 2

    How it looks compared to unscaled (bottom): Screenshot_20210524_162930 Screenshot_20210524_163117

    opened by efermi 14
  • Don't render 'WORD JOINER' character if no such glyph

    Don't render 'WORD JOINER' character if no such glyph

    • Fix index out of range in lString32::pos(lChar32) introduced in cc51fc6ff1336bc87ebaf146ee04b18207331d4a
    • Do not render the Unicode character 'WORD JOINER' (U + 2060) as a replacement character if the font does not have a corresponding glyph for it in SHAPING_MODE_HARFBUZZ_LIGHT and SHAPING_MODE_FREETYPE shaping modes. Otherwise, it results in a question mark appearing in footnote number. This symbol is embedded in the text after the d2369334b610f75504bc80cc0697cc19314710f0 commit. See https://github.com/koreader/crengine/pull/385, https://github.com/koreader/koreader/issues/6718#issuecomment-699600019 Screenshot_20201122_163648-m
    opened by virxkane 14
  • docx and FB3 formats support (for QT only)

    docx and FB3 formats support (for QT only)

    FB3 support

    • See #105 for details

    WordML (docx) support

    The following features are supported

    • Basic formatting (bold,italic,underline,strike-through,subscript,superscript)
    • Paragraph alignment
    • Images (formats supported by crengine. i.e. no emf,wmf)
    • Partially lists and tables
    • Links, footnotes and endnotes
    opened by pkb 13
  • FB3 format basic support (for QT only)

    FB3 format basic support (for QT only)

    Open issues

    • Advanced FB3 features such as SVG images, float property, extended description etc are not supported
    • fb2.css was used for fb3 as is, probably some tweaks will be required for FB3
    • Not much tested, https://github.com/gribuser/FB3/blob/master/Examples/Hardcore%20file%20structure.fb3 can't be opened.
    • images having names like '%D0%BA%D0%BB%D0%B5%D1%82%D0%BA%D0%B0.jpg' in Anathomy tutorial example.fb3 also can't be opened (getObjectImageRefName() calls DecodeHTMLUrlString() which converts these %* chars, as a result the file can't be found in a zip file, not sure how to handle this caseproperly
    opened by pkb 13
  • read aloud TTS implemented in Windows version???

    read aloud TTS implemented in Windows version???

    Hi friends ,compiled version 3.2.58-1, I can’t find the TTS function, this exists in the windows version?Build under Windows (Using MSYS2),during installation, many libraries were not loaded from Yandex due to geo-blocking. Maybe because of this there is no TTS?

    opened by kurttu4 1
  • Coolreader has it been abandoned

    Coolreader has it been abandoned

    @virxkane @buggins

    Hi it seems Buggins has disappeared and coolreader abandoned, I know @virxkane does not have access to produce compatible apk but I hope someone can create a github action to make apk so that people can merge commits and create their own apks till or if coolreader is ever revived.

    opened by Dnkhatri 3
  • Dutch translation

    Dutch translation

    I love coolreader. However, the Dutch (not German) translation has many errors. I would love to correct them. Please kindly provide the translation file, so I can provide proper translation. I'm unable to find the translation file, despite coolreader menu is able to show Dutch.

    opened by AlexJacobs1977 5
Releases(cr3.2.58)
Owner
Vadim Lopatin
Vadim Lopatin
Flym News Reader is a light Android feed reader (RSS/Atom)

BEWARE: Google added some restrictions to news app and I don't see how Flym (and other RSS aggregators) could comply to that. For instance, Flym canno

Frédéric Julian 938 Jan 1, 2023
Flym News Reader is a light Android feed reader (RSS/Atom)

BEWARE: Google added some restrictions to news app and I don't see how Flym (and other RSS aggregators) could comply to that. For instance, Flym canno

Frédéric Julian 938 Jan 1, 2023
Flym News Reader is a light Android feed reader (RSS/Atom)

BEWARE: The original developer stopped the development of the app so I'm starting to work on it to improve it and maintain it. Flym News Reader Light

null 0 Jul 26, 2022
Free and open source manga reader for Android.

Build Stable Weekly Preview Contribute Support Server Tachiyomi Tachiyomi is a free and open source manga reader for Android 5.0 and above. Features F

Tachiyomi 20.4k Jan 9, 2023
Tachiyomi 20.4k Jan 9, 2023
A Free, Open source unofficial manga reader for MangaDex

Neko A Free, Open source unofficial manga reader for MangaDex About: This is a MangaDex specific fork of Tachiyomi and TachiyomiJ2K. This contains fea

Carlos 1.4k Jan 3, 2023
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

Ionic Ionic is an open source app development toolkit for building modern, fast, top-quality cross-platform native and Progressive Web Apps from a sin

Ionic 48.4k Jan 3, 2023
Tonomy ID is the cross-platform mobile wallet (Android and iOS) for public and private EOSIO blockchains

Tonomy ID is the cross-platform mobile wallet (Android and iOS) for public and private EOSIO blockchains. This application allows you to sign transactions on the block chain, share your DID and Verifiable Credentials containing your identity with others in a consensual way and log into web2 and web3 applications. If you lose your phone several mechanisms exist to allow you to recover your account without trusting anyone with custody of your private keys.

null 7 Dec 24, 2022
A Kotlin binding to webview, a tiny cross-platform webview library, supports Java and Native.

webviewko provides a Kotlin/JVM and a Kotlin/Native(experimental) binding to webview, a tiny cross-platform webview library to build modern cross-platform GUIs using WebView2, WebKit and WebKitGTK.

Winterreisender 17 Dec 30, 2022
An easy, cross-platform method of keeping track of other people's timezones

TimezoneDB TimezoneDB is an easy, cross-platform method of keeping track of others' timezones. This project is inspired by PronounDB, and we'd like to

Synapse Technologies, LLC 13 Nov 16, 2022
An Android app that lets you download free children's books in different languages from non-profit publisher Book Dash

Bookdash Android Check out the blog post here: http://riggaroo.co.za/book-dash-android-app/ Download the app: https://play.google.com/store/apps/detai

Book Dash 684 Jan 8, 2023
Companion App for the book

Kotlin for Android Developers (the book) This is the code you can use to follow the book. https://antonioleiva.com/kotlin-android-developers-book/ Are

Antonio Leiva 2.6k Dec 14, 2022
Book Parking is a demo application based on MVVM architecture. The app allows users to booking parking slots, the app uses firebase for the backend.

Book Parking is a demo application based on MVVM architecture. The app allows users to booking parking slots, the app uses firebase for the backend.

Dheeraj Gupta 5 Dec 24, 2022
Coinbase-pro-feed-kotlin - Kotlin Coinbase Pro Level 2 Order Book Feed

Kotlin Coinbase Pro Level 2 Order Book Feed Quick start Depending on your OS run

Eric McEvoy 0 Jan 2, 2022
Bookly -Library Book Management App

Android-Study-Jams Bookly -Library Book Management App Problem Statement: University libraries have a very vast collection of books from which student

null 2 Feb 24, 2022
BabyBook - Android Mobile application about keeping a baby book

BabyBook Android Mobile application about keeping a baby book Used Tech Language

null 1 Jan 27, 2022
This project consists in the approach of a bakery business, in which the user can book one or more products (cakes), in addition to having the method of payment in cash (post-shipment) or the method of payment via mobile

This project consists in the approach of a bakery business, in which the user can book one or more products (cakes), in addition to having the method of payment in cash (post-shipment) or the method of payment via mobile

Paul Guillen Acuña 2 Dec 20, 2022
Book selling application with MVVM (Model, View, ViewModel)

Book selling application with MVVM (Model, View, ViewModel), LiveData, DataBinding, Retrofit, Room Database, Navigation Component(NavGraph, BottomNav), ViewPager2 in TabLayout, SearchView, Vertical Adapter(BestSellers) and Horizontal Adapter(All Books) with ConcatAdapter for Main Screen, Firebase Auth, SearchView in Adapter, Picasso, Lottie, Animated Svg for Splash

Caner Türe 60 Dec 26, 2022
Self hosted read and to-read list book tracker

JELU Official documentation Like Jelu or find it useful ? Offer me a coffee ☕ Purpose This app main purpose is to track what you have read, what you a

null 181 Dec 28, 2022