Re: [ft-devel] [Regression] Font doesn't open with Freetype CVS but works with Freetype 2.2.1

2007-05-26 Thread Albert Astals Cid
A Dissabte 26 Maig 2007, Ismail Dönmez va escriure:
 Hi

 On Saturday 26 May 2007 10:47:40 you wrote:
   On Saturday 26 May 2007 02:13:52 Werner LEMBERG wrote:
Hmm, this font doesn't have a `cmap' table, which is invalid
according to the OpenType standard, and the behaviour is defined as
`implementation specific' in PDF standard (see section 5.5. in the
PDF 1.6 specification).
  
   I see but lots of real world PDF files have this kind of fonts :-/
 
  I remember, ft-devel list receives several posts per year
  saying I found an embedded font in PDF that FT2 cannot
  load, FT2 should load it. It's not always stated which
  application or library using FT2 to load embedded TrueType
  data from PDF.
 
  In my opinion, embedded font in PDF is NOT self-standing
  font file. Even if it's forcibly loaded by ignoring essential
  tables, it is no more than jumping the first hurdle.
  Without cmap, most character-based API are not usable.
  One of the next expected hurdle might be we want to
  convert glyph index to character code, to extract or
  search a text in PDF. FT2 should do... It is impossible.
  Such requirement should be supplied by slightly higher
  level library which can associate the text object,
  embedded font object, CMap object, ToUnicode object.
  I think it's far higher than FT2. As a result,
  the behaviour of current FT2 is reasonable, I think.
 
  However, if somebody can define the reasonable subset of
  FT2 API which is required by most PDF parser, it will be
  quite helpful for both of FT2 and PDF-related softwares.
  If you have some idea of subsetted API for embedded font,
  please let me know.

Not sure what you want from me, you want the freetype functions we use?

We [1] use:
 * FT_Library_Version
 * FT_Init_FreeType
 * FT_Done_FreeType
 * FT_New_Face
 * FT_New_Memory_Face
 * FT_Done_Face
 * FT_Get_Name_Index
 * FT_New_Size
 * FT_Set_Pixel_Sizes
 * FT_Set_Transform
 * FT_Load_Glyph
 * FT_Render_Glyph
 * FT_Get_Glyph
 * FT_Outline_Decompose
 * FT_Done_Glyph

For text handling we don't use FreeType for anything.

Freetype 2.2.1 was able of giving us that functions working i would be happy 
if you could make newer versions work too, even if we have to set a flag 
somewhere specifically renouncing not to use some functions.

Albert

[1] We = kpdf and poppler, that are the same functions used by xpdf at the 
moment, but as i'm not involved in xpdf in any way it's not we


 I am CC'ing one of the KPDF's author Albert Astals Cid who extracted the
 problematic font for me. Maybe he might help us with whats the minimal api
 needed for a PDF viewer.

 Regards,
 ismail




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


[ft-devel] TrueType font that is not loaded by freetype

2008-05-15 Thread Albert Astals Cid
Hi, the attached font is not loaded by freetype but it is loaded by FontForge 
so it seems the font is either correct or not that broken to not be able to 
be read.

I have not tried debugging the problem but if i'm given a pointer i could try 
it and see what i can do, but i can't promise anything as i've done 0 work 
with fonts stuff.

Albert


font.ttf
Description: application/font-ttf
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] TrueType font that is not loaded by freetype

2008-05-16 Thread Albert Astals Cid
A Divendres 16 Maig 2008, vàreu escriure:
  Hi, the attached font is not loaded by freetype but it is loaded by
  FontForge so it seems the font is either correct or not that broken
  to not be able to be read.

 As others have mentioned already: This font is broken, and I won't do
 anything to make FreeType accept it.

From experience I know that supporting broken files is painful and unreliable, 
but i always try to follow the Be strict in what you generate and be open in 
what you read formula.

Anyway, i'm almost sure that nothing i can say will make you change your 
opinion so I will notify poppler/okular/evince/kpdf users that even Adobe 
renders their PDF correctly we can not do anything because FreeType 
developers do not want to be more flexible when loading fonts.

By the way, in the future should i send more fonts that i get in 
poppler/okular/evince/kpdf bugs that FreeType does not render to the list or 
you prefer to get them via a different channel (bugzilla/somethingElse).

Albert



 Werner




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] TrueType font that is not loaded by freetype

2008-05-17 Thread Albert Astals Cid
A Dissabte 17 Maig 2008, vàreu escriure:
  But i get bug reports about PDF that render correctly on Adobe and
  not on poppler based readers, and i can't fix them because it's not
  on my scope of fixing things.

 Then find one!  I have written that *I* won't fix it because I don't
 have enough time (currently, it's only me who is working on FreeType
 -- David has essentially disappeared because he is involved in other
 projects in real life).  However, I won't oppose if I receive a
 sensible patch to handle such broken fonts gracefully.

Nice, will put it on my TODO


  So i have to close the bugs saying the PDF is malformed and there's
  nothing to do, but you and i know users will not be happy about
  that.  Users don't care about malformedness they want things
  working.

 Tell this a guy who uses an older version of MS Word...

   Where shall I start?  Where shall I end?  Perhaps one Acroread
   version displays it fine, but others might not -- different
   Acroread versions have different rendering engines...  And what
   about the PDF engine of MacOS?  And other vendors?
 
  Again, i don't know nothing about fonts, not about the brokeness
  level of this font,

 Hehe, if you `don't know nothing', then you actually know something...

