예제 #1
0
        public int sceFontFindFont(FontLibraryHandle libHandle, FontStyle *fontStyle, uint *errorCode)
        {
            throw(new NotImplementedException());

            /*
             * errorCode = 0;
             * return 0;
             */
        }
        //[HlePspNotImplemented]
        public int sceFontFindFont(FontLibrary FontLibrary, FontStyle *FontStylePointer, uint *ErrorCode)
        {
            var FontRegistry = FontLibrary.FontRegistryList
                               .OrderByDescending(Entry => FontStyle.GetScoreCompare(Entry.FontStyle, *FontStylePointer)).First();
            var FontIndex = FontLibrary.FontRegistryList.IndexOf(FontRegistry);

            *ErrorCode = 0;
            return(FontIndex);
        }
        public int sceFontGetFontList(FontLibrary FontLibrary, FontStyle *FontStylesPointer,
                                      int MaximumNumberOfFontsToGet)
        {
            int NumberOfFontsReturned = Math.Min(MaximumNumberOfFontsToGet, FontLibrary.FontRegistryList.Count);

            for (int n = 0; n < NumberOfFontsReturned; n++)
            {
                FontStylesPointer[n] = FontLibrary.FontRegistryList[n].FontStyle;
            }
            return(NumberOfFontsReturned);
        }
예제 #4
0
        public int sceFontFindOptimumFont(FontLibraryHandle libHandle, FontStyle *fontStyle, uint *errorCode)
        {
            return(0);
            //throw(new NotImplementedException());

            /*
             * unimplemented_notice();
             *
             * errorCode = 0;
             * return 1;
             */
        }
예제 #5
0
        public int sceFontGetFontList(FontLibraryHandle libHandle, FontStyle *fontStyles, int numFonts)
        {
            throw (new NotImplementedException());

            /*
             * unimplemented_notice();
             *
             * FontLibrary fontLibrary = uniqueIdFactory.get!FontLibrary(libHandle);
             * fontStyles[0..numFonts] = fontLibrary.fontStyles[0..numFonts];
             * return 0;
             */
        }
 //[HlePspNotImplemented]
 public int sceFontFindOptimumFont(FontLibrary FontLibrary, FontStyle *FontStylePointer, uint *ErrorCode)
 {
     return(sceFontFindFont(FontLibrary, FontStylePointer, ErrorCode));
 }