Commit Graph

80 Commits

Author SHA1 Message Date
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.

The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.

A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +01:00
Vincent Sanders
17be8cf216 Put the font operations table alongside all the other core API
The netsurf core is driven from numerous operation tables most of
which are now set through a common netsurf_register() interface. The
font and plotting interfaces are currently separate and unlike all the
other operation tables are modified for differing contexts.

This change moves the font operations alongside all the other
operations table and remove unnecessary interaction with the renderers
font internals. Further this also removes the need for css internals
to be visible in frontends.
2014-10-13 11:56:31 +01:00
Vincent Sanders
54fcb66d87 cleanup RISC OS frontend header usage 2014-06-05 15:14:49 +01:00
Michael Drake
c716a53bed Make the no_font_blending toggle. 2013-08-16 09:28:56 +01:00
Michael Drake
2b0a98bd47 Avoid background blending overhead for treeview text. 2013-08-16 09:15:50 +01:00
Vincent Sanders
ee6e6eec05 move options include 2013-05-28 14:16:10 +01:00
Michael Drake
db8ec60fc0 Update nsfont_split documentation. Implementation was already compatible. Can only split on spaces. 2013-02-10 18:25:09 +00:00
John-Mark Bell
23e16e020e Initialise return values in error cases, too: core code is horrifically lax at checking errors from these APIs. 2013-01-26 22:05:16 +00:00
Michael Drake
bf7b23506d Make nsfont_split implementation better for core textarea. 2013-01-18 22:04:57 +00:00
Michael Drake
5bda4edb1a Don't search back for spaces if the whole string fits in available width. 2013-01-16 12:28:11 +00:00
Michael Drake
0c0b263b29 Add some startup logging. 2012-10-17 11:41:25 +01:00
Vincent Sanders
1490b52a6b NetSurf options rework (a=vince r=daniels,jmb)
svn path=/trunk/netsurf/; revision=13548
2012-03-22 09:34:34 +00:00
Michael Drake
5412d7c1b0 Don't scale text plots in front end (RISC OS).
svn path=/trunk/netsurf/; revision=11937
2011-03-08 18:48:23 +00:00
John Mark Bell
ddeadd1c02 Merge LibCSS port to trunk.
svn path=/trunk/netsurf/; revision=8752
2009-07-23 23:05:34 +00:00
John Mark Bell
6e13c2fb0a Scale font sizes, for better accuracy.
svn path=/trunk/netsurf/; revision=8657
2009-07-21 16:55:35 +00:00
John Mark Bell
2565a37a52 Refactor text plotter and other font functions to remove dependency on CSS.
svn path=/trunk/netsurf/; revision=8641
2009-07-21 10:59:53 +00:00
John Mark Bell
d8ab59b578 Squash warning
svn path=/trunk/netsurf/; revision=6928
2009-03-27 02:21:42 +00:00
Michael Drake
e34ed32685 Fix css_len2pt conversion from px and use it in the RO front end code.
svn path=/trunk/netsurf/; revision=5914
2008-12-16 12:26:52 +00:00
John Tytgat
35d3d6d0bb First merge of Adam Blokus' GSoC work from his branch 'branches/adamblokus/netsurf'.
Merged revisions 4212-4552,4554-4709,4711-4724 via svnmerge from 
svn://svn.netsurf-browser.org/branches/adamblokus/netsurf

........
  r4212 | adamblokus | 2008-05-26 19:42:31 +0200 (Mon, 26 May 2008) | 4 lines
  
  Pdf plotting skeleton pinned on Print Preview in GTK.
  Just creates a file and draws lines. 
........
  r4213 | adamblokus | 2008-05-27 00:11:03 +0200 (Tue, 27 May 2008) | 4 lines
  
  Pdf plotter - added drawing some graphic primitives.
  Still with limited functionality, but a snapshot of the
  currently viewed page can be made and resembles the original.
........
  r4214 | adamblokus | 2008-05-27 11:43:31 +0200 (Tue, 27 May 2008) | 2 lines
  
  Corrected encoding name
........
  r4215 | adamblokus | 2008-05-27 12:47:26 +0200 (Tue, 27 May 2008) | 3 lines
  
  Colours and polygons added.
