shithub: freetype+ttf2subf

Download patch

ref: 26d699ed84898b09b65bb30a0a64aef535d7edaa
parent: 1b12f5d126c7da38458f5a3b1846c93193a5e8c7
author: Werner Lemberg <[email protected]>
date: Thu Nov 27 14:22:52 EST 2014

* 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.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2014-11-27  Werner Lemberg  <[email protected]>
+
+	* 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  suzuki toshiya  <[email protected]>
 
 	* src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
--- a/src/tools/docmaker/tohtml.py
+++ b/src/tools/docmaker/tohtml.py
@@ -65,14 +65,23 @@
 
   table.center { margin: auto; }
   table.fill { width: 100%; }
+  table.index-toc-link { width: 100%; }
+  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+                                 font-size: 83%;
+                                 text-align: left; }
+  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+                                  font-size: 83%;
+                                  text-align: right; }
+  table.synopsis { margin: auto;
+                   border: 0;
+                   border-collapse: separate;
+                   border-spacing: 1em 1ex; }
+  table.synopsis tr { padding: 0; }
+  table.synopsis td { padding: 0; }
 
   td { padding: 0 0.5em 0 0.5em; }
   td.left { padding: 0 0.5em 0 0.5em;
             text-align: left; }
-  td.small { padding: 0 0.5em 0 0.5em;
-             font-size: 83%; }
-  td.tiny { padding: 0 0.5em 0 0.5em;
-            font-size: 69%; }
 
   tr.mark { background-color: #EEEEFF; }
   tr.code { background-color: #D6E8FF; }
@@ -83,19 +92,17 @@
 <body>
 """
 
-html_header_3 = """
-<table class="center"><tr><td class="small">[<a href="\
+html_header_3l = """
+<table class="index-toc-link"><tr><td class="left">[<a href="\
 """
 
-html_header_3i = """
-<table class="center"><tr><td width="100%"></td>
-<td class="small">[<a href="\
+html_header_3r = """
+<table class="index-toc-link"><tr><td class="right">[<a href="\
 """
 
 html_header_4 = """\
 ">Index</a>]</td>
-<td width="100%"></td>
-<td class="small">[<a href="\
+<td class="right">[<a href="\
 """
 
 html_header_5 = """\
@@ -103,12 +110,6 @@
 <h1>\
 """
 
-html_header_5t = """\
-">Index</a>]</td>
-<td width="100%"></td></tr></table>
-<h1>\
-"""
-
 html_header_6 = """\
  API Reference</h1>
 """
@@ -136,12 +137,11 @@
 block_header        = '<div class="indent2">'
 block_footer_start  = """\
 <hr>
-<table><tr><td class="small">[<a href="\
+<table class="index-toc-link"><tr><td class="left">[<a href="\
 """
 block_footer_middle = """\
 ">Index</a>]</td>
-<td width="100%"></td>
-<td class="small">[<a href="\
+<td class="right">[<a href="\
 """
 block_footer_end    = """\
 ">TOC</a>]</td></tr></table></div>
@@ -172,8 +172,7 @@
 # Index footer.
 index_footer_start = """\
 <hr>
-<table><tr><td width="100%"></td>
-<td class="tiny">[<a href="\
+<table class="index-toc-link"><tr><td class="right">[<a href="\
 """
 index_footer_end = """\
 ">TOC</a>]</td></tr></table>
@@ -182,12 +181,10 @@
 # TOC footer.
 toc_footer_start = """\
 <hr>
-<table><tr><td class="tiny">[<a href="\
+<table class="index-toc-link"><tr><td class="left">[<a href="\
 """
 toc_footer_end = """\
-">Index</a>]</td>
-<td width="100%"></td>
-</tr></table>
+">Index</a>]</td></tr></table>
 """
 
 
@@ -232,7 +229,7 @@
         self.html_header   = (
           html_header_1 + project_title
           + html_header_2
-          + html_header_3 + file_prefix + "index.html"
+          + html_header_3l + file_prefix + "index.html"
           + html_header_4 + file_prefix + "toc.html"
           + html_header_5 + project_title
           + html_header_6 )
@@ -239,14 +236,14 @@
         self.html_index_header = (
           html_header_1 + project_title
           + html_header_2
-          + html_header_3i + file_prefix + "toc.html"
+          + html_header_3r + file_prefix + "toc.html"
           + html_header_5 + project_title
           + html_header_6 )
         self.html_toc_header = (
           html_header_1 + project_title
           + html_header_2
-          + html_header_3 + file_prefix + "index.html"
-          + html_header_5t + project_title
+          + html_header_3l + file_prefix + "index.html"
+          + html_header_5 + project_title
           + html_header_6 )
         self.html_footer = (
           '<div class="timestamp">generated on '
@@ -526,7 +523,7 @@
         if maxwidth <> 0:
             # print section synopsis
             print section_synopsis_header
-            print '<table class="center" cellspacing="5" cellpadding="0" border="0">'
+            print '<table class="synopsis">'
 
             columns = width / maxwidth
             if columns < 1: