android build error
build/core/binary.mk:664: warning: overriding commands for target `out/host/linux-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates/proto/frameworks/base/tools/aapt2/Format.pb.cc' build/core/binary.mk:664: warning: ignoring old commands for target `out/host/linux-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates/proto/frameworks/base/tools/aapt2/Format.pb.cc' build/core/binary.mk:668: warning: overriding commands for target `out/host/linux-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates/proto/frameworks/base/tools/aapt2/Format.pb.h' build/core/binary.mk:668: warning: ignoring old commands for target `out/host/linux-x86/gen/STATIC_LIBRARIES/libaapt2_intermediates/proto/frameworks/base/tools/aapt2/Format.pb.h' Starting build with ninja ninja: Entering directory `.' [ 0% 1/34761] Lex: libaidl-common <= system/tools/aidl/aidl_language_l.ll FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll" flex-2.5.39: fatal internal error, exec of /usr/bin/m4 failed ninja: build stopped: subcommand failed. build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1 #### make failed to build some targets (29 seconds) ####
flex-2.5.39: fatal internal error, exec of /usr/bin/m4 failed
$ m4 The program 'm4' is currently not installed. You can install it by typing: sudo apt install m4
Preparing to Build | Android Open Source Project
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \ lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \ libgl1-mesa-dev libxml2-utils xsltproc unzip
FT_GLYPH_FORMAT_COMPOSITE
FT_GLYPH_FORMAT_COMPOSITE The glyph image is a composite of several other images. This format is only used with FT_LOAD_NO_RECURSE, and is used to report compound glyphs (like accented characters).
2453 FT_LOCAL_DEF( FT_Error ) 2454 TT_Load_Glyph( TT_Size size, 2455 TT_GlyphSlot glyph, 2456 FT_UInt glyph_index, 2457 FT_Int32 load_flags ) 2458 { 2459 FT_Error error; 2460 TT_LoaderRec loader; 2461 2462 2463 FT_TRACE1(( "TT_Load_Glyph: glyph index %d\n", glyph_index )); 2464 2465 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS 2501 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ 2502 2503 /* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */ 2504 if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.valid ) 2505 return FT_THROW( Invalid_Size_Handle ); 2506 2507 if ( load_flags & FT_LOAD_SBITS_ONLY ) 2508 return FT_THROW( Invalid_Argument ); 2509 2510 error = tt_loader_init( &loader, size, glyph, load_flags, FALSE ); 2511 if ( error ) 2512 return error; 2513 2514 glyph->format = FT_GLYPH_FORMAT_OUTLINE; 2515 glyph->num_subglyphs = 0; 2516 glyph->outline.flags = 0; 2517 2518 /* main loading loop */ 2519 error = load_truetype_glyph( &loader, glyph_index, 0, FALSE ); 2520 if ( !error ) 2521 { 2522 if ( glyph->format == FT_GLYPH_FORMAT_COMPOSITE ) 2523 { 2524 glyph->num_subglyphs = loader.gloader->base.num_subglyphs; 2525 glyph->subglyphs = loader.gloader->base.subglyphs; 2526 } 2527 else 2528 { 2529 glyph->outline = loader.gloader->base.outline; 2530 glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS; 2531 2532 /* Translate array so that (0,0) is the glyph's origin. Note */ 2533 /* that this behaviour is independent on the value of bit 1 of */ 2534 /* the `flags' field in the `head' table -- at least major */ 2535 /* applications like Acroread indicate that. */ 2536 if ( loader.pp1.x ) 2537 FT_Outline_Translate( &glyph->outline, -loader.pp1.x, 0 ); 2538 } 2539 2540 #ifdef TT_USE_BYTECODE_INTERPRETER 2572 #endif /* TT_USE_BYTECODE_INTERPRETER */ 2573 2574 error = compute_glyph_metrics( &loader, glyph_index ); 2575 } 2576 2577 /* Set the `high precision' bit flag. */ 2578 /* This is _critical_ to get correct output for monochrome */ 2579 /* TrueType glyphs at all sizes using the bytecode interpreter. */ 2580 /* */ 2581 if ( !( load_flags & FT_LOAD_NO_SCALE ) && 2582 size->root.metrics.y_ppem < 24 ) 2583 glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION; 2584 2585 return error; 2586 } 2587
composite glyph
1655 /* otherwise, load a composite! */ 1656 else if ( loader->n_contours == -1 ) 1657 { 1658 FT_UInt start_point; 1659 FT_UInt start_contour; 1660 FT_ULong ins_pos; /* position of composite instructions, if any */ 1661 1662 1663 start_point = (FT_UInt)gloader->base.outline.n_points; 1664 start_contour = (FT_UInt)gloader->base.outline.n_contours; 1665 1666 /* for each subglyph, read composite header */ 1667 error = face->read_composite_glyph( loader ); 1668 if ( error ) 1669 goto Exit; 1670 1671 /* store the offset of instructions */ 1672 ins_pos = loader->ins_pos; 1673 1674 /* all data we need are read */ 1675 face->forget_glyph_frame( loader ); 1676 opened_frame = 0; 1677 1678 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT 1784 #endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */ 1785 1786 /* scale phantom points, if necessary; */ 1787 /* they get rounded in `TT_Hint_Glyph' */ 1788 if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ) 1789 { 1790 loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale ); 1791 loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale ); 1792 /* pp1.y and pp2.y are always zero */ 1793 1794 loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale ); 1795 loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale ); 1796 loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale ); 1797 loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale ); 1798 } 1799 1800 /* if the flag FT_LOAD_NO_RECURSE is set, we return the subglyph */ 1801 /* `as is' in the glyph slot (the client application will be */ 1802 /* responsible for interpreting these data)... */ 1803 if ( loader->load_flags & FT_LOAD_NO_RECURSE ) 1804 { 1805 FT_GlyphLoader_Add( gloader ); 1806 loader->glyph->format = FT_GLYPH_FORMAT_COMPOSITE; 1807 1808 goto Exit; 1809 } 1810 1811 /*********************************************************************/ 1812 /*********************************************************************/ 1813 /*********************************************************************/ 1814 1815 { 1816 FT_UInt n, num_base_points; 1817 FT_SubGlyph subglyph = NULL; 1818 1819 FT_UInt num_points = start_point; 1820 FT_UInt num_subglyphs = gloader->current.num_subglyphs; 1821 FT_UInt num_base_subgs = gloader->base.num_subglyphs; 1822 1823 FT_Stream old_stream = loader->stream; 1824 FT_Int old_byte_len = loader->byte_len; 1825 1826 1827 FT_GlyphLoader_Add( gloader ); 1828 1829 /* read each subglyph independently */ 1830 for ( n = 0; n < num_subglyphs; n++ ) 1831 { 1832 FT_Vector pp[4]; 1833 1834 1835 /* Each time we call load_truetype_glyph in this loop, the */ 1836 /* value of `gloader.base.subglyphs' can change due to table */ 1837 /* reallocations. We thus need to recompute the subglyph */ 1838 /* pointer on each iteration. */ 1839 subglyph = gloader->base.subglyphs + num_base_subgs + n; 1840 1841 pp[0] = loader->pp1; 1842 pp[1] = loader->pp2; 1843 pp[2] = loader->pp3; 1844 pp[3] = loader->pp4; 1845 1846 num_base_points = (FT_UInt)gloader->base.outline.n_points; 1847 1848 error = load_truetype_glyph( loader, 1849 (FT_UInt)subglyph->index, 1850 recurse_count + 1, 1851 FALSE ); 1852 if ( error ) 1853 goto Exit; 1854 1855 /* restore subglyph pointer */ 1856 subglyph = gloader->base.subglyphs + num_base_subgs + n; 1857 1858 /* restore phantom points if necessary */ 1859 if ( !( subglyph->flags & USE_MY_METRICS ) ) 1860 { 1861 loader->pp1 = pp[0]; 1862 loader->pp2 = pp[1]; 1863 loader->pp3 = pp[2]; 1864 loader->pp4 = pp[3]; 1865 } 1866 1867 num_points = (FT_UInt)gloader->base.outline.n_points; 1868 1869 if ( num_points == num_base_points ) 1870 continue; 1871 1872 /* gloader->base.outline consists of three parts: */ 1873 /* 0 -(1)-> start_point -(2)-> num_base_points -(3)-> n_points. */ 1874 /* */ 1875 /* (1): exists from the beginning */ 1876 /* (2): components that have been loaded so far */ 1877 /* (3): the newly loaded component */ 1878 error = TT_Process_Composite_Component( loader, 1879 subglyph, 1880 start_point, 1881 num_base_points ); 1882 if ( error ) 1883 goto Exit; 1884 } 1885 1886 loader->stream = old_stream; 1887 loader->byte_len = old_byte_len; 1888 1889 /* process the glyph */ 1890 loader->ins_pos = ins_pos; 1891 if ( IS_HINTED( loader->load_flags ) && 1892 #ifdef TT_USE_BYTECODE_INTERPRETER 1893 subglyph->flags & WE_HAVE_INSTR && 1894 #endif 1895 num_points > start_point ) 1896 { 1897 error = TT_Process_Composite_Glyph( loader, 1898 start_point, 1899 start_contour ); 1900 if ( error ) 1901 goto Exit; 1902 } 1903 } 1904 } 1905 else 1906 { 1907 /* invalid composite count (negative but not -1) */ 1908 error = FT_THROW( Invalid_Outline ); 1909 goto Exit; 1910 } 1911 1912 /***********************************************************************/ 1913 /***********************************************************************/ 1914 /***********************************************************************/ 1915 1916 Exit: 1917 1918 if ( opened_frame ) 1919 face->forget_glyph_frame( loader ); 1920 1921 #ifdef FT_CONFIG_OPTION_INCREMENTAL 1922 1923 if ( glyph_data_loaded ) 1924 face->root.internal->incremental_interface->funcs->free_glyph_data( 1925 face->root.internal->incremental_interface->object, 1926 &glyph_data ); 1927 1928 #endif 1929 1930 return error; 1931 } ||< ></blockquote>< *1453964722*[truetype]maxComponentDepth maxComponentDepthの定義が、MSとAppleで違う。 >|| Microsoftの場合: USHORT maxComponentDepth Maximum levels of recursion; 1 for simple components.Appleの場合: uint16 maxComponentDepth levels of recursion, set to 0 if font has only simple glyphsFreetypeのチェック
1423 /* some fonts have an incorrect value of `maxComponentDepth', */ 1424 /* thus we allow depth 1 to catch the majority of them */ 1425 if ( recurse_count > 1 && 1426 recurse_count > face->max_profile.maxComponentDepth ) 1427 { 1428 error = FT_THROW( Invalid_Composite ); 1429 goto Exit; 1430 }maxp - Maximum Profile
Version 1.0 Type Name Description Fixed Table version number 0x00010000 for version 1.0. USHORT numGlyphs The number of glyphs in the font. USHORT maxPoints Maximum points in a non-composite glyph. USHORT maxContours Maximum contours in a non-composite glyph. USHORT maxCompositePoints Maximum points in a composite glyph. USHORT maxCompositeContours Maximum contours in a composite glyph. USHORT maxZones 1 if instructions do not use the twilight zone (Z0), or 2 if instructions do use Z0; should be set to 2 in most cases. USHORT maxTwilightPoints Maximum points used in Z0. USHORT maxStorage Number of Storage Area locations. USHORT maxFunctionDefs Number of FDEFs, equals to the highest function number + 1. USHORT maxInstructionDefs Number of IDEFs. USHORT maxStackElements Maximum stack depth2. USHORT maxSizeOfInstructions Maximum byte count for glyph instructions. USHORT maxComponentElements Maximum number of components referenced at ???top level??? for any composite glyph. USHORT maxComponentDepth Maximum levels of recursion; 1 for simple components.The maxp Table Type Name Description Fixed version 0x00010000 (1.0) uint16 numGlyphs the number of glyphs in the font uint16 maxPoints points in non-compound glyph uint16 maxContours contours in non-compound glyph uint16 maxComponentPoints points in compound glyph uint16 maxComponentContours contours in compound glyph uint16 maxZones set to 2 uint16 maxTwilightPoints points used in Twilight Zone (Z0) uint16 maxStorage number of Storage Area locations uint16 maxFunctionDefs number of FDEFs uint16 maxInstructionDefs number of IDEFs uint16 maxStackElements maximum stack depth uint16 maxSizeOfInstructions byte count for glyph instructions uint16 maxComponentElements number of glyphs referenced at top level uint16 maxComponentDepth levels of recursion, set to 0 if font has only simple glyphs