Fontforge non integral coordinates как исправить

Nobody is perfect.

Well, I’m not.

When you draw your glyphs you are likely to make some minor errors, like having
stems with slightly different widths in different glyphs, or having lines which
aren’t quite vertical or…

FontForge’s Find Problems command can help track down some common errors. In
some cases it will be able to fix things for you, but it won’t do so without
your permission (who knows, some of the so-called “problems” might actually be
what you wanted), but it will point things out to you that you should look at.

This command works either in the font view, the outline view or the metrics
view. In the font view it will examine all selected glyphs for errors, and if it
finds anything open a window looking at the glyph and post a (non-modal) dialog
saying what the error is. You may then correct the problem and press the [Next]
button in the dialog when you are done, or you may stop the command with the
[Stop] button. Some errors FontForge will be able to fix automagically, and if
so there will be a [Fix] button in this dlg.

Note

You should not assume that all problems are in fact errors. Some “problems”
may be intended peculiarities of the font design. Don’t just blindly press
the [Fix] button

Behavior in the outline and metrics views is similar, except that only one glyph
is searched for problems.

FontForge will be able to check for more problems if you:

  • AutoHint the font first

  • Bring up the Element->Font Info->Private sub-dialog,
    add entries for BlueValues, StdHW and StdVW and press the [Guess] button for
    each of them

Note: Some of these problems are geared specifically to the problems of
Latin/Greek/Cyrillic fonts. I would be happy to hear of ways to extend these to
other script systems, or of problems that are specific to other script systems
(fontforge-users@lists.sourceforge.net
this is a public mailing list).

../../_images/findprobs.png

FontForge can detect the following potential problems:

Non-Integral Coordinates¶

In TrueType fonts all coordinates must be on integral coordinates. When
FontForge generates your font it will round any non-integral coordinates –
sometimes this is fine, but it can also introduce small uglinesses into your
font that you won’t be aware of in fontforge. (Implied points are allowed to
have half-integral values (2.5 is ok, 2.25 is not)).

PostScript fonts can have non-integral coordinates, but it will make the font
bulkier, so even there it may be better to use integer values.

X near [val]¶

Often there will be a set of features which should be consistent across the
entire file. For example the left side-bearing of the glyphs “BDEFHIKLMNPR”
should perhaps all be the same. This will let you enter in the desired
side-bearing value, and then FontForge will find all glyphs with points that are
near, but not exactly on the desired value. Where “near” is defined at the
bottom of the dialog (in this case, everything within 3 em-units – in either
direction – will be near). If it finds an errant point, FontForge will select
it, stop and let you fix it.

Y near [val]¶

This is the exact counter-part of the above command except for being in the Y
direction. Often times this check is more efficiently done by the following
check…

Y near standard heights¶

In Latin, Greek and Cyrillic alphabets there are certain standard heights that
FontForge expects to find: the baseline, the height of lower case letters, the
height of capital letters, the height of lower case letters with ascenders
(often the same as, or very close to, the capital height), and the depth of
lower case letters with descenders. For this command FontForge defines these
heights to be 0, the height of “x”, the height of “I”, the height of “l” and the
depth of “p” (If you are working on a Greek or Cyrillic font and don’t include
the Latin alphabet, FontForge will pick similar letters from your alphabet).
Then FontForge will search for any points which are “near”, but not on, these
heights. Again where “near” is defined at the bottom of the dialog. If it finds
such a point, FontForge will select it, stop and let you fix things.

Control points near horizontal/vertical/italic¶

This is similar to the Edges near Horizontal option below, but
where that only looks for straight lines, this one looks for curved lines that
begin or end near horizontal (vertical, italic angle).

Control points beyond spline¶

../../_images/cpodd.png

Consider the glyph at right, the selected point has a control point that is far
outside of what is reasonable and is probably not where it should be. This will
check for such points.

Technically it will search for all control points, which when projected onto the
line between the two end points of the spline lie outside of the segment between
the two.

Irrelevant control points¶

This will look for control points which are so close to the point they modify
that they are unlikely to affect the shape of the curve. A control point is
deemed too close if the distance between it and its modified point is less than
the “Irrelevant Factor” times the distance between the two end points of the
spline controlled by this control point.

Points Too Close¶

Some of FontForge’s own commands get confused by tiny splines, on the order of
one unit or less, and anyway if you have several points very close together it
is unlikely that they will make a detectable difference when the font is
printed. Probably you should remove one of them… If FontForge detects two
points on the same path which it deems to be too close it will select both, stop
and let you fix things.

