ae 10修改字体大小和名称

来自:http://forums.arcgis.com/threads/43934-Setting-the-Color-of-a-TextSymbol

public void DrawText( IActiveView view, string text, string fontName, int fontColor, float fontSize, IPoint point ) {         
    ITextSymbol textSymbol = new TextSymbol();         
    stdole.IFontDisp font = textSymbol.Font;        
    font.Name = fontName;        
    font.Size = (decimal)fontSize;        
    textSymbol.Font = font;         
    IColor color = textSymbol.Color;        
    color.RGB = fontColor;        
    textSymbol.Color = color;         
    ITextElement textElement = new TextElementClass();        
    textElement.Text = text;        
    textElement.Symbol = textSymbol;        
    textElement.ScaleText = true;         
    IElement element = textElement as IElement;        
    element.Geometry = point;         
    view.GraphicsContainer.AddElement( element, 0 );         
    view.PartialRefresh( esriViewDrawPhase.esriViewGraphics, element, null );    
}

你可能感兴趣的:(字体)