He he :D That or either my english is not as good as i'd want.

As said will try to create a not very intrusive patch that makes this font 
work.

Albert


 Since the very beginning of FreeType more than 10 years ago, such a
 buggy font has always been rejected.  You are the first one who wants
 a change in FreeType's behaviour.  Is this good enough to classify the
 brokenness as `severe'?

  not about how difficult would be to make it work (like fontforge
  and Acroread).

 It's not too difficult to make FreeType ignore this table.


 Werner




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Type 1 font that is not loaded by freetype

2008-06-01 Thread Albert Astals Cid
A Dijous 15 Maig 2008, vàreu escriure:
  Hi, the attached font is not loaded by freetype but it is loaded by
  FontForge so it seems the font is either correct or not that broken
  to not be able to be read.

 I've just fixed this in the CVS (reported by someone else), please
 test.

I've updated from CVS and it seems the font is broken again.

Albert



 Werner




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


[ft-devel] Type 1C font that is not loaded by freetype

2008-06-10 Thread Albert Astals Cid
Hi, the attached font is not loaded by freetype. 

This font is present in a pdf found at 
https://bugs.freedesktop.org/show_bug.cgi?id=15008

Albert


bug15008.font
Description: Binary data
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


[ft-devel] Type 1C font that is not rendered correctly

2008-07-26 Thread Albert Astals Cid
I'm attaching the font, it's used by vodaphone mobile company in some 
countries.

As example, if you open it with ftview you'll see the 4 has the inner hole 
filled, fontforge seems to render it correctly in it's preview window.

Albert


font0
Description: Binary data
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] FreeType font that can not be loaded

2008-08-04 Thread Albert Astals Cid
A Dilluns 04 Agost 2008, Werner LEMBERG va escriure:
   Continuing with my fonts that come in PDF and can not be opened
   series i'm attaching a TTF file that FreeType can not load.
  
   FontForge seems to get it right.
 
  The font is bad.
 
  The table header claims there are 9 tables when there are only 8.
  The binsearch header (for the tables) is wrong
  The file checksum is wrong.
  The 'prep' table has length 0. (which may not be wrong, but is odd)
  The other 6 tables have bad table checksums
 
  I don't blame freetype.

 Well, it doesn't do any harm to ignore invalid tables.  I've just made
 FreeType much more tolerant against broken entries; this particular
 font is now loaded.  Please test.

Thanks :-) Now that the font loads i have to test why i don't get any 
rendering in poppler itself, but that's my issue now :-)

Albert



 Werner




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


[ft-devel] Regression Crash between freetype 2.3.5 and 2.3.7

2008-08-17 Thread Albert Astals Cid
The attached font crashes when trying to load it.

I'm also attaching gdb backtrace.

Albert
#0  0x7f0fd26b3afe in cff_parse_real (
start=0x7f0fd87681b4 
\177\006\036�ccc\177\f\t\036\021:3o\n\036\022\n\206�\v\036\020\nD_\036\022�\220\231\237\f\f\036\022\n\206�\036\022\212C\1
, limit=value optimized out, power_ten=0, scaling=0x0) at 
/home/tsdgeos/cvs/freetype2/src/cff/cffparse.c:361
#1  0x7f0fd26b3e30 in cff_parse_num (d=value optimized out) at 
/home/tsdgeos/cvs/freetype2/src/cff/cffparse.c:389
#2  0x7f0fd26b4054 in cff_parser_run (parser=0x7fffe077a4a0, start=value 
optimized out, limit=0x7f0fd87681e3 \r)
at /home/tsdgeos/cvs/freetype2/src/cff/cffparse.c:781
#3  0x7f0fd26b7355 in cff_subfont_load (font=0x7ddea8, idx=0x7ddde8, 
font_index=value optimized out, stream=0x7e0370, base_offset=0)
at /home/tsdgeos/cvs/freetype2/src/cff/cffload.c:1309
#4  0x7f0fd26b7805 in cff_face_init (stream=0x7e0370, cffface=0x7dd2f0, 
face_index=0, num_params=value optimized out, params=0x0)
at /home/tsdgeos/cvs/freetype2/src/cff/cffload.c:1430
#5  0x7f0fd269a163 in open_face (driver=0x773a80, stream=0x7e0370, 
face_index=0, num_params=0, params=0x0, aface=0x7fffe077ab58)
at /home/tsdgeos/cvs/freetype2/src/base/ftobjs.c:1072
#6  0x7f0fd269bd86 in FT_Open_Face (library=0x7d87b0, args=0x7fffe077ac40, 
face_index=0, aface=0x7fffe077ac98)
at /home/tsdgeos/cvs/freetype2/src/base/ftobjs.c:1794
#7  0x7f0fd269c992 in FT_New_Face (library=0x7f0fd87681b4, pathname=value 
optimized out, face_index=0, aface=0xfffe)
at /home/tsdgeos/cvs/freetype2/src/base/ftobjs.c:1133



font-bug17045
Description: Binary data
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Regression Crash between freetype 2.3.5 and 2.3.7

2008-08-17 Thread Albert Astals Cid
A Diumenge 17 Agost 2008, Werner LEMBERG va escriure:
  Strange, any idea what could be the culprit? I have 2.3.5 working and
  2.3.7 failing with Floating point exception
 
  Can it be gcc? optimization flags? Something else?

 `Floating point exception' probably indicates a compiler bug.  Please
 try with -O0.

