[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] FT_New_Memory_Face: get error code 2 on arm
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] FT_New_Memory_Face: get error code 2 on arm |
Date: |
Tue, 13 Mar 2018 22:35:20 +0100 (CET) |
> My test program
> https://paste.ubuntu.com/p/vvwW5bfmrF/
> runs normal on my pc and my cortex-r4 board.
Yes, this looks OK.
> But I get an error code (2) on my M0 board.
> >FT_New_Memory_Face: 2
The error codes are given in file `fterrdef.h'; errorĀ 2 means `unknown
file format'. Maybe an endianness problem while setting up the
external array holding the PCF data?
If you activate debugging with
#define FT_DEBUG_LEVEL_ERROR
#define FT_DEBUG_LEVEL_TRACE
in `ftoption.h', then setting the environment variable `FT2_DEBUG' to
`any:7' you will perhaps get more detailed information on the problem
FreeType has encountered. [In case your environment doesn't have
environment variables you have to adjust `ftdebug.c' accordingly.]
Of course there could also be a bug in FreeType. However, I can't
debug this...
> By the way, the assembly code is broken with thumb2:
> > static __inline FT_Int32
> > FT_MulFix_arm( FT_Int32 a,
> > FT_Int32 b )
> > {
> > FT_Int32 t, t2;
> >
> >
> > __asm
> > {
> > smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
> > mov a, t, asr #31 /* a = (hi >> 31) */
> > add a, a, #0x8000 /* a += 0x8000 */
> > adds t2, t2, a /* t2 += a */
> > adc t, t, #0 /* t += carry */
> > mov a, t2, lsr #16 /* a = t2 >> 16 */
> > orr a, a, t, lsl #16 /* a |= t << 16 */
> > }
> > return a;
> > }
Can you fix it? I have zero knowledge w.r.t. assembler code.
Werner
- [ft-devel] FT_New_Memory_Face: get error code 2 on arm, duhuanpeng, 2018/03/13
- Re: [ft-devel] FT_New_Memory_Face: get error code 2 on arm,
Werner LEMBERG <=
- Re: [ft-devel] FT_New_Memory_Face: get error code 2 on arm, duhuanpeng, 2018/03/14
- Re: [ft-devel] FT_New_Memory_Face: get error code 2 on arm, Werner LEMBERG, 2018/03/14
- Re: [ft-devel] FT_New_Memory_Face: get error code 2 on arm, Werner LEMBERG, 2018/03/14
- Re: [ft-devel] FT_New_Memory_Face: get error code 2 on arm, duhuanpeng, 2018/03/14
- Message not available
- Message not available
- Message not available
- Re: [ft-devel] FT_New_Memory_Face: get error code 2 on arm, Alexei Podtelezhnikov, 2018/03/14
- Re: [ft-devel] FT_New_Memory_Face: get error code 2 on arm, duhuanpeng, 2018/03/14
- Re: [ft-devel] FT_New_Memory_Face: get error code 2 on arm, duhuanpeng, 2018/03/14