........
  r4217 | adamblokus | 2008-05-27 21:39:35 +0200 (Tue, 27 May 2008) | 6 lines
  
  Added rectangles, filled boxes and clipping.
  Taken into consideration joty's comments.
  Added a todo list for this part.
  Added some debug stuff and checking boundaries.
........
  r4218 | adamblokus | 2008-05-28 12:37:30 +0200 (Wed, 28 May 2008) | 2 lines
  
  Added path ploting (not sure if valid argument order for bezier) and dashed/dotted line styles
........
  r4221 | adamblokus | 2008-05-28 22:11:05 +0200 (Wed, 28 May 2008) | 3 lines
  
  Some more options in graphic primitives and normalizing some parameters.
........
  r4235 | adamblokus | 2008-05-31 22:54:56 +0200 (Sat, 31 May 2008) | 4 lines
  
  Plotting changed as jmb suggested (is the least invasive one from the possible)
  Added dummy bitmap plotting - way of plotting an image is determined by its type. 
........
  r4251 | adamblokus | 2008-06-03 17:12:15 +0200 (Tue, 03 Jun 2008) | 3 lines
  
  Added plotting jpg and png images - quite a lot to improve in this code, but it seems to work ;)
........
  r4263 | adamblokus | 2008-06-05 14:20:32 +0200 (Thu, 05 Jun 2008) | 3 lines
  
  Added hadling images other than png and jpeg - with transparency.
........
  r4267 | adamblokus | 2008-06-06 15:36:34 +0200 (Fri, 06 Jun 2008) | 5 lines
  
  Added handling NULL-returns from all mallocs.
  Added plot_bitmap_tile handling.
  Changed code style a little.
........
  r4327 | adamblokus | 2008-06-12 17:46:34 +0200 (Thu, 12 Jun 2008) | 5 lines
  
  Added a first prototype of the paged-output organization.
  Still not sure about naming, file locations etc.
  Works with the same pdf plotting as before.
........
  r4328 | adamblokus | 2008-06-13 13:52:15 +0200 (Fri, 13 Jun 2008) | 4 lines
  
  Added primitive width adjustment and outputing the whole
  website in multiple pages.