Points Too Far Apart¶

Most font formats use 16 bit integers to describe the distance from one point
(or control point) to the next. This means that each point must be within 32767
em-units of the next point. If it is further away then it cannot be represented
in a generated font. If FontForge detects two points too far from each other it
will select both (a special case – the first point in a glyph must be within
32767 of the origin, if it is further, only the first point will be selected),
stop and let you fix things.

Open Paths¶

../../_images/findprobs-paths.png

All of your paths should be closed, that is they shouldn’t have any end points
the way a line segment does, but should connect back to their beginning. This is
often caused by being a little careless with the last point on a path, and
instead of joining it to the first, you just put it near the first. If FontForge
detects any open paths it will select the entire path, and stop to let you fix
things up.

Intersecting Paths¶

Both PostScript and TrueType discourage you from having intersecting paths in a
font.

Edges near horizontal/vertical/italic¶

It is very easy to create a line which is almost, but not quite, vertical. This
will check for that situation. And for horizontal, and (if your font has an
italic angle) for lines which are almost but not quite parallel to the italic
angle. If it finds one of these, FontForge will select the two end points, stop
and let you fix things.

For horizontal lines it will tell you the y coordinates of the two end-points,
for vertical lines it will show you the x coordinates.

Path Direction¶

Both PostScript and TrueType require that paths be traced in a clockwise
fashion. This sometimes doesn’t matter, but many rasterizers do a better job if
this rule is obeyed. This command will detect whether this constraint is
violated.

FontForge cannot determine path direction properly if there are
self-intersecting paths.
Do that test first.

Currently the command will report the same error several times if you do not fix
the problem. That’s sort of a bug, but I don’t see an easy way around it yet.

Check Missing Extrema¶

Both PostScript and TrueType would like you to have points at the maxima and
minima (the extrema) of a path. This checks that you do.

More Points Than¶

Appendix B of the PostScript Language Reference manual says that an interpreter
is only required to support paths with 1500 points on them. Most interpreters
actually have a much higher limit, so you may change the limit to suit your
desires. I believe that control points are included in the count. Note that when
checking a quadratic font (ie. a truetype font) there will be at most one
control point between any two end points, but when that font gets converted to
PostScript there will be two. FontForge currently counts this as one point).
TrueType has no such limit.

Flipped References¶

../../_images/findprobs-refs.png

As mentioned above both PostScript and TrueType like clockwise paths. If you
have a flipped reference then either the reference or the original glyph will be
drawn with a counter-clockwise path. To fix it you should
the reference and

Refs with bad ttf transformation matrices¶

The TrueType glyph format allows almost arbetrary transformations to be applied
to a reference. The one restriction is that all terms of the transformation
matrix (except for the translation terms) must have a value between -2 and 2.

If you have a reference with an unexpressable transformation matrix, fontforge
will expand the reference inline, so all the contours will be present they just
won’t be in a reference.

TrueType also requires that all references be translated by integral values. If
you have a reference with a non-integral translation vector, FontForge will
round it to an integer when it generates the font (this does not cause the
reference to be unlinked).

Mixed contours and references¶

In TrueType glyphs may be composed either of all references or all contours (a
reference with an unexpressable transformation matrix counts as a contour).

If you have a mixed glyph, fontforge will expand all references inline.

Refs with bad ps transformation matrices¶

The Type1 font format only allows references to be translated (so no rotation or
scaling is permitted). Technically the Type2 format does not allow any
references at all, but they can be simulated by using subroutines, which also
cannot be rotated or scaled.

If you have a reference with an unexpressable transformation matrix, fontforge
will expand the reference inline, so all the contours will be present they just
won’t be in a reference.

Refs Deeper Than¶

Appendix B of the the
Type2 spec
says that an interpreter is only required to support subroutine nesting up to 10
levels. FontForge uses subroutine calls to handle referenced glyphs and
sometimes also to handle hinting. Hinting will take up a maximum of 1 level of
subroutine calls leaving 9 available for references. TrueType has no such limit.

Refs with out of date point matching¶

TrueType allows references to be positioned by aligning points in different
references. If the point count in one of the glyphs being referred changes then
you will need to fix up these references to match the new point count.

Hints controlling no points¶

../../_images/findprobs-hint.png

This is a bit esoteric, and is present to provide a work-around for (what I
think is) a bug in ghostview. Consider the following glyph

