コード例 #1
0
        // TODO: Good to expose FontUtil.h.
        public bool analyzeStyle(MinikinFont typeface, ref int weight, ref bool italic)
        {
            std::lock_guard <std::recursive_mutex> _l = new std::lock_guard <std::recursive_mutex>(gMinikinLock);
            uint   os2Tag   = MinikinFont.MakeTag('O', 'S', '/', '2');
            HbBlob os2Table = new HbBlob(getFontTable(typeface.get(), new uint(os2Tag)));

            if (os2Table.get() == null)
            {
                return(false);
            }
            return(global::minikin.analyzeStyle(os2Table.get(), os2Table.size(), weight, italic));
        }
コード例 #2
0
        //C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#:
        //ORIGINAL LINE: ClassicUnorderedSet<AxisTag> getSupportedAxesLocked() const;
        public HashSet <AxisTag> getSupportedAxesLocked()
        {
            uint   fvarTag   = MinikinFont.MakeTag('f', 'v', 'a', 'r');
            HbBlob fvarTable = new HbBlob(getFontTable(typeface.get(), new uint(fvarTag)));

            if (fvarTable.size() == 0)
            {
                return(new HashSet <AxisTag>());
            }

            HashSet <AxisTag> supportedAxes = new HashSet <AxisTag>();

            analyzeAxes(fvarTable.get(), fvarTable.size(), supportedAxes);
            return(supportedAxes);
        }