........
  r4336 | joty | 2008-06-15 15:06:57 +0200 (Sun, 15 Jun 2008) | 1 line
  
  Fix RISC OS build failure (change r4235 wasn't complete).
........
  r4337 | joty | 2008-06-15 18:15:32 +0200 (Sun, 15 Jun 2008) | 16 lines
  
  This enables "Export PDF" in RISC OS build:
  
  - Docs/Doxyfile(PREDEFINED): Added WITH_PDF_EXPORT
  - Makefile.sources(S_PDF): Add to RISC OS target as well.
  - utils/config.h: Define WITH_PDF_EXPORT which controls if we want to have
    PDF export functionality or not.
  - riscos/save_pdf.c,riscos/save_pdf.h(save_as_pdf): Use PDF print API made
    by Adam Blokus to write a PDF file under RISC OS.
  - riscos/save.c: Call save_as_pdf added.
  - riscos/menus.c: Add 'Export->PDF' menu entry.
  - riscos/menus.h(menu_action): Added BROWSER_EXPORT_PDF.
  - desktop/gui.h(gui_save_type): Added GUI_SAVE_PDF.
  - desktop/print.c(print_run): Added return value.
  - Makefile(CCACHE): Moved closed to the place where CC is set for the first time.
    (LDFLAGS): Centralised adding all non-pkgconfig libraries and added Haru + PNG libs.
........
  r4343 | adamblokus | 2008-06-16 01:08:52 +0200 (Mon, 16 Jun 2008) | 3 lines
  
  Added margins and page size adjustment.
........
  r4412 | adamblokus | 2008-06-21 20:22:07 +0200 (Sat, 21 Jun 2008) | 4 lines
  
  Added 'fuzzy' margins on page bottom. 
  Disabled direct png embedding, because it is too unstable in Haru now.
........
  r4421 | adamblokus | 2008-06-22 18:52:28 +0200 (Sun, 22 Jun 2008) | 2 lines
  
  Added "Save as.." dialog and Export->PDF menu entry. Print preview still works with default path.
........
  r4437 | adamblokus | 2008-06-25 02:44:46 +0200 (Wed, 25 Jun 2008) | 4 lines
  
  Added skeleton of applying loose layout.
  Minor code cleaning-up.
........
  r4492 | adamblokus | 2008-07-02 09:02:42 +0200 (Wed, 02 Jul 2008) | 5 lines
  
  Implemented the elementar ideas of the loose layout.
  Added scaling in the printing routine.
  Added some basic demonstrations.
........
  r4493 | adamblokus | 2008-07-02 09:05:55 +0200 (Wed, 02 Jul 2008) | 3 lines
  
  Cleaned up the loosing code - commited to much of leftover rubbish code.
........
  r4507 | adamblokus | 2008-07-04 14:25:48 +0200 (Fri, 04 Jul 2008) | 4 lines
  
  Added duplicating box tree and current content - window flickering during printing solved.
  Minor error checking after new HPDF_Image_AddSMask call.
........
  r4515 | adamblokus | 2008-07-06 22:28:16 +0200 (Sun, 06 Jul 2008) | 2 lines
  
  Changes in loosen layout (image resizing).
........
  r4517 | adamblokus | 2008-07-06 22:38:23 +0200 (Sun, 06 Jul 2008) | 2 lines
  
  Added pdf font handling and rendering functions with the use of Haru functions.
........
  r4555 | adamblokus | 2008-07-10 00:59:05 +0200 (Thu, 10 Jul 2008) | 2 lines
  
  Added a very basic and still buggy GTK print implementation.
........
  r4565 | adamblokus | 2008-07-10 14:50:16 +0200 (Thu, 10 Jul 2008) | 2 lines
  
  Added gtk printing one more time - I have forgotten to add the main file.
........
  r4566 | adamblokus | 2008-07-10 14:57:02 +0200 (Thu, 10 Jul 2008) | 2 lines
  
  removed error with comment
........
  r4569 | adamblokus | 2008-07-10 15:52:55 +0200 (Thu, 10 Jul 2008) | 5 lines
  
  Major style improvements - added a lot of doxygen comments, 
  followed tlsa's style guide.
  Added some more error checking, too.
........
  r4575 | adamblokus | 2008-07-10 18:48:26 +0200 (Thu, 10 Jul 2008) | 2 lines
  
  Cleaned up the code.
........
  r4687 | adamblokus | 2008-07-17 14:17:19 +0200 (Thu, 17 Jul 2008) | 2 lines
  
  Changed everything according to jmb's review plus some minor bug fixes to gtk_print.
........
  r4688 | adamblokus | 2008-07-17 17:16:34 +0200 (Thu, 17 Jul 2008) | 2 lines
  
  Solved the netsurf.glade clash from r4421.
........
  r4693 | adamblokus | 2008-07-18 18:11:51 +0200 (Fri, 18 Jul 2008) | 2 lines
  
  Fixed bug with wrong number of pages in gtk printing.
........
  r4695 | adamblokus | 2008-07-18 19:59:24 +0200 (Fri, 18 Jul 2008) | 3 lines
  
  - fixed uncommented line from the previous commit
  - fixed bug with scale bigger than 1.0 (incorretly clipped page)
........
  r4696 | adamblokus | 2008-07-18 23:28:00 +0200 (Fri, 18 Jul 2008) | 2 lines
  
  Fixed bug in gtk_print_font_paint (and nsfont_paint).
........
  r4697 | adamblokus | 2008-07-18 23:35:38 +0200 (Fri, 18 Jul 2008) | 2 lines
  
  Bug fix in nsfont_paint.
........
  r4711 | adamblokus | 2008-07-19 22:44:15 +0200 (Sat, 19 Jul 2008) | 2 lines
  
  Added gtk_selection files.
........
  r4712 | adamblokus | 2008-07-20 11:15:06 +0200 (Sun, 20 Jul 2008) | 2 lines
  
  Addam missing glade files.
........
  r4713 | joty | 2008-07-20 17:13:10 +0200 (Sun, 20 Jul 2008) | 1 line
  
  Follow change r4517 for RISC OS and BeOS platforms : Added pdf font handling and rendering functions with the use of Haru functions.
........
  r4714 | joty | 2008-07-20 18:19:50 +0200 (Sun, 20 Jul 2008) | 1 line
  
  Declare haru_nsfont iso define an instance for each C source including the font_haru.h header.  This fixes breakage of PDF export on RISC OS.
........
  r4724 | adamblokus | 2008-07-23 03:30:08 +0200 (Wed, 23 Jul 2008) | 6 lines
  
  Applied changes according to joty's review.
  Added checking the dimensions of a plotted image to pdf plotter.
  Commented out jpg embedding (it seems to cause some problems
  I'll bring it back when I figure out what's wrong) .
  Added back some files removed by mistake.
........


svn path=/trunk/netsurf/; revision=4741
2008-07-26 16:01:59 +00:00
Rob Kendrick
59641def82 const fixes in plotters and history core
svn path=/trunk/netsurf/; revision=4083
2008-04-07 11:15:09 +00:00
Vincent Sanders
2f864eeecc Update all source code file headers to reflect GPL version 2 only and contain appropriate licence text
svn path=/trunk/netsurf/; revision=3486
2007-08-08 16:16:03 +00:00
Daniel Silverstone
6807b4208a Remove the netsurf/ from the include paths and rationalise use of <> vs "" in includes
NetSurf includes are now done with ""s and other system includes with <>s as C intended.
The scandeps tool has been updated to only look for ""ed includes, and to verify that the
files exist in the tree before adding them to the dependency lines. The depend rule has
therefore been augmented to make sure the autogenerated files are built before it is run.

This is untested under self-hosted RISC OS builds. All else tested and works.


svn path=/trunk/netsurf/; revision=3307
2007-05-30 22:39:54 +00:00
James Bursa
7e252084a5 Replace font_menu with new rufl built-in font menu.
svn path=/trunk/netsurf/; revision=3111
2006-12-08 20:04:03 +00:00
Michael Drake
ba23e4b693 Update project URL.
svn path=/trunk/netsurf/; revision=3073
2006-11-27 15:35:18 +00:00
John Mark Bell
b353c7cd36 Fix 1553007
svn path=/trunk/netsurf/; revision=2926
2006-09-07 20:10:14 +00:00
James Bursa
3cafb693ee Use weight 500 for Medium desktop font.
svn path=/trunk/netsurf/; revision=2881
2006-08-22 00:08:18 +00:00
James Bursa
8343f4f37a Move ro_gui_wimp_desktop_font() from wimp.c to font.c. Simplify code and add logging of result.
svn path=/trunk/netsurf/; revision=2876
2006-08-21 03:11:44 +00:00
James Bursa
877fe5c658 Remove unused and unimplemented nsfont_txtenum().
svn path=/trunk/netsurf/; revision=2875
2006-08-21 02:05:51 +00:00
John Mark Bell
ea7867b927 Dump RUfl family list if Homerton isn't found
svn path=/trunk/netsurf/; revision=2659
2006-06-28 14:38:31 +00:00
James Bursa
548e5089f8 [project @ 2006-03-08 08:27:19 by bursa]
Disable font blending during printing (should fix text printing problems for LaserJets).

svn path=/import/netsurf/; revision=2111
2006-03-08 08:27:19 +00:00
James Bursa
2e7b32ea5a [project @ 2006-01-29 12:23:22 by bursa]
New version of RUfl - better weight detection and up to 9 weights.

svn path=/import/netsurf/; revision=2050
2006-01-29 12:23:22 +00:00
James Bursa
5d6c565828 [project @ 2006-01-10 08:17:51 by bursa]
Search font list ignoring case (should fix 1330351).

svn path=/import/netsurf/; revision=2020
2006-01-10 08:17:51 +00:00
John Mark Bell
611ec68e46 [project @ 2006-01-02 23:31:28 by jmb]
Implement font default option properly

svn path=/import/netsurf/; revision=1969
2006-01-02 23:31:29 +00:00
John Mark Bell
adeea58dff [project @ 2006-01-02 23:00:18 by jmb]
Take account of default font family

svn path=/import/netsurf/; revision=1966
2006-01-02 23:00:18 +00:00
John Mark Bell
a28b0fbe07 [project @ 2006-01-02 21:24:42 by jmb]
Finish font configuration.

svn path=/import/netsurf/; revision=1953
2006-01-02 21:24:43 +00:00
James Bursa
4f56dac958 [project @ 2005-11-20 20:16:08 by bursa]
Rewrite DrawFile export completely. Text is now exported again. Images are not yet exported.

svn path=/import/netsurf/; revision=1880
2005-11-20 20:16:08 +00:00
James Bursa
d4760c09c0 [project @ 2005-03-24 07:45:41 by bursa]
Make line splitting more accurate by using rufl_split() instead of rufl_x_to_offset(). This fixes many cases of text leaking out of a box.

svn path=/import/netsurf/; revision=1579
2005-03-24 07:45:41 +00:00
John Mark Bell
68224ec45c [project @ 2005-03-20 18:58:34 by jmb]
Reinstate font background blending

svn path=/import/netsurf/; revision=1554
2005-03-20 18:58:34 +00:00
James Bursa
dace636329 [project @ 2005-02-24 22:00:40 by bursa]
Reimplement font family support, part 2 (font menus in choices).

svn path=/import/netsurf/; revision=1525
2005-02-24 22:00:41 +00:00
James Bursa
504e05c4b3 [project @ 2005-02-22 23:36:14 by bursa]
Reimplement font family support, part 1.

svn path=/import/netsurf/; revision=1524
2005-02-22 23:36:14 +00:00
James Bursa
65b5ae0f8f [project @ 2005-02-20 13:19:19 by bursa]
Font rewrite, part 3. Note that Draw export and printing are broken by these changes.

svn path=/import/netsurf/; revision=1519
2005-02-20 13:19:19 +00:00
James Bursa
39eb35cbf1 [project @ 2005-01-02 11:47:51 by bursa]
Fix comment.

svn path=/import/netsurf/; revision=1424
2005-01-02 11:47:51 +00:00
John Mark Bell
8334683068 [project @ 2005-01-02 03:58:20 by jmb]
xcalloc/xrealloc/xstrdup-purge - Lose remaining calls (and purge the relevant functions from utils.c)

svn path=/import/netsurf/; revision=1419
2005-01-02 03:58:21 +00:00
Richard Wilson
b5d3538957 [project @ 2004-11-03 02:37:58 by rjw]
Fix for refinding ufonts

svn path=/import/netsurf/; revision=1339
2004-11-03 02:37:58 +00:00
Richard Wilson
3276fe3ed8 [project @ 2004-11-03 02:29:01 by rjw]
Changing screenmodes causes font handles to be refound.

svn path=/import/netsurf/; revision=1338
2004-11-03 02:29:01 +00:00
John Mark Bell
4a37e17037 [project @ 2004-09-29 20:13:42 by jmb]
Write heuristically-generated font names to choices file - should speed up program load a bit.
Heuristic is re-run each time the choices file is saved.

svn path=/import/netsurf/; revision=1294
2004-09-29 20:13:42 +00:00
John Mark Bell
d718a30c57 [project @ 2004-09-29 03:33:24 by jmb]
Lose redundant font table.
Rework bold and italic font support.
This is now user-configurable but I've little intention of writing GUI Choices code for this.
Smallcaps is still broken and needs some thinking about - probably best to drop the smallcaps font variants and convert lowercase chars to uppercase. Quite how this works for non-latin text, I've no idea.

svn path=/import/netsurf/; revision=1293
2004-09-29 03:33:24 +00:00
John Mark Bell
dd183bcb7e [project @ 2004-09-14 14:48:51 by jmb]
Fix stupidity related to font table initialisation.

svn path=/import/netsurf/; revision=1279
2004-09-14 14:48:51 +00:00
John Mark Bell
c358b80cc5 [project @ 2004-09-13 23:56:18 by jmb]
Make fonts user-configurable.
This loses font-style support, though it shouldn't be hard to put it back again.

svn path=/import/netsurf/; revision=1274
2004-09-13 23:56:18 +00:00
John Mark Bell
c7fab5b727 [project @ 2004-08-18 22:07:20 by jmb]
Don't read screen origin when printing

svn path=/import/netsurf/; revision=1244
2004-08-18 22:07:20 +00:00