With -O0 it does not crash, so what now?

Do I close the poppler bug and tell the user to go to bug gcc devels?
Or do you do bug the gcc devels?
or we just ignore it?
or something else?

I'm using gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

Albert


  That is on an amd64 machine are you using a 32 bits one?

 Yes.

  If you want i can try on a 32 bits one.

 Maybe this gives more details.  I use a prerelease of gcc 4.1.2.


 Werner




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


[ft-devel] Problem rendering the attached font

2009-03-30 Thread Albert Astals Cid
Hi, the glyph with index 26 'u' is not rendered correctly in ftview using 
current git master.

Fontforge is able to render it.

I've found the font inside a pdf.

Albert


CairoFont-1-0
Description: Binary data
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Re: [tex-live] Fw: CMap Resources open source project

2009-11-15 Thread Albert Astals Cid
A Dijous, 24 de setembre de 2009, Ken Lunde va escriure:
 Karl,
 
 I discussed this with the Acrobat team today, and putting the Acrobat
 mapping files under the same open source license sees very favorable.
 If I can make it happen, it may take until the end of October for the
 open source project to go live. I am less then a week away from my
 annual pronghorn antelope hunt, which involves driving from California
 to Wyoming, and after that I am attending IUC33. See:
 
http://www.unicodeconference.org/
 
 I am giving two presentations, and just started working on them.
 
 In any case, I will keep you posted.

How is the open sourcing of Adobe-Japan1-UCS2, GBK-EUC-UCS2, Adobe-GB1-UCS2, 
GBpc-EUC-UCS2, etc. progressing?

Albert

 
 Regards...
 
 -- Ken
 
 On 2009/09/23, at 16:25, Karl Berry wrote:
  Hi Ken,
 
  GBK-EUC-UCS2, Adobe-GB1-UCS2, GBpc-EUC-UCS2, etc. Are they
 
 If these Acrobat-specific mapping files are to be placed under the
 same open source license,
 
  That would be very desirable.
 
 I will need to work with the Acrobat development team. I would
 prefer that they be included in a separate open source project.
 
  However it works best for you.
 
  We greatly appreciate all your efforts!
 
  Thanks,
  Karl
 
 ___
 Freetype-devel mailing list
 Freetype-devel@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/freetype-devel
 



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Bug in the font or bug in freetype?

2010-01-23 Thread Albert Astals Cid
A Dissabte, 23 de gener de 2010, mpsuz...@hiroshima-u.ac.jp va escriure:
 Hi,
 
 On Fri, 22 Jan 2010 23:31:12 +
 
 Albert Astals Cid aa...@kde.org wrote:
 Hi, i just got a PDF file with the attached font embedded, Adobe can
  render it correctly but freetype refuses to load the font. Can it be
  workarounded or the font is totally broken?
 
 Excuse me, ftdump  ftview of latest FreeType2 (available
 on GIT) can load  display the attached font. Could you
 provide the information about the version of FreeType2
 and how to reproduce the problem?

Right, sorry for not trying git version, i tried 2.3.9 (last ubuntu version) 
and 2.3.11 (last released version) and both fail, but git master works :-)

Any idea when the next version is going to be released?

Thanks and sorry for the noise.

Albert


 
 Regards,
 mpsuzuki
 


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


[ft-devel] How to get the position of a glyph without rendering it

2010-10-19 Thread Albert Astals Cid
Hi, at the moment i am doing

FT_Load_Glyph(face, ...)
FT_Render_Glyph(slot, ...)
int x = -slot-bitmap_left;
int y = slot-bitmap_top;
int w = slot-bitmap.width;
int h = slot-bitmap.rows;

I would like to get a rough idea of x, y, w, h before calling FT_Render_Glyph 
so that if certain conditions are met i don't need to render the glyph

What i have been doing is 

FT_Load_Glyph(face, ...)
FT_Glyph_Metrics *glyphMetrics = (face-glyph-metrics);
int x = round(-glyphMetrics-horiBearingX / 64.0);
int y = round(glyphMetrics-horiBearingY / 64.0);
int w = round(glyphMetrics-width / 64.0);
int h = round(glyphMetrics-height / 64.0);

That code works fine for most of the fonts i tried but now i have encountered 
a case in which 
 round(-glyphMetrics-horiBearingX / 64.0);
is -2 and 
 -slot-bitmap_left;
is 26

So my question is, is my code totally wrong in the sense that what I am trying 
to calculate is not possible without actually rendering the glyph?

Or is it possible and i'm just missing something in my guessing code?

Thanks for the help,
  Albert

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] How to get the position of a glyph without rendering it

