2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

11 Commits

Author SHA1 Message Date
NuPogodi
bd0c180c81 Add functions to change font face for all items in Font.fontmap
1. Excluded pgfont from Font.fontmap-items; it was used in helppage.lua to render footer and just duplicated ffont
2. Fixed typo: self.cfont > "cfont" in Font:getFace()
3. 3 small functions to change font face for any member of Font.fontmap
2012-09-06 20:05:57 +03:00
HW
0d12ff70cd rename debug() to Debug() to stop clashing with the debug submodule from Lua 2012-06-04 00:49:23 +02:00
NuPogodi
f595d42431 change default title font to DroidSansBold 2012-05-19 12:39:53 +02:00
Qingping Hou
3306346dba use debug to print debug info 2012-04-19 00:16:49 +08:00
traycold
6031d2066b some fixes about coding style (#62) and removed debug code 2012-04-16 20:16:31 +02:00
traycold
429f572827 modification to take into account new version of mupdf 2012-04-16 00:10:41 +02:00
HW
4714057f5b added infomessage dialog implementation 2012-04-15 02:28:48 +02:00
HW
b6d75b84ec Added widget abstraction framework
An example for using it:

--snip
require "widget"
require "font"

fb = einkfb.open("/dev/fb0")
G_width, G_height = fb:getSize()

dialog = CenterContainer:new({
        dimen = { w = G_width, h = G_height },
        VerticalGroup:new({
                align = "center",
                FrameContainer:new({
                        CenterContainer:new({
                                dimen = { w = 400, h = 200 },
                                TextWidget:new({
                                        text = "Hi there! jgVJV",
                                        face = Font:getFace("cfont", 30)
                                })
                        })
                }),
                ImageWidget:new({
                        file = "test.png"
                }),
                FrameContainer:new({
                        CenterContainer:new({
                                dimen = { w = 300, h = 200 },
                                TextWidget:new({
                                        text = "another box",
                                        face = Font:getFace("cfont", 30)
                                })
                        })
                })
        })
})

dialog:paintTo(fb.bb, 0, 0)

fb:refresh(0)

input.waitForEvent()
--snip
2012-04-15 01:59:49 +02:00
HW
ec2eda0c05 switched font handling to only work with external fonts
now you can use a environment variable, FONTDIR, to point
to a font dir. Otherwise, "./fonts" is used by default.
Subdirectories are indexed.
2012-04-09 19:04:26 +02:00
traycold
bfcad367bb using font module for getting fonts (commit f95231d789)
renamed function names using camelCase (issue #62)
2012-03-20 20:15:24 +01:00
Qingping Hou
f95231d789 add: status bar in reading menu & font.lua
* Since fontchooser is replaced by selectmenu, it
is no longer needed. So I rewrite it into font.lua
module which can cache faces that shared among all
UIs.

* add progressBar method in graphics.lua to draw
reading progress.

* add reading progress information in reading menu.
It is just a demo. Should be clean up in next release
when the real reading menu is out. :)
2012-03-10 16:41:23 +08:00