../../_images/phi-nohints-outline.png
../../_images/phi-nohints-filled.png
../../_images/phi-hints-outline.png
../../_images/phi-hints-filled.png

The first two images show the glyph with no hints, first as seen in FontForge,
then as displayed by ghostview. The result looks good. If we add hints to the
two curved stems then ghostview gets very confused. I don’t know enough about
hints to know whether there should be hints there. But this command will detect
this problem if in fact it is a problem. If FontForge finds this it will select
the offending hint and allow you to fix things (probably the best fix is to add
curved points at the extrema of all the curved splines, this is actually
recommended by adobe anyway
(T1_Spec.pdf
section 4.1)).

Points near hint edges¶

If you have a glyph like “H” where the main vertical stems are broken by the
cross bar, it is all too easy to make the top part of the stem a slightly
different width than the bottom. (The hinting process figures out all the
stems.) So this command, in essence, is looking for points which are slightly
off from a stem. (again, near is defined at the bottom of the dlg). If FontForge
finds such a point it selects it, stops, and allows you to fix it up.

Hint width near [val]¶

Usually one wants many of the glyphs to have a constant stem width, and this
command will check that all stems near the indicated value are that value (again
near is defined at the bottom of the page). If FontForge finds a bad stem it
will select it, stop and allow you to fix things.

Almost stem3 hint¶

PostScript has a special hint operator (hstem3 and vstem3) which is designed to
hint the stems of things like “m” where there are three stems of equal width and
equally far apart. It is easy for a glyph not to fit the criteria for this
operator (which means FontForge won’t use it). This will detect cases that are
close to right. I found that I needed to adjust the “Near” value to be bigger
than the default.

Show exact stem3¶

(this is not a problem, but I found it helpful to be able to distinguish between
cases where the “almost stem3” above didn’t say anything. It might be because it
was a stem3 or it might be really far off from a stem3)

More Hints Than¶

Appendix B of the the
Type2 spec
says that an interpreter is only required to support a total of 96 horizontal
and vertical hints.

Overlapped Hints¶

In a PostScript font a glyph should either contain no overlapping hints, or it
may have a set of hint masks, and each mask specifies a set of hints which do
not overlap.

Missing Bitmaps¶

../../_images/findprobs-random.png

Look through the associated bitmap fonts, and find if there is a bitmap font
which is missing versions of glyphs present in the outline font. Conversely look
for bitmap fonts with glyphs which are not present in the outline font.

Bitmap/Outline Advance Width Mismatch¶

If you have a font with embedded bitmaps, then you would expect that the bitmap
advance width would be the same as the outline glyph’s advance width (with
appropriate scaling and rounding, of course). This checks to ensure that that is
true.

Check Multiple Unicode¶

Check that you do not have two glyphs assigned to the same unicode code point.
(The unicode encoding is used to determine which glyph will appear in the
truetype/opentype ‘cmap’ table. If you have two glyphs with the same code point,
there is no guarantee which will be used.)

Check Multiple Name¶

Check that you do not have two glyphs with the same name.

Check Unicode/Name mismatch¶

Look for glyphs whose name indicates a unicode value different from the one
attached to a glyph. So if a glyph were named “A” but had Unicode code point
U+0020 (space) FontForge would complain about it.

Glyph BB Above¶

../../_images/findprobs-bb.png

Find all glyphs whose bounding box extends above the indicated value

Glyph BB Below¶

Find all glyphs whose bounding box extends below the indicated value

Glyph BB Right Of¶

Find all glyphs whose bounding box extends to the right of the indicated value

Glyph BB Left Of¶

Find all glyphs whose bounding box extends to the left of the indicated value .

Check Advance¶

Check for any glyphs whose advance width is not the specified value (useful for
a mono-space font where you want to check that all glyphs have the same width).

Check Vertical Advance¶

Check for any glyphs whose vertical advance (for fonts with vertical metrics)
differs from the specified value.

Missing Glyph Names¶

../../_images/findprobs-att.png

It is possible to create a substitution, ligature, etc. which refers to a glyph
name that is not in the font. This option will check for the above error.

Missing scripts in features¶

In OpenType a lookup will only be applied to a glyph if it is attached to a
feature which is active for the glyph’s script. So if you had a smallcaps
feature which was active for latin, and if this invoked a lookup which had also
had smallcaps data for the greek letters, then that lookup would not be invoked
for greek even though it could happily make the substitution.

This item will look for cases like the above, where a lookup applies to a script
which is not active for any of its features.

Check substitutions for empty chars¶