2010-10-20 Thread Albert Astals Cid
A Dimecres, 20 d'octubre de 2010, vàreu escriure:
 Hi,
 
 On Wed, 20 Oct 2010 01:29:29 +0100
 
 Albert Astals Cid aa...@kde.org wrote:
 That code works fine for most of the fonts i tried but now i have
 encountered a case in which
 
  round(-glyphMetrics-horiBearingX / 64.0);
 
 is -2 and
 
  -slot-bitmap_left;
 
 is 26
 
 Could you tell me any sample fonts to reproduce
 this issue?
 
 I think, the metric infos available before rendering
 come from metric tables, and the metric infos available
 after the rendering come from glyf table, so there
 can be incompatible values (rather, broken font may
 have different values).

Here some sample code and the font.

Any help more than welcome,
  Albert

 
 Regards,
 mpsuzuki

#include ft2build.h
#include FT_FREETYPE_H
#include FT_OUTLINE_H
#include FT_SIZES_H
#include FT_GLYPH_H

static void eerror(const char *msg, FT_Error e)
{
	printf(%s 0x%0x\n, msg, e);
	exit(1);
}

int main(int argc, char *argv[])
{
	FT_Face face;
	FT_Vector offset;
	FT_GlyphSlot slot;
	FT_UInt gid;
	FT_Matrix matrix;
	FT_Library lib;
	FT_Error e;

	if (e = FT_Init_FreeType(lib))
		eerror(1, e);
	
	if (e = FT_New_Face(lib, font.ttf, 0, face))
		eerror(2, e);
	
	if (e = FT_New_Size(face, face-size))
		eerror(3, e);
	
	if (e = FT_Set_Pixel_Sizes(face, 0, 28))
		eerror(6, e);
	
	matrix.xx = (FT_Fixed)(0);
	matrix.yx = (FT_Fixed)(65536);
	matrix.xy = (FT_Fixed)(-65536);
	matrix.yy = (FT_Fixed)(0);
	offset.x = 0;
	offset.y = 0;
	
	FT_Set_Transform(face, matrix, offset);
	slot = face-glyph;

	gid = (FT_UInt)45;

	if (e = FT_Load_Glyph(face, gid, FT_LOAD_NO_BITMAP))
		eerror(4, e);

	FT_Glyph_Metrics *glyphMetrics = (face-glyph-metrics);
	int x = -glyphMetrics-horiBearingX / 64.0;
	int y = glyphMetrics-horiBearingY / 64.0;
	int w = glyphMetrics-width / 64.0;
	int h = glyphMetrics-height / 64.0;

	if (e = FT_Render_Glyph(slot, ft_render_mode_normal))
		eerror(5, e);

	int x2 = -slot-bitmap_left;
	int y2 = slot-bitmap_top;
	int w2 = slot-bitmap.width;
	int h2 = slot-bitmap.rows;
	
	printf(%d %d\n, x, x2);
	printf(%d %d\n, y, y2);
	printf(%d %d\n, w, w2);
	printf(%d %d\n, h, h2);
}

font.ttf
Description: application/font-ttf
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] How to get the position of a glyph without rendering it

2010-12-04 Thread Albert Astals Cid
A Dimecres, 20 d'octubre de 2010, Albert Astals Cid va escriure:
 A Dimecres, 20 d'octubre de 2010, vàreu escriure:
  Hi,
  
  On Wed, 20 Oct 2010 01:29:29 +0100
  
  Albert Astals Cid aa...@kde.org wrote:
  That code works fine for most of the fonts i tried but now i have
  encountered a case in which
  
   round(-glyphMetrics-horiBearingX / 64.0);
  
  is -2 and
  
   -slot-bitmap_left;
  
  is 26
  
  Could you tell me any sample fonts to reproduce
  this issue?
  
  I think, the metric infos available before rendering
  come from metric tables, and the metric infos available
  after the rendering come from glyf table, so there
  can be incompatible values (rather, broken font may
  have different values).
 
 Here some sample code and the font.

Did you have any change to look at my code/font?

Thanks,
  Albert

 
 Any help more than welcome,
   Albert
 
  Regards,
  mpsuzuki

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


[ft-devel] Font that freetype doesn't want to open

2015-09-16 Thread Albert Astals Cid
Hi, in poppler we have a bug about a pdf that includes this font that freetype 
(also fontforge if it matters) complains.

Is it broken beyond recovery or could freetype be patched up to read it?

The file also includes the Bold variant that freetype loads correctly, i can 
attach it if it helps.

Thanks,
  Albert

VodafoneRg2
Description: application/font-ttf
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Font that freetype doesn't want to open

2015-09-22 Thread Albert Astals Cid
El Dimarts, 22 de setembre de 2015, a les 08:28:16, suzuki toshiya va 
escriure:
> Albert Astals Cid wrote::
> > El Dilluns, 21 de setembre de 2015, a les 13:32:18, suzuki toshiya va
> > 
> > escriure:
> >> However, I don't know how Adobe Reader handles a PDF
> >> including such font.  Yet I'm not sure whether FreeType2
> >> should care, or, poppler should, but, if Adobe Reader opens
> >> it without any font substitution, some fallback should
> >> be considered.  Where can I obtain a sample PDF?
> > 
> > If the font is "unfixable", i guess FreeType is doing the correct thing
> > and
> > just failing, i thought poppler had a "if freetype fails try to get a font
> > from fontconfig", but i'm either wrong or there's a bug in that codepath.
> > 
> > File can be obtained at https://bugs.freedesktop.org/show_bug.cgi?id=92017
> 
> Thanks, I found that Adobe Reader complains the embedded
> font, and the most texts of the PDF are not displayed at
> all (maybe no fallback). The bug submitter compares Okular
> and Google Chrome and maybe thinks Google Chrome loads the
> incompletely-embedded font. Should I check how Google Chrome
> fix this problem?

