2014-11-24 06:44:45 +01:00
|
|
|
#
|
|
|
|
# tohtml.py
|
|
|
|
#
|
|
|
|
# A sub-class container of the `Formatter' class to produce HTML.
|
|
|
|
#
|
2017-01-04 20:16:34 +01:00
|
|
|
# Copyright 2002-2017 by
|
2014-11-24 06:44:45 +01:00
|
|
|
# David Turner.
|
|
|
|
#
|
|
|
|
# This file is part of the FreeType project, and may only be used,
|
|
|
|
# modified, and distributed under the terms of the FreeType project
|
|
|
|
# license, LICENSE.TXT. By continuing to use, modify, or distribute
|
|
|
|
# this file you indicate that you have read the license and
|
|
|
|
# understand and accept it fully.
|
|
|
|
|
|
|
|
# The parent class is contained in file `formatter.py'.
|
|
|
|
|
2007-02-01 08:58:02 +01:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
from sources import *
|
|
|
|
from content import *
|
|
|
|
from formatter import *
|
2002-08-21 23:36:26 +02:00
|
|
|
|
2013-06-25 10:41:37 +02:00
|
|
|
import time
|
2002-07-30 20:49:52 +02:00
|
|
|
|
2008-01-18 06:14:13 +01:00
|
|
|
|
2014-11-24 06:44:45 +01:00
|
|
|
# The following strings define the HTML header used by all generated pages.
|
2002-07-30 20:49:52 +02:00
|
|
|
html_header_1 = """\
|
2006-03-24 13:14:48 +01:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
2017-12-04 20:43:30 +01:00
|
|
|
"https://www.w3.org/TR/html4/loose.dtd">
|
2002-07-30 20:49:52 +02:00
|
|
|
<html>
|
Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.
This change reimplements fix from 2003-05-30 without breaking
binary compatibility.
* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.
* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro. Updated all callers.
* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
* src/psaux/psobjs.c (ps_parser_load_field): Updated.
* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
|
|
|
<head>
|
2006-05-12 16:20:43 +02:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
2008-06-26 21:56:51 +02:00
|
|
|
<title>\
|
|
|
|
"""
|
2002-07-30 20:49:52 +02:00
|
|
|
|
2008-06-26 21:56:51 +02:00
|
|
|
html_header_2 = """\
|
|
|
|
API Reference</title>
|
Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.
This change reimplements fix from 2003-05-30 without breaking
binary compatibility.
* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.
* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro. Updated all callers.
* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
* src/psaux/psobjs.c (ps_parser_load_field): Updated.
* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
|
|
|
<style type="text/css">
|
2014-11-27 10:07:06 +01:00
|
|
|
a:link { color: #0000EF; }
|
|
|
|
a:visited { color: #51188E; }
|
|
|
|
a:hover { color: #FF0000; }
|
|
|
|
|
Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.
This change reimplements fix from 2003-05-30 without breaking
binary compatibility.
* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.
* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro. Updated all callers.
* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
* src/psaux/psobjs.c (ps_parser_load_field): Updated.
* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
|
|
|
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
|
|
|
|
color: #000000;
|
2014-11-29 20:08:29 +01:00
|
|
|
background: #FFFFFF;
|
|
|
|
width: 87%;
|
|
|
|
margin: auto; }
|
Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.
This change reimplements fix from 2003-05-30 without breaking
binary compatibility.
* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.
* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro. Updated all callers.
* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
* src/psaux/psobjs.c (ps_parser_load_field): Updated.
* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
|
|
|
|
2014-11-29 20:08:29 +01:00
|
|
|
div.section { width: 75%;
|
|
|
|
margin: auto; }
|
|
|
|
div.section hr { margin: 4ex 0 1ex 0; }
|
|
|
|
div.section h4 { background-color: #EEEEFF;
|
|
|
|
font-size: medium;
|
|
|
|
font-style: oblique;
|
|
|
|
font-weight: bold;
|
|
|
|
margin: 3ex 0 1.5ex 9%;
|
|
|
|
padding: 0.3ex 0 0.3ex 1%; }
|
|
|
|
div.section p { margin: 1.5ex 0 1.5ex 10%; }
|
|
|
|
div.section pre { margin: 3ex 0 3ex 9%;
|
|
|
|
background-color: #D6E8FF;
|
|
|
|
padding: 2ex 0 2ex 1%; }
|
|
|
|
div.section table.fields { width: 90%;
|
|
|
|
margin: 1.5ex 0 1.5ex 10%; }
|
2014-11-29 22:19:29 +01:00
|
|
|
div.section table.toc { width: 95%;
|
|
|
|
margin: 1.5ex 0 1.5ex 5%; }
|
2014-11-27 10:50:50 +01:00
|
|
|
div.timestamp { text-align: center;
|
2014-11-29 20:08:29 +01:00
|
|
|
font-size: 69%;
|
|
|
|
margin: 1.5ex 0 1.5ex 0; }
|
2014-11-27 10:50:50 +01:00
|
|
|
|
Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.
This change reimplements fix from 2003-05-30 without breaking
binary compatibility.
* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.
* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro. Updated all callers.
* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
* src/psaux/psobjs.c (ps_parser_load_field): Updated.
* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
|
|
|
h1 { text-align: center; }
|
2014-11-29 20:08:29 +01:00
|
|
|
h3 { font-size: medium;
|
|
|
|
margin: 4ex 0 1.5ex 0; }
|
2014-11-27 10:07:06 +01:00
|
|
|
|
|
|
|
p { text-align: justify; }
|
|
|
|
|
|
|
|
pre.colored { color: blue; }
|
Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.
This change reimplements fix from 2003-05-30 without breaking
binary compatibility.
* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.
* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro. Updated all callers.
* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
* src/psaux/psobjs.c (ps_parser_load_field): Updated.
* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
|
|
|
|
|
|
|
span.keyword { font-family: monospace;
|
|
|
|
text-align: left;
|
|
|
|
white-space: pre;
|
|
|
|
color: darkblue; }
|
2003-07-26 00:21:57 +02:00
|
|
|
|
2014-11-28 22:04:14 +01:00
|
|
|
table.fields td.val { font-weight: bold;
|
|
|
|
text-align: right;
|
|
|
|
width: 30%;
|
2014-11-29 07:18:44 +01:00
|
|
|
vertical-align: baseline;
|
2014-11-29 23:12:55 +01:00
|
|
|
padding: 1ex 1em 1ex 0; }
|
2014-11-29 07:18:44 +01:00
|
|
|
table.fields td.desc { vertical-align: baseline;
|
2014-11-29 23:12:55 +01:00
|
|
|
padding: 1ex 0 1ex 1em; }
|
|
|
|
table.fields td.desc p:first-child { margin: 0; }
|
|
|
|
table.fields td.desc p { margin: 1.5ex 0 0 0; }
|
2014-11-29 20:08:29 +01:00
|
|
|
table.index { margin: 6ex auto 6ex auto;
|
2014-11-27 19:38:31 +01:00
|
|
|
border: 0;
|
2014-11-28 05:49:56 +01:00
|
|
|
border-collapse: separate;
|
|
|
|
border-spacing: 1em 0.3ex; }
|
2014-11-27 19:38:31 +01:00
|
|
|
table.index tr { padding: 0; }
|
|
|
|
table.index td { padding: 0; }
|
2014-11-28 22:04:14 +01:00
|
|
|
table.index-toc-link { width: 100%;
|
|
|
|
border: 0;
|
2014-11-29 20:08:29 +01:00
|
|
|
border-spacing: 0;
|
|
|
|
margin: 1ex 0 1ex 0; }
|
2014-11-27 19:22:52 +01:00
|
|
|
table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
|
|
|
|
font-size: 83%;
|
|
|
|
text-align: left; }
|
2014-11-29 16:12:37 +01:00
|
|
|
table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
|
|
|
|
font-size: 83%;
|
|
|
|
text-align: center; }
|
2014-11-27 19:22:52 +01:00
|
|
|
table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
|
|
|
|
font-size: 83%;
|
|
|
|
text-align: right; }
|
2014-11-29 22:19:29 +01:00
|
|
|
table.synopsis { margin: 6ex auto 6ex auto;
|
2014-11-27 19:22:52 +01:00
|
|
|
border: 0;
|
|
|
|
border-collapse: separate;
|
2014-11-29 16:12:37 +01:00
|
|
|
border-spacing: 2em 0.6ex; }
|
2014-11-27 19:22:52 +01:00
|
|
|
table.synopsis tr { padding: 0; }
|
|
|
|
table.synopsis td { padding: 0; }
|
2014-11-29 22:19:29 +01:00
|
|
|
table.toc td.link { width: 30%;
|
|
|
|
text-align: right;
|
|
|
|
vertical-align: baseline;
|
2014-11-29 23:12:55 +01:00
|
|
|
padding: 1ex 1em 1ex 0; }
|
2014-11-29 22:19:29 +01:00
|
|
|
table.toc td.desc { vertical-align: baseline;
|
2014-11-29 23:12:55 +01:00
|
|
|
padding: 1ex 0 1ex 1em;
|
2014-11-29 22:19:29 +01:00
|
|
|
text-align: left; }
|
2014-11-29 23:12:55 +01:00
|
|
|
table.toc td.desc p:first-child { margin: 0;
|
|
|
|
text-align: left; }
|
|
|
|
table.toc td.desc p { margin: 1.5ex 0 0 0;
|
2014-11-29 22:19:29 +01:00
|
|
|
text-align: left; }
|
2014-11-27 10:51:49 +01:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
</style>
|
Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.
This change reimplements fix from 2003-05-30 without breaking
binary compatibility.
* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.
* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro. Updated all callers.
* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
* src/psaux/psobjs.c (ps_parser_load_field): Updated.
* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
2008-06-26 21:56:51 +02:00
|
|
|
"""
|
|
|
|
|
2014-11-27 19:22:52 +01:00
|
|
|
html_header_3l = """
|
|
|
|
<table class="index-toc-link"><tr><td class="left">[<a href="\
|
2008-06-26 21:56:51 +02:00
|
|
|
"""
|
|
|
|
|
2014-11-27 19:22:52 +01:00
|
|
|
html_header_3r = """
|
|
|
|
<table class="index-toc-link"><tr><td class="right">[<a href="\
|
2008-06-26 21:56:51 +02:00
|
|
|
"""
|
|
|
|
|
|
|
|
html_header_4 = """\
|
2014-11-29 20:08:29 +01:00
|
|
|
">Index</a>]</td><td class="right">[<a href="\
|
2008-06-26 21:56:51 +02:00
|
|
|
"""
|
|
|
|
|
2014-11-29 06:49:15 +01:00
|
|
|
html_header_5t = """\
|
2014-11-27 10:52:24 +01:00
|
|
|
">TOC</a>]</td></tr></table>
|
2014-11-27 10:49:05 +01:00
|
|
|
<h1>\
|
2008-06-26 21:56:51 +02:00
|
|
|
"""
|
|
|
|
|
2014-11-29 06:49:15 +01:00
|
|
|
html_header_5i = """\
|
|
|
|
">Index</a>]</td></tr></table>
|
|
|
|
<h1>\
|
|
|
|
"""
|
|
|
|
|
2008-06-26 21:56:51 +02:00
|
|
|
html_header_6 = """\
|
2014-11-27 10:52:24 +01:00
|
|
|
API Reference</h1>
|
2002-07-30 20:49:52 +02:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
# The HTML footer used by all generated pages.
|
|
|
|
html_footer = """\
|
|
|
|
</body>
|
2008-06-26 21:56:51 +02:00
|
|
|
</html>\
|
|
|
|
"""
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
# The header and footer used for each section.
|
2015-11-28 11:58:49 +01:00
|
|
|
section_title_header1 = '<h1 id="'
|
|
|
|
section_title_header2 = '">'
|
2014-11-27 10:49:05 +01:00
|
|
|
section_title_footer = "</h1>"
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
# The header and footer used for code segments.
|
2003-07-26 00:21:57 +02:00
|
|
|
code_header = '<pre class="colored">'
|
|
|
|
code_footer = '</pre>'
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
# Paragraph header and footer.
|
|
|
|
para_header = "<p>"
|
|
|
|
para_footer = "</p>"
|
|
|
|
|
|
|
|
# Block header and footer.
|
2014-11-29 20:08:29 +01:00
|
|
|
block_header = '<div class="section">'
|
2006-05-12 17:05:45 +02:00
|
|
|
block_footer_start = """\
|
2014-11-27 13:20:52 +01:00
|
|
|
<hr>
|
2014-11-27 19:22:52 +01:00
|
|
|
<table class="index-toc-link"><tr><td class="left">[<a href="\
|
2006-05-12 17:05:45 +02:00
|
|
|
"""
|
|
|
|
block_footer_middle = """\
|
2014-11-29 20:08:29 +01:00
|
|
|
">Index</a>]</td>\
|
|
|
|
<td class="middle">[<a href="#">Top</a>]</td>\
|
2014-11-27 19:22:52 +01:00
|
|
|
<td class="right">[<a href="\
|
2006-05-12 17:05:45 +02:00
|
|
|
"""
|
|
|
|
block_footer_end = """\
|
2014-11-27 13:20:52 +01:00
|
|
|
">TOC</a>]</td></tr></table></div>
|
2006-05-12 17:05:45 +02:00
|
|
|
"""
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
# Description header/footer.
|
2014-11-29 20:08:29 +01:00
|
|
|
description_header = ""
|
|
|
|
description_footer = ""
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
# Marker header/inter/footer combination.
|
2014-11-29 20:08:29 +01:00
|
|
|
marker_header = "<h4>"
|
2014-11-28 05:33:58 +01:00
|
|
|
marker_inter = "</h4>"
|
2014-11-29 20:08:29 +01:00
|
|
|
marker_footer = ""
|
2002-07-30 20:49:52 +02:00
|
|
|
|
2008-06-02 15:53:54 +02:00
|
|
|
# Header location header/footer.
|
2014-11-29 20:08:29 +01:00
|
|
|
header_location_header = "<p>"
|
|
|
|
header_location_footer = "</p>"
|
2008-06-02 15:53:54 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
# Source code extracts header/footer.
|
2014-11-29 20:08:29 +01:00
|
|
|
source_header = "<pre>"
|
|
|
|
source_footer = "</pre>"
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
# Chapter header/inter/footer.
|
2014-11-29 22:19:29 +01:00
|
|
|
chapter_header = """\
|
|
|
|
<div class="section">
|
|
|
|
<h2>\
|
|
|
|
"""
|
|
|
|
chapter_inter = '</h2>'
|
|
|
|
chapter_footer = '</div>'
|
2002-07-30 20:49:52 +02:00
|
|
|
|
2006-12-01 09:20:47 +01:00
|
|
|
# Index footer.
|
|
|
|
index_footer_start = """\
|
|
|
|
<hr>
|
2014-11-27 19:22:52 +01:00
|
|
|
<table class="index-toc-link"><tr><td class="right">[<a href="\
|
2006-12-01 09:20:47 +01:00
|
|
|
"""
|
|
|
|
index_footer_end = """\
|
2014-11-27 10:52:24 +01:00
|
|
|
">TOC</a>]</td></tr></table>
|
2006-12-01 09:20:47 +01:00
|
|
|
"""
|
|
|
|
|
2008-06-26 21:56:51 +02:00
|
|
|
# TOC footer.
|
|
|
|
toc_footer_start = """\
|
|
|
|
<hr>
|
2014-11-27 19:22:52 +01:00
|
|
|
<table class="index-toc-link"><tr><td class="left">[<a href="\
|
2008-06-26 21:56:51 +02:00
|
|
|
"""
|
|
|
|
toc_footer_end = """\
|
2014-11-27 19:22:52 +01:00
|
|
|
">Index</a>]</td></tr></table>
|
2008-06-26 21:56:51 +02:00
|
|
|
"""
|
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
|
2014-11-24 06:44:45 +01:00
|
|
|
# Source language keyword coloration and styling.
|
Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.
This change reimplements fix from 2003-05-30 without breaking
binary compatibility.
* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.
* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro. Updated all callers.
* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
* src/psaux/psobjs.c (ps_parser_load_field): Updated.
* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
|
|
|
keyword_prefix = '<span class="keyword">'
|
|
|
|
keyword_suffix = '</span>'
|
2002-07-30 20:49:52 +02:00
|
|
|
|
Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.
This change reimplements fix from 2003-05-30 without breaking
binary compatibility.
* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.
* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro. Updated all callers.
* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
* src/psaux/psobjs.c (ps_parser_load_field): Updated.
* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
|
|
|
section_synopsis_header = '<h2>Synopsis</h2>'
|
|
|
|
section_synopsis_footer = ''
|
2002-07-30 20:49:52 +02:00
|
|
|
|
2008-01-18 06:14:13 +01:00
|
|
|
|
2014-11-24 06:44:45 +01:00
|
|
|
# Translate a single line of source to HTML. This converts `<', `>', and
|
|
|
|
# `&' into `<',`>', and `&'.
|
|
|
|
#
|
2008-01-18 06:14:13 +01:00
|
|
|
def html_quote( line ):
|
2014-11-24 06:44:45 +01:00
|
|
|
result = string.replace( line, "&", "&" )
|
|
|
|
result = string.replace( result, "<", "<" )
|
|
|
|
result = string.replace( result, ">", ">" )
|
2002-07-30 20:49:52 +02:00
|
|
|
return result
|
|
|
|
|
|
|
|
|
2014-11-24 06:44:45 +01:00
|
|
|
################################################################
|
|
|
|
##
|
|
|
|
## HTML FORMATTER CLASS
|
|
|
|
##
|
2008-05-28 08:39:33 +02:00
|
|
|
class HtmlFormatter( Formatter ):
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2008-01-18 06:14:13 +01:00
|
|
|
def __init__( self, processor, project_title, file_prefix ):
|
2002-07-30 20:49:52 +02:00
|
|
|
Formatter.__init__( self, processor )
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2014-11-29 06:49:15 +01:00
|
|
|
global html_header_1
|
|
|
|
global html_header_2
|
|
|
|
global html_header_3l, html_header_3r
|
|
|
|
global html_header_4
|
|
|
|
global html_header_5t, html_header_5i
|
|
|
|
global html_header_6
|
|
|
|
global html_footer
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
if file_prefix:
|
|
|
|
file_prefix = file_prefix + "-"
|
|
|
|
else:
|
|
|
|
file_prefix = ""
|
|
|
|
|
2014-11-24 06:44:45 +01:00
|
|
|
self.headers = processor.headers
|
|
|
|
self.project_title = project_title
|
|
|
|
self.file_prefix = file_prefix
|
|
|
|
self.html_header = (
|
|
|
|
html_header_1 + project_title
|
|
|
|
+ html_header_2
|
2014-11-27 19:22:52 +01:00
|
|
|
+ html_header_3l + file_prefix + "index.html"
|
2014-11-24 06:44:45 +01:00
|
|
|
+ html_header_4 + file_prefix + "toc.html"
|
2014-11-29 06:49:15 +01:00
|
|
|
+ html_header_5t + project_title
|
2014-11-24 06:44:45 +01:00
|
|
|
+ html_header_6 )
|
|
|
|
self.html_index_header = (
|
|
|
|
html_header_1 + project_title
|
|
|
|
+ html_header_2
|
2014-11-27 19:22:52 +01:00
|
|
|
+ html_header_3r + file_prefix + "toc.html"
|
2014-11-29 06:49:15 +01:00
|
|
|
+ html_header_5t + project_title
|
2014-11-24 06:44:45 +01:00
|
|
|
+ html_header_6 )
|
|
|
|
self.html_toc_header = (
|
|
|
|
html_header_1 + project_title
|
|
|
|
+ html_header_2
|
2014-11-27 19:22:52 +01:00
|
|
|
+ html_header_3l + file_prefix + "index.html"
|
2014-11-29 06:49:15 +01:00
|
|
|
+ html_header_5i + project_title
|
2014-11-24 06:44:45 +01:00
|
|
|
+ html_header_6 )
|
|
|
|
self.html_footer = (
|
2014-11-27 10:50:50 +01:00
|
|
|
'<div class="timestamp">generated on '
|
2014-11-24 06:44:45 +01:00
|
|
|
+ time.asctime( time.localtime( time.time() ) )
|
2014-11-27 10:50:50 +01:00
|
|
|
+ "</div>" + html_footer )
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
self.columns = 3
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
def make_section_url( self, section ):
|
|
|
|
return self.file_prefix + section.name + ".html"
|
|
|
|
|
2014-12-01 08:44:48 +01:00
|
|
|
def make_block_url( self, block, name = None ):
|
|
|
|
if name == None:
|
|
|
|
name = block.name
|
2015-11-28 11:58:49 +01:00
|
|
|
|
|
|
|
try:
|
|
|
|
section_url = self.make_section_url( block.section )
|
|
|
|
except:
|
|
|
|
# we already have a section
|
|
|
|
section_url = self.make_section_url( block )
|
|
|
|
|
|
|
|
return section_url + "#" + name
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
def make_html_word( self, word ):
|
2014-11-24 06:44:45 +01:00
|
|
|
"""Analyze a simple word to detect cross-references and markup."""
|
|
|
|
# handle cross-references
|
2002-07-30 20:49:52 +02:00
|
|
|
m = re_crossref.match( word )
|
|
|
|
if m:
|
|
|
|
try:
|
2015-11-26 14:29:17 +01:00
|
|
|
name = m.group( 'name' )
|
|
|
|
rest = m.group( 'rest' )
|
2006-05-12 06:00:44 +02:00
|
|
|
block = self.identifiers[name]
|
2002-07-30 20:49:52 +02:00
|
|
|
url = self.make_block_url( block )
|
2015-11-26 14:29:17 +01:00
|
|
|
# display `foo[bar]' as `foo'
|
|
|
|
name = re.sub( r'\[.*\]', '', name )
|
|
|
|
# normalize url, following RFC 3986
|
|
|
|
url = string.replace( url, "[", "(" )
|
|
|
|
url = string.replace( url, "]", ")" )
|
2015-11-28 11:58:49 +01:00
|
|
|
|
|
|
|
try:
|
|
|
|
# for sections, display title
|
|
|
|
url = ( '‘<a href="' + url + '">'
|
|
|
|
+ block.title + '</a>’'
|
|
|
|
+ rest )
|
|
|
|
except:
|
|
|
|
url = ( '<a href="' + url + '">'
|
|
|
|
+ name + '</a>'
|
|
|
|
+ rest )
|
|
|
|
|
|
|
|
return url
|
2002-07-30 20:49:52 +02:00
|
|
|
except:
|
2005-12-23 14:32:06 +01:00
|
|
|
# we detected a cross-reference to an unknown item
|
2014-11-24 06:44:45 +01:00
|
|
|
sys.stderr.write( "WARNING: undefined cross reference"
|
|
|
|
+ " '" + name + "'.\n" )
|
2003-07-25 07:57:21 +02:00
|
|
|
return '?' + name + '?' + rest
|
2002-07-30 20:49:52 +02:00
|
|
|
|
2014-11-24 06:44:45 +01:00
|
|
|
# handle markup for italic and bold
|
2002-07-30 20:49:52 +02:00
|
|
|
m = re_italic.match( word )
|
|
|
|
if m:
|
2008-01-18 06:14:13 +01:00
|
|
|
name = m.group( 1 )
|
2014-11-27 06:48:37 +01:00
|
|
|
rest = m.group( 2 )
|
2006-05-12 06:00:44 +02:00
|
|
|
return '<i>' + name + '</i>' + rest
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
m = re_bold.match( word )
|
|
|
|
if m:
|
2008-01-18 06:14:13 +01:00
|
|
|
name = m.group( 1 )
|
2014-11-27 06:48:37 +01:00
|
|
|
rest = m.group( 2 )
|
2006-05-12 06:00:44 +02:00
|
|
|
return '<b>' + name + '</b>' + rest
|
2002-07-30 20:49:52 +02:00
|
|
|
|
2008-01-18 06:14:13 +01:00
|
|
|
return html_quote( word )
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
def make_html_para( self, words ):
|
2014-11-24 06:44:45 +01:00
|
|
|
"""Convert words of a paragraph into tagged HTML text. Also handle
|
|
|
|
cross references."""
|
2002-07-30 20:49:52 +02:00
|
|
|
line = ""
|
|
|
|
if words:
|
|
|
|
line = self.make_html_word( words[0] )
|
|
|
|
for word in words[1:]:
|
|
|
|
line = line + " " + self.make_html_word( word )
|
2013-06-25 07:24:02 +02:00
|
|
|
# handle hyperlinks
|
|
|
|
line = re_url.sub( r'<a href="\1">\1</a>', line )
|
2006-03-24 19:31:47 +01:00
|
|
|
# convert `...' quotations into real left and right single quotes
|
2014-11-24 06:44:45 +01:00
|
|
|
line = re.sub( r"(^|\W)`(.*?)'(\W|$)",
|
|
|
|
r'\1‘\2’\3',
|
2006-03-24 19:31:47 +01:00
|
|
|
line )
|
2008-06-26 21:56:51 +02:00
|
|
|
# convert tilde into non-breakable space
|
|
|
|
line = string.replace( line, "~", " " )
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2006-03-24 19:31:47 +01:00
|
|
|
return para_header + line + para_footer
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
def make_html_code( self, lines ):
|
2014-11-24 06:44:45 +01:00
|
|
|
"""Convert a code sequence to HTML."""
|
2002-07-30 20:49:52 +02:00
|
|
|
line = code_header + '\n'
|
|
|
|
for l in lines:
|
2016-02-09 08:08:17 +01:00
|
|
|
line = line + html_quote( l ).rstrip() + '\n'
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
return line + code_footer
|
|
|
|
|
|
|
|
def make_html_items( self, items ):
|
2014-11-24 06:44:45 +01:00
|
|
|
"""Convert a field's content into HTML."""
|
2002-07-30 20:49:52 +02:00
|
|
|
lines = []
|
|
|
|
for item in items:
|
|
|
|
if item.lines:
|
|
|
|
lines.append( self.make_html_code( item.lines ) )
|
|
|
|
else:
|
|
|
|
lines.append( self.make_html_para( item.words ) )
|
|
|
|
|
|
|
|
return string.join( lines, '\n' )
|
|
|
|
|
|
|
|
def print_html_items( self, items ):
|
|
|
|
print self.make_html_items( items )
|
|
|
|
|
2008-01-18 06:14:13 +01:00
|
|
|
def print_html_field( self, field ):
|
2002-07-30 20:49:52 +02:00
|
|
|
if field.name:
|
2014-11-27 08:01:25 +01:00
|
|
|
print( '<table><tr valign="top"><td><b>'
|
2014-11-24 06:44:45 +01:00
|
|
|
+ field.name
|
|
|
|
+ "</b></td><td>" )
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
print self.make_html_items( field.items )
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
if field.name:
|
|
|
|
print "</td></tr></table>"
|
|
|
|
|
2008-01-18 06:14:13 +01:00
|
|
|
def html_source_quote( self, line, block_name = None ):
|
2002-07-30 20:49:52 +02:00
|
|
|
result = ""
|
|
|
|
while line:
|
|
|
|
m = re_source_crossref.match( line )
|
|
|
|
if m:
|
2008-01-18 06:14:13 +01:00
|
|
|
name = m.group( 2 )
|
|
|
|
prefix = html_quote( m.group( 1 ) )
|
|
|
|
length = len( m.group( 0 ) )
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
if name == block_name:
|
|
|
|
# this is the current block name, if any
|
|
|
|
result = result + prefix + '<b>' + name + '</b>'
|
2008-01-18 06:14:13 +01:00
|
|
|
elif re_source_keywords.match( name ):
|
2002-07-30 20:49:52 +02:00
|
|
|
# this is a C keyword
|
2014-11-24 06:44:45 +01:00
|
|
|
result = ( result + prefix
|
|
|
|
+ keyword_prefix + name + keyword_suffix )
|
2014-12-02 08:38:57 +01:00
|
|
|
elif name in self.identifiers:
|
2002-07-30 20:49:52 +02:00
|
|
|
# this is a known identifier
|
|
|
|
block = self.identifiers[name]
|
2014-12-01 08:44:48 +01:00
|
|
|
id = block.name
|
|
|
|
|
|
|
|
# link to a field ID if possible
|
2015-11-28 11:58:49 +01:00
|
|
|
try:
|
|
|
|
for markup in block.markups:
|
|
|
|
if markup.tag == 'values':
|
|
|
|
for field in markup.fields:
|
|
|
|
if field.name:
|
|
|
|
id = name
|
|
|
|
|
|
|
|
result = ( result + prefix
|
|
|
|
+ '<a href="'
|
|
|
|
+ self.make_block_url( block, id )
|
|
|
|
+ '">' + name + '</a>' )
|
|
|
|
except:
|
|
|
|
# sections don't have `markups'; however, we don't
|
|
|
|
# want references to sections here anyway
|
|
|
|
result = result + html_quote( line[:length] )
|
2014-12-01 08:44:48 +01:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
else:
|
2008-01-18 06:14:13 +01:00
|
|
|
result = result + html_quote( line[:length] )
|
2002-07-30 20:49:52 +02:00
|
|
|
|
2006-05-12 06:00:44 +02:00
|
|
|
line = line[length:]
|
2002-07-30 20:49:52 +02:00
|
|
|
else:
|
2008-01-18 06:14:13 +01:00
|
|
|
result = result + html_quote( line )
|
2002-07-30 20:49:52 +02:00
|
|
|
line = []
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
return result
|
|
|
|
|
2008-01-18 06:14:13 +01:00
|
|
|
def print_html_field_list( self, fields ):
|
2014-11-28 22:04:14 +01:00
|
|
|
print '<table class="fields">'
|
2002-09-18 00:57:29 +02:00
|
|
|
for field in fields:
|
2014-12-01 08:44:48 +01:00
|
|
|
print ( '<tr><td class="val" id="' + field.name + '">'
|
2014-11-28 22:04:14 +01:00
|
|
|
+ field.name
|
|
|
|
+ '</td><td class="desc">' )
|
2002-07-30 20:49:52 +02:00
|
|
|
self.print_html_items( field.items )
|
* src/pfr/pfrsbit.h, src/pfr/pfrsbit.c, src/pfr/pfrload.c,
src/pfr/pfrgload.c, src/pfr/pfrobjs.c, src/pfr/pfrtypes.h,
Jamfile, src/base/ftobjs.c: adding support for embedded bitmaps to
the PFR driver, and rewriting its kerning loader / handler to use all
kerning pairs in a physical font (and not just the first item).
* src/tools/docmaker/content.py, src/tools/docmaker/sources.py,
src/tools/docmaker/tohtml.py: fixing a few nasty bugs
* src/sfnt/ttcmap0.c: the validator for format 4 sub-tables is
now capable of dealing with invalid "length" fields at the start
of the sub-table. This allows fonts like "mg______.ttf" (i.e.
Marriage) to return accurate charmaps.
2002-10-05 16:57:03 +02:00
|
|
|
print "</td></tr>"
|
2002-07-30 20:49:52 +02:00
|
|
|
print "</table>"
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2008-01-18 06:14:13 +01:00
|
|
|
def print_html_markup( self, markup ):
|
2002-07-30 20:49:52 +02:00
|
|
|
table_fields = []
|
|
|
|
for field in markup.fields:
|
|
|
|
if field.name:
|
2014-11-24 06:44:45 +01:00
|
|
|
# We begin a new series of field or value definitions. We
|
|
|
|
# record them in the `table_fields' list before outputting
|
|
|
|
# all of them as a single table.
|
2002-07-30 20:49:52 +02:00
|
|
|
table_fields.append( field )
|
|
|
|
else:
|
|
|
|
if table_fields:
|
|
|
|
self.print_html_field_list( table_fields )
|
|
|
|
table_fields = []
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
self.print_html_items( field.items )
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
if table_fields:
|
|
|
|
self.print_html_field_list( table_fields )
|
|
|
|
|
|
|
|
#
|
2014-11-24 06:44:45 +01:00
|
|
|
# formatting the index
|
2002-07-30 20:49:52 +02:00
|
|
|
#
|
|
|
|
def index_enter( self ):
|
2008-06-26 21:56:51 +02:00
|
|
|
print self.html_index_header
|
2002-07-30 20:49:52 +02:00
|
|
|
self.index_items = {}
|
|
|
|
|
|
|
|
def index_name_enter( self, name ):
|
2006-05-12 06:00:44 +02:00
|
|
|
block = self.identifiers[name]
|
2002-07-30 20:49:52 +02:00
|
|
|
url = self.make_block_url( block )
|
2006-05-12 06:00:44 +02:00
|
|
|
self.index_items[name] = url
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
def index_exit( self ):
|
2014-11-24 06:44:45 +01:00
|
|
|
# `block_index' already contains the sorted list of index names
|
2002-07-30 20:49:52 +02:00
|
|
|
count = len( self.block_index )
|
2014-12-02 08:38:57 +01:00
|
|
|
rows = ( count + self.columns - 1 ) // self.columns
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2014-11-27 19:38:31 +01:00
|
|
|
print '<table class="index">'
|
2008-01-18 06:14:13 +01:00
|
|
|
for r in range( rows ):
|
2002-07-30 20:49:52 +02:00
|
|
|
line = "<tr>"
|
2008-01-18 06:14:13 +01:00
|
|
|
for c in range( self.columns ):
|
2008-05-28 08:39:33 +02:00
|
|
|
i = r + c * rows
|
2002-07-30 20:49:52 +02:00
|
|
|
if i < count:
|
2006-05-12 06:00:44 +02:00
|
|
|
bname = self.block_index[r + c * rows]
|
|
|
|
url = self.index_items[bname]
|
2015-11-26 14:29:17 +01:00
|
|
|
# display `foo[bar]' as `foo (bar)'
|
|
|
|
bname = string.replace( bname, "[", " (" )
|
|
|
|
bname = string.replace( bname, "]", ")" )
|
|
|
|
# normalize url, following RFC 3986
|
|
|
|
url = string.replace( url, "[", "(" )
|
|
|
|
url = string.replace( url, "]", ")" )
|
2014-11-24 06:44:45 +01:00
|
|
|
line = ( line + '<td><a href="' + url + '">'
|
|
|
|
+ bname + '</a></td>' )
|
2002-07-30 20:49:52 +02:00
|
|
|
else:
|
|
|
|
line = line + '<td></td>'
|
|
|
|
line = line + "</tr>"
|
|
|
|
print line
|
|
|
|
|
Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.
This change reimplements fix from 2003-05-30 without breaking
binary compatibility.
* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.
* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro. Updated all callers.
* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
* src/psaux/psobjs.c (ps_parser_load_field): Updated.
* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
|
|
|
print "</table>"
|
2006-12-01 09:20:47 +01:00
|
|
|
|
2014-11-24 06:44:45 +01:00
|
|
|
print( index_footer_start
|
|
|
|
+ self.file_prefix + "toc.html"
|
|
|
|
+ index_footer_end )
|
2006-12-01 09:20:47 +01:00
|
|
|
|
2008-06-26 21:56:51 +02:00
|
|
|
print self.html_footer
|
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
self.index_items = {}
|
|
|
|
|
|
|
|
def index_dump( self, index_filename = None ):
|
|
|
|
if index_filename == None:
|
|
|
|
index_filename = self.file_prefix + "index.html"
|
|
|
|
|
|
|
|
Formatter.index_dump( self, index_filename )
|
|
|
|
|
|
|
|
#
|
2014-11-24 06:44:45 +01:00
|
|
|
# formatting the table of contents
|
2002-09-18 00:57:29 +02:00
|
|
|
#
|
2002-07-30 20:49:52 +02:00
|
|
|
def toc_enter( self ):
|
2008-06-26 21:56:51 +02:00
|
|
|
print self.html_toc_header
|
2014-11-27 10:49:05 +01:00
|
|
|
print "<h1>Table of Contents</h1>"
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
def toc_chapter_enter( self, chapter ):
|
2014-11-24 06:44:45 +01:00
|
|
|
print chapter_header + string.join( chapter.title ) + chapter_inter
|
2014-11-29 22:19:29 +01:00
|
|
|
print '<table class="toc">'
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
def toc_section_enter( self, section ):
|
2014-11-29 22:19:29 +01:00
|
|
|
print ( '<tr><td class="link">'
|
|
|
|
+ '<a href="' + self.make_section_url( section ) + '">'
|
|
|
|
+ section.title + '</a></td><td class="desc">' )
|
2002-07-30 20:49:52 +02:00
|
|
|
print self.make_html_para( section.abstract )
|
|
|
|
|
|
|
|
def toc_section_exit( self, section ):
|
|
|
|
print "</td></tr>"
|
|
|
|
|
|
|
|
def toc_chapter_exit( self, chapter ):
|
|
|
|
print "</table>"
|
2008-06-26 21:56:51 +02:00
|
|
|
print chapter_footer
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
def toc_index( self, index_filename ):
|
2014-11-24 06:44:45 +01:00
|
|
|
print( chapter_header
|
|
|
|
+ '<a href="' + index_filename + '">Global Index</a>'
|
|
|
|
+ chapter_inter + chapter_footer )
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
def toc_exit( self ):
|
2014-11-24 06:44:45 +01:00
|
|
|
print( toc_footer_start
|
|
|
|
+ self.file_prefix + "index.html"
|
|
|
|
+ toc_footer_end )
|
2008-06-26 21:56:51 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
print self.html_footer
|
|
|
|
|
|
|
|
def toc_dump( self, toc_filename = None, index_filename = None ):
|
|
|
|
if toc_filename == None:
|
|
|
|
toc_filename = self.file_prefix + "toc.html"
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
if index_filename == None:
|
|
|
|
index_filename = self.file_prefix + "index.html"
|
|
|
|
|
|
|
|
Formatter.toc_dump( self, toc_filename, index_filename )
|
|
|
|
|
|
|
|
#
|
2014-11-24 06:44:45 +01:00
|
|
|
# formatting sections
|
2002-07-30 20:49:52 +02:00
|
|
|
#
|
|
|
|
def section_enter( self, section ):
|
|
|
|
print self.html_header
|
|
|
|
|
2015-11-28 11:58:49 +01:00
|
|
|
print ( section_title_header1 + section.name + section_title_header2
|
|
|
|
+ section.title
|
|
|
|
+ section_title_footer )
|
2002-07-30 20:49:52 +02:00
|
|
|
|
* src/pfr/pfrsbit.h, src/pfr/pfrsbit.c, src/pfr/pfrload.c,
src/pfr/pfrgload.c, src/pfr/pfrobjs.c, src/pfr/pfrtypes.h,
Jamfile, src/base/ftobjs.c: adding support for embedded bitmaps to
the PFR driver, and rewriting its kerning loader / handler to use all
kerning pairs in a physical font (and not just the first item).
* src/tools/docmaker/content.py, src/tools/docmaker/sources.py,
src/tools/docmaker/tohtml.py: fixing a few nasty bugs
* src/sfnt/ttcmap0.c: the validator for format 4 sub-tables is
now capable of dealing with invalid "length" fields at the start
of the sub-table. This allows fonts like "mg______.ttf" (i.e.
Marriage) to return accurate charmaps.
2002-10-05 16:57:03 +02:00
|
|
|
maxwidth = 0
|
2002-07-30 20:49:52 +02:00
|
|
|
for b in section.blocks.values():
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 02:22:46 +02:00
|
|
|
if len( b.name ) > maxwidth:
|
|
|
|
maxwidth = len( b.name )
|
2002-07-30 20:49:52 +02:00
|
|
|
|
2008-01-18 06:14:13 +01:00
|
|
|
width = 70 # XXX magic number
|
2014-12-02 08:38:57 +01:00
|
|
|
if maxwidth > 0:
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 02:22:46 +02:00
|
|
|
# print section synopsis
|
|
|
|
print section_synopsis_header
|
2014-11-27 19:22:52 +01:00
|
|
|
print '<table class="synopsis">'
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 02:22:46 +02:00
|
|
|
|
2014-12-02 08:38:57 +01:00
|
|
|
columns = width // maxwidth
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 02:22:46 +02:00
|
|
|
if columns < 1:
|
|
|
|
columns = 1
|
|
|
|
|
|
|
|
count = len( section.block_names )
|
2014-12-02 10:27:40 +01:00
|
|
|
# don't handle last entry if it is empty
|
|
|
|
if section.block_names[-1] == "/empty/":
|
|
|
|
count -= 1
|
2014-12-02 08:38:57 +01:00
|
|
|
rows = ( count + columns - 1 ) // columns
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 02:22:46 +02:00
|
|
|
|
|
|
|
for r in range( rows ):
|
|
|
|
line = "<tr>"
|
|
|
|
for c in range( columns ):
|
|
|
|
i = r + c * rows
|
2014-11-28 05:49:56 +01:00
|
|
|
line = line + '<td>'
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 02:22:46 +02:00
|
|
|
if i < count:
|
|
|
|
name = section.block_names[i]
|
2014-12-02 21:16:59 +01:00
|
|
|
if name == "/empty/":
|
|
|
|
# it can happen that a complete row is empty, and
|
|
|
|
# without a proper `filler' the browser might
|
|
|
|
# collapse the row to a much smaller height (or
|
|
|
|
# even omit it completely)
|
|
|
|
line = line + " "
|
|
|
|
else:
|
2015-11-26 14:29:17 +01:00
|
|
|
url = name
|
|
|
|
# display `foo[bar]' as `foo'
|
|
|
|
name = re.sub( r'\[.*\]', '', name )
|
|
|
|
# normalize url, following RFC 3986
|
|
|
|
url = string.replace( url, "[", "(" )
|
|
|
|
url = string.replace( url, "]", ")" )
|
|
|
|
line = ( line + '<a href="#' + url + '">'
|
2014-12-02 10:27:40 +01:00
|
|
|
+ name + '</a>' )
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 02:22:46 +02:00
|
|
|
|
|
|
|
line = line + '</td>'
|
|
|
|
line = line + "</tr>"
|
|
|
|
print line
|
|
|
|
|
2014-11-29 20:08:29 +01:00
|
|
|
print "</table>"
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 02:22:46 +02:00
|
|
|
print section_synopsis_footer
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
print description_header
|
|
|
|
print self.make_html_items( section.description )
|
|
|
|
print description_footer
|
|
|
|
|
|
|
|
def block_enter( self, block ):
|
|
|
|
print block_header
|
|
|
|
|
|
|
|
# place html anchor if needed
|
|
|
|
if block.name:
|
2015-11-26 14:29:17 +01:00
|
|
|
url = block.name
|
|
|
|
# display `foo[bar]' as `foo'
|
|
|
|
name = re.sub( r'\[.*\]', '', block.name )
|
|
|
|
# normalize url, following RFC 3986
|
|
|
|
url = string.replace( url, "[", "(" )
|
|
|
|
url = string.replace( url, "]", ")" )
|
|
|
|
print( '<h3 id="' + url + '">' + name + '</h3>' )
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
# dump the block C source lines now
|
|
|
|
if block.code:
|
2008-06-02 15:53:54 +02:00
|
|
|
header = ''
|
|
|
|
for f in self.headers.keys():
|
|
|
|
if block.source.filename.find( f ) >= 0:
|
|
|
|
header = self.headers[f] + ' (' + f + ')'
|
2014-12-22 03:31:32 +01:00
|
|
|
break
|
2013-01-24 13:33:06 +01:00
|
|
|
|
2008-06-02 15:53:54 +02:00
|
|
|
# if not header:
|
2014-11-24 06:44:45 +01:00
|
|
|
# sys.stderr.write(
|
|
|
|
# "WARNING: No header macro for"
|
|
|
|
# + " '" + block.source.filename + "'.\n" )
|
2008-06-02 15:53:54 +02:00
|
|
|
|
|
|
|
if header:
|
2014-11-29 20:08:29 +01:00
|
|
|
print ( header_location_header
|
|
|
|
+ 'Defined in ' + header + '.'
|
|
|
|
+ header_location_footer )
|
2008-06-02 15:53:54 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
print source_header
|
|
|
|
for l in block.code:
|
|
|
|
print self.html_source_quote( l, block.name )
|
|
|
|
print source_footer
|
|
|
|
|
|
|
|
def markup_enter( self, markup, block ):
|
|
|
|
if markup.tag == "description":
|
|
|
|
print description_header
|
|
|
|
else:
|
|
|
|
print marker_header + markup.tag + marker_inter
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
self.print_html_markup( markup )
|
2002-09-18 00:57:29 +02:00
|
|
|
|
2002-07-30 20:49:52 +02:00
|
|
|
def markup_exit( self, markup, block ):
|
|
|
|
if markup.tag == "description":
|
|
|
|
print description_footer
|
|
|
|
else:
|
|
|
|
print marker_footer
|
|
|
|
|
|
|
|
def block_exit( self, block ):
|
2014-11-24 06:44:45 +01:00
|
|
|
print( block_footer_start + self.file_prefix + "index.html"
|
|
|
|
+ block_footer_middle + self.file_prefix + "toc.html"
|
|
|
|
+ block_footer_end )
|
2002-07-30 20:49:52 +02:00
|
|
|
|
|
|
|
def section_exit( self, section ):
|
|
|
|
print html_footer
|
|
|
|
|
2008-01-18 06:14:13 +01:00
|
|
|
def section_dump_all( self ):
|
2002-07-30 20:49:52 +02:00
|
|
|
for section in self.sections:
|
2014-11-24 06:44:45 +01:00
|
|
|
self.section_dump( section,
|
|
|
|
self.file_prefix + section.name + '.html' )
|
2005-12-23 14:32:06 +01:00
|
|
|
|
2007-02-01 08:58:02 +01:00
|
|
|
# eof
|