のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

2016-01-01から1ヶ月間の記事一覧

PtrToStructure

c# C#

ポインタから構造体へ Marshal.PtrToStructureを使います。

'System.TypeLoadException'

型 'System.TypeLoadException' のハンドルされていない例外が mscorlib.dll で発生しました 追加情報:型 'SharpFont.TrueType.Internal.HeaderRec' の フィールド 'Created' をマーシャリングできません: 無効なマネージ/アンマネージ型の組み合わせです。 …

GetSfntTable

public object GetSfntTable(SfntTag tag) { IntPtr tableRef = FT.FT_Get_Sfnt_Table(Reference, tag); if (tableRef == IntPtr.Zero) return null; switch (tag) { case SfntTag.Header: return new Header(tableRef); case SfntTag.HorizontalHeader: ret…

SetLastError

このMarshal.GetLastWin32Errorメソッドが使えるのは、呼び出すWin32 APIの定義で、DllImport属性(System.Runtime.InteropServices名前空間)のSetLastErrorフィールドに「true」が設定されている場合のみだ(デフォルトでは「false」)。

DllImport Charset.Auto

C#

CharSet.Auto プラットフォーム呼び出しでは、対象となるプラットフォームに応じて、実行時に ANSI 形式または Unicode 形式を選択します。

CS1591

プロジェクト>プロパティ>ビルド>出力:XMLドキュメントファイルのチェックをはずす。 その設定のファイル名を空にすれば XML コメント出力の機能は Off になります。

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_Loa…

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_poi…

TT_CONFIG_OPTION_EMBEDDED_BITMAPS

30 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS 31 #include "pngshim.c" 32 #include "ttsbit.c" 33 #endif

FT_DEFINE_SFNT_INTERFACE

565 #ifndef FT_CONFIG_OPTION_PIC 566 567 #define FT_DEFINE_SFNT_INTERFACE( \ 568 class_, \ 569 goto_table_, \ 570 init_face_, \ 571 load_face_, \ 572 done_face_, \ 573 get_interface_, \ 574 load_any_, \ 575 load_head_, \ 576 load_hhea_, \ …

ebdt

460 FT_DEFINE_SFNT_INTERFACE( 461 sfnt_interface, 462 tt_face_goto_table, 463 464 sfnt_init_face, 465 sfnt_load_face, 466 sfnt_done_face, 467 sfnt_get_interface, 468 469 tt_face_load_any, 470 471 tt_face_load_head, 472 tt_face_load_hhea, 4…

EBDT

static FT_Error tt_sbit_decoder_load_bitmap( TT_SBitDecoder decoder, FT_UInt glyph_format, FT_ULong glyph_start, FT_ULong glyph_size, FT_Int x_pos, FT_Int y_pos ) { FT_Error error; FT_Stream stream = decoder->stream; FT_Byte* p; FT_Byte* p…

ebdt

static void ShowGlyph(FILE *ttf,long offset,long len,int imageFormat, struct ttfinfo *info) { int h,w,sbX,sbY,advance; int i,j,k,ch; long here; if ( imageFormat!=1 && imageFormat!=2 ) return; here = ftell(ttf); fseek(ttf,info->bitmapdata_s…

showttf

fontforge/contrib/fonttools/showttf.c

ttx -t EBDT -z bitwise

$ ttx -t EBDT -z bitwise MS-Gothic.ttf Dumping "MS-Gothic.ttf" to "MS-Gothic#7.ttx"... Dumping 'EBDT' table... Traceback (most recent call last): File "/Users/m_fujii/bin/FDK/Tools/osx/../SharedData/FDKScripts/ttx.py", line 13, in <module> ttx.mai</module>…

ttx -t EBDT -z row

$ ttx -t EBDT -z row MS-Gothic.ttf Dumping "MS-Gothic.ttf" to "MS-Gothic#5.ttx"... Dumping 'EBDT' table... Traceback (most recent call last): File "/Users/m_fujii/bin/FDK/Tools/osx/../SharedData/FDKScripts/ttx.py", line 13, in <module> ttx.main(sy</module>…

ttx EBDT

$ ttx -t EBDT -z raw MS-Gothic.ttf Dumping "MS-Gothic.ttf" to "MS-Gothic#2.ttx"... Dumping 'EBDT' table... $ vi MS-Gothic#2.ttx <ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="2.5"> <EBDT> <header version="2.0"/> <strikedata index="0"> </strikedata></header></ebdt></ttfont>

otc2otf

$ otc2otf msgothic.ttc Input font: msgothic.ttc Output font: MS-Gothic.ttf Output font: MS-UIGothic.ttf Output font: MS-PGothic.ttf Done$ ttx MS-Gothic.ttf Dumping "MS-Gothic.ttf" to "MS-Gothic.ttx"... Dumping 'GlyphOrder' table... Dumping…

truetype cmap format 4

<cmap> <tableVersion version="0"/> <cmap_format_4 platformID="0" platEncID="3" language="0"> <map code="0x20" name="uni00A0"/> <map code="0x21" name="exclam"/> <map code="0x22" name="quotedbl"/> <map code="0x23" name="numbersign"/></map></map></map></map></cmap_format_4></tableversion></cmap>

Skype For Businessで音声にノイズがでる

Skype For Businessで会議をしたとき、音声にノイズがのったままになった。 音声のノイズは、アナログのジーっというおとが出続けている感じです。 使っていたヘッドセットは、”サンワサプライ USBヘッドセット MM-HSUSB13BK”です。サンワサプライ USBヘッド…

truetype cmap format 2 その2

Freetype2の場合: ※TT_PEAK_USHORTの場合、ポインタの場所を読む。(ポインタは進めない。) ※TT_NEXT_USHORTの場合、ポインタの場所を読み、ポインタを進める。 391 /* return sub header corresponding to a given character code */ 392 /* NULL on inval…

truetype cmap format 2

/** * Read a format 2 subtable. * * @param data the data stream of the to be parsed ttf font * @param numGlyphs number of glyphs to be read * @throws IOException If there is an error parsing the true type font. */ protected void processSub…

mac opengrok

$ brew install tomcat Error: tomcat-8.0.26 already installed To install this version, first `brew unlink tomcat'$ brew install ctags Warning: ctags-5.8_1 already installed$ wget -O - http://java.net/projects/opengrok/downloads/download/ope…

PTVS2.2をインストールしようとしたところエラー

Visual Studio Community 2015でPythonの機能を追加するために、PTVS2.2をインストールしたところ、以下のエラーになった。 セットアップがブロックされました。 以下の問題を修正してから、セットアップを再度実行してください。 詳細については、一般的な…

bad char in struct format

bad char in struct format-Data = struct.unpack_from('>4s>H>H>H>H', data, offset) Data = struct.unpack_from('>4sHHHH', data, offset)struct.error: bad char in struct format

Can't convert 'bytes' object to str implicitly

Can't convert 'bytes' object to str implicitly Data = struct.unpack_from("<4sHHHH", data, offset) -print("sfntVersion: "+ Data[0]) +print("sfntVersion:", Data[0][0:3])

repeat count given without format specifier

repeat count given without format specifier-Data1 = struct.unpack_from("

unpack requires a bytes object of length 16

struct: unpack Requires String Argument of Length 16

'cp932' codec can't decode byte 0x84 in position 115: illegal multibyte sequence

'cp932' codec can't decode byte 0x84 in position 115: illegal multibyte sequenceバイナリーモードで開くようにした。 -infile = open("arial.ttf", 'r') +infile = open("arial.ttf", 'rb')

ノートン拡張機能のエラー

どうするとこのエラーになるんだろう? 原因がよくわからない。 Chromeに対するノートンの拡張機能はノートンセキュリティアプリケーションと通信できませんでした。The Norton extension for Safari cannot communicate with the Norton Security applicati…