That'd be great :)

Maybe we can stop CC'ing the freetype list and carry on the discussion on the 
poopler bug? It's probably a bit off topic here now?

Cheers,
  Albert

> 
> Regards,
> mpsuzuki
> 
> > Cheers,
> > 
> >   Albert
> >> 
> >> Regards,
> >> mpsuzuki
> >> 
> >> Werner LEMBERG wrote:
> >>>>> (this is tracing data from the current FreeType git version).
> >>>> 
> >>>> So you're saying we should try to load some other substitute font if
> >>>> we encounter the font that i sent in the first email, right?
> >>> 
> >>> Yes, since the font is broken and can't be sanitized by FreeType.
> >>> 
> >>> Werner
> >>> 
> >>> ___
> >>> Freetype-devel mailing list
> >>> Freetype-devel@nongnu.org
> >>> https://lists.nongnu.org/mailman/listinfo/freetype-devel


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Font that freetype doesn't want to open

2015-09-19 Thread Albert Astals Cid
El Dimecres, 16 de setembre de 2015, a les 23:19:31, Werner LEMBERG va 
escriure:
> > Hi, in poppler we have a bug about a pdf that includes this font
> > that freetype (also fontforge if it matters) complains.
> > 
> > Is it broken beyond recovery or could freetype be patched up to read
> > it?
> 
> Well, the font has no `hmtx' table, which is essential for a TrueType
> font.  It misses a `maxp' table either, BTW.
> 
> > The file also includes the Bold variant that freetype loads
> > correctly, i can attach it if it helps.
> 
> Yes, please do.

I guess this one has the missing tables?

Cheers,
  Albert

> 
> 
> Werner


font_works
Description: application/font-ttf
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Font that freetype doesn't want to open

2015-09-21 Thread Albert Astals Cid
El Dilluns, 21 de setembre de 2015, a les 13:32:18, suzuki toshiya va 
escriure:
> Dear Albert,
> 
> As
> http://www.microsoft.com/typography/otspec/otff.htm#otttables
> says, hmtx is "required" table for self standing font.
> 
> Also
> https://partners.adobe.com/public/developer/en/font/5012.Type42_Spec.pdf
> says, hmtx is "required" table for Type42 embedded font in
> PostScript, and it is also required by CIDFontType2 in PDF, too.
> (see
> http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_
> 1-7.pdf p.468).
> 
> However, I don't know how Adobe Reader handles a PDF
> including such font.  Yet I'm not sure whether FreeType2
> should care, or, poppler should, but, if Adobe Reader opens
> it without any font substitution, some fallback should
> be considered.  Where can I obtain a sample PDF?

If the font is "unfixable", i guess FreeType is doing the correct thing and 
just failing, i thought poppler had a "if freetype fails try to get a font 
from fontconfig", but i'm either wrong or there's a bug in that codepath.

File can be obtained at https://bugs.freedesktop.org/show_bug.cgi?id=92017

Cheers,
  Albert

> 
> Regards,
> mpsuzuki
> 
> Werner LEMBERG wrote:
> >>> (this is tracing data from the current FreeType git version).
> >> 
> >> So you're saying we should try to load some other substitute font if
> >> we encounter the font that i sent in the first email, right?
> > 
> > Yes, since the font is broken and can't be sanitized by FreeType.
> > 
> > Werner
> > 
> > ___
> > Freetype-devel mailing list
> > Freetype-devel@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/freetype-devel


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Font that freetype doesn't want to open

2015-09-19 Thread Albert Astals Cid
El Dissabte, 19 de setembre de 2015, a les 17:15:41, Werner LEMBERG va 
escriure:
> > I guess this one has the missing tables?
> 
> Yep.
> 
> Note that the font from your previous mail is *really* broken!  In
> particular, it has invalid table entries in the SFNT table directory.
> 
>   tagoffsetlength   checksum
>   --
>   cmap  00ac  0556  5392599c
>   cvt   0604  00f6  132205a5
>   fpgm  06fc  0623  76bd44c4
>   glyf  0d20  3d04  63306473
>   head  4a24  0036  e2ca38f5
>   hhea  4a5c  0024  06b70492
> 4a80  08a8  
> 5328      (duplicate, ignored)
> 5328      (duplicate, ignored)
> 5328      (duplicate, ignored)
> 
> (this is tracing data from the current FreeType git version).

So you're saying we should try to load some other substitute font if we 
encounter the font that i sent in the first email, right?

Cheers,
  Albert

> 
> 
> Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


[ft-devel] Freetype fails to build

2018-08-31 Thread Albert Astals Cid
/src/freetype2/src/base/ftobjs.c:365:7: error: non-void function 
'ft_glyphslot_preset_bitmap' should return a value [-Wreturn-type]
  return;

Can anyone fix it?

Cheers,
  Albert



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype fails to build

