Rodger Combs [Thu, 11 Oct 2018 07:32:50 +0000 (02:32 -0500)]
coretext: replace CT attr reads with freetype lookups
This makes results much more consistent with other platforms,
particularly around cases where fonts have multiple conflicting names.
Rodger Combs [Sat, 23 Mar 2019 13:30:32 +0000 (08:30 -0500)]
fontselect: add overflow check
Rodger Combs [Sat, 23 Mar 2019 13:30:16 +0000 (08:30 -0500)]
fontselect: expose the freetype-provided family as well
Rodger Combs [Wed, 16 Jan 2019 00:17:57 +0000 (18:17 -0600)]
fontselect: provide a way to use freetype to get font info
Rodger Combs [Fri, 12 Oct 2018 05:58:04 +0000 (00:58 -0500)]
coretext: use weight steps from macOS SDK
Rodger Combs [Fri, 12 Oct 2018 05:37:47 +0000 (00:37 -0500)]
fontconfig: improve weight mapping
Use FcWeightToOpenType when available; otherwise, use an if/elseif ladder
implementing the inverse of fontconfig's behavior.
Rodger Combs [Fri, 12 Oct 2018 05:35:18 +0000 (00:35 -0500)]
fontselect: load actual weight instead of a guess, when possible
Rodger Combs [Fri, 12 Oct 2018 05:33:37 +0000 (00:33 -0500)]
font: don't faux-bold fonts that are already bold enough
And conversely, do faux-bold fonts that are too thin
The offset of 150 matches VSFilter's behavior
Rodger Combs [Fri, 12 Oct 2018 05:22:53 +0000 (00:22 -0500)]
font: add function to get the actual weight of a font face
Rodger Combs [Thu, 11 Oct 2018 07:32:50 +0000 (02:32 -0500)]
coretext: fix reading weights of some fonts
Some fonts have weights that can be expressed more precisely as doubles than
as floats. In these cases, when writing to a float, CFNumberGetValue will set
the value to the closest approximation, but return false (so we'd just clobber
whatever it set with 0). Easy fix: just store to a double instead.
Dr.Smile [Sat, 13 Jul 2019 23:27:15 +0000 (02:27 +0300)]
renderer: fix incorrect deallocation
shift_event() can change "bitmap" field of ASS_Image struct
so direct deallocation is no longer possible.
This commit introduces additional field "buffer"
into ASS_ImagePriv for that purpose.
Fixes https://github.com/libass/libass/issues/310.
Khaled Hosny [Sat, 24 Feb 2018 11:50:57 +0000 (13:50 +0200)]
Use FriBiDi 1.x API when available
This allows making use of the updated UBA in Unicode 6.3 and up.
C.W. Betts [Wed, 25 Sep 2019 22:41:22 +0000 (16:41 -0600)]
Update ass_fontselect.h
Fix documentation misspellings/texts.
As reported by Clang.
Dr.Smile [Mon, 20 May 2019 21:37:05 +0000 (00:37 +0300)]
Fix bunch of UB
Found by Coverity Scan and -fsanitize=undefined
Dr.Smile [Sun, 2 Dec 2018 20:26:08 +0000 (23:26 +0300)]
renderer: synchronize glyph motion to help composite cache
Slow movement of one glyph looks like periodic jumps by quantization step.
In case of multiple glyphs at different subpixel shifts
jumps of individual glyphs occur at different frames.
That leads to performance penalty due to composite image
regeneration at every such jump.
This commit aligns glyphs in such a way that all jumps coincide
at the same frames, greatly improving performance of \move commands.
That optimization also helps in case of fast motion.
Dr.Smile [Sun, 2 Dec 2018 20:08:47 +0000 (23:08 +0300)]
outline: eliminate use of VLA
Fixes https://github.com/libass/libass/pull/321.
Dr.Smile [Sun, 19 May 2019 22:09:08 +0000 (01:09 +0300)]
outline: rearrange allocations
Dr.Smile [Sun, 22 Oct 2017 04:21:34 +0000 (07:21 +0300)]
Move outline transformations to ass_outline.c
This also potentially improves performance by copying
and transforming in a single operation rather than
copying first and then transforming the result.
Also transformation function is specialized for case
where expensive perspective division is not necessary.
Dr.Smile [Sun, 19 May 2019 22:07:36 +0000 (01:07 +0300)]
renderer: quantize blur radius and shadow offset
Dr.Smile [Sat, 8 Dec 2018 18:00:42 +0000 (21:00 +0300)]
renderer: eliminate use of bitmap pointers as mode flags
Render logic should depend only on input subs
and not on some internal state such as bitmap pointers.
That can prevent incorrect behavior in case of allocation failure.
Dr.Smile [Sun, 19 May 2019 22:04:22 +0000 (01:04 +0300)]
renderer: correctly handle case of small but nonzero \bord
Fixes https://github.com/libass/libass/pull/309.
Dr.Smile [Sat, 8 Dec 2018 17:41:22 +0000 (20:41 +0300)]
renderer: rearrange render flags
Compatibility flag FILTER_DRAW_SHADOW has removed completely.
Dr.Smile [Sat, 8 Dec 2018 18:03:37 +0000 (21:03 +0300)]
bitmap: make ass_synth_blur() work on single bitmap
Now ass_synth_blur() blurs one bitmap only.
Higher level decisions (to blur or not to blur)
have moved outside of that function.
Dr.Smile [Thu, 3 May 2018 00:09:52 +0000 (03:09 +0300)]
bitmap: remove level of indirection in bitmap functions
This allows to use Bitmap struct directly as cache value
and to remove bunch of unnecessary allocations.
Dr.Smile [Wed, 2 May 2018 22:04:11 +0000 (01:04 +0300)]
bitmap: use types of fixed size in Bitmap struct
Dr.Smile [Sun, 22 Oct 2017 04:42:33 +0000 (07:42 +0300)]
renderer: improve usability of rectangle_combine()
Dr.Smile [Fri, 29 Sep 2017 00:49:18 +0000 (03:49 +0300)]
cache: remove level of indirection in glyph metrics value
Dr.Smile [Sun, 19 May 2019 22:01:34 +0000 (01:01 +0300)]
renderer: improve handling of subpixel shift
Integral pixel shift is extracted in quantization function now,
taking account of full glyph transformation and not only translation
part of it. It makes program logic more straight and ensures that
subpixel shift from cache key never exceed full pixel.
Dr.Smile [Sun, 19 May 2019 21:58:13 +0000 (00:58 +0300)]
renderer: implement correct error estimation for stroking
Accuracy of border outline calculation should depend on subsequent
transformation.
Dr.Smile [Sun, 19 May 2019 21:50:49 +0000 (00:50 +0300)]
renderer: move outline stroking immediately before rasterization
Dr.Smile [Sun, 19 May 2019 21:48:26 +0000 (00:48 +0300)]
Consolidate and quantize all transformations
This commit defers all outline transformations until rasterization stage.
Combined transformation is then quantized and used as bitmap key.
That should improve performance of slow animations.
Also caching of initial and stroked outlines and bitmaps is now separate
in preparation to proper error estimation for stroker stage.
Note that Z-clipping for perspective transformations is now done
differently compared to VSFilter. That clipping is mostly safety feature
to protect from overflows and divisions by zero and is almost never
triggered in real-world subtitles.
Dr.Smile [Sun, 2 Dec 2018 20:37:12 +0000 (23:37 +0300)]
renderer: fix potential memory leak
Dr.Smile [Sun, 22 Oct 2017 02:58:24 +0000 (05:58 +0300)]
font: extract transformation from ass_font_get_glyph()
Dr.Smile [Sun, 2 Dec 2018 19:43:52 +0000 (22:43 +0300)]
drawing: extract transformation from parsing
Dr.Smile [Fri, 20 Oct 2017 06:17:10 +0000 (09:17 +0300)]
cache: cleanup
Dr.Smile [Sun, 19 May 2019 17:24:29 +0000 (20:24 +0300)]
cache: construct cache values only from corresponding keys
This commit forces construction of cache values using only data
available in its companion keys. That ensures logical correctness:
keys are guaranteed to have all the necessary data, and prevents
accidental collisions.
Most fixes of cache logic correspond to minor problem
when rendering is done with double parameter but cache key stores
its approximate fixed-point representation. The only serious problem
is missing scale of clip drawing. Also this commit removes unused
scale parameters from glyph metrics cache key.
Due to missing scale clip shapes that differed only in scale
treated by cache system as identical. That can lead to incorrect reuse
of cached bitmap of different scale instead of correct one.
The only hack left is in glyph metrics cache with its
unicode >= VERTICAL_LOWER_BOUND check.
Dr.Smile [Sun, 2 Dec 2018 19:20:25 +0000 (22:20 +0300)]
renderer: rewrite measure_text() to correctly account for leading newlines
Dr.Smile [Sun, 19 May 2019 17:21:19 +0000 (20:21 +0300)]
font: remove dependency on symbol codes
Leading newlines are now rendered, but still incorrectly:
at full height rather than at half-height as required.
Dr.Smile [Fri, 20 Oct 2017 01:58:44 +0000 (04:58 +0300)]
renderer: use C99 features in some functions
Note that return value is reversed in parse_events(),
ass_render_event() and ass_start_frame() functions.
Dr.Smile [Sun, 2 Dec 2018 19:34:45 +0000 (22:34 +0300)]
drawing: separate drawing text reading from outline construction
Purpose of this commit is to simplify logic behind drawing handling.
Dr.Smile [Thu, 8 Mar 2018 04:57:31 +0000 (07:57 +0300)]
Eliminate advance.y from drawings and glyphs
Drawings always have advance.y = 0 and
FreeType guarantees that for horizontal writing.
Dr.Smile [Tue, 19 Sep 2017 21:55:58 +0000 (00:55 +0300)]
drawing: remove unnecessary fields from ASS_Drawing struct
Dr.Smile [Tue, 19 Sep 2017 17:36:50 +0000 (20:36 +0300)]
font: remove unused field
Dr.Smile [Thu, 10 Jan 2019 21:26:45 +0000 (00:26 +0300)]
stroker: correctly handle case of many small segments
Fixes: https://github.com/libass/libass/issues/326.
Dr.Smile [Sun, 21 Jan 2018 17:30:35 +0000 (20:30 +0300)]
render: simplify detection of hard overrides
Previously each \r triggered full rescan of event string.
After this commit such scanning is done once in init_render_context().
Additionally some lines have moved around to correctly account for
state.evt_type (calculated in apply_transition_effects) and
state.explicit (used in reset_render_context).
That should fix cases with incorrectly applied style overrides
for subs with banner scrolling effect before the first \r.
Oleg Oshmyan [Thu, 4 Jan 2018 01:37:28 +0000 (03:37 +0200)]
parse_tags: handle argumentless \t inside \t() like VSFilter
\t with no parantheses inside \t() resets the animation parameters
of the \t() for subsequent tags, so they are animated as if the \t()
was the single-argument version regardless of the actual number
of arguments the \t() has.
Equivalently, you could say parentheses are implied for \t inside \t().
For example, \t(20,60,\frx0\t\fry0\frz0) animates \frx from 20 to 60 ms
and animates \fry and \frz for the whole duration of the line,
just like \t(20,60,\frx0)\t(\fry0\frz0) or \t(20,60,\frx0\t(\fry0\frz0)).
Technically, VSFilter simply resets the animation parameters for any \t
it encounters but parses the embedded tags only if the \t has the right
number of arguments. However, top-level animation parameters don't matter
because top-level tags are not animated, while any nested \t that has
parentheses terminates the containing \t because they share the closing
parenthesis, so the fact that a nested \t with empty parentheses or with
at least four arguments changes the animation parameters also doesn't
matter because the containing \t immediately ends and the changed
parameters have nothing to apply to. Thus the only situation where
this has a visible effect is a nested \t without parentheses.
Closes https://github.com/libass/libass/pull/296.
Oleg Oshmyan [Thu, 4 Jan 2018 00:42:09 +0000 (02:42 +0200)]
parse_tags: don't recurse for nested \t()
This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4892
(stack overflow on deeply nested \t()).
This is possible because parentheses do not nest and the first ')'
terminates the whole tag. Thus something like \t(\t(\t(\t(\t() can be
read in a simple loop with no recursion required. Recursion is also
not required if the ')' is missing entirely and the outermost \t(...
never ends.
See https://github.com/libass/libass/pull/296 for more backstory.
Oleg Oshmyan [Thu, 4 Jan 2018 00:37:02 +0000 (02:37 +0200)]
Move parse_tag loop into parse_tag itself, now called parse_tags
This commit is mostly transparent to `git blame -w`.
Oleg Oshmyan [Tue, 31 Oct 2017 12:07:26 +0000 (14:07 +0200)]
Release 0.14.0
Oleg Oshmyan [Tue, 31 Oct 2017 12:53:55 +0000 (14:53 +0200)]
configure: remove obsolete --disable-rasterizer option
The internal rasterizer cannot be disabled (and the option has
no effect) since commit
ef6cc020bc00118a5b142b37fe401327a029a1fc.
Oleg Oshmyan [Thu, 26 Oct 2017 19:38:49 +0000 (22:38 +0300)]
Support Core Text on earlier versions of Mac OS X
Loosely based on behdad/harfbuzz@
b96af03c20e46105982b3608b608614403540661.
Prefer to link against ApplicationServices to maximize the
portability of binaries built on newer versions of macOS.
The symbol kCTFontURLAttribute, which is checked in this commit, was
introduced in Mac OS X 10.6, the latest of any Core Text symbols that
we use. It is essential to our Core Text font provider, so this is the
earliest version of Mac OS X where we can support this font provider.
The TARGET_OS_IPHONE conditional that this commit adds is necessary to
continue supporting iOS in addition to supporting old Mac OS X. On iOS,
CoreText.h *must* be included to use Core Text, whereas on old Mac OS X,
CoreText.h is not directly accessible and ApplicationServices.h must be
used. On modern macOS, either header works. This conditional is also
used in HarfBuzz.
Oleg Oshmyan [Thu, 26 Oct 2017 19:34:03 +0000 (22:34 +0300)]
Don't link Core Text font provider to unneeded CoreGraphics framework
Oleg Oshmyan [Tue, 13 Oct 2015 23:05:54 +0000 (02:05 +0300)]
coretext: don't use a variable-length array
This fixes compilation with GCC, which complains that a
variable-length array declaration must not have an initializer.
Rodger Combs [Wed, 6 Sep 2017 12:28:02 +0000 (07:28 -0500)]
Silence missing-field-initializers warning
Clang gives this warning for the universal initializer `={0}`:
https://bugs.llvm.org/show_bug.cgi?id=21689
Signed-off-by: Oleg Oshmyan <chortos@inbox.lv>
Oleg Oshmyan [Thu, 26 Oct 2017 21:45:47 +0000 (00:45 +0300)]
fontselect: fix include guard macro name
Oleg Oshmyan [Thu, 26 Oct 2017 21:41:36 +0000 (00:41 +0300)]
Completely exclude ass_fontconfig.c from build when it is disabled
Rodger Combs [Wed, 6 Sep 2017 02:15:40 +0000 (21:15 -0500)]
ass_set_fonts: empty cache as well
Dr.Smile [Sun, 17 Sep 2017 21:56:00 +0000 (00:56 +0300)]
rasterizer: fix warning
While int8_t work in practice, uint8_t is more correct type here.
Dr.Smile [Sun, 17 Sep 2017 00:39:11 +0000 (03:39 +0300)]
Consolidate bounding box operations
Dr.Smile [Sun, 17 Sep 2017 00:47:45 +0000 (03:47 +0300)]
Rename DBBox to ASS_DRect for uniformity
Dr.Smile [Sat, 5 Aug 2017 01:55:03 +0000 (04:55 +0300)]
Reorganize outline transformation functions
Dr.Smile [Sun, 17 Sep 2017 00:36:29 +0000 (03:36 +0300)]
Switch to more efficient representation of outlines
Dr.Smile [Wed, 2 Aug 2017 01:34:28 +0000 (04:34 +0300)]
Switch to native coordinate system for outlines
Dr.Smile [Sun, 17 Sep 2017 00:00:34 +0000 (03:00 +0300)]
Replace FreeType types with libass native types
FT_Vector and FT_BBox types are based on FT_Pos, which is alias of long.
FreeType treats it as 32-bit integer, but on some platforms long can be
64-bit. That leads to wasted memory and suboptimal performance.
Dr.Smile [Sat, 16 Sep 2017 23:57:43 +0000 (02:57 +0300)]
stroker: fix wording of algorithm description
Ricardo Constantino [Tue, 12 Sep 2017 09:04:45 +0000 (10:04 +0100)]
x86: fix out-of-root builds after
8bddaa2a7
nasm always uses %include paths starting from the directory from where
it's started.
Rodger Combs [Wed, 21 Jun 2017 04:16:53 +0000 (23:16 -0500)]
build: switch from yasm to nasm
Rodger Combs [Wed, 21 Jun 2017 04:16:22 +0000 (23:16 -0500)]
Makefile: silence warning when x86/utils has no symbols
Rodger Combs [Wed, 21 Jun 2017 04:15:31 +0000 (23:15 -0500)]
x86: update x86inc.asm
Rodger Combs [Wed, 21 Jun 2017 04:14:52 +0000 (23:14 -0500)]
x86: asm adjustments for nasm compatibility
Rodger Combs [Wed, 21 Jun 2017 04:10:34 +0000 (23:10 -0500)]
configure: cleanup in preparation for x86inc update and switch to nasm
Dr.Smile [Tue, 1 Aug 2017 18:35:59 +0000 (21:35 +0300)]
renderer: fix border existence check
Found by coverity scan.
Dr.Smile [Tue, 1 Aug 2017 00:50:50 +0000 (03:50 +0300)]
stroker: add algorithm description
Dr.Smile [Sat, 8 Apr 2017 18:15:48 +0000 (21:15 +0300)]
stroker: skip degenerate 2-point contours from broken fonts
Dr.Smile [Sat, 8 Apr 2017 17:57:42 +0000 (20:57 +0300)]
cosmetic: fix codestyle
Dr.Smile [Sat, 8 Apr 2017 17:55:41 +0000 (20:55 +0300)]
renderer: fix handling of empty outlines
Dr.Smile [Mon, 31 Jul 2017 03:27:09 +0000 (06:27 +0300)]
renderer: switch to using two border outlines instead of one
Dr.Smile [Thu, 13 Apr 2017 19:53:40 +0000 (22:53 +0300)]
renderer: remove legacy FreeType rasterizer
Dr.Smile [Mon, 31 Jul 2017 02:33:00 +0000 (05:33 +0300)]
stroker: implement fast two-outline stroker
Dr.Smile [Mon, 31 Jul 2017 02:30:21 +0000 (05:30 +0300)]
rasterizer: implement simultaneous rasterization of two outlines
Dr.Smile [Mon, 31 Jul 2017 02:33:59 +0000 (05:33 +0300)]
rasterizer: refactoring
Dr.Smile [Mon, 31 Jul 2017 02:15:13 +0000 (05:15 +0300)]
cosmetic: extract most of the outline-related functions into separate file
Grigori Goronzy [Sat, 3 Jun 2017 17:07:46 +0000 (19:07 +0200)]
Release 0.13.7
Ricardo Constantino [Wed, 26 Apr 2017 22:11:47 +0000 (23:11 +0100)]
Allow using shadow offset to adjust size of text background
Text background refers to the libass-only BorderStyle 4, which is
similar to 3, but isn't affected by outline/border size and doesn't
render shadow, so shadow offset can be used.
You can override the horizontal and vertical box size separately
with override tags, just like you can override the color with
shadow color.
Closes #270
Grigori Goronzy [Thu, 1 Jun 2017 12:04:03 +0000 (14:04 +0200)]
Fix function prototype
Not a serious issue: arguments were named/ordered incorrectly.
No functional change.
Grigori Goronzy [Thu, 1 Jun 2017 12:01:15 +0000 (14:01 +0200)]
fontselect: cleanup lazy font index evaluation
Fixes a possible NULL pointer dereference, reported by Coverity.
Grigori Goronzy [Thu, 1 Jun 2017 09:25:09 +0000 (11:25 +0200)]
directwrite: fix font collections
DirectWrite's FontFileStream does not actually use the data of a specific
font in a collection, which was an expectation of the existing code. It
simply returns a stream to the underlying file, collection or not. So we
need to get the index of the font. This needs to be done lazily as this
information is only available in a FontFace, which is expensive to
initialize.
Add a new optional font provider function for lazy initialization of the
index and use it. This is similar to the check_postscript callback.
Fixes libass#275.
v2: fix type of returned value.
Grigori Goronzy [Wed, 10 May 2017 11:39:57 +0000 (13:39 +0200)]
Fix PlayResX/Y calculations
Avoid that PlayResY is set to 0 when only PlayResX is specified and
set to 1. Setting PlayResY to 0 results in divide-by-zero errors.
Also fix PlayResX calculations in case only PlayResY is specified,
for completeness.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1474.
wm4 [Thu, 27 Apr 2017 12:49:25 +0000 (14:49 +0200)]
Changelog: update
Rodger Combs [Sun, 12 Feb 2017 01:19:31 +0000 (19:19 -0600)]
Remove arbitrary bitmap size limit
We're not aware of any specific reason for this number to be used,
and actual potentially-dangerous cases should be handled by the
other limits.
Fixes #260
Oleg Oshmyan [Sat, 4 Feb 2017 14:09:36 +0000 (16:09 +0200)]
Don't limit size of "uuencoded" font lines
Oleg Oshmyan [Sat, 4 Feb 2017 02:02:50 +0000 (04:02 +0200)]
Fix decode_font when size % 4 != 0 or data contains illegal bytes
When given a byte c, decode_chars expects that 0 <= c - 33 <= 63,
i. e. that only the six lowest bits of c - 33 are possibly set.
With this assumption, it shifts and adds together multiple c - 33 values.
When c > 96, c - 33 has high nonzero bits, which interferes with other
shifted terms. c < 33 is even worse: c - 33 is negative (if unsigned char
fits in int), and left-shifting negative numbers has undefined behavior.
Even before the shift, on common platforms with a two's complement
representation of negative integers (or if unsigned char does not fit in
int and is promoted to unsigned int), c - 33 has high nonzero bits, which
again interfere with other shifted terms.
To make matters worse, even perfectly valid encoded data is affected when
size % 4 != 0, as decode_font calls decode_chars with '\0', which leads
decode_chars to shift and add -33, causing undefined behavior and/or
incorrect output.
Take our cue from VSFilter and bit-mask c - 33 to keep only the six
relevant bits. To ensure that we get the same bits as VSFilter when
c < 33 and to avoid the undefined behavior of left-shifting negative
numbers, convert the number to unsigned before masking and shifting.
While we are at it, rewrite decode_chars entirely
to get rid of any GPL code from mkvtoolnix.
Related mkvtoolnix bug: https://github.com/mbunkus/mkvtoolnix/issues/1003
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=516.
Also allocate exactly the right amount of memory for the font,
because why not.
Oleg Oshmyan [Fri, 3 Feb 2017 23:53:43 +0000 (01:53 +0200)]
ass_lazy_track_init: handle negative PlayResX/PlayResY
Like VSFilter, treat negative values the same as missing values.
Oleg Oshmyan [Fri, 3 Feb 2017 19:40:19 +0000 (21:40 +0200)]
string2timecode: don't truncate milliseconds to int
Commit
8c8741fe2000d4b4d89a53f894363a42288cec3e attempted to fix this
expression and make it use the full range of long long, but it missed
the millisecond term.
This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=522.
The entire timestamp can still overflow long long though.
Oleg Oshmyan [Fri, 3 Feb 2017 19:36:23 +0000 (21:36 +0200)]
Reuse numpad2align in parse_tag
Oleg Oshmyan [Fri, 3 Feb 2017 19:34:13 +0000 (21:34 +0200)]
Fix parsing of unusual Alignment values in ASS style definitions
Handle large and negative values except INT32_MIN like VSFilter.
This avoids both overflow and inconsistent internal state.
This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=523.
VSFilter handles INT32_MIN like a mix of \an1, \an2 and \an3:
* Vertical alignment is bottom.
* Lines within the event are center-aligned.
* Without \pos or \move, the center of the event is aligned
with the right edge of the screen minus MarginR.
* With \pos or \move, the left edge of the event is aligned
with the position point.
* Without \org, the rotation origin is aligned
with the horizontal center of the event.
* (With \org, the rotation origin is as specified.)
If we wanted to emulate this in libass, the cleanest way would be to
introduce a new horizontal alignment constant for this purpose that
would be used only for ASS style definitions with Alignment INT32_MIN.
This commit makes no attempt to do this and instead arbitrarily picks
\an2 for style definitions with Alignment -INT_MAX-1, which equals
INT32_MIN if int is int32_t. The fact that int is platform-dependent
is one of the reasons for this. We could change Alignment to be int32_t
instead of int for perfect VSFilter compatibility, but the same applies
to many other fields that currently use platform-dependent types.
Oleg Oshmyan [Fri, 3 Feb 2017 13:45:55 +0000 (15:45 +0200)]
Don't treat :;<=>? as hexadecimal digits in color headers
Oops.
Oleg Oshmyan [Sat, 11 Feb 2017 12:02:32 +0000 (14:02 +0200)]
Explicitly handle FcPatternGetString(FC_POSTSCRIPT_NAME) mismatch
This does not affect functionality in any way,
but it hopefully makes the logic easier to follow.
Resolves CID 175691.
Oleg Oshmyan [Tue, 7 Feb 2017 12:14:07 +0000 (14:14 +0200)]
Travis CI: remove HarfBuzz and re-remove Fontconfig from OS X builds
Installing HarfBuzz through Homebrew seems to be consistently slow
whether we use the bottles and disable the Fontconfig cache or build
it from source and drop Fontconfig and other dependencies entirely.
To speed up OS X builds, disable both HarfBuzz and Fontconfig.
We build with HarfBuzz and Fontconfig on Linux, and we should
not have any platform-dependent code that depends on them,
so this should not reduce our code coverage.
Oleg Oshmyan [Mon, 6 Feb 2017 16:46:22 +0000 (18:46 +0200)]
Travis CI: re-enable Fontconfig on OS X but force no cache built
Building HarfBuzz from source works to avoid Fontconfig, but it is still
fairly slow. To further speed up the build, try to use only the prebuilt
bottle packages (which inevitably brings in Fontconfig as a dependency)
but hack the Fontconfig formula to avoid building the font cache.
Adding Fontconfig is not the goal of this commit, as we already have it
on Linux and our Fontconfig-related code "should" work equally well on
other platforms. But since we can now afford it, explicitly ask Homebrew
to install Fontconfig even if the dependency that brings it in disappears
from Homebrew in the future, and enjoy the improved code coverage.