Looks through all the ‘GSUB’ substitution, alternate substitution, multiple
substitution and ligature entries that are attached to the current glyph and
checks to make sure that all the named components are present in the font (and
contain something).

Check for incomplete mark to base subtables¶

I find it hard to believe that this is really a problem, but I have a second
hand report that MicroSoft considers it to be so.

If a mark to base subtable has several anchor classes, then all base glyphs must
define anchor points for all anchor classes.


../../_images/findprobs-cid.png

If your font is a CID keyed font you will also get:

Check for CIDs defined twice¶

Looks through the font set to see if there are any CIDs which have valid glyphs
in two or more fonts.

Check for undefined CIDs¶

Looks for CIDs which have no glyphs defined for them in any font. This is a
fairly common occurrence in CID fonts, so use this with caution.

At the bottom of the dialog are two buttons ([Clear All] and [Set All]
which will, respectively, clear and set the check boxes for all tests – Well,
CID tests will not be set by [Set All] in non cid-keyed fonts).

There is also a text field which allows you to define the meaning of “Near” as
used in various of these tests. The default value is that things are “near” if
they are within 3 em-units of the desired value and not equal to that value.

  1. Что такое нецелые координаты?
  2. Как проверить шрифт FontForge?
  3. Как проверить глифовый шрифт?
  4. Как открыть шрифты в FontForge?
  5. Что подразумевается под нецелым?
  6. Что подразумевается под нецелым значением?
  7. Как изменить шрифт в FontForge?
  8. Как добавить пространство в FontForge?
  9. Как вы набираете глифы?
  10. Как сделать глиф?
  11. Как сделать свои собственные глифы?

Что такое нецелые координаты?

Неинтегральные координаты

(Предполагаемые точки могут иметь полуцелые значения (2.5 в порядке, 2.25 нет)). Шрифты PostScript могут иметь нецелочисленные координаты, но это сделает шрифт более громоздким, поэтому даже там может быть лучше использовать целочисленные значения.

Как проверить шрифт FontForge?

10.1. Проверка шрифта

В FontForge есть команда Element->Поиск проблем, предназначенный для поиска множества распространенных проблем. Просто выберите все глифы в шрифте и откройте диалоговое окно «Найти проблемы».

Как проверить глифовый шрифт?

В режиме редактирования вы можете вводить текст, чтобы редактировать и тестировать шрифт. Чтобы получить доступ к режиму редактирования, вы можете либо дважды щелкнуть глиф в режиме просмотра шрифтов, либо открыть вкладку в режиме просмотра > Открыть вкладку (Cmd-T). Выбранные глифы затем открываются в режиме редактирования, и инструмент Текст (T) становится активным.

Как открыть шрифты в FontForge?