2018-08-31 Thread Albert Astals Cid
El divendres, 31 d’agost de 2018, a les 22:39:44 CEST, Albert Astals Cid va 
escriure:
> /src/freetype2/src/base/ftobjs.c:365:7: error: non-void function 
> 'ft_glyphslot_preset_bitmap' should return a value [-Wreturn-type]
>   return;

I guess it's my fault for compiling with -Werror, but i guess it's still a 
warning that makes sense to fix.

Cheers,
  Albert

> 
> Can anyone fix it?
> 
> Cheers,
>   Albert
> 
> 
> 
> ___
> Freetype-devel mailing list
> Freetype-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/freetype-devel
> 





___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Can freetype be more tolerant with this font?

2019-01-01 Thread Albert Astals Cid
El dilluns, 31 de desembre de 2018, a les 14:44:10 CET, Alexei Podtelezhnikov 
va escriure:
> > I obviously have no idea how important the check for FT_CURVE_TAG_CUBIC is, 
> > just that for this particular font removing it makes it work.
> 
> Below is the dump of the m outline data. The contour 1 contains a run
> of four control points FT_CURVE_TAG_CUBIC (0x2), which is not how a
> Bezier curve would be specified. I think Freetype is correct to reject
> this font.

Ok, so the font is not correctly formed, but it seems that freetype can still 
render it "just fine".

Personally i think it would be much better if freetype would render the font 
(maybe even with a printf saying "broken font trying to continue") instead of 
"punishing" the person that received a PDF with that font in it by not 
rendering it.

There's that old saying that one should be strict when writing a format but 
flexible when reading the same format for maximum usability.

Cheers,
  Albert

> 
> LinuxBiolinumOItalic Regular loaded...
> Loading Flags: 0x1
> Outline Flags: 0x4
> Contour   0
>   1   x:   458   y:   180   t: 0x1
>   2   x:   465   y:   212   t: 0x2
>   3   x:   475   y:   249   t: 0x2
>   4   x:   482   y:   281   t: 0x1
>   5   x:   484   y:   293   t: 0x2
>   6   x:   485   y:   305   t: 0x2
>   7   x:   486   y:   316   t: 0x1
>   8   x:   540   y:   364   t: 0x2
>   9   x:   566   y:   379   t: 0x2
>  10   x:   603   y:   379   t: 0x1
>  11   x:   657   y:   379   t: 0x2
>  12   x:   672   y:   357   t: 0x2
>  13   x:   658   y:   290   t: 0x1
>  14   x:   635   y:   178   t: 0x1
>  15   x:   620   y:   104   t: 0x2
>  16   x:   608   y:52   t: 0x2
>  17   x:   589   y:-1   t: 0x1
>  18   x:   589   y:-4   t: 0x1
>  19   x:   589   y:-4   t: 0x2
>  20   x:   603   y:-1   t: 0x2
>  21   x:   638   y:-1   t: 0x1
>  22   x:   672   y:-1   t: 0x2
>  23   x:   685   y:-4   t: 0x2
>  24   x:   685   y:-4   t: 0x1
>  25   x:   687   y:-1   t: 0x1
>  26   x:   690   y:56   t: 0x2
>  27   x:   698   y:   102   t: 0x2
>  28   x:   714   y:   178   t: 0x1
>  29   x:   735   y:   278   t: 0x1
>  30   x:   753   y:   367   t: 0x2
>  31   x:   757   y:   437   t: 0x2
>  32   x:   649   y:   437   t: 0x1
>  33   x:   596   y:   437   t: 0x2
>  34   x:   552   y:   419   t: 0x2
>  35   x:   484   y:   361   t: 0x1
>  36   x:   478   y:   411   t: 0x2
>  37   x:   447   y:   437   t: 0x2
>  38   x:   391   y:   437   t: 0x1
>  39   x:   357   y:   437   t: 0x2
>  40   x:   301   y:   422   t: 0x2
>  41   x:   228   y:   347   t: 0x1
>  42   x:   226   y:   350   t: 0x1
>  43   x:   230   y:   393   t: 0x2
>  44   x:   228   y:   425   t: 0x2
>  45   x:   228   y:   425   t: 0x1
>  46   x:   228   y:   435   t: 0x2
>  47   x:   226   y:   435   t: 0x2
>  48   x:   220   y:   435   t: 0x1
>  49   x:   196   y:   425   t: 0x2
>  50   x:   169   y:   417   t: 0x2
>  51   x:   139   y:   414   t: 0x1
>  52   x:   137   y:   411   t: 0x1
>  53   x:   144   y:   365   t: 0x2
>  54   x:   139   y:   308   t: 0x2
>  55   x:   123   y:   233   t: 0x1
>  56   x:   112   y:   178   t: 0x1
>  57   x:96   y:   103   t: 0x2
>  58   x:83   y:52   t: 0x2
>  59   x:64   y:-2   t: 0x1
>  60   x:65   y:-5   t: 0x1
>  61   x:65   y:-5   t: 0x2
>  62   x:83   y:-2   t: 0x2
>  63   x:   114   y:-2   t: 0x1
>  64   x:   145   y:-2   t: 0x2
>  65   x:   161   y:-5   t: 0x2
>  66   x:   161   y:-5   t: 0x1
>  67   x:   164   y:-2   t: 0x1
>  68   x:   168   y:55   t: 0x2
>  69   x:   177   y:   102   t: 0x2
>  70   x:   193   y:   178   t: 0x1
>  71   x:   218   y:   295   t: 0x1
>  72   x:   277   y:   355   t: 0x2
>  73   x:   321   y:   377   t: 0x2
>  74   x:   353   y:   377   t: 0x1
>  75   x:   399   y:   377   t: 0x2
>  76   x:   413   y:   357   t: 0x2
>  77   x:   396   y:   276   t: 0x1
>  78   x:   375   y:   178   t: 0x1
>  79   x:   359   y:   103   t: 0x2
>  80   x:   348   y:52   t: 0x2
>  81   x:   328   y:-2   t: 0x1
>  82   x:   328   y:-5   t: 0x1
>  83   x:   328   y:-5   t: 0x2
>  84   x:   346   y:-2   t: 0x2
>  85   x:   377   y:-2   t: 0x1
>  86   x:   407   y:-2   t: 0x2
>  87   x:   425   y:-5   t: 0x2
>  88   x:   425   y:-5   t: 0x1
>  89   x:   427   y:-2   t: 0x1
>  90   x:   431   y:55   t: 0x2
>  91   x:   440   y:   102   t: 0x2
> Contour   1
>  92   x:   456   y:   178   t: 0x1
>  93   x:   484   y:   358   t: 0x1
>  94   x:   484   y:   358   t: 0x2
>  95   x:   484   y:   358   t: 0x2
>  96   x:   484   y:   360   t: 0x2
>  97   x:   484   y:   360   t: 0x2
> 





