Commit Graph

63 Commits

Author SHA1 Message Date
Werner Lemberg 87ddad2007 Update or fix links to use the https protocol instead of http. 2017-12-04 20:43:30 +01:00
Werner Lemberg 563ae78022 Update copyright year. 2017-01-04 20:16:34 +01:00
Werner Lemberg 4b3ea5ca8f [docmaker] Don't emit trailing newlines.
* src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code):
Use `rstrip'.
2016-02-09 08:08:17 +01:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Werner Lemberg 98afe3f5c8 [docmaker] Allow references to section names.
In the reference, we show the section's title enclosed in single
quotes.

* src/tools/docmaker/formatter.py (Formatter::__init__): Collect
section names as identifiers.

* src/tools/docmaker/tohtml.py (section_title_header): Split into...
(section_title_header1, section_title_header2): ... these two
strings.
(HtmlFormatter::make_block_url, make_html_word, html_source_quote):
Handle sections.
(HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
2015-11-28 11:58:49 +01:00
Werner Lemberg 97b808fdad [docmaker] Allow `foo[bar]' as identifier.
We need this to handle equally named properties in different
modules.

* src/tools/docmaker/content.py (re_identifier),
src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.

* src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
HtmlFormatter::index_exit, HtmlFormatter::section_enter,
HtmlFormatter::block_enter): Handle `foo[bar]'.
2015-11-26 14:29:17 +01:00
Werner Lemberg f57fc59e01 Run `src/tools/update-copyright'. 2015-01-17 20:41:43 +01:00
Werner Lemberg 36a4676136 Remove C-isms in Python code. 2014-12-22 03:31:32 +01:00
Werner Lemberg ef6a352344 [docmaker] Properly handle empty rows in Synopsis.
* src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
` ' for empty fields.
2014-12-02 21:16:59 +01:00
Werner Lemberg 102d4a76ed [docmaker] Honour empty lines in `<Order>' section element.
This greatly improves the readability of the `Synopsis' links.

* src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
Insert string `/empty/' between items.

* src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
robust against nonexistent keys.

* src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
empty <td> elements for `/empty/'.
2014-12-02 10:27:40 +01:00
Werner Lemberg 2af25ac0f9 [docmaker] Ensure Python 3 compatibility.
* src/tools/docmaker/content.py (ContentProcessor::set_section,
ContentProcessor::finish): Replace `has_key' function with `in'
keyword.

* src/tools/docmaker/formatter.py (Formatter::__init__): Replace
sorting function with a key generator.
(Formatter::add_identifier): Replace `has_key' function with `in'
keyword.

