Add support for generating a Red Hat source package.
Update licensing.
Conform package names.
Merge pull request #1739 from fontforge/frank_redhat_1

Add support for generating a Red Hat source package.
Improve support for generic Debian packages.
Merge pull request #1744 from fontforge/frank_redhat_1

Improve support for generic Debian packages.
Properly store bit-depth for bitmaps when generating ttc.

Before this change it is impossible to create a ttc with embedded
monochrome bitmaps from a python script, as the bit depth for such
bitmaps was set to 0. Before this scripts like

  font.bitmapSizes = ((12,),)
  font.regenBitmaps((12,))
  font.generateTtc("font.ttc", None, bitmap_type="ttf", layer=1)

would result in an error message like

  The font database does not contain a bitmap of size 12 and depth 0
Update OSX FontForge script to remove dialog text

The script doesn't open Finder as it says it will, so don't say that
Merge pull request #1746 from bungeman/master

Properly store bit-depth for bitmaps when generating ttc.
Python font.em chgd to match UI em size computations

While investigating issue #1741 I noticed that the computed answers for
.sfd values `Ascent:` and `Descent:` were not matching those when
changed via the UI versus changed using the Python scripting setter
`font.em`.  The UI code was using floating-point computations and then
rounding-to-nearest, while the Python code was all integer multiply and
divide.

This change copies the UI operations and so resulting values match
using either UI or Python scripting.
Merge pull request #1751 from tshinnic/1741_python_em_size_1

Python font.em chgd to match UI em size computations
Native script SetGasp() extended to version 1 tables

@MichinariNukazawa [reported](https://mail.google.com/mail/u/0/#inbox/148ad5832ecbf196)
that they were not able to set values for TTF 'gasp' table.  It was
discovered that the native scripting function SetGasp() had not yet
been updated to support 'gasp' version 1 additional flags.

Matthew Skala [reported](https://mail.google.com/mail/u/0/#inbox/148af2d5160f1639)
he had [updated](https://github.com/mskala/Tsukurimashou/commit/c225dabd5dd5fda56358ece93755cf14be6e26ac)
FontAnvil to allow SetGasp() to apply version 1 flags.

Testing that change in FontForge revealed a small needed modification
(four bit flags gives upper limit for mask of 15, as seen in MS docs).

Tested before and after change, and @mskala 's change automatically sets
the table version number as needed, as there is no native scripting method
to do so.

Apple documents version 0 flags:
  https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6gasp.html
Microsoft documents version 1 flags:
  http://www.microsoft.com/typography/otspec/gasp.htm
Guard against CharView UI Hints/View menu crashes

This change implements the strategy "disallow user actions when they
are not appropriate - disable inappropriate UI menu items".  Thus we
add code that checks whether the current charview display layer is
'Grid' and disables menu items that are known to crash when 'Grid'
is selected.

This change adds disabling of the following charview menu items when
the 'Grid' layer is selected:

    Hints menu
        Hint Substitution Pts
        Clear HStem
        Clear VStem
        Clear DStem
        Create HHint...
        Create VHint...
    View / Number Points menu  (all items)
        None
        TrueType
        PostScript
        SVG
        Position

This is not necessarily an exhaustive list of all vulnerable UI actions,
just those which were proven to crash either always or 'sometimes'.

Tested as not affecting the menu items when 'Back' or 'Fore' layers are
selected.

Note that this change does **not** correct the vulnerable internal
routines.  (*That will be another change*)  This change merely prevents
those vulnerable routines from being reached by user menu actions known
to be 'bad'.

The patient says, "Doctor, it hurts when I do this." "Then don't do that!"
Merge pull request #1753 from tshinnic/native_gasp_version_1_flags

Native script SetGasp() extended to version 1 tables
Merge pull request #1754 from tshinnic/1750_invalid_layer_index_1

Guard against CharView UI Hints/View menu crashes
Guard against crashes when "Guide" layer active

This change implements checks against crashes in some vulnerable routines
that can fail when the current displayed layer in CharView is the
"Guide" aka 'grid' layer.

Testing of various UI actions revealed that these routines would crash
using the layer index value -1, which is the 'grid' layer index:
   fontforge/cvundoes.c    SCPreserveHints()
   fontforge/splinechar.c  SCNumberPoints()
   fontforge/autohint.c    _SCClearHintMasks()
   fontforge/stemdb.c      GlyphDataInit()
   fontforge/cvhints.c     SCModifyHintMasksAdd()
Code was added to these routines to simply return if the layer value
was outside the valid range for the layers array.

During testing using Python scripts a further set of problem routines
were identified in python.c and fixes applied.

Finally, the original investigation found a number of places where code
was using "magic numbers" that were equivalent to the `enum layer_type`
values defined in splinefont.h.  This obscured the intent of such code
and enum definitions were used to replace those numbers (-1, -2, etc.)

Tested with debug printf()'s to demonstrate usefulness, with all these
added checks being hit and preventing crashes.

"Doctor Doctor when I touch my head it hurts. When I touch my arm it hurts. When I touch my knees it hurts." The doctor replied, "You have a broken finger."
Python script crash on 'empty' contour/layer/glyph

While investigating issue #1750 and trying to test scenarios with scripts,
I found vulnerabilities when certain Python scripting APIs were called
with empty ('new') FF objects.  Internal routines would return NULL
pointers in consequence of the empty objects but sometimes calling code
would not guard against these, and following calls would crash trying to
use the NULL pointers.

This change fixes the following scenarios:
```
    contour1 = fontforge.contour()
    contour1.is_quadratic = 1

    contour1 = fontforge.contour()
    contour1.spiros()

    layerEmpty1 = fontforge.layer()
    layerEmpty2 = fontforge.layer()
    layerEmpty1.stroke("polygonal", layerEmpty2)
```
The last example pattern is seen for all three of `contour`, `layer`, and
`glyph`.

All these combinations (and many others) were tested and no longer crash,
or were proven not to crash originally.

Additionally, another crashing scenario with an empty tuple was found:
```
    contour1 = fontforge.contour()
    contour1.spiros = ()
```
This change fixes that problem by simple checking for empty tuple.
Merge pull request #1755 from tshinnic/1750_invalid_layer_index_2

Guard against crashes when "Guide" layer active
Merge pull request #1759 from tshinnic/python_spiro_null_checks_1

Python script crash on 'empty' contour/layer/glyph/tuple
Work around the bootstrap state problem by deleting the config files before packaging.