Ticket #8300: cannaim.patch

File cannaim.patch, 2.4 KB (added by mt, 12 years ago)
  • src/add-ons/input_server/methods/canna/CannaInterface.cpp

    diff --git a/src/add-ons/input_server/methods/canna/CannaInterface.cpp b/src/add-ons/input_server/methods/canna/CannaInterface.cpp
    index 3cdbbee..1fb2af3 100644
    a b SERIAL_PRINT(( "CannaInterface: GenerateKouhoStr() revPos = %d, revLen = %d, mod  
    593593                && kouhoRevLine != -1)
    594594            || current_mode == CANNA_MODE_TourokuDicMode
    595595            || current_mode == CANNA_MODE_BushuMode) {
    596             // remove first index
    597             memmove(kouhoUTF, kouhoUTF + 2, kouhoUTFLen - 1);
     596            // remove first index (3 bytes)
     597            memmove(kouhoUTF, kouhoUTF + 3, kouhoUTFLen - 2);
    598598
    599             // convert full-space to LF
     599            // convert full width space and following 3 bytes index to LF
    600600            while ((index = strstr(kouhoUTF, "\xe3\x80\x80")) != NULL) {
    601601                *index = '\x0a';
    602602                len = strlen(index);
    603                 memmove(index + 1, index + 5, len - 4);
     603                memmove(index + 1, index + 6, len - 5);
    604604            }
    605605            kouhoUTFLen = strlen(kouhoUTF);
    606606        }
  • src/add-ons/input_server/methods/canna/CannaLooper.cpp

    diff --git a/src/add-ons/input_server/methods/canna/CannaLooper.cpp b/src/add-ons/input_server/methods/canna/CannaLooper.cpp
    index 1d5641d..db7fc80 100644
    a b CannaLooper::ReadSettings(char* basePath)  
    109109
    110110    font_family family;
    111111    font_style style;
    112     strcpy(family, "Haru");
    113     strcpy(style, "Regular");
     112    strcpy(family, "VL PGothic");
     113    strcpy(style, "regular");
    114114
    115115    fKouhoFont.SetFamilyAndStyle(family, style);
    116116    fKouhoFont.SetSize(12);
  • src/add-ons/input_server/methods/canna/KouhoWindow.cpp

    diff --git a/src/add-ons/input_server/methods/canna/KouhoWindow.cpp b/src/add-ons/input_server/methods/canna/KouhoWindow.cpp
    index 2bc2f46..38cc36e 100644
    a b KouhoWindow::KouhoWindow( BFont *font, BLooper *looper )  
    3333
    3434    font_family family;
    3535    font_style style;
    36     strcpy( family, "Haru" );
    37     strcpy( style, "Regular" );
     36    strcpy( family, "VL PGothic" );
     37    strcpy( style, "regular" );
    3838    indexfont.SetFamilyAndStyle( family, style );
    3939    indexfont.SetSize( 10 );
    4040
    void KouhoView::HighlightLine( int32 line )  
    271271        highlightRect = region.RectAt( 0 );
    272272        //extend highlihght region to right end
    273273        highlightRect.right = Bounds().right;
    274         Invalidate( highlightRect );
    275 
     274        Invalidate();
    276275    }
    277276
    278277}