___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


[ft-devel] Can freetype be more tolerant with this font?

2018-12-23 Thread Albert Astals Cid
Hi, if try to render this pdf file 
   
https://gitlab.freedesktop.org/poppler/poppler/uploads/0d2f71bf676d3136f8b4ffec534163c0/test.pdf
with poppler you'll see it's missing an m
   https://i.imgur.com/EX6PUym.png

I can "fix" it with this patch

diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index f54ebdf5c..48b351db2 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -221,8 +221,7 @@
 FT_Vector  vec1, vec2;
 
 
-if ( point + 1 > limit ||
- FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
+if ( point + 1 > limit )
   goto Invalid_Outline;
 
 point += 2;

As shown in https://i.imgur.com/a89ECGb.png

I obviously have no idea how important the check for FT_CURVE_TAG_CUBIC is, 
just that for this particular font removing it makes it work.

I'm attaching the extracted font out of the pdf file.

fontforge seems to open it "just fine", though when asked to check errors on 
the paths of 'm' it gives some, but given i'm a total font/fontforge newbie i'm 
not sure how important those are.

Do you think there's a way that freetype can "render" that m? Or should we just 
tell the font authors to fix it?

Cheers,
  Albert

CA+LinuxBiolinumOItalic
Description: application/font-type1
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Can freetype be more tolerant with this font?

2019-01-03 Thread Albert Astals Cid
El dijous, 3 de gener de 2019, a les 3:09:38 CET, Alexei Podtelezhnikov va 
escriure:
> > > Adobe renders this "m".
> >
> > Thanks to all for checking.
> >
> > Alexei, can you take care of this?
> 
> It appears that this got fixed between 2.9.1 and current head, which
> parses and renders "m" just fine. I have no idea what fixed it.

master still has this problem for me.

Can some body else please confirm if the font renders fine for them?

Cheers,
  Albert





___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: Build system considerations

2020-04-30 Thread Albert Astals Cid
El dijous, 30 d’abril de 2020, a les 19:35:19 CEST, Behdad Esfahbod va escriure:
> Hi David,
> 
> Thanks for bringing this up.  I come from the GNOME camp.  My understanding
> is that meson is replacing autotools longterm, sidestepping attempts like
> cmake, the same way that git replaced CVS, sidestepping mercurial, bazaar,
> etc.

I am afraid that is your very biased life bubble.

CMake is the industry standard.

I know comparisons are not easy, but let's search for "project" (a keyword my 
little knowledge of meson says that is present in all meson using projects) in 
meson files in github
https://github.com/search?l=Meson=project=Code
6500 instances

Now let's search for CMAKE_CXX_STANDARD a keyword in CMake used for C++ 
projects (and not even mandatory to use)
https://github.com/search?l=CMake=CMAKE_CXX_STANDARD=Code
246000 instances

And that's not including the C based projects or similar.

I know you don't have to choose build systems based on popularity, but saying 
that meson is sidestepping cmake is far from the truth.

Cheers,
  Albert

> 
> In the latest HarfBuzz release we added a meson build system.  Over the
> next few months I expect us to remove our cmake one and eventually the
> autotools one (which is the "official" one right now).
> 
> Hope that helps,
> behdad
> 
> On Wed, Apr 29, 2020 at 5:34 PM David Turner  wrote:
> 
> > Starting a thread here to discuss potential build system improvements for
> > FreeType.
> >
> > The current FreeType 2 build system has many flaws. To its credit, it was
> > designed in a very different time, when things like CMake / Meson / Ninja/
> > Maven / GN / Bazel didn't even exist, when Autotools was considered the
> > best system to configure your build (ah!), and GNU Make 3.81 was considered
> > new and bleeding edge, and didn't necessarily exist for all platforms. I'm
> > not even sure pkg-config was available on all Linux distros until quite a
> > long time. As I said ... very different times.
> >
> > Despite that, it was also designed to make FreeType buildable on a maximum
> > amount of systems, and I attribute part of its success to that specific
> > feature, especially in the embedded world. While we probably no longer care
> > about developers using DOS and OS/2 systems to build the library, I would
> > really appreciate if any replacement could continue in this direction.
> >
> > I think it would also be acceptable if the build system used to develop
> > FreeType itself, might be different than the one used by other developers
> > that simply want to use it in their own projects. For example something
> > that can build and run tests easily with sanitizers, fuzzing, remote bots
> > and other goodies, or can integrate well with a continuous integration
> > system. While at the same time, being able to generate simple Makefiles /
> > CMakefiles / BUILD / BUILD.gn / whatever corresponding to a specific
> > configuration of the library (which is what 95% of developers using the
> > library need).
> >
> > I have experience with CMake (I find it a vast improvement over auto-tools
> > for package / feature detection, but a hot mess for about anything else),
> > GN/Ninja (very powerful, but essentially requires too much dependencies to
> > get the most out of it) and Bazel (can be hard to get into, very powerful,
> > but requirements are a bit crazy at the moment). I'm curious about Meson.
> >
> > I don't have something specific to propose, but that's my current point of
> > view. I may be wrong or misguided, so please share your feedback in this
> > thread.
> >
> > Let the flame^W war^W games begin :-)
> >
> > - David
> >
> >
> 
> 







Re: Build system considerations

2020-05-01 Thread Albert Astals Cid
El divendres, 1 de maig de 2020, a les 0:52:16 CEST, David Turner va escriure:
> Le jeu. 30 avr. 2020 à 23:33, Albert Astals Cid  a écrit :
> 
> > El dijous, 30 d’abril de 2020, a les 19:35:19 CEST, Behdad Esfahbod va
> > escriure:
> > > Hi David,
> > >
> > > Thanks for bringing this up.  I come from the GNOME camp.  My
> > understanding
> > > is that meson is replacing autotools longterm, sidestepping attempts like
> > > cmake, the same way that git replaced CVS, sidestepping mercurial,
> > bazaar,
> > > etc.
> >
> > I am afraid that is your very biased life bubble.
> 
> I'm not sure you realize that what you wrote sounds insensitive and is
> bordering ad-hominen.
> You could have said that you disagree and that this doesn't match your
> experience for example.
> Instead you tone devalues the point you're trying to make.

I apologize if somebody felt personally wronged by my comment.

Since I don't see anything wrong with it, I would be very happy if you could 
please explain what's wrong with it so I can try to improve myself in the 
future.

Best Regards,
  Albert





Re: [Discussion] Structure of GitLab project

2020-08-23 Thread Albert Astals Cid
El diumenge, 23 d’agost de 2020, a les 18:36:17 CEST, Anurag Thakur va escriure:
> So, with the issue porting nearly done, I would like to start a discussion
> about the structure/workflow of the gitlab project.
> 
> So, Here are some of my suggestions/questions:
> 
> 1. Rename the git project from freetype2 to freetype(i.e. Use
> gitlab.com/freetype/freetype instead of gitlab.com/freetype/freetype2)
> 
> 2. Determine a workflow for the project.(Check if the "git flow" workflow
> would suit the project)
> 
> 3. What should be the format of "new issue" template on gitlab?
> 
> 4. What should be the format of "new merge request" template on gitlab?
> 
> 5. How would the commits be structured in an MR?, will the commit title
> follow a naming convention?
> 
> 6. Determine the permission level for each contributor.(Who are the owners,
> maintainers, developers etc., Do we set an yearly limit on access, hence
> automatically removing access for inactive accounts?)
> 
> 7. Determine the labels available to be applied to issues.
> 
> 8. Determine the function, permission level of freetype-bot in the short as
> well as long term.

Let me suggest:

9. Determine which of the merging strategies you want to use, i.e. which of 
these 3 the project wants to use

https://i.imgur.com/Ev6AYuy.png

Cheers,
  Albert

> 
> 
> I want to make sure that the switch to gitlab enhances productivity,
> improves community interaction, decrease friction for potential
> contributors and leads to a better product in the long run .
> 
> Everyone please send your suggestions/opinion
> 
> Regards,
> Anurag
> 







Re: Migrate to github

2020-08-21 Thread Albert Astals Cid
El dimarts, 18 d’agost de 2020, a les 8:41:09 CEST, Werner LEMBERG va escriure:
> 
> Hello Anurag,
> 
> 
> thanks for your thoughts.
> 
> > *#1: Migrate development over to github:*
> > Host the git repo on GitHub, use the GitHub issues and PR tracker
> > instead of GNU Savannah and e-mail
> 
> No.  We won't migrate to github.  If at all, gitlab would be a
> possible choice.

Just out of curiosity, feel free to not answer.

Any specific reason for github.com being "banned" but gitlab.com being possible?

Both run on non Free Software.

Cheers,
  Albert