* src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
Replace `has_key' function with `in' keyword.
(HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
integer division.
s/<>/>/.

* src/tools/docmaker/utils.py: Import `itertools'.
(index_sort): Replaced by...
(index_key): ... this new key generator (doing exactly the same).
2014-12-02 08:38:57 +01:00
Werner Lemberg 0dbad7632b [docmaker] Use field values as HTML link targets where possible.
* src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
Accept second, optional argument to specify a name.
(HtmlFormatter::html_source_quote): Link to field ID if possible.
(HtmlFormatter::print_html_field_list): Emit `id' attribute.
2014-12-01 08:44:48 +01:00
Werner Lemberg aaffbf85df Minor. 2014-11-29 23:26:46 +01:00
Werner Lemberg 434bc69573 * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing. 2014-11-29 23:12:55 +01:00
Werner Lemberg 51987eaf39 [docmaker] Improve HTML code for table of contents..
* src/toold/docmaker/tohtml.py: Introduce a new table class `toc',
together with proper CSS.
2014-11-29 22:19:29 +01:00
Werner Lemberg aa834ce580 [docmaker] Provide higher-level markup and simplify HTML.
* src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
elements, use CSS descendants (of class `section') to format the
data.

Also remove reduntant <p> and <br> elements, replacing them with
proper CSS.

Globally reduce page width to 75%.

(block_header): Rename <div> class to `section'.
2014-11-29 20:08:29 +01:00
Werner Lemberg 3bb9702387 [docmaker] Add `top' links after blocks.
* src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
2014-11-29 16:12:37 +01:00
Werner Lemberg a31f971577 * src/tools/docmaker/tohtml.py: Improve CSS for fields.
Make fields align horizotnally relative to full line width.
2014-11-29 07:18:44 +01:00
Werner Lemberg 8f795118b8 * src/tools/docmaker/tohtml.py: Fix index and TOC templates.
This thinko was introduced 2014-11-27.
2014-11-29 06:49:15 +01:00
Werner Lemberg ba1ba0cade [docmaker] Format field lists with CSS.
This also simplifies the inserted HTML code.

* src/tools/docmaker/tohtml.py
(HtmlFormatter::print_html_field_list): Do it.
2014-11-28 22:04:14 +01:00
Werner Lemberg 46d4dc86e1 [docmaker] Replace empty `<td>' with CSS..
* src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
it.
2014-11-28 05:49:56 +01:00
Werner Lemberg 984e07176c [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
* src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
(source_*): Use `<div>'.
(HtmlFormatter::block_enter): s/<h4>/<h3>/.
2014-11-28 05:33:58 +01:00
Werner Lemberg 7ea363402c * src/tools/docmaker/tohtml.py: Usee more CSS for index. 2014-11-27 19:38:31 +01:00
Werner Lemberg edcf817efa [docmaker] Replace `name' attribute of `<a>' with `id'.
* src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
2014-11-27 19:28:48 +01:00
Werner Lemberg 26d699ed84 * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
For `Index' and `TOC' links, we now simply use the `text-align' CSS
property of `<td>' to enforce flush-left and flush-right,
eliminating the hack with an empty, full-width `<td>' element
inbetween.

The change also enforces the same (smaller) size for all index and
TOC links.
2014-11-27 19:22:52 +01:00
Werner Lemberg dd3fee072c * src/tools/docmaker/tohtml.py: More HTML table refactoring.
Replace some `<table>' tags with `<div>' to simplify structure.

Move `bgcolor' attribute to CSS.

Replace most `width' attributes with CSS.  The remaining instances
(providing a similar effect as LaTeX's `\hfill' command) are removed
in a later patch.
2014-11-27 13:20:52 +01:00
Werner Lemberg 339d830efe [docmaker] Typos. 2014-11-27 12:03:17 +01:00
Werner Lemberg a5ad26afea * src/tools/docmaker/tohtml.py: Replace <font> with CSS. 2014-11-27 11:05:57 +01:00
Werner Lemberg ba67c61972 * src/tools/docmaker/tohtml.py: Center <table> with CSS. 2014-11-27 11:05:11 +01:00
Werner Lemberg 5594fa549d * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'. 2014-11-27 11:04:18 +01:00
Werner Lemberg 433295ab6e Sort CSS entries. 2014-11-27 11:03:28 +01:00
Werner Lemberg 8585cf56c1 * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
This starts a series of commits into the direction of generating
valid HTML 5 code, especially using much more CSS.
2014-11-27 11:03:09 +01:00
Werner Lemberg c52882ab72 [docmaker] Produce better HTML code.
* src/tools/docmaker/tohtml.py: Always use double quotes for
attribute values.
(source_footer): Close `td' and `tr' groups.
2014-11-27 08:01:25 +01:00
Werner Lemberg e8a5c33e9f * src/tools/docmaker/sources.py (re_bold, re_italic): Use
non-grouping parentheses.
* src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
Updated.
2014-11-27 06:48:37 +01:00
Werner Lemberg a7a4207d10 [docmaker] Formatting, copyright, improved documentation.
* src/tools/docmaker/*: No code changes besides trivial
modifications.
2014-11-24 06:44:45 +01:00
Werner Lemberg fad93267a2 [docmaker] Code shuffling.
* src/tools/docmaker/tohtml.py (re_url): Move regexp...
* src/tools/docmaker/sources.py: ... to this file.
2013-06-25 10:41:37 +02:00
Werner Lemberg 8bdc40716a [docmaker] Remove unused functions.
* src/tools/docmaker/content.py (DocMarkup.get_start,
DocBlock.get_markup_name): Removed.
* src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
HtmlFormatter.make_html_words): Removed.
2013-06-25 10:20:53 +02:00
Werner Lemberg c7cc9ebe20 [docmaker] Recognise URLs.
* src/tools/docmaker/tohtml.py (re_url): New regular expression.
(make_html_para): Use it.
2013-06-25 07:24:02 +02:00
Werner Lemberg 4cd5fd463e Remove trailing whitespace. 2013-01-24 13:33:06 +01:00
Werner Lemberg 8a9b63913f Improve navigation in API reference.
* src/tools/docmaker/tohtml.py (html_header_3): Renamed to...
(html_header_6): This.
(html_header_3, html_header_3i, html_header_4, html_header_5,
html_header_5t): New strings.
(toc_footer_start, toc_footer_end): New strings.
(HtmlFormatter::html_header): Updated.
(HtmlFormatter::html_index_header, HtmlFormatter::html_toc_header):
New strings.
(HtmlFormatter::index_enter): Use `html_index_header'.
(HtmlFormatter::index_exit): Print `html_footer'.
(HtmlFormatter::toc_enter): Use `html_toc_header'.
(HtmlFormatter::toc_exit): Print proper footer.

Convert ~ to non-breakable space.

* src/tools/docmaker/tohtml.py (make_html_para): Implement it.
Update header files accordingly.

Many other minor documentation fixes.
2008-06-26 19:56:51 +00:00
Werner Lemberg 8e3539bf7c Emit header info for defined FreeType objects in reference.
* src/tools/docmaker/content.py (re_header_macro): New regexp.
(ContentProcessor::__init__): Initialize new dictionary `headers'.
(DocBlock::__init__): Collect macro header definitions.

* src/tools/docmaker/tohtml.py (header_location_header,
header_location_footer): New strings.
(HtmlFormatter::__init__): Pass `headers' dictionary.
(HtmlFormatter::print_html_field): Don't emit paragraph tags.
(HtmlFormatter::print_html_field_list): Emit empty paragraph.
(HtmlFormatter::block_enter): Emit header info.
2008-06-02 13:53:54 +00:00
Werner Lemberg 8f7d17bfe3 formatting 2008-05-28 06:39:33 +00:00
Werner Lemberg 35a90b7901 * src/tools/docmaker/tohtml.py (block_footer_start,
block_footer_middle): Beautify output.
2008-05-27 18:16:03 +00:00
Werner Lemberg 53286c0970 more formatting and whitespace 2008-01-18 05:14:13 +00:00
Werner Lemberg 6684257742 * src/tools/docmaker/tohtml.py (html_header_2): Fix typo.
Add `td.left' element to CSS.
(toc_section_enter): Use it.
2007-10-20 16:17:28 +00:00
Werner Lemberg 4b2e83d5b5 A new set of spelling fixes from Alexei.
Add some copyright messages.
2007-02-01 07:58:02 +00:00
Werner Lemberg 960ba59ad9 * src/sfnt/sfobjs.c (tt_face_get_name): All Unicode strings are
encoded in UTF-16BE.  Patch from Rajeev Pahuja <rpahuja@esri.com>.
(tt_name_entry_ascii_from_ucs4): Removed.


* include/freetype/ftxf86.h: Fix and extend comment so that it
appears in the documentation.

* include/freetype/ftchapters.h: Add `font_format' section.


* src/tools/docmaker/tohtml.py (HtmlFormatter::index_exit): Add link
to TOC in index page.


Formatting.
2006-12-01 08:20:47 +00:00
Werner Lemberg 6e467a654d * src/tools/docmaker/tohtml.py (block_footer): Split into...
(block_footer_start, block_footer_middle, block_footer_end): This to
add navigation buttons.
(HtmlFormatter::block_exit): Updated.
2006-05-12 15:05:45 +00:00
Werner Lemberg e12a471f6a * src/tools/docmaker/tohtml.py (html_header_1): Use `utf-8' charset.
Convert some files to UTF-8.
2006-05-12 14:20:43 +00:00
Werner Lemberg fd74ec68b4 * README: Minor updates.
* include/freetype/*: s/scale/scaling value/ where appropriate.
Many other minor documentation improvements.

* src/tools/docmaker/sources.py (re_italic, re_bold): Handle
trailing punctuation.
* src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word): Add
warning message for undefined cross references.
Update handling of re_italic and re_bold.
2006-05-12 04:00:44 +00:00