<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt><br>
</tt>
<blockquote
style="border-left: 2px solid rgb(0, 153, 0) ! important; border-right: 2px solid rgb(0, 153, 0) ! important; margin: 8px 2px; padding: 0px 15px;"
cite="mid:C0A819320ee52014E6NpmJF546D5@192.168.25.40" type="cite"><tt><span
class="headerSpan">On 2010-06-09 at 18:49 Eric Muller wrote:<br>
<br>
</span></tt></blockquote>
<tt>Thanks, Eric, for taking time to reply. I hope others will also
chime in at some point.<br>
<br>
</tt>
<blockquote
style="border-left: 2px solid rgb(0, 153, 0) ! important; border-right: 2px solid rgb(0, 153, 0) ! important; margin: 8px 2px; padding: 0px 15px;"
cite="mid:C0A819320ee52014E6NpmJF546D5@192.168.25.40" type="cite">
<pre wrap=""><tt>Remember that the coverage index is used to index in tables, so it must
be in the range [0..nb_covered_glyphs -1]. </tt></pre>
</blockquote>
<tt>Ok, I can agree with that.<br>
<br>
</tt>
<blockquote
style="border-left: 2px solid rgb(0, 153, 0) ! important; border-right: 2px solid rgb(0, 153, 0) ! important; margin: 8px 2px; padding: 0px 15px;"
cite="mid:C0A819320ee52014E6NpmJF546D5@192.168.25.40" type="cite">
<pre wrap=""><tt>The field coverageIndex is
just a "cached" value, namely the number of glyphs covered by the
previous ranges. </tt></pre>
</blockquote>
<tt>Other than the sentence I originally quoted (from which one might
deduce that the field is intended as a cache, but it certainly isn't
explicit), is it said somewhere that the StartCoverageIndex (SCI) field
is simply a cache?<br>
<br>
</tt>
<blockquote
style="border-left: 2px solid rgb(0, 153, 0) ! important; border-right: 2px solid rgb(0, 153, 0) ! important; margin: 8px 2px; padding: 0px 15px;"
cite="mid:C0A819320ee52014E6NpmJF546D5@192.168.25.40" type="cite">
<pre wrap=""><tt>Since ranges are ordered, you can binary search for the
range of interest, and the cached value saves you the visit to each
previous range (which the search may not have visited).
</tt></pre>
</blockquote>
I agree this is a reason to have SCI in each range.<br>
<br>
<blockquote
style="border-left: 2px solid rgb(0, 153, 0) ! important; border-right: 2px solid rgb(0, 153, 0) ! important; margin: 8px 2px; padding: 0px 15px;"
cite="mid:C0A819320ee52014E6NpmJF546D5@192.168.25.40" type="cite">
<pre wrap=""><tt>The spec could be improved by changing the text you quote to something
like: "The StartCoverageIndex of a range must be the number of glyphs
covered by the preceding ranges (and therefore 0 for the first range)"
</tt></pre>
</blockquote>
<tt>Yes that would make it clearly state what you are suggesting. But
I'm wondering if requiring ascending SCI was really the intent of the
spec?<br>
<br>
In any case, why would this constraint be necessary? <tt>Any
implementation worth its salt would, as you suggest, do a binary search
on the
ranges and then depend on the SCI value in the located range record. </tt>Thus
following set of
ranges, for example, satisfy the requirement that the coverage indices
be in the range [0..nb_covered_glyphs-1]:<br>
<br>
start: 10<br>
end: 10<br>
SCI: 2<br>
<br>
start: 20<br>
end: 21<br>
SCI: 0<br>
<br>
but they are clearly not in ascending SCI order.<br>
<br>
I'm not trying to be difficult. We agree that the spec wording could be
improved -- just that I would propose to eliminate the confusing
sentence:<br>
<br>
<blockquote type="cite"><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span
class="Apple-style-span"
style="font-family: Georgia,'Times New Roman',Times,serif; font-size: 13px;">The
Coverage Indexes for the first range begin with zero (0), and the Start
Coverage Indexes for each succeeding range are determined by adding the
length of the preceding range (End GlyphID - Start GlyphID + 1) to the
array Index.<span class="Apple-converted-space"> </span></span></span></blockquote>
<br>
Bob</tt><tt><br>
</tt>
</body>
</html>