Чтобы открыть шрифт (или *. sfd, вы можете просто запустить Fontforge без каких-либо аргументов, и вам будет представлено диалоговое окно выбора файла. Вы также можете использовать File->Открыть, чтобы открыть файлы. Чтобы сохранить файлы, просто используйте File->Сохранить как .

Что подразумевается под нецелым?

1: не является математическим целым нецелым числом, не относится к нему. 2: не важно для полноты: не быть неотъемлемой частью чего-то, не являющегося неотъемлемыми персонажами рассказа.

Что подразумевается под нецелым значением?

числа, которые не являются целыми, называются нецелыми числами. он включает дроби (или десятичные знаки), действительные числа, комплексные числа (и, в конечном итоге, кватернионы). пр. 2 / 3,0.2.

Как изменить шрифт в FontForge?

2 ответа

  1. Установить FontForge. В Linux это сделать намного проще, чем в Windows / Cygwin. …
  2. Open Consola. …
  3. Выбрать элемент -> Информация о шрифте.
  4. Измените название шрифта, фамилию и имя для людей на одно и то же. …
  5. Нажмите ОК. …
  6. Выбрать файл -> Сгенерировать шрифты. …
  7. Теперь откройте Consolai. …
  8. Вернуться к элементу -> Информация о шрифте.

Как добавить пространство в FontForge?

Окна показателей можно открыть из меню «Окно» или с помощью команды Ctrl + K. Пространство между любыми двумя глифами состоит из двух компонентов: пространство после первого глифа и пространство перед вторым глифом. Эти промежутки между глифами состоят из «боковых опор» каждой пары глифов.

Как вы набираете глифы?

Используя инструмент «Текст», щелкните, чтобы поместить точку вставки в то место, где вы хотите ввести символ. Выберите тип > Глифы для отображения панели «Глифы». Чтобы отобразить другой набор символов на панели «Глифы», выполните одно из следующих действий: Выберите другой шрифт и стиль шрифта, если они доступны.

Как сделать глиф?

Быстрый способ создать варианты глифов — выбрать один или несколько глифов в режиме редактирования или шрифта, а затем выбрать Glyph > Повторяющийся символ (Cmd-D). Затем глифы создадут копии выбранных глифов с . 001 суффикс, или, если этот суффикс уже занят, . 002 и т. Д.

Как сделать свои собственные глифы?

Создайте собственный набор символов

  1. Выберите тип>Глифы, чтобы открыть панель Глифов. …
  2. Назовите набор и нажмите ОК.
  3. На панели «Глифы» выберите символ, который нужно добавить в набор.
  4. Выберите Добавить в набор глифов>[Установить имя] из меню панели «Глифы».
  5. Повторите шаги 3 и 4, чтобы добавить в набор другие глифы.

Ответ на:

комментарий
от AP 06.05.14 20:09:06 MSK

Я нарисовал фонт из одного символа, при сохранении в SVG оно мне говорит «Missing Points at Extrema», «Non-integral coordinates»

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от AP 06.05.14 20:09:06 MSK

символ у меня с кодом 47000

а ещё, шрифт почему-то не отображается.
вот мой .htm для загрузки в FF 29

<!DOCTYPE html>
<html>
<head>
<style>
   @font-face {
    font-family: font1;
    src: url(./font1.svg);
   }
   h1 {
    font-family: font1;
   }
  </style>
</head>
<body>
<h1>래</h1>
<h1>񇀀</h1>
</body>
</html>
  • Ссылка

Ответ на:

комментарий
от AP 06.05.14 20:09:06 MSK

Нарисовал два символа, потому что один не сохранялся в ttf (говорил, что нет ни одного).

перекодировал символы — теперь они &#xDEA0; и &#xDEA1;

ttf тоже не загружается.

  • Ссылка

Ответ на:

комментарий
от StrongDollar 06.05.14 20:32:11 MSK

Ответ на:

комментарий
от AP 07.05.14 01:00:39 MSK

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.

Похожие темы

  • Форум
    Приложение для написания svg. (2014)
  • Форум
    cairo svg (2008)
  • Форум
    SVG некорректно рендерится. (2017)
  • Форум
    На что способен SVG? (2020)
  • Форум
    svg, inkscape (2012)
  • Форум
    SVG как замена флешу (2008)
  • Форум
    А подскажите картинкохостинг с поддержкой SVG (2013)
  • Форум
    [SVG, анимация, бровзеры] Отказывается анамировать. (2009)
  • Форум
    [Qt, XML, SVG] Нашёл странность в обработке SVG, помОжете составить багрепорт (если это действительно баг)? (2009)
  • Форум
    [svg][firefox][smil][animate] анимация средствами SMIL в firefox (2010)

@duckravel

I have some svg files and try to make it in the ttf form. However, it seems that svg files which create by other program can not have integral coordinates automatically ( I had checked the preference setting, and set snaptoINT to on). I have to go through the non-integral coordinate check every time I tweak a glyph. It there any way to figure out the problem ?

@davelab6

round to int, is the ff command you need
On Feb 25, 2015 9:53 PM, «duckravel» notifications@github.com wrote:

I have some svg files and try to make it in the ttf form. However, it
seems that svg files which create by other program can not have integral
coordinates automatically ( I had checked the preference setting, and set
snaptoINT to on). I have to go through the non-integral coordinate check
every time I tweak a glyph. It there any way to figure out the problem ?


Reply to this email directly or view it on GitHub
#2088.

@larsenwork

assuming it was answer enough

On Sun, 2008-08-24 at 06:38, Alexey Kryukov wrote:
> suppose I have a font which contains some points with non-integral
> coordinates and I have decided to treat this as an error during
> the font validation. Now FF gives me a list of problematic glyphs,
> and, if I double-click on the line which describes the problem,
> a charview window and a "Problem explanation" message box is displayed.
> Now, if I press the "Fix" button, I get an error message: "Internal
> Error: nothing selected". This is a bit strange, because the problematic
> point _is_ selected in charview.
Fixed.



Понравилась статья? Поделить с друзьями:
  • Как можно найти девушку с легким поведением
  • Как найти периметр треугольника со вписанной окружностью
  • Как правильно составить раствор
  • Как найти свое местоположение по координатам
  • Как найти аймесседж в айфоне