Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insert characters at the cursor and run to another location #4374

Closed
sujiangyin opened this issue Sep 1, 2020 · 8 comments
Closed

insert characters at the cursor and run to another location #4374

sujiangyin opened this issue Sep 1, 2020 · 8 comments

Comments

@sujiangyin
Copy link

i found the same problem,there are reason for:
This happens because the font is not monospace, ace supports only monospace fonts for now.

how to set the right font in windows?

@sujiangyin
Copy link
Author

i found the same problem,there are reason for:
This happens because the font is not monospace, ace supports only monospace fonts for now.

how to set the right font in windows?

everybody can give me one answer?help please

@nightwing
Copy link
Member

Do you see the issue on https://ace.c9.io/? If no some css rule on your page may be changing the font. try finding that rule,

@sujiangyin
Copy link
Author

sujiangyin commented Sep 8, 2020

Do you see the issue on https://ace.c9.io/? If no some css rule on your page may be changing the font. try finding that rule,

on https://ace.c9.io/ everything is normal,on my page i had cover the css rule like:

.ace-container {
    font-family: 'Monaco';
    
	@font-face {
		font-family: 'Monaco';
                src: url('Monaco.ttf');
                font-weight: normal;
               font-style: normal;
	}
}
.ace_editor {
    font-family: 'Monaco';
	@font-face {
		font-family: 'Monaco';
                src: url('Monaco.ttf');
                font-weight: normal;
                font-style: normal;
	}
}

but not help,the font may had used,but still not right. i think it may be reason by the wrong font file i download?do you kown where to download the right font file ttf? or some other reason you know? thank.

@sujiangyin
Copy link
Author

Do you see the issue on https://ace.c9.io/? If no some css rule on your page may be changing the font. try finding that rule,

on https://ace.c9.io/ everything is normal,on my page i had cover the css rule like:

.ace-container {
    font-family: 'Monaco';
    
	@font-face {
		font-family: 'Monaco';
                src: url('Monaco.ttf');
                font-weight: normal;
               font-style: normal;
	}
}
.ace_editor {
    font-family: 'Monaco';
	@font-face {
		font-family: 'Monaco';
                src: url('Monaco.ttf');
                font-weight: normal;
                font-style: normal;
	}
}

but not help,the font may had used,but still not right. i think it may be reason by the wrong font file i download?do you kown where to download the right font file ttf? or some other reason you know? thank.

i found the problem。now i can use monaco.ttf cover my font,but manaco it have the same bug.i use Font detection tool to find what font is used. now,what font is right?manaco or monospace?

@sujiangyin
Copy link
Author

Do you see the issue on https://ace.c9.io/? If no some css rule on your page may be changing the font. try finding that rule,

on https://ace.c9.io/ everything is normal,on my page i had cover the css rule like:

.ace-container {
    font-family: 'Monaco';
    
	@font-face {
		font-family: 'Monaco';
                src: url('Monaco.ttf');
                font-weight: normal;
               font-style: normal;
	}
}
.ace_editor {
    font-family: 'Monaco';
	@font-face {
		font-family: 'Monaco';
                src: url('Monaco.ttf');
                font-weight: normal;
                font-style: normal;
	}
}

but not help,the font may had used,but still not right. i think it may be reason by the wrong font file i download?do you kown where to download the right font file ttf? or some other reason you know? thank.

i found the problem。now i can use monaco.ttf cover my font,but manaco it have the same bug.i use Font detection tool to find what font is used. now,what font is right?manaco or monospace?

i had tried manaco and monospace fonts,only manaco.ttf take effect,monospace's ttf not effect. can you give a right monospace's ttf file ,where to download??
i tried http://xiazai.zol.com.cn/detail/46/457577.shtml ,but it not right

@sujiangyin
Copy link
Author

Do you see the issue on https://ace.c9.io/? If no some css rule on your page may be changing the font. try finding that rule,

new finds,i use my Font detection tool to detect the font on https://ace.c9.io/build/kitchen-sink.html,it use the font consola,but that not found any bug,and i replace my project font to consola, it still exist,why?

@sujiangyin
Copy link
Author

Do you see the issue on https://ace.c9.io/? If no some css rule on your page may be changing the font. try finding that rule,

new finds,i use my Font detection tool to detect the font on https://ace.c9.io/build/kitchen-sink.html,it use the font consola,but that not found any bug,and i replace my project font to consola, it still exist,why?

there is all my config:

`let ace = require('ace-builds');
require("ace-builds/src-min-noconflict/mode-json5");
require("ace-builds/src-min-noconflict/theme-monokai");
require("ace-builds/src-min-noconflict/ext-searchbox");

        require("ace-builds/src-min-noconflict/ext-language_tools");
        // require("ace-builds/src-min-noconflict/ext-spellcheck");
        // require("ace-builds/src-min-noconflict/ext-beautify");
        // require("ace-builds/src-min-noconflict/ext-emmet");
        //  require("ace-builds/src-min-noconflict/ext-error_marker");
        // require("ace-builds/src-min-noconflict/ext-static_highlight");

        this.aceEditor = ace.edit(this.$refs.ace, {
            fontSize: 12, // 编辑器内字体大小
            theme: this.themePath, // 默认设置的主题
            mode: this.modePath, // 默认设置的语言模式
            tabSize: 2, // 制表符设置为 4 个空格大小
            // highlightActiveLine: true,
            value: this.codeValue,
            // autoScrollEditorIntoView: true,
            maxLines: 26,
            minLines: 26
        });
        // this.aceEditor.find('ops-coffee', {  
        //     backwards: false,  
        //     wrap: false,  
        //     caseSensitive: false,  
        //     wholeWord: false,  
        //     regExp: false  
        // });  
        this.aceEditor.session.setMode('ace/mode/json5');
        this.aceEditor.setOptions({
            enableBasicAutocompletion: true,
            enableSnippets: true,
            enableLiveAutocompletion: true
        });
        // 高亮显示搜索到的内容
        this.aceEditor.findAll();
        // this.aceEditor.replace('ops-coffee.cn'); 
        // this.aceEditor.replaceAll('ops-coffee.cn');
        this.aceEditor.setShowPrintMargin(false); //设置打印线`

@andrewnester
Copy link
Contributor

Duplicate of this #460

@andrewnester andrewnester closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants